Haskell Modules

Well, it’s may be very obvious note, but yesterday I’ve spent a lot of time trying to solve problem with haskell modules.

I’ve got 3 files.

main.hs
foo/bar.hs
foo/foo.hs

And their module names were

Main
Foo.Bar
Foo.Foo

So I was trying to use Foo.Foo in Foo.Bar. But I was getting not found error. The solution was to compile them from the parent of foo folder and to rename files like module Foo.Bar -> file has to be Foo/Bar.hs

comments powered by Disqus