Dear ladies and gentlemen, I'm trying to learn Haskell using Hugs. On my experiments I tried to run the Haskore example. But I get the following error: ERROR "/usr/local/share/hugs/lib/hugs/../Haskore/src/Monads.hs" (line 55): No member "map" in class "Functor" Now I looked into the Prelude and there one can just find fmap class Functor f where fmap :: (a -> b) -> (f a -> f b) Now there is obvious no map. So I guess it must either be added or the Monads.hs from Haskore have to be patched. Regards Friedrich
At 09.08 +0200 0-10-13, Friedrich Dominicus wrote:
On my experiments I tried to run the Haskore example. But I get the following error: ERROR "/usr/local/share/hugs/lib/hugs/../Haskore/src/Monads.hs" (line 55): No member "map" in class "Functor"
Now I looked into the Prelude and there one can just find fmap class Functor f where fmap :: (a -> b) -> (f a -> f b)
Now there is obvious no map. So I guess it must either be added or the Monads.hs from Haskore have to be patched.
Try to patch Haskore by changing map to fmap; I think that class may have changed that name. Also, there is a "Monad.hs" in the standards library that come with Hugs. -- I do not know how the "Monads.hs" that Haskore seems to call relates to that one, but it would be better if Haskore is changed to use "Monad.hs" instead, if possible. Hans Aberg
Hi Friedrich, | On my experiments I tried to run the Haskore example. But I get the | following error: | ERROR "/usr/local/share/hugs/lib/hugs/../Haskore/src/Monads.hs" (line | 55): No member "map" in class "Functor" | | Now I looked into the Prelude and there one can just find fmap | class Functor f where | fmap :: (a -> b) -> (f a -> f b) | | Now there is obvious no map. So I guess it must either be added or the | Monads.hs from Haskore have to be patched. Where did you get your copy of Haskore from? Perhaps you can persuade its hosts to post an updated version. I'm sure that there used to be a version on the Hugs web pages that I had personally updated to be compatible with Haskell 98, and hence with Hugs 98. But that file doesn't appear to be on the Hugs web pages any more. As I recall, the conversion wasn't particularly difficult, but it did involve more than just changes to fmap. (e.g. remove references to MonadPlus and rewriting to avoid use of punning.) All the best, Mark
On my experiments I tried to run the Haskore example. But I get the following error: ERROR "/usr/local/share/hugs/lib/hugs/../Haskore/src/Monads.hs" (line 55): No member "map" in class "Functor"
Now I looked into the Prelude and there one can just find fmap class Functor f where fmap :: (a -> b) -> (f a -> f b) Now there is obvious no map. So I guess it must either be added or the Monads.hs from Haskore have to be patched.
You must have an old version of Haskore. The one currently at haskell.org/haskore (which has been stable for awhile) does not have this problem. -Paul Hudak
participants (4)
-
Friedrich.Dominicus@t-online.de -
Hans Aberg -
Mark P Jones -
Paul Hudak