Mercurial > urweb
diff src/compiler.sml @ 1079:d069b193ed6b
Especialize uses a termination measure based on number of arguments introduced
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 15 Dec 2009 19:26:52 -0500 |
parents | 3bc726a822fb |
children | 4b2f50829af5 |
line wrap: on
line diff
--- a/src/compiler.sml Tue Dec 15 13:20:13 2009 -0500 +++ b/src/compiler.sml Tue Dec 15 19:26:52 2009 -0500 @@ -71,10 +71,20 @@ 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