Skip to main content
Filter by
Sorted by
Tagged with
4 votes
3 answers
164 views

This question springs from another earlier question of mine: How can a type with all constructors having a field mapped to Void via a type family have any values at all?, because one implication of ...
Enlico's user avatar
  • 30.4k
4 votes
1 answer
122 views

I'm studying Trees that grow by Shayan Najd and Simon Peyton Jones to better understand type families, and I'd like some help. The paper goes that the following data types can be used to model simply-...
Enlico's user avatar
  • 30.4k
3 votes
3 answers
98 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,815
0 votes
1 answer
57 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
1 vote
0 answers
46 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,095
Advice
0 votes
4 replies
88 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
112 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
159 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
154 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
118 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
166 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
124 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
73 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
110 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
147 views

I have the following sample code which shows the problem {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# ...
JonnyRaa's user avatar
  • 8,178

15 30 50 per page
1
2 3 4 5
3455