Haskell Warnings Break Instance Resolution
Today after an hour of "+the fuck can possibly be wrong here???" I found another bug in the Haskell compiler. Disabling already disabled warnings breaks basic code in the most cryptic way imaginable. Programmers do deserve this. It's divine punishment for making the rock think. Disabling warnings breaks instance resolution This snippet: {-# OPTIONS_GHC -Wno-all #-} main = print $ Just () == Nothing fails with <source>:2:24: error: [GHC-39999] * No instance for ‘Eq (Maybe ())’ arising from a use of ‘==’ * In the second argument of ‘($)’, namely ‘Just () == Nothing’ In the expression: print $ Just () == Nothing In an equation for ‘main’: main = print $ Just () == Nothing | 2 | main = print $ Just () == Nothing |
A programmer shares a screenshot of a Haskell compiler issue where disabling warnings causes a basic comparison to fail with an absurd typeclass error. The joke is that Haskell's extreme type-system strictness turns a tiny, seemingly obvious expression into cryptic divine punishment for programmers who made the machine think too hard.
programming code / программный кодissue tracker screenshot / скриншот трекера задачerror message / сообщение об ошибкеblack background / чёрный фонwhite text / белый текстHaskell compiler / компилятор Haskellwarning flag / флаг предупрежденийcode snippet / фрагмент кодаtypeclass resolution / разрешение типоклассаrounded white panel / округлая белая панель
- @dev_meme / 7094 2025-09-02
- Type
- image
- Size
- 667×800 · 83.6 KiB
- Mood
- sarcastic, absurd
- Language
- en
- Added