2#if MIN_VERSION_base(4,9,0)
3{-# LANGUAGE GeneralizedNewtypeDeriving #-}
4{-# LANGUAGE StandaloneDeriving #-}
11-- This module defines the FunctorMaybe class, which extends Functors with the
12-- ability to delete values.
13module Reflex.FunctorMaybe
17import Data.IntMap (IntMap)
19#if MIN_VERSION_base(4,9,0)
20import Data.Semigroup (Option(..))
24--TODO: See if there's a better class in the standard libraries already
26-- | A class for values that combines filtering and mapping using 'Maybe'.
27-- Morally, @'FunctorMaybe' ~ KleisliFunctor 'Maybe'@.
28{-# DEPRECATED FunctorMaybe "Use 'Filterable' from Data.Witherable instead" #-}
29class FunctorMaybe f where
30 -- | Combined mapping and filtering function.
31 fmapMaybe :: (a -> Maybe b) -> f a -> f b
33instance FunctorMaybe Maybe where
36#if MIN_VERSION_base(4,9,0)
37deriving instance FunctorMaybe Option
40instance FunctorMaybe [] where
43instance FunctorMaybe (Map k) where
46instance FunctorMaybe IntMap where
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list