This was a bug in GHC 5.00, fixed in 5.02. Simon
| -----Original Message----- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED]] | Sent: 23 August 2002 23:00 | To: [EMAIL PROTECTED] | Subject: TCMonad:723 bug | | | ghci -fglasgow-exts -syslib data x.lhs | ___ ___ _ | / _ \ /\ /\/ __(_) | / /_\// /_/ / / | | GHC Interactive, version 5.00.2, | For Haskell 98. | / /_\\/ __ / /___| | http://www.haskell.org/ghc/ | \____/\/ /_/\____/|_| Type :? for help. | | Loading package std ... linking ... done. | Loading package lang ... linking ... done. | Loading package concurrent ... linking ... done. | Loading package posix ... linking ... done. | Loading package util ... linking ... done. | Loading package data ... linking ... done. | Compiling Main ( x.lhs, interpreted ) | | x.lhs:5: | Could not deduce `Ord x' from the context () | Probable fix: | Add `Ord x' to the type signature(s) for {applyElt} | arising from use of `elt' at x.lhs:5 | In the second argument of `($)', namely `elt fact' | In the record update: fact {elt = f $ (elt fact)} | | x.lhs:5: | Could not deduce `Ord y' from the context () | Probable fix: | Add `Ord y' to the type signature(s) for {applyElt} | arising fromghc-5.00.2: panic! (the `impossible' | happened, GHC version 5.00.2): | typecheck/TcMonad.lhs:723: Non-exhaustive patterns in | function pp_orig | | | Please report it as a compiler bug to | [EMAIL PROTECTED], or | http://sourceforge.net/projects/ghc/. | | | | Source: | | > data (Eq | x, Ord x) => | > Fact x = Fact { elt :: x, causes :: [FactID] } | deriving (Eq, Ord) | | > applyElt :: (x -> y) -> Fact x -> Fact y | > applyElt f fact = fact { elt = f $ elt fact } | | | > main = main | > type FactID = Int | | | | ----------------------- | Moore's Law, the more transistors, the more Gates | | _______________________________________________ | Glasgow-haskell-bugs mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/glasgow-| haskell-bugs | _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
