GHC is looping while deriving for pathologically recursive types
data Plus parent a = Plus [Plus (Plus parent) a] [parent (Plus parent a)] deriving Eq I think that something like this type is really what I want in practice, but I'm not sure 8-) -- __("Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/ \__/ GCS/M d- s+:-- a22 C+++$ UL++$ P+++ L++$ E- ^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t QRCZAK 5? X- R tv-- b+++ DI D- G+ e h! r--%++ y-
False warning about overlapping patterns
GHC gives a false warning about overlapping patterns (-Wall): f "ab"= 1 f ('c':_) = 2 Surprisingly, changing "ab" to ['a','b'] shuts up the warning. The (correct) warning about non-exhaustive patterns says: Patterns not matched: #x with #x `not_elem` ["ab"] The Prelude function is called notElem, not not_elem. Also this message is not accurate. Changing "ab" to ['a','b'] causes this message to be more correct. -- __("Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/ \__/ GCS/M d- s+:-- a22 C+++$ UL++$ P+++ L++$ E- ^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t QRCZAK 5? X- R tv-- b+++ DI D- G+ e h! r--%++ y-
Re: False warning about overlapping patterns
Marcin 'Qrczak' Kowalczyk wrote: GHC gives a false warning about overlapping patterns (-Wall): f "ab"= 1 f ('c':_) = 2 Surprisingly, changing "ab" to ['a','b'] shuts up the warning. [...] This is one of GHC's classic false alarms, and has been reported a couple of times by different people (including me :-}. But IIRC it can't be fixed easily, because of the way literals are handled in the desugarer(?). You see similar effects with numeric literals when GHC compiles itself and its libraries (e.g. modules Complex, Int, Num, IIRC). I'd like to see these warnings disappear, too. Hmmm, perhaps I should update my (slightly dormant) Wish List... :-) Cheers, Sven -- Sven PanneTel.: +49/89/2178-2235 LMU, Institut fuer Informatik FAX : +49/89/2178-2211 LFE Programmier- und Modellierungssprachen Oettingenstr. 67 mailto:[EMAIL PROTECTED]D-80538 Muenchen http://www.informatik.uni-muenchen.de/~Sven.Panne
Wish List (Re: False warning about overlapping patterns)
Sun, 06 Feb 2000 16:45:06 +0100, Sven Panne [EMAIL PROTECTED] pisze: Hmmm, perhaps I should update my (slightly dormant) Wish List... http://marutea.pms.informatik.uni-muenchen.de/wishlist/ is inaccessible... -- __("Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/ \__/ GCS/M d- s+:-- a22 C+++$ UL++$ P+++ L++$ E- ^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t QRCZAK 5? X- R tv-- b+++ DI D- G+ e h! r--%++ y-
Re: Wish List (Re: False warning about overlapping patterns)
Marcin 'Qrczak' Kowalczyk wrote: http://marutea.pms.informatik.uni-muenchen.de/wishlist/ is inaccessible... Oooops, that's because of our new firewall. I've moved it to a more generic address, which should work: http://www.informatik.uni-muenchen.de/haskell-wish-list/ Could somebody please update the link on haskell.org? Cheers, Sven -- Sven PanneTel.: +49/89/2178-2235 LMU, Institut fuer Informatik FAX : +49/89/2178-2211 LFE Programmier- und Modellierungssprachen Oettingenstr. 67 mailto:[EMAIL PROTECTED]D-80538 Muenchen http://www.informatik.uni-muenchen.de/~Sven.Panne
Re: Wish List (Re: False warning about overlapping patterns)
http://www.informatik.uni-muenchen.de/haskell-wish-list/ Could somebody please update the link on haskell.org? Done. -- http://sc3d.org/rrt/ | certain, a. insufficiently analysed