Re: No default for MutualRecursion.PP
Christian Maeder <[email protected]> Tue, 07 Jun 2005 23:13:14 +0200
| Newsgroups | gmane.comp.lang.haskell.nhc.user |
|---|---|
| Message-ID | <[email protected]> |
Sorry, that I came up again with such an old bug (a pity it isn't fixed yet) http://www.cs.york.ac.uk/fp/nhc98/nhc-users-archive/0107.html Christian I wrote: > No default for MutualRecursion.PP at 23:1-24:18.(174,[(148,187)]) > No default for MutualRecursion.PP at 19:1-20:18.(183,[(148,186)]) > > -- -------------------------------------------------------------------- > > module MutualRecursion where > > data A a = A a | BasA (B a) > > data B a = B a | AasB (A a) > > class PP a where > pp :: a -> String > > instance PP a => PP (A a) where > pp (A a) = pp a > pp (BasA b) = pp b > > instance PP a => PP (B a) where > pp (B a) = pp a > pp (AasB b) = pp b > > fA :: PP a => A a -> String > fA (A a) = pp a > fA (BasA b) = fB b > > fB :: PP a => B a -> String > fB (B b) = pp b > fB (AasB a) = fA a >