haskell
Skill15 starsChanged 2 months agoMITView on GitHub
Expert Haskell assistance covering pure functional programming, monads, typeclasses, GHC, and Cabal/Stack. Use when developing provably correct software, compilers, financial models, or theorem provers.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- rogue-dev-studio/ai-agents-roguetheir own version, first seen Nov 1, 2026
- srid/skillstheir own version, first seen Apr 9, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- rogue-dev-studio/ai-agents-rogue★ 2same name
- srid/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 107
Use GHC Modern Language Extensions: Standardize on GHC2021 or GHC2024 with OverloadedStrings and RecordWildCards.
- Very specific: line 108
Use Strict Data Types in Production: Use Data.Text instead of String ([Char]).
- Very specific: line 114
Use head or fromJust: Partial functions crash at runtime on empty lists.
- Very specific: line 115
Use String for high-throughput text processing: The default String is a linked list of characters.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Haskell
An advanced, purely functional programming language.
When to Use
- Pure Functional Programming: Building systems with mathematical guarantees of purity, referential transparency, and immutability.
- Compiler Construction & Domain-Specific Languages (DSLs): Authoring parsers, programming language compilers, and type checkers.
- Financial Modeling & Cryptographic Protocols: Implementing smart contract runtimes (Cardano/Plutus) and quantitative financial models.
- High-Assurance Systems: Mission-critical software where compile-time type verification must eliminate runtime errors entirely.
Quick Start
main :: IO ()
main = putStrLn "Hello, World!"
factorial :: Integer -> Integer
factorial 0 = 1
factorial n = n * factorial (n - 1)Core Concepts
Non-Strict Lazy Evaluation
Expressions are not evaluated until their results are explicitly demanded by consumer functions:
-- Generates an infinite stream of Fibonacci numbers lazily
fibs :: [Integer]
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
-- Safely takes only the first 10 elements without evaluating infinity
main :: IO ()
main = print (take 10 fibs) -- [0,1,1,2,3,5,8,13,21,34]Monads & Explicit I/O Separation
Isolates pure code from side effects (disk, network, state) using Monads:
-- Pure logic (no side-effects possible)
validateEmail :: String -> Either String String
validateEmail email
| '@' `elem` email = Right email
| otherwise = Left "Invalid email format"
-- Explicit IO boundary
main :: IO ()
main = do
putStrLn "Enter email address:"
input <- getLine
case validateEmail input of
Right email -> putStrLn ("Success: " ++ email)
Left err -> putStrLn ("Error: " ++ err)Advanced Typeclasses & Higher-Kinded Types
Defines generic behaviors across data types (Functor, Applicative, Monad):
-- Custom Functor mapping over container structure
data Tree a = Leaf a | Node (Tree a) (Tree a) deriving (Show)
instance Functor Tree where
fmap f (Leaf x) = Leaf (f x)
fmap f (Node l r) = Node (fmap f l) (fmap f r)Common Patterns
Monadic Error Handling with Either and Do Notation
Problem: Deeply nested error checks make business logic unreadable.
Solution:
Compose operations cleanly using the Either monad:
data User = User { userId :: Int, email :: String } deriving (Show)
validateId :: Int -> Either String Int
validateId uid = if uid > 0 then Right uid else Left "Invalid User ID"
validateEmail :: String -> Either String String
validateEmail e = if '@' `elem` e then Right e else Left "Invalid Email"
createUser :: Int -> String -> Either String User
createUser uid e = do
validId <- validateId uid
validE <- validateEmail e
return (User validId validE)Best Practices
Do:
- Use GHC Modern Language Extensions: Standardize on
GHC2021orGHC2024withOverloadedStringsandRecordWildCards. - Use Strict Data Types in Production: Use
Data.Textinstead ofString([Char]); use strict fields (!) in record data types. - Structure Applications with Polysemy or MTL: Manage effects cleanly using Monad Transformers (
ReaderT,ExceptT) or effect systems. - Enforce Warnings with
-Wall: Compile with-Wall -Werrorto treat unhandled pattern cases as fatal build errors.
Don't:
- Use
headorfromJust: Partial functions crash at runtime on empty lists; use pattern matching or safe alternatives (headMay). - Use
Stringfor high-throughput text processing: The defaultStringis a linked list of characters; useTextorByteString. - Cause space leaks with lazy accumulation: Use strict fold (
foldl') instead of lazy fold (foldl) to prevent building massive thunk trees.
Troubleshooting
| Error | Cause | Solution |
Couldn't match expected type '...' with actual type '...' | Type mismatch in expression. | Check function signature and use GHC typed holes (_) to inspect required types. |
Non-exhaustive patterns in function | Pattern match missing one or more constructor cases. | Compile with -Wall to catch unhandled pattern match cases. |
Infinite loop / space leak on foldl | Lazy evaluation retaining thunk chains in memory. | Use strict fold foldl' from Data.List to force eager evaluation. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

