Safe Haskell | None |
---|---|

Language | Haskell2010 |

# Documentation

newtype Eff carrier a Source #

## Instances

Carrier sig carrier => Carrier sig (Eff carrier) Source # | |

Monad (Eff carrier) Source # | |

Functor (Eff carrier) Source # | |

(Member Fail sig, Carrier sig carrier) => MonadFail (Eff carrier) Source # | |

Defined in Control.Effect.Internal | |

Applicative (Eff carrier) Source # | |

Defined in Control.Effect.Internal | |

(Member NonDet sig, Carrier sig carrier) => MonadPlus (Eff carrier) Source # | |

(Member (Lift IO) sig, Carrier sig carrier) => MonadIO (Eff carrier) Source # | |

Defined in Control.Effect.Internal | |

(Member Random sig, Carrier sig carrier) => MonadRandom (Eff carrier) Source # | |

Defined in Control.Effect.Internal | |

(Member Random sig, Carrier sig carrier) => MonadInterleave (Eff carrier) Source # | |

Defined in Control.Effect.Internal interleave :: Eff carrier a -> Eff carrier a # | |

(Member NonDet sig, Carrier sig carrier) => Alternative (Eff carrier) Source # | Run computations nondeterministically. run (runNonDet empty) == [] run (runNonDet empty) == Nothing run (runNonDet (pure a <|> pure b)) == [a, b] run (runNonDet (pure a <|> pure b)) == Just a Associativity: run (runNonDet ((pure a <|> pure b) <|> pure c)) == (run (runNonDet (pure a <|> (pure b <|> pure c))) :: [Integer]) run (runNonDet ((pure a <|> pure b) <|> pure c)) == (run (runNonDet (pure a <|> (pure b <|> pure c))) :: Maybe Integer) Left-identity: run (runNonDet (empty <|> pure b)) == (run (runNonDet (pure b)) :: [Integer]) run (runNonDet (empty <|> pure b)) == (run (runNonDet (pure b)) :: Maybe Integer) Right-identity: run (runNonDet (pure a <|> empty)) == (run (runNonDet (pure a)) :: [Integer]) run (runNonDet (pure a <|> empty)) == (run (runNonDet (pure a)) :: Maybe Integer) |