1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Better docs and param naming

This commit is contained in:
Timothy Clem 2018-08-20 09:58:28 -07:00
parent b5fdc2d079
commit 92a15e2bcb

View File

@ -92,8 +92,8 @@ import Reprinting.Translate
import Reprinting.Typeset
-- | Given the language of the provided 'Term' and the original 'Source' from
-- which the provided 'Term' was passed, run the reprinting pipeline.
-- | Run the reprinting pipeline given the original 'Source', a language
-- specific machine (`ProcessT`) and the provided 'Term'.
runReprinter ::
( Show (Record fields)
, Tokenize a
@ -103,14 +103,14 @@ runReprinter ::
-> ProcessT Translator Splice Splice
-> Term a (Record fields)
-> Either TranslationException Source.Source
runReprinter s languageRules tree
runReprinter src languageSubPipeline tree
= fmap go
. Effect.run
. Exc.runError
. fmap snd
. runState (mempty :: [Context])
. foldT $ source (tokenizing s tree)
. foldT $ source (tokenizing src tree)
~> translating
~> languageRules
~> languageSubPipeline
~> typesetting
where go = Source.fromText . renderStrict . layoutPretty defaultLayoutOptions