Hoogle Search
Within LTS Haskell 24.33 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
contiguous Data.Primitive.Contiguous Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. for a version that ignores the results see mapM_.
-
contiguous Data.Primitive.Contiguous Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ = traverse_
-
contiguous Data.Primitive.Contiguous The mapMaybe function is a version of map which can throw out elements. In particular, the functional arguments returns something of type Maybe b. If this is Nothing, no element is added on to the result array. If it is Just b, then b is included in the result array.
-
contiguous Data.Primitive.Contiguous Map over a mutable array, modifying the elements in place.
-
contiguous Data.Primitive.Contiguous Strictly map over a mutable array, modifying the elements in place.
mapOrHead :: (Num a, Eq a) => a -> (t -> b) -> [t] -> ([b] -> b) -> bdbus DBus.Generation No documentation available.
mapMaybe :: Ord k => (a -> Maybe b) -> Map k a -> Map k bdhall Dhall.Map Transform all values in a Map using the supplied function, deleting the key if the function returns Nothing
>>> mapMaybe Data.Maybe.listToMaybe (fromList [("C",[1]),("B",[]),("A",[3])]) fromList [("C",1),("A",3)]mapWithKey :: (k -> a -> b) -> Map k a -> Map k bdhall Dhall.Map Transform the values of a Map using their corresponding key
mapWithKey (pure id) = id mapWithKey (liftA2 (.) f g) = mapWithKey f . mapWithKey g
mapWithKey f mempty = mempty mapWithKey f (x <> y) = mapWithKey f x <> mapWithKey f y
>>> mapWithKey (,) (fromList [("B",1),("A",2)]) fromList [("B",("B",1)),("A",("A",2))]mapMOf :: LensLike (WrappedMonad m) s t a b -> (a -> m b) -> s -> m tdhall Dhall.Optics Identical to Control.Lens.mapMOf
mapperIsLabelDeriver :: Deriverdomain Domain Generates instances of IsLabel for sums and products, providing mappers over their components.
Product Example
Having the following schema:NetworkAddress: product: protocol: TransportProtocol host: Host port: Word16
The following instances will be generated:instance mapper ~ (TransportProtocol -> TransportProtocol) => IsLabel "protocol" (mapper -> NetworkAddress -> NetworkAddress) where fromLabel mapper (NetworkAddress a b c) = NetworkAddress (mapper a) b c instance mapper ~ (Host -> Host) => IsLabel "host" (mapper -> NetworkAddress -> NetworkAddress) where fromLabel mapper (NetworkAddress a b c) = NetworkAddress a (mapper b) c instance mapper ~ (Word16 -> Word16) => IsLabel "port" (mapper -> NetworkAddress -> NetworkAddress) where fromLabel mapper (NetworkAddress a b c) = NetworkAddress a b (mapper c)
In case you're wondering what this tilde (~) constraint business is about, refer to the Type Equality Constraint section.Sum Example
Having the following schema:Host: sum: ip: Ip name: Text
The following instances will be generated:instance mapper ~ (Ip -> Ip) => IsLabel "ip" (mapper -> Host -> Host) where fromLabel fn (IpHost a) = IpHost (fn a) fromLabel _ a = a instance mapper ~ (Text -> Text) => IsLabel "name" (mapper -> Host -> Host) where fromLabel fn (NameHost a) = NameHost (fn a) fromLabel _ a = a
In case you're wondering what this tilde (~) constraint business is about, refer to the Type Equality Constraint section.