Open
Description
The code:
module Bug exposing ( .. )
err : Array Int -> Int
err array =
case Array.popFirst array of
Nothing -> 0
Just { first = _, rest = _ } -> 0
_ -> 0
The error:
Compiling ...gren: Map.!: given key is not an element in the map
CallStack (from HasCallStack):
error, called at libraries/containers/containers/src/Data/Map/Internal.hs:617:17 in containers-0.6.7:Data.Map.Internal
-- ERROR -----------------------------------------------------------------------
I ran into something that bypassed the normal error reporting process! I
extracted whatever information I could from the internal error:
> thread blocked indefinitely in an MVar operation
...
It compiles without the last branch. Without the first branch it also compiles. But it seems to have problems with the redundant branches. If I remove the Array.popFirst, it also compiles.