What is called and what does it do? [closed]

Sorry, I don’t really know my math, so I’m curious how to pronounce the functions in the Applicative typeclass Knowing your math, or not, is largely irrelevant here, I think. As you’re probably aware, Haskell borrows a few bits of terminology from various fields of abstract math, most notably Category Theory, from whence we get … Read more

Haskell threads heap overflow despite only 22Mb total memory usage?

Not the solution to your problem, but a hint to the cause: Haskell seems to be very conservative in memory reuse and when the interpreter sees the potential to reclaim a memory block, it goes for it. Your problem description fits the minor GC behavior described here (bottom) https://wiki.haskell.org/GHC/Memory_Management. New data are allocated in 512kb … Read more

What are the best Haskell libraries to operationalize a program? [closed]

This is a great question! Here’s a first cut. Be able to log at multiple levels (ex: debug, warning, etc.). hslogger is easily the most popular logging framework. Be able to collect and share metrics/statistics about the types of work the program is doing and how long that work is taking. Ideally, the collected metrics … Read more

Why doesn’t Haskell’s Prelude.read return a Maybe?

Edit: As of GHC 7.6, readMaybe is available in the Text.Read module in the base package, along with readEither: http://hackage.haskell.org/packages/archive/base/latest/doc/html/Text-Read.html#v:readMaybe Great question! The type of read itself isn’t changing anytime soon because that would break lots of things. However, there should be a maybeRead function. Why isn’t there? The answer is “inertia”. There was a … Read more

Haskell error parse error on input `=’

In GHCi 7.x or below, you need a let to define things in it. Prelude> let f x = x * 2 Prelude> f 4 8 Starting from GHC 8.0.1, top-level bindings are supported in GHCi, so OP’s code will work without change. GHCi, version 8.0.1.20161213: http://www.haskell.org/ghc/ 😕 for help Prelude> f x = x … Read more