Last active
March 26, 2017 12:35
-
-
Save oleks/4b12ce8fdbeeeb835fff0670fbf71416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Expr | |
data Expr = X | |
| Plus (Expr, Expr) | |
Show Expr where | |
show X = "x" | |
show (Plus (e_left, e_right)) = (show e_left) ++ " + " ++ (show e_right) | |
{- | |
$ idris | |
Idris> :l Expr.idr | |
*Expr> show (Plus (X,X)) | |
prim__concat (Expr.Expr implementation of Prelude.Show.Show, method show X) | |
(prim__concat " + " (Expr.Expr implementation of Prelude.Show.Show, method show X)) : String | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment