Mercurial > urweb
diff src/elab_print.sml @ 41:1405d8c26790
Beginning of functor elaboration
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 19 Jun 2008 16:04:28 -0400 |
parents | 44b5405e74c7 |
children | b3fbbc6cb1e5 |
line wrap: on
line diff
--- a/src/elab_print.sml Thu Jun 19 15:15:00 2008 -0400 +++ b/src/elab_print.sml Thu Jun 19 16:04:28 2008 -0400 @@ -310,6 +310,19 @@ newline, string "end"] | SgnVar n => string (#1 (E.lookupSgnNamed env n)) + | SgnFun (x, n, sgn, sgn') => box [string "functor", + space, + string "(", + string x, + space, + string ":", + space, + p_sgn env sgn, + string ")", + space, + string ":", + space, + p_sgn (E.pushStrNamedAs env x n sgn) sgn'] | SgnError => string "<ERROR>" fun p_decl env ((d, _) : decl) = @@ -367,6 +380,28 @@ | StrProj (str, s) => box [p_str env str, string ".", string s] + | StrFun (x, n, sgn, sgn', str) => + let + val env' = E.pushStrNamedAs env x n sgn + in + box [string "functor", + space, + string "(", + string x, + space, + string ":", + space, + p_sgn env sgn, + string ")", + space, + string ":", + space, + p_sgn env' sgn', + space, + string "=>", + space, + p_str env' str] + end | StrError => string "<ERROR>" and p_file env file =