RE: Combinators for ReadP

Simon Peyton-Jones said:
Koen, not me!
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? Regards, /Koen

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

| > 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. I understand that the change will make it Haskell'98, but my feeling is that the change in the API of ReadP makes it unusable as a replacement for ReadS. But I have not looked at the details and I might be wrong. Also, I was thrown into this discussion without any context so I do not really know what the exact change is that is being proposed, and what the purpose is. /Koen
participants (2)
-
Koen Claessen
-
Martin Sjögren