diff options
author | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
---|---|---|
committer | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
commit | 84c2ad99582391005b5e873198b15e9e9eb4f78d (patch) | |
tree | caa8c2f2ec7e97fbb4977263c6817c9af5025cf4 /compiler/utils/ListT.hs | |
parent | 8ddb47cfcf5776e9a3c55fd37947c8a95e00fa12 (diff) | |
parent | e68b439fe5de61b9a2ca51af472185c62ccb8b46 (diff) | |
download | haskell-wip/T13904.tar.gz |
update to current master againwip/T13904
Diffstat (limited to 'compiler/utils/ListT.hs')
-rw-r--r-- | compiler/utils/ListT.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/utils/ListT.hs b/compiler/utils/ListT.hs index 2b81db1ed4..c16701419d 100644 --- a/compiler/utils/ListT.hs +++ b/compiler/utils/ListT.hs @@ -29,9 +29,12 @@ module ListT ( fold ) where +import GhcPrelude + import Control.Applicative import Control.Monad +import Control.Monad.Fail as MonadFail ------------------------------------------------------------------------- -- | A monad transformer for performing backtracking computations @@ -64,6 +67,9 @@ instance Alternative (ListT f) where instance Monad (ListT m) where m >>= f = ListT $ \sk fk -> unListT m (\a fk' -> unListT (f a) sk fk') fk + fail = MonadFail.fail + +instance MonadFail (ListT m) where fail _ = ListT $ \_ fk -> fk instance MonadPlus (ListT m) where |