🐙 Templated web page generator for your git repositories
git clone https://github.com/m-col/gitja
Files | Refs | Readme | License

Commit 343385fd21bf0b47923028575a18ad17b97bb805
Parent: 3fd1dd84281c984ada8dc10d860ac5e5961189dc
Author: mcol <mcol@posteo.net>
Date: 2022-05-28 22:10:06 +0100
Committer: mcol <mcol@posteo.net>
Committed: 2022-05-28 22:10:06 +0100

convert m in RunRepo to IO

src/Types.hs Modified

@@ -34,7 +34,7 @@
 {-
 Convenience type alias for the ginger run monad with git repo context.
 -}
-type RunRepo = Run SourcePos (ReaderT LgRepo IO) Html
+type RunRepo = Run SourcePos IO Html
 
 unquote :: String -> String
 unquote = init . tail

src/Templates.hs Modified

@@ -63,9 +63,9 @@
 generate template context = do
     content <- liftIO . newIORef . TB.fromText $ ""
 
-    let emit :: Html -> ReaderT LgRepo IO ()
+    let emit :: Html -> IO ()
         emit = liftIO . modifyIORef' content . flip mappend . TB.fromText . htmlSource
 
-    runGingerT (easyContext emit context) . templateGinger $ template
+    liftIO $ runGingerT (easyContext emit context) . templateGinger $ template
     result <- liftIO . readIORef $ content
     return . TB.toLazyText $ result