Copyright | (c) Fumiaki Kinoshita 2018 |
---|---|
License | BSD3 |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data (xs :: [k]) :/ (h :: k -> Type) where
- EmbedAt :: !(Membership xs x) -> h x -> xs :/ h
- type (:|) h xs = xs :/ h
- hoist :: (forall x. g x -> h x) -> (xs :/ g) -> xs :/ h
- embed :: x ∈ xs => h x -> xs :/ h
- strike :: forall h x xs. x ∈ xs => (xs :/ h) -> Maybe (h x)
- strikeAt :: forall h x xs. Membership xs x -> (xs :/ h) -> Maybe (h x)
- (<:|) :: (h x -> r) -> ((xs :/ h) -> r) -> ((x ': xs) :/ h) -> r
- exhaust :: ('[] :/ h) -> r
- embedAssoc :: Lookup xs k a => h (k :> a) -> xs :/ h
Documentation
data (xs :: [k]) :/ (h :: k -> Type) where Source #
The extensible sum type
(:/) :: [k] -> (k -> Type) -> Type
EmbedAt :: !(Membership xs x) -> h x -> xs :/ h |
Instances
(Applicative f, Choice p) => Extensible f p ((:/) :: [k] -> (k -> Type) -> Type) Source # | |
Defined in Data.Extensible.Sum type ExtensibleConstr (:/) xs h x :: Constraint Source # pieceAt :: ExtensibleConstr (:/) xs h x => Membership xs x -> Optic' p f (xs :/ h) (h x) Source # | |
Last xs ∈ xs => Bounded (xs :/ (Proxy :: k -> Type)) Source # | |
Enum (xs :/ (Proxy :: k -> Type)) Source # | |
Defined in Data.Extensible.Sum succ :: (xs :/ Proxy) -> xs :/ Proxy # pred :: (xs :/ Proxy) -> xs :/ Proxy # toEnum :: Int -> xs :/ Proxy # fromEnum :: (xs :/ Proxy) -> Int # enumFrom :: (xs :/ Proxy) -> [xs :/ Proxy] # enumFromThen :: (xs :/ Proxy) -> (xs :/ Proxy) -> [xs :/ Proxy] # enumFromTo :: (xs :/ Proxy) -> (xs :/ Proxy) -> [xs :/ Proxy] # enumFromThenTo :: (xs :/ Proxy) -> (xs :/ Proxy) -> (xs :/ Proxy) -> [xs :/ Proxy] # | |
WrapForall Eq h xs => Eq (xs :/ h) Source # | |
(Eq (xs :/ h), WrapForall Ord h xs) => Ord (xs :/ h) Source # | |
Defined in Data.Extensible.Dictionary | |
WrapForall Show h xs => Show (xs :/ h) Source # | |
WrapForall Lift h xs => Lift (xs :/ h) Source # | |
WrapForall NFData h xs => NFData (xs :/ h) Source # | |
Defined in Data.Extensible.Dictionary | |
WrapForall Hashable h xs => Hashable (xs :/ h) | |
Defined in Data.Extensible.Dictionary | |
WrapForall Pretty h xs => Pretty (xs :/ h) | |
Defined in Data.Extensible.Dictionary pretty :: (xs :/ h) -> Doc ann prettyList :: [xs :/ h] -> Doc ann | |
WrapForall Arbitrary h xs => Arbitrary (xs :/ h) | |
type ExtensibleConstr ((:/) :: [k] -> (k -> Type) -> Type) (xs :: [k]) (h :: k -> Type) (x :: k) Source # | |
Defined in Data.Extensible.Sum type ExtensibleConstr ((:/) :: [k] -> (k -> Type) -> Type) (xs :: [k]) (h :: k -> Type) (x :: k) = () |
strike :: forall h x xs. x ∈ xs => (xs :/ h) -> Maybe (h x) Source #
Try to extract something you want.
strikeAt :: forall h x xs. Membership xs x -> (xs :/ h) -> Maybe (h x) Source #
Try to extract something you want.