Instance Declarations are Universal

1998-07-31 Thread Keith S. Wansbrough
Following recent discussions about instance declarations in Haskell-2 on the Haskell mailing list, and the suggestion that without sufficient restrictions in this area Haskell's type system would become undecidable, I decided to demonstrate this directly. In this brief paper I present a

ST in pure Haskell

1998-07-31 Thread Koen Claessen
Hi all, For some time now I have been wondering if it is possible to implement the ST monad (with polymorphic newVar, writeVar, and readVar) in "pure" Haskell. One might be allowed to use existential/universal quantification in types, but no dynamic types or explicit type casts. I do not care

Layout rule confusion

1998-07-31 Thread Sven Panne
Is the following fragment legal Haskell? Section B.3 of the report is not clear enough in this respect (at least for me :-} foo x = do case x of _ - return '?' If it *is* legal, GHC is wrong and Hugs is correct, otherwise GHC is right and Hugs is too liberal and its library contains