TCMonad:723 bug
Simon Peyton-Jones
simonpj at microsoft.com
Thu Aug 29 05:31:51 EDT 2002
This was a bug in GHC 5.00, fixed in 5.02.
Simon
| -----Original Message-----
| From: Sengan.Baring-Gould at nsc.com
| [mailto:Sengan.Baring-Gould at nsc.com]
| Sent: 23 August 2002 23:00
| To: glasgow-haskell-bugs at haskell.org
| 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
| glasgow-haskell-bugs at haskell.org, 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
| Glasgow-haskell-bugs at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-| haskell-bugs
|
More information about the Glasgow-haskell-bugs
mailing list