Skip to content

Instantly share code, notes, and snippets.

View liancheng's full-sized avatar

Cheng Lian liancheng

View GitHub Profile
@jvranish
jvranish / lift.hs
Created March 29, 2011 19:47
Example of how to automatically lift a haskell function into a function on some AST
import Control.Monad
import Control.Monad.Error
instance Error (RuntimeError a) where
data Expr = Number Int
| SomethingElse
deriving (Show, Eq, Ord)
data Type = Func Type Type