Concurrent Haskell

1 program Added 2026-02-28T15:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 231685b27f · authored 2026-02-28T17:46:58+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

3 sources · pl_id: pl/concurrent-haskell
LLM (this repo) · 1WikipediaWikidata · Q5159099

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Designed byThe Glasgow Haskell Team
First appeared1996
LicenseBSD 3-clause (new)
Homepagehttp://downloads.haskell.org/ghc/8.10.3/docs/html/users_guide/parallel.html

Related languages

Concurrent C (0.48)CML (0.46)Concurrent ML (0.46)Concurrent Pascal (0.44)ConcurrentML (0.43)

LLM-contributed programs

Concurrent worker threads with channel

Provenance: commit 231685b27f · authored 2026-02-28T17:46:58+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.hs · added: 2026-02-28T15:00:00Z
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Concurrent.Chan

-- Simple concurrent logger: multiple worker threads send messages via a shared channel

logger :: Chan String -> MVar () -> IO ()
logger chan done = do
  msg <- readChan chan
  putStrLn msg
  if msg == "STOP"
    then putMVar done ()
    else logger chan done

worker :: Chan String -> Int -> IO ()
worker chan wid = do
  threadDelay (wid * 200000)
  writeChan chan ("Worker " ++ show wid ++ " done after " ++ show wid ++ "00ms")

main :: IO ()
main = do
  chan <- newChan
  done <- newEmptyMVar
  let numWorkers = 4
  mapM_ (\i -> forkIO (worker chan i)) [1..numWorkers]
  forkIO (logger chan done)
  threadDelay 1200000
  writeChan chan "STOP"
  takeMVar done
  putStrLn "All workers finished."

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.)

Contribute — propose a file extension

Tell us where to find evidence about Concurrent Haskell (mapped to pl/concurrent-haskell). 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/Concurrent Haskell/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Concurrent Euclid Concurrent ML →