Created
February 11, 2016 19:04
-
-
Save mmakowski/f4531b74c97ffcaacbf8 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 Evaluator where | |
--data Expr | |
-- = Lit Int | |
-- | Add Expr Expr | |
class ExprSym e where | |
lit :: Int -> e | |
add :: e -> e -> e | |
instance ExprSym Int where | |
lit = id | |
add = (+) | |
evaluate :: Int -> Int | |
evaluate = id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment