Ticket #1 (new defect)

Opened 5 years ago

Accessing undefined value in DiffArray returns misleading error message

Reported by: igloo Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

Originally reported here: http://hackage.haskell.org/trac/ghc/ticket/1259

Prelude> :m + Data.Array.Diff
Prelude Data.Array.Diff> :t array
array :: (Ix i, IArray a e) => (i, i) -> [(i, e)] -> a i e
Prelude Data.Array.Diff> array (1,1) [] :: DiffArray Int Int
array (1,1) [(1,*** Exception: MArray: undefined array element

Since DiffArray isn't a MArray(it implements IArray), this is misleading. It should either say IArray or better DiffArray: undefined array element.

Note: See TracTickets for help on using tickets.