Packages, modules and import in Haskell

前端 未结 1 699
暗喜
暗喜 2021-01-18 16:10

I\'m newish to Haskell. Would someone kindly explain how code organization works in Haskell? To date I have written everything in one big long file and tested code from GH

相关标签:
1条回答
  • 2021-01-18 17:08

    Here is an introduction Haskell modules from "Learn You a Haskell for Great Good!":

    http://learnyouahaskell.com/modules

    I would call a package the smallest deliverable unit of Haskell software. For most people, it is enough to say "packages are the things on Hackage".

    If you're shipping an executable I wouldn't worry about breaking up your project into multiple packages until you get to your second project, and want to re-use modules from the first.

    0 讨论(0)
提交回复
热议问题