Reputation: 351
I am using the Haskell app for OS X, and have created a Haskell project, and when I create another file in the project, Haskell tells me that the file name and path do not match the module name! I am new to Haskell, what does this mean?
It is telling me also that it is expecting the name of the file as the module name.
Thanks!
Upvotes: 3
Views: 7521
Reputation: 6517
The error message tells you that the module name and the file name should be the same.
E.g.: If the file name is NewModule.hs
, the module name should be NewModule
.
E.g.
-- NewModule.hs:
module NewModule where
-- you may define functions here...
So, you just have to use the module
directive.
Upvotes: 7