
3 Jul
2010
3 Jul
'10
10:52 p.m.
Hello!
On Sat, Jul 3, 2010 at 9:12 PM, Dan Doel
The problem is instantiation. SomeMonad is a constructor for the type
SomeMonad s a
for any *particular* s and a. But the type:
forall s. SomeMonad s a
is not that type. That type doesn't have constructors (proper) at all, and hence you cannot match against it. If types were passed explicitly, then values of the second type would look like:
/\s -> ...
Where the big lambda is type abstraction. But you can't match against this, of course (just as you can't match against functions as lambda expressions), you can only apply values of this type.
I understood your explanation. However, is this an implementation detail/bug or is it an intended feature? Cheers, -- Felipe.