Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I link modules in ghc?

Tags:

haskell

ghc

I have a haskell program that uses Data.Set and Data.IntMap, what flags do I need to give GHC to get it to link those libraries in? Simple question, I know, but the man pages didn't help me and I don't know where to look.

like image 279
So8res Avatar asked Oct 18 '10 04:10

So8res


1 Answers

Adding --make will tell GHC to find all the dependencies and do all the linking for you automatically:

GHC will figure out all the modules in the program by following the imports from these initial modules. It will then attempt to compile each module which is out of date, and finally, if there is a Main module, the program will also be linked into an executable.

like image 82
Travis Brown Avatar answered Oct 11 '22 23:10

Travis Brown