package gadt;

/**
 * Created by bibou on 12/5/14.
 */
public interface Visitor<C> {
    <A> App<C, A> caseIntLit (IntLit expr);
    <A> App<C, A> caseBoolLit (BoolLit expr);
    <A> App<C, A> casePlus (Plus expr);
    <Y, A> App<C, A> caseIf (If<Y> expr);
}

@@ -47,16 +47,257 @@
 /14.%0A */
+%0A%0A// In Haskell with GADTs%0A%0A//  data Expr a where%0A//      IntLit      :: Int  -%3E Expr Int%0A//      BoolLit     :: Bool -%3E Expr Bool%0A//      Plus        :: Expr Int -%3E Expr Int -%3E Expr Int%0A//      If          :: Expr Bool -%3E Expr Y -%3E Expr Y%0A%0A
 %0Apublic 

Add a GADT comment from Haskell.