-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Derive instances for your existential types. -- @package exinst @version 0.1 -- | See the README file for documentation: -- https://hackage.haskell.org/package/exinst#readme module Exinst.Singletons data Some1 (f1 :: k1 -> *) some1 :: SingI a1 => f1 a1 -> Some1 f1 -- | Like withSome1, but takes an explicit Sing instead of a -- SingI instance. withSome1Sing :: Some1 f1 -> (forall a1. Sing a1 -> f1 a1 -> r) -> r withSome1 :: Some1 f1 -> (forall a1. SingI a1 => f1 a1 -> r) -> r fromSome1 :: (SingI a1, SDecide (KProxy :: KProxy k1)) => Some1 f1 -> Maybe (f1 a1) class Dict1 (c :: * -> Constraint) (f1 :: k1 -> *) dict1 :: Dict1 c f1 => Sing a1 -> Dict (c (f1 a1)) data Some2 (f2 :: k2 -> k1 -> *) some2 :: (SingI a2, SingI a1) => f2 a2 a1 -> Some2 f2 -- | Like withSome2, but takes explicit Sings instead of -- SingI instances. withSome2Sing :: Some2 f2 -> (forall a2 a1. Sing a2 -> Sing a1 -> f2 a2 a1 -> r) -> r withSome2 :: Some2 f2 -> (forall a2 a1. (SingI a2, SingI a1) => f2 a2 a1 -> r) -> r fromSome2 :: (SingI a2, SDecide (KProxy :: KProxy k2), SingI a1, SDecide (KProxy :: KProxy k1)) => Some2 f2 -> Maybe (f2 a2 a1) class Dict2 (c :: * -> Constraint) (f2 :: k2 -> k1 -> *) dict2 :: Dict2 c f2 => Sing a2 -> Sing a1 -> Dict (c (f2 a2 a1)) data Some3 (f3 :: k3 -> k2 -> k1 -> *) some3 :: (SingI a3, SingI a2, SingI a1) => f3 a3 a2 a1 -> Some3 f3 -- | Like withSome3, but takes explicit Sings instead of -- SingI instances. withSome3Sing :: Some3 f3 -> (forall a3 a2 a1. Sing a3 -> Sing a2 -> Sing a1 -> f3 a3 a2 a1 -> r) -> r withSome3 :: Some3 f3 -> (forall a3 a2 a1. (SingI a3, SingI a2, SingI a1) => f3 a3 a2 a1 -> r) -> r fromSome3 :: (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 :: * -> Constraint) (f3 :: k3 -> k2 -> k1 -> *) dict3 :: Dict3 c f3 => Sing a3 -> Sing a2 -> Sing a1 -> Dict (c (f3 a3 a2 a1)) data Some4 (f4 :: k4 -> k3 -> k2 -> k1 -> *) some4 :: (SingI a4, SingI a3, SingI a2, SingI a1) => f4 a4 a3 a2 a1 -> Some4 f4 -- | Like withSome4, but takes explicit Sings instead of -- SingI instances. withSome4Sing :: Some4 f4 -> (forall a4 a3 a2 a1. Sing a4 -> Sing a3 -> Sing a2 -> Sing a1 -> f4 a4 a3 a2 a1 -> r) -> r withSome4 :: Some4 f4 -> (forall a4 a3 a2 a1. (SingI a4, SingI a3, SingI a2, SingI a1) => f4 a4 a3 a2 a1 -> r) -> r fromSome4 :: (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 :: * -> Constraint) (f4 :: k4 -> k3 -> k2 -> k1 -> *) dict4 :: Dict4 c f4 => Sing a4 -> Sing a3 -> Sing a2 -> Sing a1 -> Dict (c (f4 a4 a3 a2 a1)) -- | This module exports Show, Eq and Ord instances -- for Some1, Some2, Some3 and Some4 from -- Exinst.Singletons, provided situable Dict1, -- Dict2, Dict3 and Dict4 instances are available. -- -- See the README file for more general documentation: -- https://hackage.haskell.org/package/exinst#readme module Exinst.Instances.Base instance (Show r1, Show x) => Show (Some1'Show r1 x) instance (Show r2, Show r1, Show x) => Show (Some2'Show r2 r1 x) instance (Show r3, Show r2, Show r1, Show x) => Show (Some3'Show r3 r2 r1 x) instance (Show r4, Show r3, Show r2, Show r1, Show x) => Show (Some4'Show r4 r3 r2 r1 x) instance (SingKind 'KProxy, SingKind 'KProxy, SingKind 'KProxy, SingKind 'KProxy, SDecide 'KProxy, SDecide 'KProxy, SDecide 'KProxy, SDecide 'KProxy, Ord (DemoteRep 'KProxy), Ord (DemoteRep 'KProxy), Ord (DemoteRep 'KProxy), Ord (DemoteRep 'KProxy), Dict4 Ord f4, Eq (Some4 f4)) => Ord (Some4 f4) instance (SingKind 'KProxy, SingKind 'KProxy, SingKind 'KProxy, SDecide 'KProxy, SDecide 'KProxy, SDecide 'KProxy, Ord (DemoteRep 'KProxy), Ord (DemoteRep 'KProxy), Ord (DemoteRep 'KProxy), Dict3 Ord f3, Eq (Some3 f3)) => Ord (Some3 f3) instance (SingKind 'KProxy, SingKind 'KProxy, SDecide 'KProxy, SDecide 'KProxy, Ord (DemoteRep 'KProxy), Ord (DemoteRep 'KProxy), Dict2 Ord f2, Eq (Some2 f2)) => Ord (Some2 f2) instance (SingKind 'KProxy, SDecide 'KProxy, Ord (DemoteRep 'KProxy), Dict1 Ord f1, Eq (Some1 f1)) => Ord (Some1 f1) instance (SingKind 'KProxy, SingKind 'KProxy, SingKind 'KProxy, SingKind 'KProxy, SDecide 'KProxy, SDecide 'KProxy, SDecide 'KProxy, SDecide 'KProxy, Dict4 Eq f4) => Eq (Some4 f4) instance (SingKind 'KProxy, SingKind 'KProxy, SingKind 'KProxy, SDecide 'KProxy, SDecide 'KProxy, SDecide 'KProxy, Dict3 Eq f3) => Eq (Some3 f3) instance (SingKind 'KProxy, SingKind 'KProxy, SDecide 'KProxy, SDecide 'KProxy, Dict2 Eq f2) => Eq (Some2 f2) instance (SingKind 'KProxy, SDecide 'KProxy, Dict1 Eq f1) => Eq (Some1 f1) instance (SingKind 'KProxy, SingKind 'KProxy, SingKind 'KProxy, SingKind 'KProxy, Show (DemoteRep 'KProxy), Show (DemoteRep 'KProxy), Show (DemoteRep 'KProxy), Show (DemoteRep 'KProxy), Dict4 Show f4) => Show (Some4 f4) instance (SingKind 'KProxy, SingKind 'KProxy, SingKind 'KProxy, Show (DemoteRep 'KProxy), Show (DemoteRep 'KProxy), Show (DemoteRep 'KProxy), Dict3 Show f3) => Show (Some3 f3) instance (SingKind 'KProxy, SingKind 'KProxy, Show (DemoteRep 'KProxy), Show (DemoteRep 'KProxy), Dict2 Show f2) => Show (Some2 f2) instance (SingKind 'KProxy, Show (DemoteRep 'KProxy), Dict1 Show f1) => Show (Some1 f1)