Avoid calling failure continuation in msplit
This commit is contained in:
		
							parent
							
								
									9f91c31b2d
								
							
						
					
					
						commit
						e19721af5e
					
				@ -59,7 +59,8 @@ instance MonadTrans SFKT where
 | 
			
		||||
    lift m = SFKT (\sk fk -> m >>= (\a -> sk a fk))
 | 
			
		||||
 | 
			
		||||
instance Monad m => MonadLogic (SFKT m) where
 | 
			
		||||
    msplit ma = lift (unSFKT ma (\a fk -> pure (Just (a /\ (lift (fk unit) >>= reflect)))) (\_ -> pure Nothing))
 | 
			
		||||
    msplit ma = lift (unSFKT ma (\a fk -> pure (Just (a /\ (lazyLift fk >>= reflect)))) (\_ -> pure Nothing))
 | 
			
		||||
        where lazyLift f = SFKT (\sk fk -> f unit >>= (\a -> sk a fk))
 | 
			
		||||
    interleave m1 m2 = do
 | 
			
		||||
        r <- msplit m1
 | 
			
		||||
        case r of
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user