Combinators for ReadP
Martin Sjögren
msjogren at gmail.com
Wed Jul 28 05:39:36 EDT 2004
> I know that one can get away with the local quantification by adding an
> extra type parameter to the type constructor:
>
> newtype ReadP r a = ...
>
> But that wouldn't do much good, would it?
What do you mean? It would make ReadP Haskell98 and thus nhc would be
able to distribute it. Of course, it changes the API, which kinda
sucks, so I suggest rather to have
newtype SomeOtherName r a = R (...)
#ifndef __NHC__
type ReadP a = forall r. SomeOtherName r a
#endif
but it's somewhat ugly.
/Martin
More information about the Libraries
mailing list