Ejemplo n.º 1
0
        public override string VisitSumType(SumType t)
        {
            var rArgs = VisitList(t.Args);
            var aggr  = rArgs.Aggregate((s1, s2) => s1 + " + " + s2);

            return(IsaPrettyPrinterHelper.Parenthesis(aggr));
        }
Ejemplo n.º 2
0
        public override string VisitArrowType(ArrowType t)
        {
            var rArg = Visit(t.ArgType);
            var rRes = Visit(t.ResType);

            return(IsaPrettyPrinterHelper.Parenthesis(rArg + " => " + rRes));
        }
Ejemplo n.º 3
0
        public override string VisitDataType(DataType t)
        {
            var rArgs = VisitList(t.Args);

            if (t.Args.Count == 0)
            {
                return(IsaPrettyPrinterHelper.Parenthesis(t.Name));
            }
            return(IsaPrettyPrinterHelper.Parenthesis(rArgs.SpaceAggregate() + t.Name));
        }
Ejemplo n.º 4
0
 public override string VisitVarType(VarType t)
 {
     return(IsaPrettyPrinterHelper.Parenthesis("\'" + t.Name));
 }