Skip to content

Commit

Permalink
0.24.0 - generalize cpsPreProcessors from IO to (Functor m, MonadIO m…
Browse files Browse the repository at this point in the history
…, Happstack m)
  • Loading branch information
stepcut committed Dec 18, 2016
1 parent 8bc70f9 commit 6e5a755
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Clckwrks/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ type ClckForm url = Form (ClckT url (ServerPartT IO)) [Input] ClckFormError [
------------------------------------------------------------------------------

data ClckPluginsSt = ClckPluginsSt
{ cpsPreProcessors :: [TL.Text -> ClckT ClckURL IO TL.Text]
{ cpsPreProcessors :: forall m. (Functor m, MonadIO m, Happstack m) => [TL.Text -> ClckT ClckURL m TL.Text]
, cpsNavBarLinks :: [ClckT ClckURL IO (String, [NamedLink])]
, cpsAcid :: Acid -- ^ this value is also in ClckState, but it is sometimes needed by plugins during initPlugin
}
Expand Down Expand Up @@ -587,7 +587,7 @@ instance (Functor m, Monad m) => EmbedAsChild (ClckT url m) Content where

addPreProc :: (MonadIO m) =>
Plugins theme n hook config ClckPluginsSt
-> (TL.Text -> ClckT ClckURL IO TL.Text)
-> (forall mm. (Functor mm, MonadIO mm, Happstack mm) => TL.Text -> ClckT ClckURL mm TL.Text)
-> m ()
addPreProc plugins p =
modifyPluginsSt plugins $ \cps -> cps { cpsPreProcessors = p : (cpsPreProcessors cps) }
Expand Down Expand Up @@ -675,7 +675,7 @@ getNavBarLinks plugins =

getPreProcessors :: (MonadIO m) =>
Plugins theme n hook config ClckPluginsSt
-> ClckT url m [TL.Text -> ClckT ClckURL IO TL.Text]
-> (forall mm. (Functor mm, MonadIO mm, Happstack mm) => ClckT url m [TL.Text -> ClckT ClckURL mm TL.Text])
getPreProcessors plugins =
mapClckT liftIO $
(cpsPreProcessors <$> getPluginsSt plugins)
Expand Down
2 changes: 1 addition & 1 deletion clckwrks.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: clckwrks
Version: 0.23.19.2
Version: 0.24.0
Synopsis: A secure, reliable content management system (CMS) and blogging platform
Description: clckwrks (pronounced, clockworks) aims to compete
directly with popular PHP-based blogging and CMS
Expand Down

0 comments on commit 6e5a755

Please sign in to comment.