Haskell is a purely functional programming language featuring strong static typing, lazy evaluation, extensive parallelism and concurrency support, and unique abstraction capabilities.
49,128 questions- Bountied 0
- Unanswered
- Frequent
- Score
- Unanswered (my tags)
Type error in application type does not match
nextMyStates::MyState->[MyState] nextMyStates(s) =[up(s),down(s),left(s),right(s),collect(s)] isGoal::MyState->Bool isGoal (S (l) (al) d z) = if al == [] then True else False search::[MyState]-... haskell functional-programming hugs- 1
How to explicitly import 'Fn' pattern from Test.QuickCheck?
Haskell's Test.QuickCheck module exports pattern Fn, which I have been using. When I import it with: import Test.QuickCheck it works fine. However, when I import it with: import Test.QuickCheck (Fn) ... haskell quickcheck- 4,907
Syntax error in expression (unexpected `;', possibly due to bad layout) in line 50
Hello I'm writing this code as a beginner Haskell project that solves a very basic version of minesweeper. Details are unimportant but I keep getting a syntax error on line 50 in the isGoal function ... haskell functional-programming hugs- 1
yesod installation fails.. haskell --ghc-options " -fdiagnostics-color=always"
I am trying out yesod tutorial from On step no 3 stack install yesod-bin --install-ghc I get an error as shown below stack install yesod-bin --install-ghc ... haskell yesod- 93
Create haskel socket client
I try to connect to created socket by haskell: -- Logger putStrLn "Create socket" sock_logger <- socket AF_INET Stream 0 putStrLn "Bind socket" connect ... sockets haskell networking stack connection- 78
Could not find module `Network' Haskell Stack
System: Windows 10, Haskell version latest. I'm use Stack package manager. I want to add Network package - network dependency was added in package.yaml dependencies: - base >= 4.7 && < 5 ... haskell networking dependencies haskell-stack- 78
Is there a platform-independent way to check if a file path is some representation of a root directory in Haskell?
In Haskell, is there a portable way to check of a FilePath if it’s a root directory, e.g. / or // on Unix/POSIX/Linux, and C:\ or \\?\UNC\Foobar on Windows/NT/DOS? I’ve checked through the directory ... linux windows haskell path- 1,716
Haskell - Apply list of functions to a variable
I have been trying to implement a function that applies a list of functions given as a parameter to a given variable. I have been running into various type errors with infinite types and type ... haskell functional-programming- 13
How can I find all words in a string which have a capital letter?
a is a string and I would like to find all words in the string which have an upper case character. How can I convert the string to chars? listWordsWithUpper :: String -> [String] listWordsWithUpper ... string haskell char- 45
How can I only slice the list when the function is not true in haskell?
I would like to slice my list when the function is not true, but I do not have an idea what I have to give back in the otherwise case. Do you have any idea ? Example : sliceBy odd [1..5] == [[1],[2],[... list haskell slice- 33
Non-exhaustive patterns in function - Maybe type [duplicate]
In the following function definition I am getting Non-exhaustive patterns in function tapChar. What am I missing? reverseTap :: DaPhone -> Char -> [(Digit, Presses)] reverseTap phone s | ... haskell pattern-matching where-clause maybe- 31
Why is this code hanging when I execute it?
What I'm trying to achieve As an exercise, I'm trying to write a 'mergeSorted' function which takes two lists, and returns a single list, in which all the elements from the two lists are sorted. For ... haskell- 33
How can I build a haskell '#' mountain?
Define a function called mountain that draws a mountain of height n and width that can be climbed from the east (right). Widen the mountain from top to bottom by one character per line. The mountain ... haskell- 37
When using bracket with a Ptr as resource, can it be replaced with ForeignPtr?
My code uses a resource that can be described as a pointer; I'll use a void pointer here for simplicity. The resource must be closed after the computation with it finishes, so the Control.Exception.... haskell ffi- 15.1k
Restarting with Mod - q is slow after installing xmonad with stack instead of pacman
After learning that the recommended method of installing xmonad on arch is using stack/cabal, i uninstalled the pacman package and installed it with stack. Mod - q was not working initially, but ... haskell haskell-stack xmonad xmonad-contrib- 7
15 30 50 per page12345…3276 Next