Where can I save Haskell modules?

I put some functions in a file. Where should I save this file on my PC so that I can easily download my functions?

I am using the Haskell platform on a 64-bit Windows computer.

+5
source share
2 answers

Usually I put my modules in one directory tree and run ghciin the root directory of the tree. Then the modules can import each other, and I can easily :loadmodules in ghciinteractively.

$ ghci

.... loading ....

Prelude> :load directory/subdirectory/mymodule.hs
+9
source

, , cabal cabal install. - cabal install .cabal .

, , Haskell. :

Hello/World.hs
Foo/Bar.hs
Quux.hs
Hello.hs

Hello/World.hs module Hello.World where . module Main, (, Quux.hs). Foo/Bar.hs import Hello.World. Foo/Bar.hs ghci, , Hello.World. ghci: . ghci Hello.World .

:

http://haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html

http://haskell.org/ghc/docs/latest/html/users_guide/packages.html

+2

All Articles