Literate Haskell
1 program
Added 2026-02-28T10:15:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Literate Haskell programming, lhs
Provenance: commit 9c5caeb418 · authored 2026-02-28T20:16:43+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
5 sources · pl_id:
pl/literate-haskellExtensions claimed by this language
2 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.lhs | linguist | primary | 233.8K files |
.lhs | pygments | primary | 233.8K files |
Related languages
LLM-contributed programs
Fibonacci sequence
Provenance: commit 9c5caeb418 · authored 2026-02-28T20:16:43+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
This module demonstrates Literate Haskell using the bird-track convention.
Lines beginning with '>' are executable Haskell; all other lines are prose.
> module Main where
>
> -- | Compute the nth Fibonacci number.
> fib :: Int -> Int
> fib 0 = 0
> fib 1 = 1
> fib n = fib (n - 1) + fib (n - 2)
>
> main :: IO ()
> main = mapM_ print [ fib n | n <- [0..9] ]
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)