incorrect type error message

2002-11-25 Thread Martin Sulzmann
Consider module Bug where e = fmap id 1 ghci --version The Glorious Glasgow Haskell Compilation System, version 5.02.2 says :l Bug.hs Compiling Bug ( Bug.hs, interpreted ) Bug.hs:5: No instance for (Num (f a)) arising from the literal `1' at Bug.hs:5 In the second

RE: incorrect type error message

2002-11-25 Thread Simon Peyton-Jones
The reason there's an error message at all is because of the monomorphism restriction. So that's not surprising. So the compiler has to solve the constraints { Num (f a), Functor f } in the absence of any other context whatsoever. So the constraint (Functor f) is certainly ambiguous, in the

RE: incorrect type error message

2002-11-25 Thread Bernard James POPE
The reason there's an error message at all is because of the monomorphism restriction. So that's not surprising. Can you suggest a better error message? I'm always looking for ways to report errors more informatively. It may be hard to do, but it would be helpful in cases like this for the

[ ghc-Bugs-643878 ] sortBy not stable

2002-11-25 Thread noreply
Bugs item #643878, was opened at 2002-11-26 01:12 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=643878group_id=8032 Category: Prelude Group: 5.04.1 Status: Open Resolution: None Priority: 5 Submitted By: Mike Gunter (magunter) Assigned to:

[ ghc-Bugs-643878 ] sortBy not stable

2002-11-25 Thread noreply
Bugs item #643878, was opened at 2002-11-26 01:12 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=643878group_id=8032 Category: Prelude Group: 5.04.1 Status: Open Resolution: None Priority: 7 Submitted By: Mike Gunter (magunter) Assigned to: