class declaration in boot file

Simon Peyton-Jones simonpj at microsoft.com
Fri Aug 11 05:59:29 EDT 2006


Well this is odd.  The manual (for 6.6 anyway) says that class decls are
allowed in hs-boot files, but instance decls are not, whereas the code
seems to say that class decls aren't but instance decls are!

I will look into this.  Meanwhile, I'm afraid you just can't put a class
decl in the hs-boot file with the version of the compiler you have.

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org
[mailto:glasgow-haskell-users-bounces at haskell.org]
| On Behalf Of Gaal Yahas
| Sent: 09 August 2006 18:25
| To: GHC Users Mailing List
| Subject: class declaration in boot file
| 
| I'm trying to solve a circularity problem with .hs-boot, but am
getting
| the error: "Illegal class declaration in hs-boot file".
| 
| The offending declaration is:
| 
| class (Monad m, Functor m, Eq a, Data a, Typeable a) => ICoercible m a
| a -> m
| 
| I've tried with and without the fundeps. Data and Typeable are in
scope,
| and -fglasgow-exts is set. Any ideas on what else I should be doing?
| 
| --
| Gaal Yahas <gaal at forum2.org>
| http://gaal.livejournal.com/
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


More information about the Glasgow-haskell-users mailing list