[Haskell] Swapping parameters and type classes

Stefan O'Rear stefanor at cox.net
Sun Sep 16 16:59:02 EDT 2007


On Sun, Sep 16, 2007 at 10:45:39PM +0200, Bas van Dijk wrote:
> On 9/16/07, Mads Lindstrøm <mads_lindstroem at yahoo.dk> wrote:
> > But what if I want to "apply" the 'b' ? How do I do that ?
> 
> The following uses type families (functions) and compiles under GHC HEAD:
> 
> {-# OPTIONS_GHC -XTypeFamilies -XEmptyDataDecls -XTypeSynonymInstances #-}

Eek!

That should be:

{-# LANGUAGE TypeFamilies, EmptyDataDecls, TypeSynonymInstances #-}

Modulo the fact that only GHC support type families at the moment, the
latter will be portable...

(Ian/Simon: I've seen this several times now.  Maybe there should be a
warning for -X in OPTIONS?  Is that even feasable?)

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell/attachments/20070916/9a61901a/attachment.bin


More information about the Haskell mailing list