# Learn

**URL:** https://discourse.haskell.org/c/learn/5.md?page=1

[Latest](https://discourse.haskell.org/latest.md) · [Categories](https://discourse.haskell.org/categories.md) · [Tags](https://discourse.haskell.org/tags.md)

**Page:** 2

---

## [Verifying type families for termination and correctness](https://discourse.haskell.org/t/verifying-type-families-for-termination-and-correctness/14365)

<div class="topic-metadata">

**Author:** [@dyaitskov](https://discourse.haskell.org/u/dyaitskov)\
**Replies:** 7\
**Last updated:** [July 14, 2026, 4:09pm UTC](https://discourse.haskell.org/t/verifying-type-families-for-termination-and-correctness/14365 "2026-07-14T16:09:20Z")

</div>

Hi, Powerful Haskell type system helps to catch errors, but as the number of type functions and their sizes grows I anticipate the opposite effect and I would like to have a way to verify them. Is there a tool or techn…

---

## [Documentation/Source Link Broken in Emacs/VScode](https://discourse.haskell.org/t/documentation-source-link-broken-in-emacs-vscode/14353)

<div class="topic-metadata">

**Author:** [@dawkrish](https://discourse.haskell.org/u/dawkrish)\
**Replies:** 5\
**Last updated:** [July 7, 2026, 7:46am UTC](https://discourse.haskell.org/t/documentation-source-link-broken-in-emacs-vscode/14353 "2026-07-07T07:46:47Z")

</div>

Reddit Link - Reddit - Please wait for verification GH issue - Documentation URLs are broken · Issue #4579 · haskell/haskell-language-server · GitHub Is this bug fixed? Below is the reddit post body I have tried Emac…

---

## [Weird bug on Hackage: hackage 'turncoat' project does not display properly](https://discourse.haskell.org/t/weird-bug-on-hackage-hackage-turncoat-project-does-not-display-properly/14351)

<div class="topic-metadata">

**Author:** [@sourdecor](https://discourse.haskell.org/u/sourdecor)\
**Replies:** 3\
**Last updated:** [July 6, 2026, 1:31am UTC](https://discourse.haskell.org/t/weird-bug-on-hackage-hackage-turncoat-project-does-not-display-properly/14351 "2026-07-06T01:31:34Z")

</div>

This is my first time posting here, sorry if it is a weird problem no one cares about, just thought I would mention it. I am on Ubuntu 26.04, and in Firefox and Chrome I cannot click any of the links or highlight any of…

---

## [No Syntax Highlighting in VSCode on Windows](https://discourse.haskell.org/t/no-syntax-highlighting-in-vscode-on-windows/14345)

<div class="topic-metadata">

**Author:** [@KripkesBeard](https://discourse.haskell.org/u/KripkesBeard)\
**Replies:** 3\
**Last updated:** [July 4, 2026, 4:15pm UTC](https://discourse.haskell.org/t/no-syntax-highlighting-in-vscode-on-windows/14345 "2026-07-04T16:15:50Z")

</div>

I’ve been away from Haskell for a few years and have run into some issues when trying to set things up on a new Windows machine. After installing everything except for HLS via ghcup and installing the Haskell extension …

---

## [Meaning of strictness](https://discourse.haskell.org/t/meaning-of-strictness/14326)

<div class="topic-metadata">

**Author:** [@ynishiza](https://discourse.haskell.org/u/ynishiza)\
**Replies:** 13\
**Last updated:** [July 3, 2026, 7:51am UTC](https://discourse.haskell.org/t/meaning-of-strictness/14326 "2026-07-03T07:51:18Z")

</div>

Hello Haskell community. I’ve only been a spectator in this discourse so far, so this is my first time starting a post myself. Nice to meet you! I thought I understood what strictness meant but I realized there were sti…

---

## [Can NOINLINE fail to prevent inlining?](https://discourse.haskell.org/t/can-noinline-fail-to-prevent-inlining/14324)

<div class="topic-metadata">

**Author:** [@brandonchinn178](https://discourse.haskell.org/u/brandonchinn178)\
**Replies:** 14\
**Last updated:** [July 1, 2026, 8:53pm UTC](https://discourse.haskell.org/t/can-noinline-fail-to-prevent-inlining/14324 "2026-07-01T20:53:12Z")

</div>

If a top-level variable foo :: Foo is annotated with NOINLINE, are there any situations where GHC would inline it anyway? Context I prototyped a new API for the prometheus package to define counters as top-level variabl…

---

## [\[wasm\] \`warning: return type of 'main' is not 'int' ' \[-Wmain-return-type\]\`](https://discourse.haskell.org/t/wasm-warning-return-type-of-main-is-not-int-wmain-return-type/13932)

<div class="topic-metadata">

**Author:** [@Ambrose](https://discourse.haskell.org/u/Ambrose)\
**Replies:** 3\
**Last updated:** [June 27, 2026, 11:57pm UTC](https://discourse.haskell.org/t/wasm-warning-return-type-of-main-is-not-int-wmain-return-type/13932 "2026-06-27T23:57:13Z")

</div>

I forked @Tritlo 's wasm-game for the upcoming Ludum Dare 59. I reworked the dev env to be Nix flake-based. It all builds and runs fine..but I get a warning at the C compiler level: /var/folders/17/b\_0jqlgs3gx\_l0nph13\_c…

---

## [NixOS, posix\_spawn: Argument list too long](https://discourse.haskell.org/t/nixos-posix-spawn-argument-list-too-long/14310)

<div class="topic-metadata">

**Author:** [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Replies:** 3\
**Last updated:** [June 23, 2026, 11:38pm UTC](https://discourse.haskell.org/t/nixos-posix-spawn-argument-list-too-long/14310 "2026-06-23T23:38:44Z")

</div>

New to NixOS, I thought I would see if I could use Stack to build Stack. However, GHC fails and I wondered if I was hitting a known problem on NixOS and, if so, is there a solution? GHC 9.10.3 fails at the linking stage…

---

## [Error GHC-91510: illegal polymorphic type](https://discourse.haskell.org/t/error-ghc-91510-illegal-polymorphic-type/14304)

<div class="topic-metadata">

**Author:** [@mixphix](https://discourse.haskell.org/u/mixphix)\
**Replies:** 11\
**Last updated:** [June 23, 2026, 12:55pm UTC](https://discourse.haskell.org/t/error-ghc-91510-illegal-polymorphic-type/14304 "2026-06-23T12:55:47Z")

</div>

I’m working on constrained categories, and I want to write the following: type Category :: (k -\> k -\> Type) -\> Constraint class Category cat where type Objects cat (x :: k) :: Constraint type Objects cat x = () id…

---

## [Adding \`ghc-options\` to a package from a \`source-repository-package\` not working](https://discourse.haskell.org/t/adding-ghc-options-to-a-package-from-a-source-repository-package-not-working/14300)

<div class="topic-metadata">

**Author:** [@Ambrose](https://discourse.haskell.org/u/Ambrose)\
**Replies:** 7\
**Last updated:** [June 22, 2026, 2:23am UTC](https://discourse.haskell.org/t/adding-ghc-options-to-a-package-from-a-source-repository-package-not-working/14300 "2026-06-22T02:23:25Z")

</div>

This is the commit in question: cute-c2 ..doesnt compile due to duplicate record fields in re-export · ramirez7/theveryseriousjuniperdevgamejam2026@58c3539 · GitHub I’m using the wasm backend toolchain (ghc 9.14.1.20260…

---

## [NixOS, VS Code and Haskell-related extensions for VS Code](https://discourse.haskell.org/t/nixos-vs-code-and-haskell-related-extensions-for-vs-code/14299)

<div class="topic-metadata">

**Author:** [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)\
**Replies:** 2\
**Last updated:** [June 21, 2026, 10:34pm UTC](https://discourse.haskell.org/t/nixos-vs-code-and-haskell-related-extensions-for-vs-code/14299 "2026-06-21T22:34:41Z")

</div>

I am a Windows/Windows Terminal/VS Code user, experimenting with NixOS/Plasma as a dual boot (principally with the long term aim to support better users of Stack on NixOS). I’ve configured NixOS to have Stack (the stack …

---

## [Config languages (and Dhall)](https://discourse.haskell.org/t/config-languages-and-dhall/13948)

<div class="topic-metadata">

**Author:** [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Replies:** 28\
**Last updated:** [June 18, 2026, 8:09pm UTC](https://discourse.haskell.org/t/config-languages-and-dhall/13948 "2026-06-18T20:09:00Z")

</div>

I’ve been tinkering with Dhall in GHCup: ghcup-metadata/dhall at installer-dsl · haskell/ghcup-metadata · GitHub But my feeling was it is not a good fit: no text comparison updating deeply nested Maps is very hard syn…

---

## [Specialization and dead code elimination](https://discourse.haskell.org/t/specialization-and-dead-code-elimination/14283)

<div class="topic-metadata">

**Author:** [@mkleczek](https://discourse.haskell.org/u/mkleczek)\
**Replies:** 1\
**Last updated:** [June 17, 2026, 5:28pm UTC](https://discourse.haskell.org/t/specialization-and-dead-code-elimination/14283 "2026-06-17T17:28:54Z")

</div>

Hi All, I am struggling with code optimization. I have a polymorphic function fun in module A that is only used in module B. Adding -fexpose-overloaded-unfoldings -fspecialise-aggressively caused GHC to generate a spec…

---

## [Best way to run tests on file save](https://discourse.haskell.org/t/best-way-to-run-tests-on-file-save/14264)

<div class="topic-metadata">

**Author:** [@marcosh](https://discourse.haskell.org/u/marcosh)\
**Replies:** 7\
**Last updated:** [June 17, 2026, 10:49am UTC](https://discourse.haskell.org/t/best-way-to-run-tests-on-file-save/14264 "2026-06-17T10:49:47Z")

</div>

TL;DR: what is the best way to run tests on every file save? On the project we have at work, I’d like to run the test suite at every file save. At the moment I’m doing it using stack test --file-watch. This works but it…

---

## [Optimizing interpreted code](https://discourse.haskell.org/t/optimizing-interpreted-code/14281)

<div class="topic-metadata">

**Author:** [@mchav](https://discourse.haskell.org/u/mchav)\
**Replies:** 2\
**Last updated:** [June 17, 2026, 3:27am UTC](https://discourse.haskell.org/t/optimizing-interpreted-code/14281 "2026-06-17T03:27:32Z")

</div>

Looking into options for making GHCi run faster and came across: 3. Using GHCi — Glasgow Haskell Compiler 9.15.20260306 User's Guide Before GHC 9.8, optimizations were considered too unstable to be used with the byteco…

---

## [What is a higher-order effect?](https://discourse.haskell.org/t/what-is-a-higher-order-effect/10744)

<div class="topic-metadata">

**Author:** [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Replies:** 33\
**Last updated:** [June 13, 2026, 2:21pm UTC](https://discourse.haskell.org/t/what-is-a-higher-order-effect/10744 "2026-06-13T14:21:40Z")

</div>

Via a comment of @arybczak, I came to this example of an effectful higher-order effect: ▶ Preamble example :: IO () example = runEff $ runReader "global" $ do interpret (\\\_ SomeAction -\> (liftIO . putStrLn) =\<…

---

## [Is there a way to get a OsChar literal more conveniently than osp + head](https://discourse.haskell.org/t/is-there-a-way-to-get-a-oschar-literal-more-conveniently-than-osp-head/14206)

<div class="topic-metadata">

**Author:** [@eldritch-cookie](https://discourse.haskell.org/u/eldritch-cookie)\
**Replies:** 9\
**Last updated:** [June 9, 2026, 9:05am UTC](https://discourse.haskell.org/t/is-there-a-way-to-get-a-oschar-literal-more-conveniently-than-osp-head/14206 "2026-06-09T09:05:55Z")

</div>

i started trying to use OsString + OsChar and immediately ran into this issue using osp is really annoying but tolerable this is more than double the overhead

---

## [Euterpea library to create music with Haskell](https://discourse.haskell.org/t/euterpea-library-to-create-music-with-haskell/8391)

<div class="topic-metadata">

**Author:** [@Toxypiks](https://discourse.haskell.org/u/Toxypiks)\
**Replies:** 5\
**Last updated:** [June 4, 2026, 11:02pm UTC](https://discourse.haskell.org/t/euterpea-library-to-create-music-with-haskell/8391 "2026-06-04T23:02:40Z")

</div>

Hey guys, I’m currently trying to play some notes with the Haskell Euterpea library. I’m using yoshimi as a synthesizer software. My Problem is, for some odd reason the first note gets skipped, only the second, third an…

---

## [Any way to unroll Generic instances?](https://discourse.haskell.org/t/any-way-to-unroll-generic-instances/14198)

<div class="topic-metadata">

**Author:** [@BurningWitness](https://discourse.haskell.org/u/BurningWitness)\
**Replies:** 2\
**Last updated:** [June 3, 2026, 3:17pm UTC](https://discourse.haskell.org/t/any-way-to-unroll-generic-instances/14198 "2026-06-03T15:17:37Z")

</div>

Looking to know whether there’s any way to go from data Foo = … deriving Generic deriving Bar \[via Quux Foo\] to data Foo = … instance Bar Foo where … without potentially introducing errors in…

---

## [Template haskell quotations guide](https://discourse.haskell.org/t/template-haskell-quotations-guide/14185)

<div class="topic-metadata">

**Author:** [@ashokkimmel](https://discourse.haskell.org/u/ashokkimmel)\
**Replies:** 3\
**Last updated:** [June 2, 2026, 5:49pm UTC](https://discourse.haskell.org/t/template-haskell-quotations-guide/14185 "2026-06-02T17:49:57Z")

</div>

Because of Working towards a more stable Template Haskell, I’m trying to use quotes whenever possible in my template Haskell. Unfortunately, I don’t know what types are expected where in the template haskell quotes. (e.g…

---

## [Pattern Synonyms and type families](https://discourse.haskell.org/t/pattern-synonyms-and-type-families/14180)

<div class="topic-metadata">

**Author:** [@dyaitskov](https://discourse.haskell.org/u/dyaitskov)\
**Replies:** 6\
**Last updated:** [June 1, 2026, 9:53pm UTC](https://discourse.haskell.org/t/pattern-synonyms-and-type-families/14180 "2026-06-01T21:53:51Z")

</div>

Hi, I tried to use a pattern synonym with a type family and got the following GHC error: Pattern synonym ‘ZeroAB’ cannot be used here (pattern synonyms cannot be promoted) {-# LANGUAGE DataKinds #-} {-# LANGUAGE …

---

## [Changing Reader environment type (in an effect system?)](https://discourse.haskell.org/t/changing-reader-environment-type-in-an-effect-system/12804)

<div class="topic-metadata">

**Author:** [@marcosh](https://discourse.haskell.org/u/marcosh)\
**Replies:** 17\
**Last updated:** [May 29, 2026, 10:25pm UTC](https://discourse.haskell.org/t/changing-reader-environment-type-in-an-effect-system/12804 "2026-05-29T22:25:00Z")

</div>

If I have a function foo :: (MonadReader a m) =\> m c and I want to call it in from another function bar :: (MonadReader (a, b) m) =\> m c I think I need to ask first the value from the reader and then rewrap it with a…

---

## [Error installing freetype2](https://discourse.haskell.org/t/error-installing-freetype2/14155)

<div class="topic-metadata">

**Author:** [@ashokkimmel](https://discourse.haskell.org/u/ashokkimmel)\
**Replies:** 7\
**Last updated:** [May 27, 2026, 6:55pm UTC](https://discourse.haskell.org/t/error-installing-freetype2/14155 "2026-05-27T18:55:39Z")

</div>

I was trying to install freetype2 after trying to use brillo. (base) myname@My-computer Documents % cabal install freetype2 ▶ Cabal install warning ▶ Error message ▶ Cabal module compilation log ▶ Error message ▶ GCC Version ▶ G…

---

## [Why no exposed \`NullAddr#\` literal?](https://discourse.haskell.org/t/why-no-exposed-nulladdr-literal/14157)

<div class="topic-metadata">

**Author:** [@thesnakefromthelemma](https://discourse.haskell.org/u/thesnakefromthelemma)\
**Replies:** 4\
**Last updated:** [May 27, 2026, 1:11pm UTC](https://discourse.haskell.org/t/why-no-exposed-nulladdr-literal/14157 "2026-05-27T13:11:56Z")

</div>

Suppose that, switching on -XDataKinds -XGADTSyntax -XKindSignatures -XMagicHash -XUnliftedNewtypes and importing the relevant definitions from GHC.Exts, one creates the newtype newtype MyAddr# :: TYPE AddrRep where …

---

## [Lazily consuming a self-referential linked list](https://discourse.haskell.org/t/lazily-consuming-a-self-referential-linked-list/14131)

<div class="topic-metadata">

**Author:** [@VegOwOtenks](https://discourse.haskell.org/u/VegOwOtenks)\
**Replies:** 17\
**Last updated:** [May 26, 2026, 5:02am UTC](https://discourse.haskell.org/t/lazily-consuming-a-self-referential-linked-list/14131 "2026-05-26T05:02:13Z")

</div>

I grew tired of explicitly writing fixed-point/worklist algorithms so I tried to create a combinator for it, the signature looks like this: run :: \[q\] -\> s -\> (q -\> s -\> \[q\] -\> (\[q\], s)) -\> s Which is to say: Given any…

---

## [How do I implement this transformation using generics?](https://discourse.haskell.org/t/how-do-i-implement-this-transformation-using-generics/14153)

<div class="topic-metadata">

**Author:** [@kevin](https://discourse.haskell.org/u/kevin)\
**Replies:** 1\
**Last updated:** [May 24, 2026, 2:29pm UTC](https://discourse.haskell.org/t/how-do-i-implement-this-transformation-using-generics/14153 "2026-05-24T14:29:04Z")

</div>

Let’s say I have a data type for integer lists. There are two Conses: one that takes a normal List, and one that takes a DeeperList, which just embeds a List. data DeeperList = DeeperList List data List = Nil …

---

## [Empty list without list literals](https://discourse.haskell.org/t/empty-list-without-list-literals/14147)

<div class="topic-metadata">

**Author:** [@ashokkimmel](https://discourse.haskell.org/u/ashokkimmel)\
**Replies:** 2\
**Last updated:** [May 22, 2026, 2:02pm UTC](https://discourse.haskell.org/t/empty-list-without-list-literals/14147 "2026-05-22T14:02:18Z")

</div>

This is my situation. I want to make this rule: {-# RULES "++ 1 element" forall x xs. (x:\[\]) ++ xs = x:xs #-} However, I have OverloadedLists enabled, so this becomes. {-# RULES "++ 1 element" forall x xs. (x:(fromLi…

---

## [Game engine for 2d games](https://discourse.haskell.org/t/game-engine-for-2d-games/13977)

<div class="topic-metadata">

**Author:** [@Swordlash](https://discourse.haskell.org/u/Swordlash)\
**Replies:** 9\
**Last updated:** [May 20, 2026, 3:32pm UTC](https://discourse.haskell.org/t/game-engine-for-2d-games/13977 "2026-05-20T15:32:01Z")

</div>

If I wanted to create an indie 2d game, is there a reasonably high level game engine / library for that purpose?

---

## [How to parse specific syntax elements and discard the rest?](https://discourse.haskell.org/t/how-to-parse-specific-syntax-elements-and-discard-the-rest/14047)

<div class="topic-metadata">

**Author:** [@leana8959](https://discourse.haskell.org/u/leana8959)\
**Replies:** 7\
**Last updated:** [May 14, 2026, 2:41pm UTC](https://discourse.haskell.org/t/how-to-parse-specific-syntax-elements-and-discard-the-rest/14047 "2026-05-14T14:41:15Z")

</div>

Hello, I’m trying to write a tool to analyze nix files, notably rewriting/analyzing the path literals. I would like to parse a nix file into a list of path literals and the location they can be found. With this data I …

---

## [Is it okay to use the cabal solver to conditionally define dependencies and instances like this?](https://discourse.haskell.org/t/is-it-okay-to-use-the-cabal-solver-to-conditionally-define-dependencies-and-instances-like-this/14103)

<div class="topic-metadata">

**Author:** [@clinton](https://discourse.haskell.org/u/clinton)\
**Replies:** 3\
**Last updated:** [May 14, 2026, 8:06am UTC](https://discourse.haskell.org/t/is-it-okay-to-use-the-cabal-solver-to-conditionally-define-dependencies-and-instances-like-this/14103 "2026-05-14T08:06:31Z")

</div>

Edit: In hindsight this approach will result in a circular dependency between alice and alice-bob-instances anyway so won’t work. Edit 2: Also see my reply below where I admit that just having the orphan package is the …

[Previous page](https://discourse.haskell.org/c/learn/5.md)

[Next page](https://discourse.haskell.org/c/learn/5.md?page=2)
