Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options questions only user 61231

A functional programming language

25
votes
2answers
Why does Haskell have a built-in if/then/else, which is dependent on the Bool type, instead of having a simple library function? Such as if :: Bool -> a -> a -> a if True x _ = x if False _ y = y …
asked Apr 22 '13 by Petr Pudlák
5
votes
1answer
Looking into Haskell's standard library we can see: newtype StateT s m a = StateT { runStateT :: s -> m (a, s) } newtype WrappedMonad m a = WrapMonad { unwrapMonad :: m a } newtype Sum a = Sum { ge …
asked Oct 12 '12 by Petr Pudlák
7
votes
1answer
Haskell's type classes are a very powerful tool and give Haskell a great expressive ability, compared to functional languages that don't have them. When were they invented, and who invented them? …
asked Jul 6 '14 by Petr Pudlák
13
votes
5answers
record field for unwrapping a value (especially for single-valued data types such as newtypes) is sometimes called destructor or perhaps deconstructor. For example, let's have (in Haskell): newtype … ? And to clarify, is this/other terminology applicable to other functional languages, or is it used just in the Haskell? Perhaps also, is there any terminology for this in general, in non-functional …
asked Oct 12 '12 by Petr Pudlák
22
votes
1answer
Are there some theoretical reasons for that (like that the type checking or type inference would become undecidable), or practical reasons (too difficult to implement properly)? Currently, we can wra …
asked Dec 1 '12 by Petr Pudlák
46
votes
5answers
The IO monad in Haskell is often explained as a state monad where the state is the world. So a value of type IO a monad is viewed as something like worldState -> (a, worldState). Some time ago I … input/output, concurrency, exceptions, and foreign-language calls in Haskell by Simon Peyton Jones. (Thanks to TacTics's answer.) …
asked Aug 20 '12 by Petr Pudlák
43
votes
2answers
What are some techniques I might use to consistently refactor code removing the reliance on existential types? Typically these are used to disqualify undesired constructions of your type as well as to …
asked Jan 26 '13 by Petr Pudlák