-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Derive instances for your existential types. -- -- Derive instances for your existential types. @package exinst @version 0.2 -- | See the README file for documentation: -- https://hackage.haskell.org/package/exinst#readme module Exinst.Singletons data Some1 (f1 :: k1 -> Type) Some1 :: !(Sing a1) -> !(f1 a1) -> Some1 some1 :: forall (f1 :: k1 -> Type) a1. SingI a1 => f1 a1 -> Some1 f1 fromSome1 :: forall (f1 :: k1 -> Type) a1. (SingI a1, SDecide k1) => Some1 f1 -> Maybe (f1 a1) _Some1 :: forall (f1 :: k1 -> Type) a1. (SingI a1, SDecide k1) => Prism' (Some1 f1) (f1 a1) withSome1 :: forall (f1 :: k1 -> Type) (r :: Type). Some1 f1 -> (forall a1. SingI a1 => f1 a1 -> r) -> r -- | Like withSome1, but takes an explicit Sing besides the -- SingI instance. withSome1Sing :: forall (f1 :: k1 -> Type) (r :: Type). Some1 f1 -> (forall a1. (SingI a1) => Sing a1 -> f1 a1 -> r) -> r some1SingRep :: SingKind k1 => Some1 (f1 :: k1 -> Type) -> DemoteRep k1 class Dict1 (c :: k0 -> Constraint) (f1 :: k1 -> k0) -- | Runtime lookup of the c (f1 a1) instance. dict1 :: Dict1 c f1 => Sing a1 -> Dict (c (f1 a1)) data Some2 (f2 :: k2 -> k1 -> Type) Some2 :: !(Sing a2) -> !(Sing a1) -> !(f2 a2 a1) -> Some2 some2 :: forall (f2 :: k2 -> k1 -> Type) a2 a1. (SingI a2, SingI a1) => f2 a2 a1 -> Some2 f2 fromSome2 :: forall (f2 :: k2 -> k1 -> Type) a2 a1. (SingI a2, SDecide k2, SingI a1, SDecide k1) => Some2 f2 -> Maybe (f2 a2 a1) _Some2 :: forall (f2 :: k2 -> k1 -> Type) a2 a1. (SingI a2, SDecide k2, SingI a1, SDecide k1) => Prism' (Some2 f2) (f2 a2 a1) withSome2 :: forall (f2 :: k2 -> k1 -> Type) (r :: Type). Some2 f2 -> (forall a2 a1. (SingI a2, SingI a1) => f2 a2 a1 -> r) -> r -- | Like withSome2, but takes explicit Sings besides the -- SingI instances. withSome2Sing :: forall (f2 :: k2 -> k1 -> Type) (r :: Type). Some2 f2 -> (forall a2 a1. (SingI a2, SingI a1) => Sing a2 -> Sing a1 -> f2 a2 a1 -> r) -> r some2SingRep :: (SingKind k2, SingKind k1) => Some2 (f2 :: k2 -> k1 -> Type) -> (DemoteRep k2, DemoteRep k1) class Dict2 (c :: k0 -> Constraint) (f2 :: k2 -> k1 -> k0) dict2 :: Dict2 c f2 => Sing a2 -> Sing a1 -> Dict (c (f2 a2 a1)) data Some3 (f3 :: k3 -> k2 -> k1 -> Type) Some3 :: !(Sing a3) -> !(Sing a2) -> !(Sing a1) -> !(f3 a3 a2 a1) -> Some3 some3 :: forall (f3 :: k3 -> k2 -> k1 -> Type) a3 a2 a1. (SingI a3, SingI a2, SingI a1) => f3 a3 a2 a1 -> Some3 f3 fromSome3 :: forall (f3 :: k3 -> k2 -> k1 -> Type) a3 a2 a1. (SingI a3, SDecide k3, SingI a2, SDecide k2, SingI a1, SDecide k1) => Some3 f3 -> Maybe (f3 a3 a2 a1) _Some3 :: forall (f3 :: k3 -> k2 -> k1 -> Type) a3 a2 a1. (SingI a3, SDecide k3, SingI a2, SDecide k2, SingI a1, SDecide k1) => Prism' (Some3 f3) (f3 a3 a2 a1) withSome3 :: forall (f3 :: k3 -> k2 -> k1 -> Type) (r :: Type). Some3 f3 -> (forall a3 a2 a1. (SingI a3, SingI a2, SingI a1) => f3 a3 a2 a1 -> r) -> r -- | Like withSome3, but takes explicit Sings besides the -- SingI instances. withSome3Sing :: forall (f3 :: k3 -> k2 -> k1 -> Type) (r :: Type). Some3 f3 -> (forall a3 a2 a1. (SingI a3, SingI a2, SingI a1) => Sing a3 -> Sing a2 -> Sing a1 -> f3 a3 a2 a1 -> r) -> r some3SingRep :: (SingKind k3, SingKind k2, SingKind k1) => Some3 (f3 :: k3 -> k2 -> k1 -> Type) -> (DemoteRep k3, DemoteRep k2, DemoteRep k1) class Dict3 (c :: k0 -> Constraint) (f3 :: k3 -> k2 -> k1 -> k0) dict3 :: Dict3 c f3 => Sing a3 -> Sing a2 -> Sing a1 -> Dict (c (f3 a3 a2 a1)) data Some4 (f4 :: k4 -> k3 -> k2 -> k1 -> Type) Some4 :: !(Sing a4) -> !(Sing a3) -> !(Sing a2) -> !(Sing a1) -> !(f4 a4 a3 a2 a1) -> Some4 some4 :: forall (f4 :: k4 -> k3 -> k2 -> k1 -> Type) a4 a3 a2 a1. (SingI a4, SingI a3, SingI a2, SingI a1) => f4 a4 a3 a2 a1 -> Some4 f4 fromSome4 :: forall (f4 :: k4 -> k3 -> k2 -> k1 -> Type) a4 a3 a2 a1. (SingI a4, SDecide k4, SingI a3, SDecide k3, SingI a2, SDecide k2, SingI a1, SDecide k1) => Some4 f4 -> Maybe (f4 a4 a3 a2 a1) _Some4 :: forall (f4 :: k4 -> k3 -> k2 -> k1 -> Type) a4 a3 a2 a1. (SingI a4, SDecide k4, SingI a3, SDecide k3, SingI a2, SDecide k2, SingI a1, SDecide k1) => Prism' (Some4 f4) (f4 a4 a3 a2 a1) withSome4 :: forall (f4 :: k4 -> k3 -> k2 -> k1 -> Type) (r :: Type). Some4 f4 -> (forall a4 a3 a2 a1. (SingI a4, SingI a3, SingI a2, SingI a1) => f4 a4 a3 a2 a1 -> r) -> r -- | Like withSome4, but takes explicit Sings besides the -- SingI instances. withSome4Sing :: forall (f4 :: k4 -> k3 -> k2 -> k1 -> Type) (r :: Type). 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 some4SingRep :: (SingKind k4, SingKind k3, SingKind k2, SingKind k1) => Some4 (f4 :: k4 -> k3 -> k2 -> k1 -> Type) -> (DemoteRep k4, DemoteRep k3, DemoteRep k2, DemoteRep k1) class Dict4 (c :: k0 -> Constraint) (f4 :: k4 -> k3 -> k2 -> k1 -> k0) dict4 :: Dict4 c f4 => Sing a4 -> Sing a3 -> Sing a2 -> Sing a1 -> Dict (c (f4 a4 a3 a2 a1)) -- | Values of type Dict p capture a dictionary for a -- constraint of type p. -- -- 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. data Dict (a :: Constraint) :: Constraint -> * [Dict] :: Dict a -- | 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 (GHC.Show.Show x, GHC.Show.Show r1, GHC.Show.Show r2, GHC.Show.Show r3, GHC.Show.Show r4) => GHC.Show.Show (Exinst.Instances.Base.Some4'Show r4 r3 r2 r1 x) instance (GHC.Show.Show x, GHC.Show.Show r1, GHC.Show.Show r2, GHC.Show.Show r3) => GHC.Show.Show (Exinst.Instances.Base.Some3'Show r3 r2 r1 x) instance (GHC.Show.Show x, GHC.Show.Show r1, GHC.Show.Show r2) => GHC.Show.Show (Exinst.Instances.Base.Some2'Show r2 r1 x) instance (GHC.Show.Show x, GHC.Show.Show r1) => GHC.Show.Show (Exinst.Instances.Base.Some1'Show r1 x) instance forall k1 (f1 :: k1 -> GHC.Types.Type). (Data.Singletons.SingKind k1, GHC.Show.Show (Data.Singletons.DemoteRep k1), Exinst.Singletons.Dict1 GHC.Show.Show f1) => GHC.Show.Show (Exinst.Singletons.Some1 f1) instance forall k2 k1 (f2 :: k2 -> k1 -> GHC.Types.Type). (Data.Singletons.SingKind k2, Data.Singletons.SingKind k1, GHC.Show.Show (Data.Singletons.DemoteRep k2), GHC.Show.Show (Data.Singletons.DemoteRep k1), Exinst.Singletons.Dict2 GHC.Show.Show f2) => GHC.Show.Show (Exinst.Singletons.Some2 f2) instance forall k3 k2 k1 (f3 :: k3 -> k2 -> k1 -> GHC.Types.Type). (Data.Singletons.SingKind k3, Data.Singletons.SingKind k2, Data.Singletons.SingKind k1, GHC.Show.Show (Data.Singletons.DemoteRep k3), GHC.Show.Show (Data.Singletons.DemoteRep k2), GHC.Show.Show (Data.Singletons.DemoteRep k1), Exinst.Singletons.Dict3 GHC.Show.Show f3) => GHC.Show.Show (Exinst.Singletons.Some3 f3) instance forall k4 k3 k2 k1 (f4 :: k4 -> k3 -> k2 -> k1 -> GHC.Types.Type). (Data.Singletons.SingKind k4, Data.Singletons.SingKind k3, Data.Singletons.SingKind k2, Data.Singletons.SingKind k1, GHC.Show.Show (Data.Singletons.DemoteRep k4), GHC.Show.Show (Data.Singletons.DemoteRep k3), GHC.Show.Show (Data.Singletons.DemoteRep k2), GHC.Show.Show (Data.Singletons.DemoteRep k1), Exinst.Singletons.Dict4 GHC.Show.Show f4) => GHC.Show.Show (Exinst.Singletons.Some4 f4) instance forall k1 (f1 :: k1 -> GHC.Types.Type). (Data.Singletons.Decide.SDecide k1, Exinst.Singletons.Dict1 GHC.Classes.Eq f1) => GHC.Classes.Eq (Exinst.Singletons.Some1 f1) instance forall k2 k1 (f2 :: k2 -> k1 -> GHC.Types.Type). (Data.Singletons.Decide.SDecide k2, Data.Singletons.Decide.SDecide k1, Exinst.Singletons.Dict2 GHC.Classes.Eq f2) => GHC.Classes.Eq (Exinst.Singletons.Some2 f2) instance forall k3 k2 k1 (f3 :: k3 -> k2 -> k1 -> GHC.Types.Type). (Data.Singletons.Decide.SDecide k3, Data.Singletons.Decide.SDecide k2, Data.Singletons.Decide.SDecide k1, Exinst.Singletons.Dict3 GHC.Classes.Eq f3) => GHC.Classes.Eq (Exinst.Singletons.Some3 f3) instance forall k4 k3 k2 k1 (f4 :: k4 -> k3 -> k2 -> k1 -> GHC.Types.Type). (Data.Singletons.Decide.SDecide k4, Data.Singletons.Decide.SDecide k3, Data.Singletons.Decide.SDecide k2, Data.Singletons.Decide.SDecide k1, Exinst.Singletons.Dict4 GHC.Classes.Eq f4) => GHC.Classes.Eq (Exinst.Singletons.Some4 f4) instance forall k1 (f1 :: k1 -> GHC.Types.Type). (Data.Singletons.SingKind k1, Data.Singletons.Decide.SDecide k1, GHC.Classes.Ord (Data.Singletons.DemoteRep k1), Exinst.Singletons.Dict1 GHC.Classes.Ord f1, GHC.Classes.Eq (Exinst.Singletons.Some1 f1)) => GHC.Classes.Ord (Exinst.Singletons.Some1 f1) instance forall k2 k1 (f2 :: k2 -> k1 -> GHC.Types.Type). (Data.Singletons.SingKind k2, Data.Singletons.SingKind k1, Data.Singletons.Decide.SDecide k2, Data.Singletons.Decide.SDecide k1, GHC.Classes.Ord (Data.Singletons.DemoteRep k2), GHC.Classes.Ord (Data.Singletons.DemoteRep k1), Exinst.Singletons.Dict2 GHC.Classes.Ord f2, GHC.Classes.Eq (Exinst.Singletons.Some2 f2)) => GHC.Classes.Ord (Exinst.Singletons.Some2 f2) instance forall k3 k2 k1 (f3 :: k3 -> k2 -> k1 -> GHC.Types.Type). (Data.Singletons.SingKind k3, Data.Singletons.SingKind k2, Data.Singletons.SingKind k1, Data.Singletons.Decide.SDecide k3, Data.Singletons.Decide.SDecide k2, Data.Singletons.Decide.SDecide k1, GHC.Classes.Ord (Data.Singletons.DemoteRep k3), GHC.Classes.Ord (Data.Singletons.DemoteRep k2), GHC.Classes.Ord (Data.Singletons.DemoteRep k1), Exinst.Singletons.Dict3 GHC.Classes.Ord f3, GHC.Classes.Eq (Exinst.Singletons.Some3 f3)) => GHC.Classes.Ord (Exinst.Singletons.Some3 f3) instance forall k4 k3 k2 k1 (f4 :: k4 -> k3 -> k2 -> k1 -> GHC.Types.Type). (Data.Singletons.SingKind k4, Data.Singletons.SingKind k3, Data.Singletons.SingKind k2, Data.Singletons.SingKind k1, Data.Singletons.Decide.SDecide k4, Data.Singletons.Decide.SDecide k3, Data.Singletons.Decide.SDecide k2, Data.Singletons.Decide.SDecide k1, GHC.Classes.Ord (Data.Singletons.DemoteRep k4), GHC.Classes.Ord (Data.Singletons.DemoteRep k3), GHC.Classes.Ord (Data.Singletons.DemoteRep k2), GHC.Classes.Ord (Data.Singletons.DemoteRep k1), Exinst.Singletons.Dict4 GHC.Classes.Ord f4, GHC.Classes.Eq (Exinst.Singletons.Some4 f4)) => GHC.Classes.Ord (Exinst.Singletons.Some4 f4) instance forall k0 (c :: k0 -> GHC.Types.Constraint) (f :: GHC.Types.Bool -> k0). (c (f 'GHC.Types.True), c (f 'GHC.Types.False)) => Exinst.Singletons.Dict1 c f