Skip to content

Instantly share code, notes, and snippets.

@mietek
Forked from puffnfresh/Main.agda
Created July 30, 2017 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mietek/33e87d1978c0198079fe0a3fbc14fca0 to your computer and use it in GitHub Desktop.
Save mietek/33e87d1978c0198079fe0a3fbc14fca0 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