... that the problem is:
- if I must write my own definitions, like:
inc :: Integer -> Integer
inc n = n+1
in a file, and this file is a ".hs" file, so how can I write an ".hs" file?
- my Hug's prompt, when I start it, is "Prelude>". If Prelude is an ".hs"
file, and if that definitions were writed in "Incr.hs" file, my prompt must
be "Incr>"?
Thank you very much! But the manuals files I downloaded don't explain it...
Best regards,
Pedro.
----- Original Message -----
From: Pedro L. P. Dias
Dear Professor Hans Aberg:
Thank you for your answer! 'Sorry to bother you again... I found a Hugs manual, "The Hugs 98 User Manual", and it describes "module". So, I wrote:
module Fact where fact :: Integer -> Integer fact n = product [1..n]
because this is the example showed at page 8 of that manual. But, unfortunately, another error message appears: "cannot find module 'Fact' ". I understood, from your e-mail and the manual, that I must create an ".hs" file with my own definitions; so, how can I do this?
Thank you very much (again!). Best regards, Pedro.
----- Original Message ----- From: Hans Aberg
To: Pedro L. P. Dias Cc: Sent: Thursday, July 25, 2002 1:36 PM Subject: Re: Problems... At 10:31 -0300 2002/07/25, Pedro L. P. Dias wrote: I start Hugs, and, at the line command "prelude>", when I digit, for example, "add x y = x + y", an error message appear: "...unexpected '='". Also, when I digit (other example) "inc n = n + 1", the error message is "undefined variable inc",
Dig-it, Hugs is hooked up so that definitions must be in a file. So put the stuff in a file and then load that file.
Hans Aberg