diff options
-rw-r--r-- | restricted_exisential_type.icl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/restricted_exisential_type.icl b/restricted_exisential_type.icl new file mode 100644 index 0000000..0e0bff8 --- /dev/null +++ b/restricted_exisential_type.icl @@ -0,0 +1,14 @@ +module restricted_existential_type + +import StdString + +:: List = Nil + | E.e: Cons e List & toString e + +instance toString List +where + toString Nil = "[]" + toString (Cons e l) = "["+++toString e+++":"+++toString l+++"]" + +Start = toString (Cons 'a' (Cons 5 Nil)) + |