|
incorrect type error message: msg#00032lang.haskell.glasgow.bugs
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 argument of `fmap', namely `1' In the definition of `e': fmap id 1 Bug.hs:5: Ambiguous type variable(s) `f' in the constraint `Functor f' arising from use of `fmap' at Bug.hs:5 In the definition of `e': fmap id 1 although :t (fmap id 1) forall f a. (Num (f a), Functor f) => f a Clearly, 'f' is not ambiguous. Martin
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-642810 ] Still fails to build with GCC 3.2, noreply |
|---|---|
| Next by Date: | RE: incorrect type error message, Simon Peyton-Jones |
| Previous by Thread: | [ ghc-Bugs-642810 ] Still fails to build with GCC 3.2, noreply |
| Next by Thread: | RE: incorrect type error message, Simon Peyton-Jones |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |