polysemy-plugin-0.4.3.1: Disambiguate obvious uses of effects.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Plugin.Fundep.Utils

Synopsis

Documentation

singleListToJust :: [a] -> Maybe a Source #

Returns the head of the list iff there is exactly one element.

whenA :: (Monad m, Alternative z) => Bool -> m a -> m (z a) Source #

Like when, but in the context of an Alternative.

countLength :: Eq a => [a] -> [(a, Int)] Source #

Count the number of times a is present in the list.