From b71b861008381626633bf28b033cd866d7e4e0b7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 20 Jun 2019 22:32:59 -0400 Subject: Improved the convention for using text formatters. --- stdlib/source/program/scriptum.lux | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'stdlib/source/program/scriptum.lux') diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux index 1522e8f66..569371900 100644 --- a/stdlib/source/program/scriptum.lux +++ b/stdlib/source/program/scriptum.lux @@ -15,7 +15,7 @@ [format ["md" markdown (#+ Markdown Span Block)]] ["." text ("#;." equivalence) - format + ["%" format (#+ format)] ["." encoding]] [collection ["." sequence (#+ Sequence) ("#;." functor)] @@ -104,10 +104,10 @@ [_ (#.Primitive name params)] (case params #.Nil - (format "(primitive " (%t name) ")") + (format "(primitive " (%.text name) ")") _ - (format "(primitive " (%t name) " " (|> params (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) ")")) + (format "(primitive " (%.text name) " " (|> params (list;map (pprint-type-definition level type-func-info #.None module signature? recursive-type?)) (text.join-with " ")) ")")) [_ (#.Sum _)] (let [members (type.flatten-variant type)] @@ -166,7 +166,7 @@ (^template [
 ]
         [_ ( id)]
-        (format 
 (%n id) ))
+        (format 
 (%.nat id) ))
       ([#.Var "⌈v:" "⌋"]
        [#.Ex  "⟨e:" "⟩"])
 
@@ -196,7 +196,7 @@
       [_ (#.Named [_module _name] type)]
       (if (text;= module _module)
         _name
-        (%name [_module _name]))
+        (%.name [_module _name]))
       )))
 
 (def: (pprint-type level type-func-name module type)
@@ -205,10 +205,10 @@
     (#.Primitive name params)
     (case params
       #.Nil
-      (format "(primitive " (%t name) ")")
+      (format "(primitive " (%.text name) ")")
 
       _
-      (format "(primitive " (%t name) " " (|> params (list;map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
+      (format "(primitive " (%.text name) " " (|> params (list;map (pprint-type level type-func-name module)) (list.interpose " ") (text.join-with "")) ")"))
 
     (#.Sum _)
     (let [members (type.flatten-variant type)]
@@ -231,7 +231,7 @@
 
     (^template [ 
 ]
       ( id)
-      (format 
 (%n id) ))
+      (format 
 (%.nat id) ))
     ([#.Var "⌈" "⌋"]
      [#.Ex  "⟨" "⟩"])
 
@@ -253,7 +253,7 @@
     (#.Named [_module _name] type)
     (if (text;= module _module)
       _name
-      (%name [_module _name]))
+      (%.name [_module _name]))
     ))
 
 (type: (Mutation a)
@@ -337,7 +337,7 @@
     type))
 
 (exception: #export (anonymous-type-definition {type Type})
-  (ex.report ["Type" (%type type)]))
+  (ex.report ["Type" (%.type type)]))
 
 (def: (document-type module type def-annotations)
   (-> Text Type Code (Meta (Markdown Block)))
-- 
cgit v1.2.3