Standard library - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

TheMatten

If you were allowed to change anything in standard librar(ies), what would it be?

TheMatten

Related question - are there some interesting alternatives to module hierarchy compared to one in base?
I mean, Data and Control don't feel very intuitive, and that explanation in terms of linearity doesn't help that much :big_smile:

TheMatten

Personally I would probably like Data/Class distinction - I find it to be closer to what we actually do

Georgi Lyubenov // googleson78

I think I like the Control name (from control flow, which is what you usually do with Applicatives or Monads)

Class feels weird, is it meant to imply that all the tcs live in there?

Will

I kinda like purescript's more fine-tuned class hierarchy, esp. the monad and numeric trees

Vincent L

Is "Prelude" considered the standard lib in Haskell ? I sometimes see basesometimes preludeand it looks like the community is recommending relude instead of prelude, but as a newcomer I'm a bit confused

Torsten Schmits

base is the package containing a module named Prelude. Whatever module by that name is in the library path will be imported when the runtime starts, unless otherwise specified. base is the standard that's distributed with GHC, but you still have to add it to the cabal dependencies, which is why you can switch in relude.

Vincent L

by the way what is the difference between cabal and stack ? I'm rather using stack since I started with it, but then I discovered that there was another tool, cabal, and it looks like stack is using cabal under the hood. My understanding is that stack is adding dependency versionning on top of cabal. Is it correct ?

Torsten Schmits

yes, although nowadays cabal is considered similarly capable, it used to be that stack made up for cabal's shortcomings

Vincent L

both tool can access the same dependencies ?

Torsten Schmits

stack queries the stackage service for additional versioning information, but they both have access to all packages