Skip to content

Instantly share code, notes, and snippets.

@puffnfresh
Last active July 30, 2017 01:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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