summaryrefslogtreecommitdiff
path: root/src/core_util.sig
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-06-08 17:15:09 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-06-08 17:15:09 -0400
commitbc3d86e857b3b5884aba5b61d7bedb40e76e6616 (patch)
tree11a3ee7fb0a09f4b89b8ee195cc96b50850df233 /src/core_util.sig
parentd52cd67621a27bbd27888c170c843fafb552658c (diff)
Tree-shaking
Diffstat (limited to 'src/core_util.sig')
-rw-r--r--src/core_util.sig34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/core_util.sig b/src/core_util.sig
index 45ee7dfd..64cd671b 100644
--- a/src/core_util.sig
+++ b/src/core_util.sig
@@ -55,6 +55,11 @@ structure Con : sig
con : 'context -> Core.con' -> Core.con',
bind : 'context * binder -> 'context}
-> 'context -> (Core.con -> Core.con)
+
+ val fold : {kind : Core.kind' * 'state -> 'state,
+ con : Core.con' * 'state -> 'state}
+ -> 'state -> Core.con -> 'state
+
val exists : {kind : Core.kind' -> bool,
con : Core.con' -> bool} -> Core.con -> bool
end
@@ -85,6 +90,12 @@ structure Exp : sig
exp : 'context -> Core.exp' -> Core.exp',
bind : 'context * binder -> 'context}
-> 'context -> (Core.exp -> Core.exp)
+
+ val fold : {kind : Core.kind' * 'state -> 'state,
+ con : Core.con' * 'state -> 'state,
+ exp : Core.exp' * 'state -> 'state}
+ -> 'state -> Core.exp -> 'state
+
val exists : {kind : Core.kind' -> bool,
con : Core.con' -> bool,
exp : Core.exp' -> bool} -> Core.exp -> bool
@@ -99,6 +110,17 @@ structure Decl : sig
decl : ('context, Core.decl', 'state, 'abort) Search.mapfolderB,
bind : 'context * binder -> 'context}
-> ('context, Core.decl, 'state, 'abort) Search.mapfolderB
+ val mapfold : {kind : (Core.kind', 'state, 'abort) Search.mapfolder,
+ con : (Core.con', 'state, 'abort) Search.mapfolder,
+ exp : (Core.exp', 'state, 'abort) Search.mapfolder,
+ decl : (Core.decl', 'state, 'abort) Search.mapfolder}
+ -> (Core.decl, 'state, 'abort) Search.mapfolder
+
+ val fold : {kind : Core.kind' * 'state -> 'state,
+ con : Core.con' * 'state -> 'state,
+ exp : Core.exp' * 'state -> 'state,
+ decl : Core.decl' * 'state -> 'state}
+ -> 'state -> Core.decl -> 'state
end
structure File : sig
@@ -111,12 +133,24 @@ structure File : sig
bind : 'context * binder -> 'context}
-> ('context, Core.file, 'state, 'abort) Search.mapfolderB
+ val mapfold : {kind : (Core.kind', 'state, 'abort) Search.mapfolder,
+ con : (Core.con', 'state, 'abort) Search.mapfolder,
+ exp : (Core.exp', 'state, 'abort) Search.mapfolder,
+ decl : (Core.decl', 'state, 'abort) Search.mapfolder}
+ -> (Core.file, 'state, 'abort) Search.mapfolder
+
val mapB : {kind : Core.kind' -> Core.kind',
con : 'context -> Core.con' -> Core.con',
exp : 'context -> Core.exp' -> Core.exp',
decl : 'context -> Core.decl' -> Core.decl',
bind : 'context * binder -> 'context}
-> 'context -> Core.file -> Core.file
+
+ val fold : {kind : Core.kind' * 'state -> 'state,
+ con : Core.con' * 'state -> 'state,
+ exp : Core.exp' * 'state -> 'state,
+ decl : Core.decl' * 'state -> 'state}
+ -> 'state -> Core.file -> 'state
end
end