Haskell SOE Question
Hello! I'm a student in Professor John Peterson's Elements of Computing (class site located here: http://cs.yale.edu/cs110-05) and he's having me learn Haskell with Paul Hudak's SOE book. I'm working on the PaddleBall in 20 lines at the end of Chapter 15 and I'm having a problem with HUGS. I downloaded the version from http://haskell.org/soe/software.htm which is recommended but I'm still having trouble. I copied the code verbatim from the book and I still get the following error. ERROR "Animation.hs" - Unknown entity "word32ToInt" imported from module "Word" It looks like this is a problem with one of the Haskell or Hugs libraries, not an SOE library. If anyone has any suggestions, they would be greatly appreciated. If anyone would like to see my code, please let me know and I'll post it ASAP. ~Alex
On 7/27/05, Alex Edelsburg <alex.edelsburg@gmail.com> wrote:
Hello! I'm a student in Professor John Peterson's Elements of Computing (class site located here: http://cs.yale.edu/cs110-05) and he's having me learn Haskell with Paul Hudak's SOE book. I'm working on the PaddleBall in 20 lines at the end of Chapter 15 and I'm having a problem with HUGS. I downloaded the version from http://haskell.org/soe/software.htm which is recommended but I'm still having trouble. I copied the code verbatim from the book and I still get the following error.
ERROR "Animation.hs" - Unknown entity "word32ToInt" imported from module "Word"
'word32ToInt' is 'fromIntegral' now. -- Friendly, Lemmih
Thanks for the quick reply. I rewrote import Word (word32ToInt) as import Word (fromIntegral). It took much longer for Hugs to compile my code (I know its technically an interpeter...) but when it finished, I got the following error. ERROR "Animation.hs" - Unknown entity "fromIntegral" imported from module "Word" Just to be specific, I have HUGS Version: 20050113 from http://haskell.org/soe/software.htm
On 26/07/05, Alex Edelsburg <alex.edelsburg@gmail.com> wrote:
Thanks for the quick reply. I rewrote import Word (word32ToInt) as import Word (fromIntegral). It took much longer for Hugs to compile my code (I know its technically an interpeter...) but when it finished, I got the following error.
ERROR "Animation.hs" - Unknown entity "fromIntegral" imported from module "Word"
Just to be specific, I have HUGS Version: 20050113 from http://haskell.org/soe/software.htm
You shouldn't have to import it even, it's in the Prelude.
Thanks for your suggestion. --import Word (fromIntegral) --import Word (word32ToInt) I removed both import statements from the code and tried to run again. This time HUGS generated the following error. ERROR "Animation.hs":57 - Undefined variable "word32ToInt" ~Alex
But who said you should remove the import of word32ToInt? It was only fromIntegral that was discussed. -- Lennart Alex Edelsburg wrote:
Thanks for your suggestion. --import Word (fromIntegral) --import Word (word32ToInt) I removed both import statements from the code and tried to run again. This time HUGS generated the following error. ERROR "Animation.hs":57 - Undefined variable "word32ToInt"
~Alex _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Thanks for the quick reply, Lennart. If I understand you correctly, I should only have the following import import Word (word32ToInt) Is this correct? If so, this is how my code was at the beginning. With only that import statement, I get this error. ERROR "Animation.hs" - Unknown entity "word32ToInt" imported from module "Word" Sorry if I'm misunderstanding... ~Alex
Alex, Just remove the line import Word (word32ToInt) and replace all *other* occurrences of word32ToInt with fromIntegral. HTH, Stefan On Jul 27, 2005, at 10:46 AM, Alex Edelsburg wrote:
Thanks for the quick reply, Lennart. If I understand you correctly, I should only have the following import
import Word (word32ToInt)
Is this correct? If so, this is how my code was at the beginning. With only that import statement, I get this error.
ERROR "Animation.hs" - Unknown entity "word32ToInt" imported from module "Word"
Sorry if I'm misunderstanding...
~Alex _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Alex Edelsburg <alex.edelsburg@gmail.com> writes:
I removed both import statements from the code and tried to run again. This time HUGS generated the following error. ERROR "Animation.hs":57 - Undefined variable "word32ToInt"
...which is, as pointed out previously, deprecated in favor of "fromIntegral". So you need to replace it. -k -- If I haven't seen further, it is by standing in the footprints of giants
"So you need to replace it." That was the magic command which I misunderstood... It's running perfectly now. Thanks to everyone who helped with this. ~Alex
participants (6)
-
Alex Edelsburg -
Cale Gibbard -
Ketil Malde -
Lemmih -
Lennart Augustsson -
Stefan Holdermans