Add a lazy instance for LogicT.
This commit is contained in:
parent
398fccecf0
commit
9f91c31b2d
|
@ -3,6 +3,7 @@ module Control.Monad.Logic.Trans (SFKT(..), FK, SK, unSFKT, runSFKT, runSFKTOnce
|
|||
import Prelude (class Applicative, class Apply, class Bind, class Functor, class Monad, bind, pure, ($), (<<<), (>>=), const, Unit, unit)
|
||||
import Control.Monad.Logic.Class
|
||||
|
||||
import Control.Lazy (class Lazy)
|
||||
import Control.MonadPlus (class MonadPlus, class Alternative, class Alt, class Plus, (<|>), empty)
|
||||
import Control.Monad.Reader.Class (class MonadReader, local, class MonadAsk, ask)
|
||||
import Control.Monad.State.Class (class MonadState, state)
|
||||
|
@ -73,3 +74,6 @@ instance MonadReader r m => MonadReader r (SFKT m) where
|
|||
|
||||
instance MonadState s m => MonadState s (SFKT m) where
|
||||
state f = lift $ state f
|
||||
|
||||
instance Lazy (SFKT m a) where
|
||||
defer f = SFKT (\sk fk -> unSFKT (f unit) sk fk)
|
||||
|
|
Loading…
Reference in New Issue
Block a user