[Haskell-cafe] Classes in type declarations in Hugs

John Goerzen jgoerzen at complete.org
Fri Dec 3 12:16:19 EST 2004


On Fri, Dec 03, 2004 at 11:59:23AM -0500, Scott Turner wrote:
> On 2004 November 30 Tuesday 11:04, John Goerzen wrote:
> > type CPResult a = MonadError CPError m => m a
> 
> You've got an existential type here.  (Was that the intent?)

Yes.  It was so that I could make the return types of some various
functions easier to type and deal with.  Problem with using a data type
is that the result is no longer directly in MonadError, nor usable as an
Either.  I wound up just manually expanding it.  Thanks, though, for the
feedback.

-- John


More information about the Haskell-Cafe mailing list