Questions tagged [haskell]
Haskell is a functional programming language featuring strong static typing, lazy evaluation, extensive parallelism and concurrency support, and unique abstraction capabilities.
77 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
39
views
Why does the G-machine push arguments before the function for application (MKAP)?
I'm reading The implementation of functional programming languages (1987) by Peyton Jones and he mentions (p.307) that the MKAP (make application) instruction is more convenient if the argument is ...
1
vote
1
answer
148
views
Haskell instance resolution on recursive types
Not sure if this question fits here, but I'm looking to implement (or try to) Hakell's type classes into my own language, however I don't understand how resolution works on recursive types like the ...
2
votes
1
answer
111
views
Is Calling a Function a Side Effect
I've noticed a pattern in trying to make functional programming effective - there is still some kind of impure, effectful operation going on, but it gets holed up in a single, manageable imperative ...
2
votes
1
answer
73
views
Is there any reference materials on complexity analysis for lazy languages?
Is there any books, papers or articles on how to analyze the time complexity of programs written in lazy languages such as Haskell?
I know how laziness is implemented and how it can be expanded and ...
0
votes
0
answers
77
views
Representation of pairs in System F
System F defines the data type pair as:
$$X\times Y := \Pi Z. (X\to Y \to Z)\to Z$$
with:
$$\langle x,y \rangle := \Lambda Z. \lambda p^{X\to Y\to Z}.p \text{ }x\text{ } y$$
Projections are defined:
$$...
1
vote
1
answer
117
views
DFA for even concatenation of strings from a language
If I have a deterministic finite automaton (DFA) with a language $W,ドル and I need to create another DFA that returns all the strings that are a concatenation of an even number of strings in $W,ドル how ...
3
votes
1
answer
99
views
Are Haskell monads stronger than strong monads?
Haskell's monads are usually considered to mean strong monads in category theory, but it seems like the former is a bit stronger than the latter. With strong monads, you have a Kleisli extension ...
1
vote
0
answers
52
views
Mathematical explanation of the usage of monads to wrap data for avoiding errors
For the past two days I have been on a question to understand monads in the context of Haskell. A nice explanation I found is by Graham Hutton on the Computerphile channel see here. This explanation ...
1
vote
0
answers
47
views
How much is decidability compromised within this restriction of the fixpoint combinator?
Though purely functional programming languages, such as Haskell, is commonly thought to have no side-effects, there is a caveat: Recursive calls may hang.
I considered this to be undesirable, and ...
1
vote
1
answer
58
views
Literature on delta encoding serializeable ADTs
Suppose that I have some nested algebraic data type (ie. something one can construct via datas in Haskell) that is serializeable (so no functional fields ...
3
votes
1
answer
146
views
What is the type of a type signature?
For example, using GHCi,
ghci> f x = x + 1
ghci> :t f
f :: Num a => a -> a
What is the type of the type signature ...
8
votes
1
answer
736
views
Strictness in both arguments but not in each individually
I'm learning about strict functions in Haskell.
A function f is strict if f ⊥ = ⊥
Some functions are strict only in the first argument (for e.g. const), others are strict in the second (for e.g. map)....
5
votes
1
answer
129
views
Book references for combinatory logic as applied in Haskell?
I am looking for book references on combinatory logic. Is there a book focused on how combinatory logic is applied in the context of pure functional languages like Haskell?
I found "Combinators: ...
0
votes
0
answers
48
views
Ambiguous type of "triangle" operator for sum types
In Meijer, Fokkinga and Patersons "Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire" the ∇ operator for sum types is introduced which removes the tags from its ...
0
votes
0
answers
78
views
Is type inference for arbitrary-rank types decidable when supplied type signatures?
I found following statements in 6.4.16. Arbitrary-rank polymorphism of ghc document.
GHC uses an algorithm proposed by Odersky and Laufer ("Putting type annotations to work", POPL‘96) to get a ...