Safe Haskell | None |
---|---|
Language | Haskell2010 |
See the README file for documentation: https://hackage.haskell.org/package/exinst#readme
- data Some1 f1 = Some1 !(Sing a1) !(f1 a1)
- some1 :: forall f1 a1. SingI a1 => f1 a1 -> Some1 f1
- withSome1Sing :: forall f1 r. Some1 f1 -> (forall a1. SingI a1 => Sing a1 -> f1 a1 -> r) -> r
- withSome1 :: forall f1 r. Some1 f1 -> (forall a1. SingI a1 => f1 a1 -> r) -> r
- fromSome1 :: forall f1 a1. (SingI a1, SDecide (KProxy :: KProxy k1)) => Some1 f1 -> Maybe (f1 a1)
- class Dict1 c f1 where
- data Some2 f2 = Some2 !(Sing a2) !(Sing a1) !(f2 a2 a1)
- some2 :: forall f2 a2 a1. (SingI a2, SingI a1) => f2 a2 a1 -> Some2 f2
- withSome2Sing :: forall f2 r. Some2 f2 -> (forall a2 a1. (SingI a2, SingI a1) => Sing a2 -> Sing a1 -> f2 a2 a1 -> r) -> r
- withSome2 :: forall f2 r. Some2 f2 -> (forall a2 a1. (SingI a2, SingI a1) => f2 a2 a1 -> r) -> r
- fromSome2 :: forall f2 a2 a1. (SingI a2, SDecide (KProxy :: KProxy k2), SingI a1, SDecide (KProxy :: KProxy k1)) => Some2 f2 -> Maybe (f2 a2 a1)
- class Dict2 c f2 where
- data Some3 f3 = Some3 !(Sing a3) !(Sing a2) !(Sing a1) !(f3 a3 a2 a1)
- some3 :: forall f3 a3 a2 a1. (SingI a3, SingI a2, SingI a1) => f3 a3 a2 a1 -> Some3 f3
- withSome3Sing :: forall f3 r. Some3 f3 -> (forall a3 a2 a1. (SingI a3, SingI a2, SingI a1) => Sing a3 -> Sing a2 -> Sing a1 -> f3 a3 a2 a1 -> r) -> r
- withSome3 :: forall f3 r. Some3 f3 -> (forall a3 a2 a1. (SingI a3, SingI a2, SingI a1) => f3 a3 a2 a1 -> r) -> r
- fromSome3 :: forall f3 a3 a2 a1. (SingI a3, SDecide (KProxy :: KProxy k3), SingI a2, SDecide (KProxy :: KProxy k2), SingI a1, SDecide (KProxy :: KProxy k1)) => Some3 f3 -> Maybe (f3 a3 a2 a1)
- class Dict3 c f3 where
- data Some4 f4 = Some4 !(Sing a4) !(Sing a3) !(Sing a2) !(Sing a1) !(f4 a4 a3 a2 a1)
- some4 :: forall f4 a4 a3 a2 a1. (SingI a4, SingI a3, SingI a2, SingI a1) => f4 a4 a3 a2 a1 -> Some4 f4
- withSome4Sing :: forall f4 r. Some4 f4 -> (forall a4 a3 a2 a1. (SingI a4, SingI a3, SingI a2, SingI a1) => Sing a4 -> Sing a3 -> Sing a2 -> Sing a1 -> f4 a4 a3 a2 a1 -> r) -> r
- withSome4 :: forall f4 r. Some4 f4 -> (forall a4 a3 a2 a1. (SingI a4, SingI a3, SingI a2, SingI a1) => f4 a4 a3 a2 a1 -> r) -> r
- fromSome4 :: forall f4 a4 a3 a2 a1. (SingI a4, SDecide (KProxy :: KProxy k4), SingI a3, SDecide (KProxy :: KProxy k3), SingI a2, SDecide (KProxy :: KProxy k2), SingI a1, SDecide (KProxy :: KProxy k1)) => Some4 f4 -> Maybe (f4 a4 a3 a2 a1)
- class Dict4 c f4 where
- data Dict a :: Constraint -> * where
1 type index
2 type indexes
3 type indexes
4 type indexes
Re-exports
data Dict a :: Constraint -> * where #
Values of type
capture a dictionary for a constraint of type Dict
pp
.
e.g.
Dict
::Dict
(Eq
Int
)
captures a dictionary that proves we have an:
instance Eq
'Int
Pattern matching on the Dict
constructor will bring this instance into scope.
a :=> (Read (Dict a)) | |
a :=> (Monoid (Dict a)) | |
a :=> (Enum (Dict a)) | |
a :=> (Bounded (Dict a)) | |
() :=> (Eq (Dict a)) | |
() :=> (Ord (Dict a)) | |
() :=> (Show (Dict a)) | |
a => Bounded (Dict a) | |
a => Enum (Dict a) | |
Eq (Dict a) | |
(Typeable Constraint p, p) => Data (Dict p) | |
Ord (Dict a) | |
a => Read (Dict a) | |
Show (Dict a) | |
a => Monoid (Dict a) | |