Impossible happened when using ViewPattern in Arrows
When I try to load file in ghci impossible happened:
ghc: panic! (the 'impossible' happened)
(GHC version 6.12.1 for x86_64-unknown-linux):
collectl/go
((=={v aOp} [lid]
u{v avw} [lid]) -> {229:56-59}{229:56-59}ghc-prim:GHC.Bool.True{(w) d 6u})
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Problematic function:
isOn :: ArrowChoice a => DSignal a c -> SF a b (Maybe c)
isOn (DSignal _ f u) = let sf = SF $! \_ -> proc (_, s, e) ->
case fromDynamic (_payload e) of
Just (Event ((== u) -> True) v) ->
returnA -< (Just (f v), s, sf)
Nothing -> returnA -< (Nothing, s, sf)
in sf
(Full sources will be attached. As it was found in-development so style may not be perfect)