1module TypeFun.Data.Maybe
11type family MaybeCase (a :: Maybe k)
13 (just :: k -> r) :: r where
14 MaybeCase 'Nothing nothing just = nothing
15 MaybeCase ('Just k) nothing just = just k
17type family NothingToConstr (a :: Maybe k) (c :: Constraint) :: Constraint where
18 NothingToConstr 'Nothing c = c
19 NothingToConstr ('Just a) c = ()
21type family JustToConstr (a :: Maybe k) (c :: Constraint) :: Constraint where
22 JustToConstr 'Nothing c = ()
23 JustToConstr ('Just a) c = c
25-- | Like 'catMaybes' for type lists
26type family CatMaybes (l :: [Maybe k]) :: [k] where
28 CatMaybes (('Just a) ': as) = a ': (CatMaybes as)
29 CatMaybes ('Nothing ': as) = CatMaybes as
31type family FromJust (a :: Maybe k) :: k where
32 FromJust ('Just a) = a
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