0 | ||| Module with operators for the `DFunctor` intrerface
 1 | ||| I put them in a separate module to make it possible to avoid name
 2 | ||| ambiguities.
 3 | module Data.DFunctor.Operators
 4 |
 5 | import Data.DFunctor
 6 |
 7 | ||| An infix alias for `dmap`
 8 | public export
 9 | (<$>) : DFunctor f => {0 a, b : t -> Type} -> ({0 x : t} -> a x -> b x) -> f a -> f b
10 | (<$>) func x = dmap {f} func x
11 |
12 | ||| Flipped version of `<$>`, an infix alias for `dmap`
13 | public export
14 | (<&>) : DFunctor f => {0 a, b : t -> Type} -> f a -> ({0 x : t} -> a x -> b x) -> f b
15 | (<&>) x func = dmap {f} func x
16 |