diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-12-15 19:26:52 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-12-15 19:26:52 -0500 |
commit | da3dbba11e21149ab08eb95526918a91840783c2 (patch) | |
tree | 5d5334486b71856ca71f54fd6bdaaffeac2e84ff /src/compiler.sml | |
parent | 6570b6c0426fc7054d4a0353dd1fab3da7c7a249 (diff) |
Especialize uses a termination measure based on number of arguments introduced
Diffstat (limited to 'src/compiler.sml')
-rw-r--r-- | src/compiler.sml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler.sml b/src/compiler.sml index 256162ce..baf8ddac 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -71,10 +71,20 @@ type ('src, 'dst) transform = { time : 'src * pmap -> 'dst option * pmap } +val debug = ref false + fun transform (ph : ('src, 'dst) phase) name = { func = fn input => let + val () = if !debug then + print ("Starting " ^ name ^ "....\n") + else + () val v = #func ph input in + if !debug then + print ("Finished " ^ name ^ ".\n") + else + (); if ErrorMsg.anyErrors () then NONE else |