Skip to content

Commit ebecece

Browse files
committed
added MonadFix
1 parent 00addd4 commit ebecece

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/compiler/api/GF/Data/Operations.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import qualified Data.Map as Map
5050
import Data.Map (Map)
5151
--import Control.Applicative(Applicative(..))
5252
import Control.Monad (liftM,liftM2) --,ap
53+
import Control.Monad.Fix
5354

5455
import GF.Data.ErrM
5556
import GF.Data.Relation
@@ -237,6 +238,10 @@ instance ErrorMonad Err where
237238
handle a@(Ok _) _ = a
238239
handle (Bad i) f = f i
239240

241+
instance MonadFix Err where
242+
mfix f = let res@(~(Ok x)) = f x in res
243+
244+
240245
liftErr e = err raise return e
241246
{-
242247
instance ErrorMonad (STM s) where

0 commit comments

Comments
 (0)