summaryrefslogtreecommitdiff
path: root/Source/Dafny/Printer.cs
diff options
context:
space:
mode:
authorGravatar Rustan Leino <unknown>2014-07-11 20:50:08 -0700
committerGravatar Rustan Leino <unknown>2014-07-11 20:50:08 -0700
commita8161c0e52d9c1743679091c36f64e925723d607 (patch)
tree01d7b64cc2c85b81452e3aceba4318f6c1e68353 /Source/Dafny/Printer.cs
parent92cced2f7bde488e450fa12f7ef50d98f474ab61 (diff)
Added type synonyms. (No support yet for these in refinements.)
Diffstat (limited to 'Source/Dafny/Printer.cs')
-rw-r--r--Source/Dafny/Printer.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Dafny/Printer.cs b/Source/Dafny/Printer.cs
index 440fcc68..49121848 100644
--- a/Source/Dafny/Printer.cs
+++ b/Source/Dafny/Printer.cs
@@ -142,6 +142,14 @@ namespace Microsoft.Dafny {
wr.Write("(==)");
}
wr.WriteLine();
+ } else if (d is TypeSynonymDecl) {
+ var syn = (TypeSynonymDecl)d;
+ if (i++ != 0) { wr.WriteLine(); }
+ Indent(indent);
+ PrintClassMethodHelper("type", syn.Attributes, syn.Name, syn.TypeArgs);
+ wr.Write(" = ");
+ PrintType(syn.Rhs);
+ wr.WriteLine();
} else if (d is DatatypeDecl) {
if (i++ != 0) { wr.WriteLine(); }
PrintDatatype((DatatypeDecl)d, indent);