8
User
Recs.
Recs.
5
Updates
Last
Updated
Updated
Activity
9 Options
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
Specs
Pros
Know any positive aspects of this option?
Cons
Know any negative aspects of this option?
Recommendations
My brain just exploded
Recommended 8 years ago
David hasn’t added their experience, pros or cons to their recommendation.
My brain just exploded
Recommended 11 years ago
Ryan hasn’t added their experience, pros or cons to their recommendation.
My brain just exploded
Recommended 11 years ago
Ryan hasn’t added their experience, pros or cons to their recommendation.
My brain just exploded
Recommended 11 years ago
Anthony hasn’t added their experience, pros or cons to their recommendation.
My brain just exploded
Recommended 11 years ago
etler hasn’t added their experience, pros or cons to their recommendation.
My brain just exploded
Recommended 11 years ago
Owen hasn’t added their experience, pros or cons to their recommendation.
My brain just exploded
Recommended 11 years ago
Stuart hasn’t added their experience, pros or cons to their recommendation.
My brain just exploded
Recommended 11 years ago
T-R hasn’t added their experience, pros or cons to their recommendation.