Skip to content

Instantly share code, notes, and snippets.

@puffnfresh
Last active July 30, 2017 01:59
Show Gist options
  • Save puffnfresh/0def5a2c09d7da144c0d7018b88bcfc2 to your computer and use it in GitHub Desktop.
Save puffnfresh/0def5a2c09d7da144c0d7018b88bcfc2 to your computer and use it in GitHub Desktop.
cat in Agda
module Main where
import IO.Primitive as Prim
open import Coinduction
open import Data.Unit
open import IO
cat : IO ⊤
cat = ♯ getContents >>= (\cs → ♯ (putStr∞ cs))
main : Prim.IO ⊤
main = run cat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment