src/Tools/Haskell/Haskell.thy
changeset 69291 36d711008292
parent 69290 fb77612d11eb
child 69315 fc1a8df3062d
equal deleted inserted replaced
69290:fb77612d11eb 69291:36d711008292
   251 
   251 
   252   completionN, completion, no_completionN, no_completion,
   252   completionN, completion, no_completionN, no_completion,
   253 
   253 
   254   lineN, end_lineN, offsetN, end_offsetN, fileN, idN, positionN, position,
   254   lineN, end_lineN, offsetN, end_offsetN, fileN, idN, positionN, position,
   255 
   255 
       
   256   expressionN, expression,
       
   257 
       
   258   citationN, citation,
       
   259 
       
   260   pathN, urlN, docN,
       
   261 
   256   markupN, consistentN, unbreakableN, indentN, widthN,
   262   markupN, consistentN, unbreakableN, indentN, widthN,
   257   blockN, block, breakN, break, fbreakN, fbreak, itemN, item,
   263   blockN, block, breakN, break, fbreakN, fbreak, itemN, item,
   258 
   264 
   259   wordsN, words, no_wordsN, no_words,
   265   wordsN, words, no_wordsN, no_words,
   260 
   266 
   300 properties :: Properties.T -> T -> T
   306 properties :: Properties.T -> T -> T
   301 properties more_props (elem, props) =
   307 properties more_props (elem, props) =
   302   (elem, fold_rev Properties.put more_props props)
   308   (elem, fold_rev Properties.put more_props props)
   303 
   309 
   304 markup_elem name = (name, (name, []) :: T)
   310 markup_elem name = (name, (name, []) :: T)
       
   311 markup_string name prop = (name, \s -> (name, [(prop, s)]) :: T)
   305 
   312 
   306 
   313 
   307 {- misc properties -}
   314 {- misc properties -}
   308 
   315 
   309 nameN :: String
   316 nameN :: String
   345 fileN = \<open>Markup.fileN\<close>
   352 fileN = \<open>Markup.fileN\<close>
   346 idN = \<open>Markup.idN\<close>
   353 idN = \<open>Markup.idN\<close>
   347 
   354 
   348 positionN :: String; position :: T
   355 positionN :: String; position :: T
   349 (positionN, position) = markup_elem \<open>Markup.positionN\<close>
   356 (positionN, position) = markup_elem \<open>Markup.positionN\<close>
       
   357 
       
   358 
       
   359 {- expression -}
       
   360 
       
   361 expressionN :: String
       
   362 expressionN = \<open>Markup.expressionN\<close>
       
   363 
       
   364 expression :: String -> T
       
   365 expression kind = (expressionN, if kind == "" then [] else [(kindN, kind)])
       
   366 
       
   367 
       
   368 {- citation -}
       
   369 
       
   370 citationN :: String; citation :: String -> T
       
   371 (citationN, citation) = markup_string \<open>Markup.citationN\<close> nameN
       
   372 
       
   373 
       
   374 {- external resources -}
       
   375 
       
   376 pathN :: String; path :: String -> T
       
   377 (pathN, path) = markup_string \<open>Markup.pathN\<close> nameN
       
   378 
       
   379 urlN :: String; url :: String -> T
       
   380 (urlN, url) = markup_string \<open>Markup.urlN\<close> nameN
       
   381 
       
   382 docN :: String; doc :: String -> T
       
   383 (docN, doc) = markup_string \<open>Markup.docN\<close> nameN
   350 
   384 
   351 
   385 
   352 {- pretty printing -}
   386 {- pretty printing -}
   353 
   387 
   354 markupN, consistentN, unbreakableN, indentN :: String
   388 markupN, consistentN, unbreakableN, indentN :: String