I am writing my first big project in Haskell, and I would like to split it into several files. So far I have written two modules: Parse and Eval . I would like to have a Main module that includes only these two modules and defines the Main function. I have Main.hs , Parse.hs and Eval.hs and import them into Main , but this happens:
Prelude> :load "~/code/haskell/lisp/Main.hs" [1 of 3] Compiling Eval ( Eval.hs, interpreted ) [2 of 3] Compiling Parse ( Parse.hs, interpreted ) [3 of 3] Compiling Main ( ~/code/haskell/lisp/Main.hs, interpreted ) Ok, modules loaded: Main, Parse, Eval. *Main> parse parseExpr "" "#b101" <interactive>:1:0: Not in scope: `parse'
The Parse function comes from the Parsec library, which is imported into Parse.hs . What's wrong?
source share