David
@dq
8 years ago

T-R
@T-R
11 years ago

If you try to compile this code: {-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. Foo a ignorefoo f = 1 where Foo a = f You will get this error message: $ ghc Foo.hs Foo.hs:3:22: My brain just exploded. I can't handle pattern bindings for existentially-quantified constructors. Instead, use a case-expression, or do-notation, to unpack the constructor. In the binding group for Foo a In a pattern binding: Foo a = f In the definition of `ignorefoo': ignorefoo f = 1 where Foo a = f [By ephemient on a closed StackOverflow question](http://stackoverflow.com/a/213441)

T-R
@T-R
11 years ago

If you try to compile this code: {-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. Foo a ignorefoo f = 1 where Foo a = f You will get this error message: $ ghc Foo.hs Foo.hs:3:22: My brain just exploded. I can't handle pattern bindings for existentially-quantified constructors. Instead, use a case-expression, or do-notation, to unpack the constructor. In the binding group for Foo a In a pattern binding: Foo a = f In the definition of `ignorefoo': ignorefoo f = 1 where Foo a = f [ephemient on StackOverflow](http://stackoverflow.com/a/213441)

T-R
@T-R
11 years ago

If you try to compile this code: {-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. Foo a ignorefoo f = 1 where Foo a = f You will get this error message: $ ghc Foo.hs Foo.hs:3:22: My brain just exploded. I can't handle pattern bindings for existentially-quantified constructors. Instead, use a case-expression, or do-notation, to unpack the constructor. In the binding group for Foo a In a pattern binding: Foo a = f In the definition of `ignorefoo': ignorefoo f = 1 where Foo a = f [ephemient on SO](http://stackoverflow.com/a/213441)

undefinedurl nextprice drop