Haskell is a functional programming language featuring strong static typing, lazy evaluation, extensive parallelism and concurrency support, and unique abstraction capabilities.
I'm puzzled by how the haskell compiler sometimes infers types that are lesspolymorphic than what I'd expect, for example when using point-free definitions.It seems like the issue is the "...
What is the difference between the dot (.) and the dollar sign ($)?. As I understand it, they are both syntactic sugar for not needing to use parentheses.
I often read that I shouldn't mix tabs and spaces in Haskell, or that I shouldn't use tabs at all. Why?
Having briefly looked at Haskell recently, what would be a brief, succinct, practical explanation as to what a monad essentially is?I have found most explanations I've come across to be fairly ...
What does Weak Head Normal Form (WHNF) mean? What does Head Normal form (HNF) and Normal Form (NF) mean?Real World Haskell states:The familiar seq function evaluates an expression to what we ...
I'm very new to Yesod and I'm having trouble building Yesod staticallyso I can deploy to Heroku.I have changed the default .cabal file to reflect static compilationif flag(production)cpp-...
For a few days I've tried to wrap my head around the functional programming paradigm in Haskell. I've done this by reading tutorials and watching screencasts, but nothing really seems to stick.Now, ...
I discovered the "time" command in unix today and thought I'd use it to check the difference in runtimes between tail-recursive and normal recursive functions in Haskell.I wrote the following ...
I have a function that has a return type of Maybe ([(Int,Int)],(Int,Int))I would like to call this from another function and perform an operation on the data.However, the return value is contained ...
How can I find the actual amount of memory required to store a value of some data type in Haskell (mostly with GHC)? Is it possible to evaluate it at runtime (e.g. in GHCi) or is it possible to ...
Shouldn’t this definition be allowed in a lazy language like Haskell in which functions are curried?apply f =fapply f (x:xs)=apply (f x) xsIt’s basically a function that applies the given ...
While explaining to someone what a type class X is I struggle to find good examples of data structures which are exactly X.So, I request examples for:A type constructor which is not a Functor.A ...
Applicatives compose, monads don't.What does the above statement mean? And when is one preferable to other?
I can't figure out why m1 is apparently memoized while m2 is not in the following:m1=((filter odd [1..]) !!)m2 n=((filter odd [1..]) !! n)m1 10000000 takes about 1.5 seconds on the ...
I have trouble understanding this chunk of code:letsieve (p:xs)=p : sieve (filter (\ x -> x `mod` p /=0) xs)in sieve [2 .. ]Can someone break it down for me? I understand there is ...