[Haskell-cafe] Compiling with NHC98

Daniel Carrera dcarrera at digitaldistribution.com
Sat May 7 14:36:50 EDT 2005


Hello,

After days of effort, I finally managed to compile and install a Haskell 
compiler. The one I have is NHC98.

So now, with my new toy, I am eager to compile my very first Haskell 
program (I've been using 'runhugs' so far). But I'm having problems:

---<quote>----
$ nhc98 prng.hs -o prng
I/O error (user-defined), call to function `userError':
   In file ./RC4.hi:
1:1-1:6 Found _module_ but expected a interface
---<quote>----

Okay, so I need to learn what an interface is. It looks like Hugs and 
NHC98 have idfferent ideas of what's acceptable. The file prng.hs starts 
with:

---<quote>----
module Main where
import RC4
....
---<quote>----

And the file RC4.hs contains all the interesting code.

So that's where I am. I'm not clear what it is NHC98 is complaining 
about or how to fix it. It looks like it doesn't like modules and it 
wants an interface instead. Can someone point me to where I can learn 
what an interface is? and how to turn my module into one? Or else, how 
to make NHC98 accept the module.

Any help would be much appreciated.

Cheers,
Daniel.


More information about the Haskell-Cafe mailing list