typed coreExpr quoter

This commit is contained in:
crumbtoo
2024-02-09 18:31:37 -07:00
parent 58838b9527
commit 17d764c2ec
4 changed files with 29 additions and 13 deletions

View File

@@ -1,11 +1,13 @@
module Control.Monad.Utils
( mapAccumLM
, Kendo(..)
, generalise
)
where
----------------------------------------------------------------------------------
import Data.Tuple (swap)
import Data.Coerce
import Data.Functor.Identity
import Control.Monad.State
import Control.Monad
----------------------------------------------------------------------------------
@@ -30,3 +32,6 @@ instance (Monad m) => Semigroup (Kendo m a) where
instance (Monad m) => Monoid (Kendo m a) where
mempty = Kendo pure
generalise :: (Monad m) => Identity a -> m a
generalise (Identity a) = pure a