multiple module program fails compile

Brent Yorgey byorgey at
Mon Nov 15 14:39:27 EST 2010

On Sat, Nov 13, 2010 at 10:20:31AM -0600, Larry Evans wrote:
> The attached program fails to compile despite it being a close
> copy of that shown in the Reference: comments.  The ghci invocation
>   Reference:
>     First code example here:

Note the distinction between a Haskell *program* (as defined in that
section of the Report) and a *file* on your file system.  A "program"
as defined in the Report is an abstract entity consisting of a
collection of modules; the relationship between programs and files is
not specified.  As it happens, GHC does not support having multiple
modules in the same file, although it is conceivable that another
compiler might (although I do not know of any).


More information about the Glasgow-haskell-users mailing list