Re: [Haskell-cafe] Hiding functions

2004-08-14 Thread Martin Sjögren
On Fri, 13 Aug 2004 15:32:51 -0700, Lyle Kopnicky [EMAIL PROTECTED] wrote: Simon, That makes good sense, as it's hard to read code that contains standard terms used in a nonstandard way. I was just concerned that the function name I wanted to use was already in the Prelude! Perhaps the

Re: [Haskell-cafe] closed classes [was: Re: exceptions vs. Either]

2004-08-14 Thread Frank Atanassow
On Aug 9, 2004, at 5:00 PM, Simon Peyton-Jones wrote: Closed classes are certainly interesting, but a better way to go in this case is to allow the programmer to declear new kinds, as well as new types. This is what Tim Sheard's language Omega lets you do, and I'm considering adding it to GHC.

[Haskell-cafe] Control.Monad.Error with a custom error type

2004-08-14 Thread Brian Smith
I have: data Reference = Ref [String] String data ReferenceError = RefError { expectedType :: String -- type of element we were looking for (e.g. type,package) , pointOfError :: Reference-- path to deepest parent element not found in path } type

Re: [Haskell-cafe] Control.Monad.Error with a custom error type

2004-08-14 Thread Tom Pledger
Brian Smith wrote: [...] instance MonadError (Either ReferenceError) Kind error: `Either ReferenceError' is not applied to enough type arguments When checking kinds in `MonadError (Either ReferenceError)' In the instance declaration for `MonadError (Either ReferenceError)' MonadError takes