Skip to main content
1 vote
3 answers
32 views

I have some programs consuming a list with structured items. The list may contain an item multiple times. From these items I extract a subcomponent and collect all these different subcomponents. With ...
Jogger's user avatar
  • 1,793
0 votes
1 answer
47 views

I'm building a package where one of its dependencies requires an external library. So the stack.yaml looks like this: snapshot: lts-22.44 packages: - . - external/PRECiSA/PRECiSA PRECiSA's build ...
sdpoll's user avatar
  • 496
0 votes
0 answers
34 views

OK, I keep getting HLS errors even though cabal builds fine. Environment: OS: Windows 10 Pro GHC: 9.6.7 Cabal: 3.12.1.0 I'm on Windows 10 Pro Education, using GHC 9.6.7, and cabal 3.12.1.0 I'm ...
david-hoze's user avatar
  • 1,085
Advice
0 votes
4 replies
84 views

The following function shower = show "String" when it is called I get the output "\"String\"" How come those backslashes and addition quotation marks? In contrast: shower ...
Jakob jensen's user avatar
0 votes
1 answer
111 views

Is it possible to obtain an array with O(1) read and write access (like Haskell's STArray) using a read only array (such as Haskell's Data.Array.Array)? Or is there a wrapper around pure functions ...
Vladimir's user avatar
Best practices
0 votes
5 replies
157 views

module Trial where import Data.List getRunCount :: (Ord a, Eq a) => [a] -> [(a, Integer)] getRunCount lst = getRunCount' (sort lst) [] where getRunCount' :: Eq a => [a] -> [(a, ...
kesarling's user avatar
  • 2,338
0 votes
1 answer
150 views

I'm using HLS from terminal with the command haskell-language-server-9.12.2. I'm getting the following error: Step 4/4: Type checking the files 2025-12-15T23:04:57.109846Z | Info | Cradle path: app/...
Yago's user avatar
  • 493
2 votes
0 answers
114 views

I am a beginner Haskell programmer on Windows 11. I am writing a Snakes & Ladders program, and am attempting to set up a Stack environment to work in. I have been following this guide, as well as ...
bigpython's user avatar
2 votes
1 answer
163 views

The following questions are in fact exercises 6.3-i, 6.3-ii, 6.3-iii from Thinking with Types What is the rank of Int -> forall a. a -> a? What is the rank of (a -> b) -> (forall c. c -&...
Enlico's user avatar
  • 30.4k
Best practices
2 votes
11 replies
122 views

In English, I might talk about the category or property or type tree, and then refer to specific trees as tree "instances" of the property tree. (In philosophical writing, sometimes it's ...
Mars's user avatar
  • 8,894
Best practices
0 votes
2 replies
71 views

I want to make a function call with two arguments: function and its arguments. Arguments are provided as heterogeneous list (Data.HList). Function should have a signature matching types of arguments. ...
Dmitry Kapustin's user avatar
Best practices
1 vote
2 replies
108 views

How could I get a type of parameter from parametrized type? For example, for type T = Maybe String I want to get String, for type T = [Bool] I want to get Bool. It should be a function of T. Thanks in ...
Dmitry Kapustin's user avatar
0 votes
2 answers
145 views

I have the following sample code which shows the problem {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# ...
JonnyRaa's user avatar
  • 8,168
0 votes
1 answer
194 views

MRE: MyType = MyDataCtor [MyType] | MyDataCtor2 MyType MyType | ... other cases (none of which require the map operation) foo :: Type1 -> Type2 -> (Type1, Type2) For example, for the ...
kesarling's user avatar
  • 2,338
2 votes
1 answer
81 views

I'm creating a toy language in Haskell, and using Text.Parsec to parse everything, So far it's worked great, but there's a certain feature that I don't know how to implement: What I want to implement: ...
buzzbuzz20xx's user avatar

15 30 50 per page
1
2 3 4 5
3455