Skip to content

Instantly share code, notes, and snippets.

@valpackett
Created December 3, 2019 21:27
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 valpackett/4d02bce08667b084c06f7a4084bd572f to your computer and use it in GitHub Desktop.
Save valpackett/4d02bce08667b084c06f7a4084bd572f to your computer and use it in GitHub Desktop.
module Main
data Printable : Type where
Pr : Show a => a -> Printable
Show Printable where
show (Pr p) = show p
hello : (f: Bool) -> Printable
hello False = Pr 10
hello True = Pr [10, 20]
main : IO ()
main = do
putStrLn "Hello World"
v <- getLine
print $ hello $ if v == "True" then True else False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment