Hoogle Search
Within LTS Haskell 24.63 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
decide :: Decide f => (a -> Either b c) -> f b -> f c -> f asemigroupoids Data.Functor.Contravariant.Decide Takes the "decision" method and the two potential consumers, and returns the wrapped/combined consumer.
decided :: Decide f => f b -> f c -> f (Either b c)semigroupoids Data.Functor.Contravariant.Decide For decided x y, the resulting f (Either b c) will direct Lefts to be consumed by x, and Rights to be consumed by y.
gdecide :: (Generic1 f, Decide (Rep1 f)) => (a -> Either b c) -> f b -> f c -> f asemigroupoids Data.Functor.Contravariant.Decide Generic decide. Caveats:
- Will not compile if f is a sum type.
- Will not compile if f contains fields that do not mention its type variable.
- -XDeriveGeneric is not smart enough to make instances where the type variable appears in negative position.
gdecided :: (Generic1 f, Decide (Rep1 f)) => f b -> f c -> f (Either b c)semigroupoids Data.Functor.Contravariant.Decide -
No documentation available.
class Semigroupoid k1 =>
Groupoid (k1 :: k -> k -> Type)semigroupoids Data.Groupoid semigroupoid with inverses. This technically should be a category with inverses, except we need to use Ob to define the valid objects for the category
-
A semigroupoid satisfies all of the requirements to be a Category except for the existence of identity arrows.
class
Semigroupoid (c :: k -> k -> Type)semigroupoids Data.Semigroupoid -
semigroupoids Data.Semigroupoid.Ob No documentation available.
void :: Functor f => f a -> f ()base-compat Data.Functor.Compat void value discards or ignores the result of evaluation, such as the return value of an IO action.
Examples
Replace the contents of a Maybe Int with unit:>>> void Nothing Nothing
>>> void (Just 3) Just ()
Replace the contents of an Either Int Int with unit, resulting in an Either Int ():>>> void (Left 8675309) Left 8675309
>>> void (Right 8675309) Right ()
Replace every element of a list with unit:>>> void [1,2,3] [(),(),()]
Replace the second element of a pair with unit:>>> void (1,2) (1,())
Discard the result of an IO action:>>> mapM print [1,2] 1 2 [(),()]
>>> void $ mapM print [1,2] 1 2