more Haskell operations;
authorwenzelm
Sun Nov 04 17:19:56 2018 +0100 (6 months ago)
changeset 692342dec32c7313f
parent 69233 560263485988
child 69235 0e156963b636
more Haskell operations;
src/Pure/PIDE/xml.ML
src/Tools/Haskell/Haskell.thy
src/Tools/Haskell/Library.hs
src/Tools/Haskell/Markup.hs
src/Tools/Haskell/XML.hs
     1.1 --- a/src/Pure/PIDE/xml.ML	Sun Nov 04 15:28:51 2018 +0100
     1.2 +++ b/src/Pure/PIDE/xml.ML	Sun Nov 04 17:19:56 2018 +0100
     1.3 @@ -33,6 +33,9 @@
     1.4        Elem of (string * attributes) * tree list
     1.5      | Text of string
     1.6    type body = tree list
     1.7 +  val xml_elemN: string
     1.8 +  val xml_nameN: string
     1.9 +  val xml_bodyN: string
    1.10    val wrap_elem: ((string * attributes) * tree list) * tree list -> tree
    1.11    val unwrap_elem: tree -> (((string * attributes) * tree list) * tree list) option
    1.12    val add_content: tree -> Buffer.T -> Buffer.T
     2.1 --- a/src/Tools/Haskell/Haskell.thy	Sun Nov 04 15:28:51 2018 +0100
     2.2 +++ b/src/Tools/Haskell/Haskell.thy	Sun Nov 04 17:19:56 2018 +0100
     2.3 @@ -36,9 +36,12 @@
     2.4  -}
     2.5  
     2.6  module Isabelle.Library
     2.7 -  ((|>), (|->), (#>), (#->), fold, fold_rev, single, quote, trim_line)
     2.8 +  ((|>), (|->), (#>), (#->), the_default, fold, fold_rev, single, quote, trim_line)
     2.9  where
    2.10  
    2.11 +import Data.Maybe
    2.12 +
    2.13 +
    2.14  {- functions -}
    2.15  
    2.16  (|>) :: a -> (a -> b) -> b
    2.17 @@ -54,6 +57,13 @@
    2.18  (f #-> g) x  = x |> f |-> g
    2.19  
    2.20  
    2.21 +{- options -}
    2.22 +
    2.23 +the_default :: a -> Maybe a -> a
    2.24 +the_default x Nothing = x
    2.25 +the_default _ (Just y) = y
    2.26 +
    2.27 +
    2.28  {- lists -}
    2.29  
    2.30  fold :: (a -> b -> b) -> [a] -> b -> b
    2.31 @@ -196,12 +206,44 @@
    2.32  Quasi-abstract markup elements.
    2.33  -}
    2.34  
    2.35 -module Isabelle.Markup (T, empty, is_empty, Output, no_output)
    2.36 +module Isabelle.Markup (
    2.37 +  T, empty, is_empty, properties,
    2.38 +
    2.39 +  nameN, name, xnameN, xname, kindN,
    2.40 +
    2.41 +  lineN, end_lineN, offsetN, end_offsetN, fileN, idN, positionN, position,
    2.42 +
    2.43 +  wordsN, words, no_wordsN, no_words,
    2.44 +
    2.45 +  tfreeN, tfree, tvarN, tvar, freeN, free, skolemN, skolem, boundN, bound, varN, var,
    2.46 +  numeralN, numeral, literalN, literal, delimiterN, delimiter, inner_stringN, inner_string,
    2.47 +  inner_cartoucheN, inner_cartouche, inner_commentN, inner_comment,
    2.48 +  token_rangeN, token_range,
    2.49 +  sortingN, sorting, typingN, typing, class_parameterN, class_parameter,
    2.50 +
    2.51 +  antiquotedN, antiquoted, antiquoteN, antiquote,
    2.52 +
    2.53 +  paragraphN, paragraph, text_foldN, text_fold,
    2.54 +
    2.55 +  keyword1N, keyword1, keyword2N, keyword2, keyword3N, keyword3, quasi_keywordN, quasi_keyword,
    2.56 +  improperN, improper, operatorN, operator, stringN, string, alt_stringN, alt_string,
    2.57 +  verbatimN, verbatim, cartoucheN, cartouche, commentN, comment,
    2.58 +
    2.59 +  writelnN, writeln, stateN, state, informationN, information, tracingN, tracing,
    2.60 +  warningN, warning, legacyN, legacy, errorN, error, reportN, report, no_reportN, no_report,
    2.61 +
    2.62 +  intensifyN, intensify,
    2.63 +  Output, no_output)
    2.64  where
    2.65  
    2.66 +import Prelude hiding (words, error)
    2.67 +
    2.68 +import Isabelle.Library
    2.69  import qualified Isabelle.Properties as Properties
    2.70  
    2.71  
    2.72 +{- basic markup -}
    2.73 +
    2.74  type T = (String, Properties.T)
    2.75  
    2.76  empty :: T
    2.77 @@ -211,6 +253,199 @@
    2.78  is_empty ("", _) = True
    2.79  is_empty _ = False
    2.80  
    2.81 +properties :: Properties.T -> T -> T
    2.82 +properties more_props (elem, props) =
    2.83 +  (elem, fold_rev Properties.put more_props props)
    2.84 +
    2.85 +markup_elem name = (name, (name, []) :: T)
    2.86 +
    2.87 +
    2.88 +{- misc properties -}
    2.89 +
    2.90 +nameN :: String
    2.91 +nameN = \<open>Markup.nameN\<close>
    2.92 +
    2.93 +name :: String -> T -> T
    2.94 +name a = properties [(nameN, a)]
    2.95 +
    2.96 +xnameN :: String
    2.97 +xnameN = \<open>Markup.xnameN\<close>
    2.98 +
    2.99 +xname :: String -> T -> T
   2.100 +xname a = properties [(xnameN, a)]
   2.101 +
   2.102 +kindN :: String
   2.103 +kindN = \<open>Markup.kindN\<close>
   2.104 +
   2.105 +
   2.106 +{- position -}
   2.107 +
   2.108 +lineN, end_lineN :: String
   2.109 +lineN = \<open>Markup.lineN\<close>
   2.110 +end_lineN = \<open>Markup.end_lineN\<close>
   2.111 +
   2.112 +offsetN, end_offsetN :: String
   2.113 +offsetN = \<open>Markup.offsetN\<close>
   2.114 +end_offsetN = \<open>Markup.end_offsetN\<close>
   2.115 +
   2.116 +fileN, idN :: String
   2.117 +fileN = \<open>Markup.fileN\<close>
   2.118 +idN = \<open>Markup.idN\<close>
   2.119 +
   2.120 +positionN :: String; position :: T
   2.121 +(positionN, position) = markup_elem \<open>Markup.positionN\<close>
   2.122 +
   2.123 +
   2.124 +{- text properties -}
   2.125 +
   2.126 +wordsN :: String; words :: T
   2.127 +(wordsN, words) = markup_elem \<open>Markup.wordsN\<close>
   2.128 +
   2.129 +no_wordsN :: String; no_words :: T
   2.130 +(no_wordsN, no_words) = markup_elem \<open>Markup.no_wordsN\<close>
   2.131 +
   2.132 +
   2.133 +{- inner syntax -}
   2.134 +
   2.135 +tfreeN :: String; tfree :: T
   2.136 +(tfreeN, tfree) = markup_elem \<open>Markup.tfreeN\<close>
   2.137 +
   2.138 +tvarN :: String; tvar :: T
   2.139 +(tvarN, tvar) = markup_elem \<open>Markup.tvarN\<close>
   2.140 +
   2.141 +freeN :: String; free :: T
   2.142 +(freeN, free) = markup_elem \<open>Markup.freeN\<close>
   2.143 +
   2.144 +skolemN :: String; skolem :: T
   2.145 +(skolemN, skolem) = markup_elem \<open>Markup.skolemN\<close>
   2.146 +
   2.147 +boundN :: String; bound :: T
   2.148 +(boundN, bound) = markup_elem \<open>Markup.boundN\<close>
   2.149 +
   2.150 +varN :: String; var :: T
   2.151 +(varN, var) = markup_elem \<open>Markup.varN\<close>
   2.152 +
   2.153 +numeralN :: String; numeral :: T
   2.154 +(numeralN, numeral) = markup_elem \<open>Markup.numeralN\<close>
   2.155 +
   2.156 +literalN :: String; literal :: T
   2.157 +(literalN, literal) = markup_elem \<open>Markup.literalN\<close>
   2.158 +
   2.159 +delimiterN :: String; delimiter :: T
   2.160 +(delimiterN, delimiter) = markup_elem \<open>Markup.delimiterN\<close>
   2.161 +
   2.162 +inner_stringN :: String; inner_string :: T
   2.163 +(inner_stringN, inner_string) = markup_elem \<open>Markup.inner_stringN\<close>
   2.164 +
   2.165 +inner_cartoucheN :: String; inner_cartouche :: T
   2.166 +(inner_cartoucheN, inner_cartouche) = markup_elem \<open>Markup.inner_cartoucheN\<close>
   2.167 +
   2.168 +inner_commentN :: String; inner_comment :: T
   2.169 +(inner_commentN, inner_comment) = markup_elem \<open>Markup.inner_commentN\<close>
   2.170 +
   2.171 +
   2.172 +token_rangeN :: String; token_range :: T
   2.173 +(token_rangeN, token_range) = markup_elem \<open>Markup.token_rangeN\<close>
   2.174 +
   2.175 +
   2.176 +sortingN :: String; sorting :: T
   2.177 +(sortingN, sorting) = markup_elem \<open>Markup.sortingN\<close>
   2.178 +
   2.179 +typingN :: String; typing :: T
   2.180 +(typingN, typing) = markup_elem \<open>Markup.typingN\<close>
   2.181 +
   2.182 +class_parameterN :: String; class_parameter :: T
   2.183 +(class_parameterN, class_parameter) = markup_elem \<open>Markup.class_parameterN\<close>
   2.184 +
   2.185 +
   2.186 +{- antiquotations -}
   2.187 +
   2.188 +antiquotedN :: String; antiquoted :: T
   2.189 +(antiquotedN, antiquoted) = markup_elem \<open>Markup.antiquotedN\<close>
   2.190 +
   2.191 +antiquoteN :: String; antiquote :: T
   2.192 +(antiquoteN, antiquote) = markup_elem \<open>Markup.antiquoteN\<close>
   2.193 +
   2.194 +
   2.195 +{- text structure -}
   2.196 +
   2.197 +paragraphN :: String; paragraph :: T
   2.198 +(paragraphN, paragraph) = markup_elem \<open>Markup.paragraphN\<close>
   2.199 +
   2.200 +text_foldN :: String; text_fold :: T
   2.201 +(text_foldN, text_fold) = markup_elem \<open>Markup.text_foldN\<close>
   2.202 +
   2.203 +
   2.204 +{- outer syntax -}
   2.205 +
   2.206 +keyword1N :: String; keyword1 :: T
   2.207 +(keyword1N, keyword1) = markup_elem \<open>Markup.keyword1N\<close>
   2.208 +
   2.209 +keyword2N :: String; keyword2 :: T
   2.210 +(keyword2N, keyword2) = markup_elem \<open>Markup.keyword2N\<close>
   2.211 +
   2.212 +keyword3N :: String; keyword3 :: T
   2.213 +(keyword3N, keyword3) = markup_elem \<open>Markup.keyword3N\<close>
   2.214 +
   2.215 +quasi_keywordN :: String; quasi_keyword :: T
   2.216 +(quasi_keywordN, quasi_keyword) = markup_elem \<open>Markup.quasi_keywordN\<close>
   2.217 +
   2.218 +improperN :: String; improper :: T
   2.219 +(improperN, improper) = markup_elem \<open>Markup.improperN\<close>
   2.220 +
   2.221 +operatorN :: String; operator :: T
   2.222 +(operatorN, operator) = markup_elem \<open>Markup.operatorN\<close>
   2.223 +
   2.224 +stringN :: String; string :: T
   2.225 +(stringN, string) = markup_elem \<open>Markup.stringN\<close>
   2.226 +
   2.227 +alt_stringN :: String; alt_string :: T
   2.228 +(alt_stringN, alt_string) = markup_elem \<open>Markup.alt_stringN\<close>
   2.229 +
   2.230 +verbatimN :: String; verbatim :: T
   2.231 +(verbatimN, verbatim) = markup_elem \<open>Markup.verbatimN\<close>
   2.232 +
   2.233 +cartoucheN :: String; cartouche :: T
   2.234 +(cartoucheN, cartouche) = markup_elem \<open>Markup.cartoucheN\<close>
   2.235 +
   2.236 +commentN :: String; comment :: T
   2.237 +(commentN, comment) = markup_elem \<open>Markup.commentN\<close>
   2.238 +
   2.239 +
   2.240 +{- messages -}
   2.241 +
   2.242 +writelnN :: String; writeln :: T
   2.243 +(writelnN, writeln) = markup_elem \<open>Markup.writelnN\<close>
   2.244 +
   2.245 +stateN :: String; state :: T
   2.246 +(stateN, state) = markup_elem \<open>Markup.stateN\<close>
   2.247 +
   2.248 +informationN :: String; information :: T
   2.249 +(informationN, information) = markup_elem \<open>Markup.informationN\<close>
   2.250 +
   2.251 +tracingN :: String; tracing :: T
   2.252 +(tracingN, tracing) = markup_elem \<open>Markup.tracingN\<close>
   2.253 +
   2.254 +warningN :: String; warning :: T
   2.255 +(warningN, warning) = markup_elem \<open>Markup.warningN\<close>
   2.256 +
   2.257 +legacyN :: String; legacy :: T
   2.258 +(legacyN, legacy) = markup_elem \<open>Markup.legacyN\<close>
   2.259 +
   2.260 +errorN :: String; error :: T
   2.261 +(errorN, error) = markup_elem \<open>Markup.errorN\<close>
   2.262 +
   2.263 +reportN :: String; report :: T
   2.264 +(reportN, report) = markup_elem \<open>Markup.reportN\<close>
   2.265 +
   2.266 +no_reportN :: String; no_report :: T
   2.267 +(no_reportN, no_report) = markup_elem \<open>Markup.no_reportN\<close>
   2.268 +
   2.269 +intensifyN :: String; intensify :: T
   2.270 +(intensifyN, intensify) = markup_elem \<open>Markup.intensifyN\<close>
   2.271 +
   2.272 +
   2.273 +{- output -}
   2.274  
   2.275  type Output = (String, String)
   2.276  
   2.277 @@ -246,9 +481,9 @@
   2.278  
   2.279  {- wrapped elements -}
   2.280  
   2.281 -xml_elemN = "xml_elem";
   2.282 -xml_nameN = "xml_name";
   2.283 -xml_bodyN = "xml_body";
   2.284 +xml_elemN = \<open>XML.xml_elemN\<close>
   2.285 +xml_nameN = \<open>XML.xml_nameN\<close>
   2.286 +xml_bodyN = \<open>XML.xml_bodyN\<close>
   2.287  
   2.288  wrap_elem (((a, atts), body1), body2) =
   2.289    Elem (xml_elemN, (xml_nameN, a) : atts) (Elem (xml_bodyN, []) body1 : body2)
     3.1 --- a/src/Tools/Haskell/Library.hs	Sun Nov 04 15:28:51 2018 +0100
     3.2 +++ b/src/Tools/Haskell/Library.hs	Sun Nov 04 17:19:56 2018 +0100
     3.3 @@ -8,9 +8,12 @@
     3.4  -}
     3.5  
     3.6  module Isabelle.Library
     3.7 -  ((|>), (|->), (#>), (#->), fold, fold_rev, single, quote, trim_line)
     3.8 +  ((|>), (|->), (#>), (#->), the_default, fold, fold_rev, single, quote, trim_line)
     3.9  where
    3.10  
    3.11 +import Data.Maybe
    3.12 +
    3.13 +
    3.14  {- functions -}
    3.15  
    3.16  (|>) :: a -> (a -> b) -> b
    3.17 @@ -26,6 +29,13 @@
    3.18  (f #-> g) x  = x |> f |-> g
    3.19  
    3.20  
    3.21 +{- options -}
    3.22 +
    3.23 +the_default :: a -> Maybe a -> a
    3.24 +the_default x Nothing = x
    3.25 +the_default _ (Just y) = y
    3.26 +
    3.27 +
    3.28  {- lists -}
    3.29  
    3.30  fold :: (a -> b -> b) -> [a] -> b -> b
     4.1 --- a/src/Tools/Haskell/Markup.hs	Sun Nov 04 15:28:51 2018 +0100
     4.2 +++ b/src/Tools/Haskell/Markup.hs	Sun Nov 04 17:19:56 2018 +0100
     4.3 @@ -7,12 +7,44 @@
     4.4  Quasi-abstract markup elements.
     4.5  -}
     4.6  
     4.7 -module Isabelle.Markup (T, empty, is_empty, Output, no_output)
     4.8 +module Isabelle.Markup (
     4.9 +  T, empty, is_empty, properties,
    4.10 +
    4.11 +  nameN, name, xnameN, xname, kindN,
    4.12 +
    4.13 +  lineN, end_lineN, offsetN, end_offsetN, fileN, idN, positionN, position,
    4.14 +
    4.15 +  wordsN, words, no_wordsN, no_words,
    4.16 +
    4.17 +  tfreeN, tfree, tvarN, tvar, freeN, free, skolemN, skolem, boundN, bound, varN, var,
    4.18 +  numeralN, numeral, literalN, literal, delimiterN, delimiter, inner_stringN, inner_string,
    4.19 +  inner_cartoucheN, inner_cartouche, inner_commentN, inner_comment,
    4.20 +  token_rangeN, token_range,
    4.21 +  sortingN, sorting, typingN, typing, class_parameterN, class_parameter,
    4.22 +
    4.23 +  antiquotedN, antiquoted, antiquoteN, antiquote,
    4.24 +
    4.25 +  paragraphN, paragraph, text_foldN, text_fold,
    4.26 +
    4.27 +  keyword1N, keyword1, keyword2N, keyword2, keyword3N, keyword3, quasi_keywordN, quasi_keyword,
    4.28 +  improperN, improper, operatorN, operator, stringN, string, alt_stringN, alt_string,
    4.29 +  verbatimN, verbatim, cartoucheN, cartouche, commentN, comment,
    4.30 +
    4.31 +  writelnN, writeln, stateN, state, informationN, information, tracingN, tracing,
    4.32 +  warningN, warning, legacyN, legacy, errorN, error, reportN, report, no_reportN, no_report,
    4.33 +
    4.34 +  intensifyN, intensify,
    4.35 +  Output, no_output)
    4.36  where
    4.37  
    4.38 +import Prelude hiding (words, error)
    4.39 +
    4.40 +import Isabelle.Library
    4.41  import qualified Isabelle.Properties as Properties
    4.42  
    4.43  
    4.44 +{- basic markup -}
    4.45 +
    4.46  type T = (String, Properties.T)
    4.47  
    4.48  empty :: T
    4.49 @@ -22,6 +54,199 @@
    4.50  is_empty ("", _) = True
    4.51  is_empty _ = False
    4.52  
    4.53 +properties :: Properties.T -> T -> T
    4.54 +properties more_props (elem, props) =
    4.55 +  (elem, fold_rev Properties.put more_props props)
    4.56 +
    4.57 +markup_elem name = (name, (name, []) :: T)
    4.58 +
    4.59 +
    4.60 +{- misc properties -}
    4.61 +
    4.62 +nameN :: String
    4.63 +nameN = "name"
    4.64 +
    4.65 +name :: String -> T -> T
    4.66 +name a = properties [(nameN, a)]
    4.67 +
    4.68 +xnameN :: String
    4.69 +xnameN = "xname"
    4.70 +
    4.71 +xname :: String -> T -> T
    4.72 +xname a = properties [(xnameN, a)]
    4.73 +
    4.74 +kindN :: String
    4.75 +kindN = "kind"
    4.76 +
    4.77 +
    4.78 +{- position -}
    4.79 +
    4.80 +lineN, end_lineN :: String
    4.81 +lineN = "line"
    4.82 +end_lineN = "end_line"
    4.83 +
    4.84 +offsetN, end_offsetN :: String
    4.85 +offsetN = "offset"
    4.86 +end_offsetN = "end_offset"
    4.87 +
    4.88 +fileN, idN :: String
    4.89 +fileN = "file"
    4.90 +idN = "id"
    4.91 +
    4.92 +positionN :: String; position :: T
    4.93 +(positionN, position) = markup_elem "position"
    4.94 +
    4.95 +
    4.96 +{- text properties -}
    4.97 +
    4.98 +wordsN :: String; words :: T
    4.99 +(wordsN, words) = markup_elem "words"
   4.100 +
   4.101 +no_wordsN :: String; no_words :: T
   4.102 +(no_wordsN, no_words) = markup_elem "no_words"
   4.103 +
   4.104 +
   4.105 +{- inner syntax -}
   4.106 +
   4.107 +tfreeN :: String; tfree :: T
   4.108 +(tfreeN, tfree) = markup_elem "tfree"
   4.109 +
   4.110 +tvarN :: String; tvar :: T
   4.111 +(tvarN, tvar) = markup_elem "tvar"
   4.112 +
   4.113 +freeN :: String; free :: T
   4.114 +(freeN, free) = markup_elem "free"
   4.115 +
   4.116 +skolemN :: String; skolem :: T
   4.117 +(skolemN, skolem) = markup_elem "skolem"
   4.118 +
   4.119 +boundN :: String; bound :: T
   4.120 +(boundN, bound) = markup_elem "bound"
   4.121 +
   4.122 +varN :: String; var :: T
   4.123 +(varN, var) = markup_elem "var"
   4.124 +
   4.125 +numeralN :: String; numeral :: T
   4.126 +(numeralN, numeral) = markup_elem "numeral"
   4.127 +
   4.128 +literalN :: String; literal :: T
   4.129 +(literalN, literal) = markup_elem "literal"
   4.130 +
   4.131 +delimiterN :: String; delimiter :: T
   4.132 +(delimiterN, delimiter) = markup_elem "delimiter"
   4.133 +
   4.134 +inner_stringN :: String; inner_string :: T
   4.135 +(inner_stringN, inner_string) = markup_elem "inner_string"
   4.136 +
   4.137 +inner_cartoucheN :: String; inner_cartouche :: T
   4.138 +(inner_cartoucheN, inner_cartouche) = markup_elem "inner_cartouche"
   4.139 +
   4.140 +inner_commentN :: String; inner_comment :: T
   4.141 +(inner_commentN, inner_comment) = markup_elem "inner_comment"
   4.142 +
   4.143 +
   4.144 +token_rangeN :: String; token_range :: T
   4.145 +(token_rangeN, token_range) = markup_elem "token_range"
   4.146 +
   4.147 +
   4.148 +sortingN :: String; sorting :: T
   4.149 +(sortingN, sorting) = markup_elem "sorting"
   4.150 +
   4.151 +typingN :: String; typing :: T
   4.152 +(typingN, typing) = markup_elem "typing"
   4.153 +
   4.154 +class_parameterN :: String; class_parameter :: T
   4.155 +(class_parameterN, class_parameter) = markup_elem "class_parameter"
   4.156 +
   4.157 +
   4.158 +{- antiquotations -}
   4.159 +
   4.160 +antiquotedN :: String; antiquoted :: T
   4.161 +(antiquotedN, antiquoted) = markup_elem "antiquoted"
   4.162 +
   4.163 +antiquoteN :: String; antiquote :: T
   4.164 +(antiquoteN, antiquote) = markup_elem "antiquote"
   4.165 +
   4.166 +
   4.167 +{- text structure -}
   4.168 +
   4.169 +paragraphN :: String; paragraph :: T
   4.170 +(paragraphN, paragraph) = markup_elem "paragraph"
   4.171 +
   4.172 +text_foldN :: String; text_fold :: T
   4.173 +(text_foldN, text_fold) = markup_elem "text_fold"
   4.174 +
   4.175 +
   4.176 +{- outer syntax -}
   4.177 +
   4.178 +keyword1N :: String; keyword1 :: T
   4.179 +(keyword1N, keyword1) = markup_elem "keyword1"
   4.180 +
   4.181 +keyword2N :: String; keyword2 :: T
   4.182 +(keyword2N, keyword2) = markup_elem "keyword2"
   4.183 +
   4.184 +keyword3N :: String; keyword3 :: T
   4.185 +(keyword3N, keyword3) = markup_elem "keyword3"
   4.186 +
   4.187 +quasi_keywordN :: String; quasi_keyword :: T
   4.188 +(quasi_keywordN, quasi_keyword) = markup_elem "quasi_keyword"
   4.189 +
   4.190 +improperN :: String; improper :: T
   4.191 +(improperN, improper) = markup_elem "improper"
   4.192 +
   4.193 +operatorN :: String; operator :: T
   4.194 +(operatorN, operator) = markup_elem "operator"
   4.195 +
   4.196 +stringN :: String; string :: T
   4.197 +(stringN, string) = markup_elem "string"
   4.198 +
   4.199 +alt_stringN :: String; alt_string :: T
   4.200 +(alt_stringN, alt_string) = markup_elem "alt_string"
   4.201 +
   4.202 +verbatimN :: String; verbatim :: T
   4.203 +(verbatimN, verbatim) = markup_elem "verbatim"
   4.204 +
   4.205 +cartoucheN :: String; cartouche :: T
   4.206 +(cartoucheN, cartouche) = markup_elem "cartouche"
   4.207 +
   4.208 +commentN :: String; comment :: T
   4.209 +(commentN, comment) = markup_elem "comment"
   4.210 +
   4.211 +
   4.212 +{- messages -}
   4.213 +
   4.214 +writelnN :: String; writeln :: T
   4.215 +(writelnN, writeln) = markup_elem "writeln"
   4.216 +
   4.217 +stateN :: String; state :: T
   4.218 +(stateN, state) = markup_elem "state"
   4.219 +
   4.220 +informationN :: String; information :: T
   4.221 +(informationN, information) = markup_elem "information"
   4.222 +
   4.223 +tracingN :: String; tracing :: T
   4.224 +(tracingN, tracing) = markup_elem "tracing"
   4.225 +
   4.226 +warningN :: String; warning :: T
   4.227 +(warningN, warning) = markup_elem "warning"
   4.228 +
   4.229 +legacyN :: String; legacy :: T
   4.230 +(legacyN, legacy) = markup_elem "legacy"
   4.231 +
   4.232 +errorN :: String; error :: T
   4.233 +(errorN, error) = markup_elem "error"
   4.234 +
   4.235 +reportN :: String; report :: T
   4.236 +(reportN, report) = markup_elem "report"
   4.237 +
   4.238 +no_reportN :: String; no_report :: T
   4.239 +(no_reportN, no_report) = markup_elem "no_report"
   4.240 +
   4.241 +intensifyN :: String; intensify :: T
   4.242 +(intensifyN, intensify) = markup_elem "intensify"
   4.243 +
   4.244 +
   4.245 +{- output -}
   4.246  
   4.247  type Output = (String, String)
   4.248  
     5.1 --- a/src/Tools/Haskell/XML.hs	Sun Nov 04 15:28:51 2018 +0100
     5.2 +++ b/src/Tools/Haskell/XML.hs	Sun Nov 04 17:19:56 2018 +0100
     5.3 @@ -27,9 +27,9 @@
     5.4  
     5.5  {- wrapped elements -}
     5.6  
     5.7 -xml_elemN = "xml_elem";
     5.8 -xml_nameN = "xml_name";
     5.9 -xml_bodyN = "xml_body";
    5.10 +xml_elemN = "xml_elem"
    5.11 +xml_nameN = "xml_name"
    5.12 +xml_bodyN = "xml_body"
    5.13  
    5.14  wrap_elem (((a, atts), body1), body2) =
    5.15    Elem (xml_elemN, (xml_nameN, a) : atts) (Elem (xml_bodyN, []) body1 : body2)