home
I'm using Windows. I have several Haskell packages using OpenGL. They worked until yesterday. Now...
I just see an example, which is checking if a list is nondescendant nondec :: Ord a => [a]...
So far I can only find 3 ways. First, if-then-else Second, pattern matching Third, using |. I...
I have compiled a Haskell GUI application with stack-1.7.1, ghc-8.2.2, gtk+-2.24.28 and glade-3.8....
Background: I'm writing a small application to learn Haskell. Its purpose is to parse a...
I'm attempting to use postgresql-simple to interact with a Redshift cluster. One of the things I...
I am a mathematician who works a lot with category theory, and I've been using Haskell for a while...
I'm driving myself crazy with this simple exercice. I just want to divide a list by two, separating...
I have written a data structure, data Bit a = Add a (Bit a) | End deriving (Show,Eq) data Bits a =...
I'm writing a small library in Haskell, and want to have tests to accompany it. For testing I...
I use Haskell with Stack in watch mode like this: stack build --file-watch --fast --exec...
It seems you can simply declare: import qualified Control.Category as Cat instance Cat.Category q...
I am trying to implement the Longest Common Substring algorithm in Haskell. As far as I can tell,...
[ e | v <- f:fs, q ] reduces to [ e | q ] [ v := f ] ++ [ e | v <- fs, q ] The output of [ e...
Cons has the input as a -> [a] -> [a] Can you change cons to be a -> a -> a without a list...
I have the following problem when executing the function insert sending a text type parameter and I...
This is a list subtraction example. (\\) :: Eq a => [a] -> [a] -> [a] [] \\ _ = [] xs \\...
It seems that raising a Complex Int to a power violates some contract in its instances. Am I wrong...
I want to use one list e.g. [1, 2, 4] to get elements from another list e.g. [1, 0, 2, 5, 1, 0]...
I'm something of a Haskell beginner. I'd like to know why the following isn't working: import...
Motivation I have a type, MyType, which is parametrised by a functor, f. I want to use MyType...
In an attempt to find a quick and easy way to add different time periods, it occurred to me that I...
Context. I'm running NixOS, with stack included in my configuration.nix. Running stack --version...
pure / impure: appears when we talk about the different between Haskell and lisp-family. safe /...
This question already has an answer here: Is Haskell truly pure (is...
I'm learning Haskell. Average of large number of Dice Rolls in Haskell How shall I make the below...
I am wondering if one can write a functional program (as in Haskell or OCaml) that takes two lists...
I'm reading a book and it asked me to define my own concat function. I defined it correctly...
I'm having a bit of trouble parsing this. But as I write it out, I think I may have it. let add =...
I have this JSON code { "cod": "200", "message": 0.0205, "cnt": 40, "list": [{ "dt":...