deriving over renamed types

Simon Peyton-Jones simonpj@microsoft.com
Thu, 4 Apr 2002 00:48:38 -0800


It's a bug in GHC 5.02 and earlier; fixed in 5.03

Simon

| -----Original Message-----
| From: Hal Daume III [mailto:hdaume@ISI.EDU]=20
| Sent: 04 April 2002 00:15
| To: Haskell Mailing List
| Subject: deriving over renamed types
|=20
|=20
| Why can't I do this:
|=20
| > import FiniteMap
| > type FM =3D FiniteMap
| > instance (Show a, Show b) =3D> Show (FiniteMap a b) where
| >     show =3D show . fmToList
| > data X =3D X (FM Int Int)
| >        deriving (Show)
|=20
| if I replace
|=20
| > type FM =3D FiniteMap
|=20
| with
|=20
| > type FM a b =3D FiniteMap a b
|=20
| it works fine.  I wasn't aware there was (supposed to be) a=20
| difference between these two declarations?  Is there?
|=20
|  - Hal
|=20
|=20
| --
| Hal Daume III
|=20
|  "Computer science is no more about computers    | hdaume@isi.edu
|   than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
|=20
| _______________________________________________
| Haskell mailing list
| Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
|=20