LiquidHaskell

1 program Added 2026-02-26T00:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Liquid Haskell, LH
Provenance: commit 48f8ac6ac8 · authored 2026-02-26T18:10:11+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Liquid Haskell (0.82)Liskell (0.37)Literate Haskell (0.24)Liquidity (0.23)Liquidsoap (0.22)

LLM-contributed programs

Fibonacci and absolute value with refinement types

Provenance: commit 48f8ac6ac8 · authored 2026-02-26T18:10:11+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.hs · license: MIT · added: 2026-02-26T00:00:00Z
module Main where

{-@ type Nat = {v:Int | v >= 0} @-}

{-@ fibonacci :: Nat -> Nat @-}
fibonacci :: Int -> Int
fibonacci 0 = 0
fibonacci 1 = 1
fibonacci n = fibonacci (n-1) + fibonacci (n-2)

{-@ abs' :: Int -> Nat @-}
abs' :: Int -> Int
abs' n
  | n < 0    = (-n)
  | otherwise = n

main :: IO ()
main = do
  putStrLn "Fibonacci sequence:"
  mapM_ (print . fibonacci) [0..10]
  putStrLn "Absolute values:"
  mapM_ (\x -> print (abs' x)) [-3..3]

Contribute — propose a file extension

Tell us where to find evidence about LiquidHaskell (mapped to pl/liquidhaskell). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/LiquidHaskell/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Liquid Haskell Liquidity →