Interface files and recursive modules with nhc98

I am still trying to get ghc-0.29 compiling on nhc98, but I’m stuck on this interface file that I can’t seem to get right. What might be the problem?

I am writing the interface file by hand because these modules are recursive. The example in the screenshot was simplified before screenshotting.

Simpler examples work fine, where only functions are mutually recursive, but not data types.

I still don’t understand what the NEED annotation does. Should be some dependency declaration, but what exactly? I fiddled with NEED annotations and I can’t find an example where they make a difference.

I wish I could get hold of Niklas Röjemo’s thesis somehow.

1 Like

[…] Niklas Röjemo’s thesis […]

…whichever one’s accessible at the moment :-\

(…assuming it doesn’t use recursive imports, of course.) Being in Haskell, Hugs could bootstrap it instead. It just means maintaining two other language implementations along with Hugs.

Another option would be to use rio-lml to inform the design of a new Lazy ML interpreter…in COBOL: