definition module while :: Then = Then :: Else = Else :: Do = Do :: WhileExpr = (=.) infix 1 String WhileInt | If WhileBool Then WhileExpr Else WhileExpr | (:.) infixr 0 WhileExpr WhileExpr | While WhileBool Do WhileExpr | Skip | E.e: WExpr e & eval e :: WhileBool = Bool Bool | (==.) infix 4 WhileInt WhileInt | (&.) infix 3 WhileBool WhileBool | Not WhileBool | E.e: WBool e & evalb e :: WhileInt = Int Int | Var String | (+.) infixl 6 WhileInt WhileInt | E.e: WInt e & evali e class gamma g where put :: g String Int -> g get :: g String -> Int instance gamma Gamma :: Gamma emptyGamma :: Gamma class eval m :: m -> (g -> g) | gamma g class evali m :: m -> (g -> Int) | gamma g class evalb m :: m -> (g -> Bool) | gamma g instance eval WhileExpr instance evali WhileInt instance evalb WhileBool