tintin 1.3.5 → 1.4.5
raw patch · 6 files changed
+21/−5 lines, 6 files
Files
- README.md +1/−0
- src/Tintin/Capabilities/Logging.hs +1/−1
- src/Tintin/Domain/HtmlFile.hs +4/−0
- src/Tintin/Errors.hs +12/−1
- src/Tintin/Render.hs +1/−1
- tintin.cabal +2/−2
README.md view
@@ -33,6 +33,7 @@ |λ|λ| |-|-| |[Tintin](https://theam.github.io/tintin)| A softer alternative to Haddock |+|[backprop](https://backprop.jle.im)| Heterogeneous automatic differentiation | # Copyright
src/Tintin/Capabilities/Logging.hs view
@@ -68,5 +68,5 @@ mute = Capability { _log = return . const () , _debug = return . const ()- , _err = return . const ()+ , _err = putTextLn . ("[ERROR] - " <>) }
src/Tintin/Domain/HtmlFile.hs view
@@ -10,6 +10,10 @@ newtype CompilationError = CompilationError Text deriving Show +showCompilationError :: CompilationError+ -> Text+showCompilationError (CompilationError e) = "CompilationError\n" <> e+ data HtmlFile = HtmlFile { filename :: Text , title :: Text
src/Tintin/Errors.hs view
@@ -1,9 +1,11 @@ module Tintin.Errors ( Errors , showAndDie+ , textDie ) where +import qualified Data.Text as T import Tintin.Core require Tintin.Capabilities.Logging @@ -17,5 +19,14 @@ showAndDie errors = do errors |> mapM_ (Logging.err . show)- error "Errors found. Exiting."+ die "Errors found. Exiting."++textDie :: ( Has Logging.Capability eff+ )+ => [T.Text]+ -> Effectful eff ()+textDie errors = do+ errors+ |> mapM_ Logging.err+ die "Errors found. Exiting."
src/Tintin/Render.hs view
@@ -27,7 +27,7 @@ |> map HtmlFile.fromDocumentationFile |> mapM HtmlFile.run |$> partitionEithers- unless (null errors) (Errors.showAndDie errors)+ unless (null errors) (Errors.textDie (HtmlFile.showCompilationError <$> errors)) return htmlFiles
tintin.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 0c88129c3e8eba05edbef963e56ee9c022f21ba1b8e8d302f1168a007e6f995b+-- hash: 9942e552184b8b9d38d5dffd39d68aa5c5e04c7ffff9e1b3b3d797ff8ece6fb3 name: tintin-version: 1.3.5+version: 1.4.5 synopsis: A softer alternative to Haddock description: Please see the website <https://theam.github.io/tintin> category: Documentation