summaryrefslogtreecommitdiff
path: root/Test/dafny1/Rippling.dfy
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2011-11-21 22:40:44 -0800
committerGravatar Rustan Leino <leino@microsoft.com>2011-11-21 22:40:44 -0800
commit456b38819dd1bdafdf2baaa59125ecf9910722ed (patch)
tree30a578b1c14143c1ae5b4d321b9f7bc587d6852a /Test/dafny1/Rippling.dfy
parent1558959e901ab53203f08c1dcbc6acaa7ed7460f (diff)
Dafny: Added "type" declaration (syntax: "type X;"), which introduces an arbitrary type (like a global type parameter). In the future, a refined module may allow such types to be instantiated.
Diffstat (limited to 'Test/dafny1/Rippling.dfy')
-rw-r--r--Test/dafny1/Rippling.dfy6
1 files changed, 3 insertions, 3 deletions
diff --git a/Test/dafny1/Rippling.dfy b/Test/dafny1/Rippling.dfy
index 211afd83..677e6e70 100644
--- a/Test/dafny1/Rippling.dfy
+++ b/Test/dafny1/Rippling.dfy
@@ -278,11 +278,11 @@ function mirror(t: Tree): Tree
// Function parameters
// Dafny currently does not support passing functions as arguments. To simulate
-// arbitrary functions, the following type (declared as a class) and Apply function
-// play the role of applying some prescribed function (here, an instance of the class)
+// arbitrary functions, the following type and Apply function play the role of
+// applying some prescribed function (here, a value of the type)
// to some argument.
-class FunctionValue { }
+type FunctionValue;
function Apply(f: FunctionValue, x: Nat): Nat // this function is left uninterpreted
// The following functions stand for the constant "false" and "true" functions,