Skip to content

Instantly share code, notes, and snippets.

@mmakowski
Created February 11, 2016 19:04
Show Gist options
  • Save mmakowski/f4531b74c97ffcaacbf8 to your computer and use it in GitHub Desktop.
Save mmakowski/f4531b74c97ffcaacbf8 to your computer and use it in GitHub Desktop.
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