Autodoc support for default env var declarations
[hcoop/domtool2.git] / src / printFn.sml
index 42282aa..9b3c4ee 100644 (file)
@@ -155,6 +155,12 @@ fun p_decl d =
                                                ident name, space 1,
                                                punct ":", space 1,
                                                p_typ t])
+      | DEnv (name, NONE, _) => string "Unannotated env declaration!"
+      | DEnv (name, SOME t, _) => anchor ("D_" ^ name,
+                                         dBox [keyword "var", space 1,
+                                               ident name, space 1,
+                                               punct ":", space 1,
+                                               p_typ t])
       | DContext name => anchor ("C_" ^ name,
                                 dBox [keyword "context", space 1,
                                       ident name])
@@ -176,6 +182,12 @@ fun p_decl_fref d =
                                        space 1,
                                        punct ":", space 1,
                                        p_typ t]
+      | DEnv (name, NONE, _) => string "Unannotated var declaration!"
+      | DEnv (name, SOME t, _) => dBox [keyword "var", space 1,
+                                       link ("#D_" ^ name, ident name),
+                                       space 1,
+                                       punct ":", space 1,
+                                       p_typ t]
       | DContext name => dBox [keyword "context", space 1,
                               link ("#C_" ^ name, ident name)]