packages feed

decidable 0.2.1.0 → 0.3.0.0

raw patch · 5 files changed

+176/−61 lines, 5 filesdep ~basedep ~functor-productsdep ~singletonsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, functor-products, singletons

API changes (from Hackage documentation)

- Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.NERec Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PEither Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PIdentity Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PMaybe Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PTup Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Vinyl.Core.Rec Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.NERec Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PEither Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PIdentity Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PMaybe Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PTup Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Vinyl.Core.Rec Data.Singletons.Internal.Sing))
- Data.Type.Predicate: instance forall k1 j (p :: j Data.Singletons.Internal.~> *) (f :: k1 Data.Singletons.Internal.~> j). (Data.Type.Predicate.Decidable p, Data.Singletons.Internal.SingI f) => Data.Type.Predicate.Decidable (Data.Type.Predicate.PMap f p)
- Data.Type.Predicate: instance forall k1 j (p :: j Data.Singletons.Internal.~> *) (f :: k1 Data.Singletons.Internal.~> j). (Data.Type.Predicate.Provable p, Data.Singletons.Internal.SingI f) => Data.Type.Predicate.Provable (Data.Type.Predicate.PMap f p)
- Data.Type.Predicate: type Evident = (TyPred Sing :: Predicate k)
- Data.Type.Predicate.Auto: instance forall j k (a :: k). Data.Singletons.Internal.SingI a => Data.Type.Predicate.Auto.Auto Data.Type.Universe.IsRight ('Data.Either.Right a)
- Data.Type.Predicate.Auto: instance forall j k (as :: (j, k)). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PTup Data.Singletons.Internal.Sing)) as
- Data.Type.Predicate.Auto: instance forall j k (as :: Data.Either.Either j k). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PEither Data.Singletons.Internal.Sing)) as
- Data.Type.Predicate.Auto: instance forall k (as :: Data.Functor.Identity.Identity k). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PIdentity Data.Singletons.Internal.Sing)) as
- Data.Type.Predicate.Auto: instance forall k (as :: GHC.Base.NonEmpty k). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.NERec Data.Singletons.Internal.Sing)) as
- Data.Type.Predicate.Auto: instance forall k (as :: GHC.Maybe.Maybe k). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PMaybe Data.Singletons.Internal.Sing)) as
- Data.Type.Predicate.Auto: instance forall k j (p :: Data.Type.Predicate.Predicate j) (f :: k Data.Singletons.Internal.~> j) (a :: k). Data.Type.Predicate.Auto.Auto p (f Data.Singletons.Internal.@@ a) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.PMap f p) a
- Data.Type.Predicate.Auto: instance forall k j (p :: Data.Type.Predicate.Predicate j) (f :: k Data.Singletons.Internal.~> j) (a :: k). Data.Type.Predicate.Auto.AutoNot p (f Data.Singletons.Internal.@@ a) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Not (Data.Type.Predicate.PMap f p)) a
- Data.Type.Predicate.Auto: instance forall k j v (p :: Data.Type.Predicate.Param.ParamPred j v) (f :: k Data.Singletons.Internal.~> j) (a :: k). Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Param.Found p) (f Data.Singletons.Internal.@@ a) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Param.Found (Data.Type.Predicate.Param.PPMap f p)) a
- Data.Type.Predicate.Auto: instance forall k j v (p :: Data.Type.Predicate.Param.ParamPred j v) (f :: k Data.Singletons.Internal.~> j) (a :: k). Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Param.NotFound p) (f Data.Singletons.Internal.@@ a) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Param.NotFound (Data.Type.Predicate.Param.PPMap f p)) a
- Data.Type.Predicate.Auto: instance forall u (as :: [u]). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Vinyl.Core.Rec Data.Singletons.Internal.Sing)) as
- Data.Type.Predicate.Auto: instance forall v k (f :: * -> *) (as :: f k) (p :: Data.Type.Predicate.Param.ParamPred k v). (Data.Singletons.Internal.SingI as, Data.Type.Predicate.Auto.AutoAll f (Data.Type.Predicate.Not (Data.Type.Predicate.Param.Found p)) as) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Not (Data.Type.Predicate.Param.Found (Data.Type.Predicate.Param.AnyMatch f p))) as
- Data.Type.Predicate.Logic: type Evident = (TyPred Sing :: Predicate k)
- Data.Type.Predicate.Param: instance forall u k1 v (p :: Data.Type.Predicate.Param.ParamPred k1 v) (q :: Data.Type.Predicate.Param.ParamPred k1 u). (Data.Type.Predicate.Param.Searchable p, Data.Type.Predicate.Param.Searchable q) => Data.Type.Predicate.Decidable (Data.Type.Predicate.Param.Found (Data.Type.Predicate.Param.AndP p q))
- Data.Type.Predicate.Param: instance forall u k1 v (p :: Data.Type.Predicate.Param.ParamPred k1 v) (q :: Data.Type.Predicate.Param.ParamPred k1 u). (Data.Type.Predicate.Param.Selectable p, Data.Type.Predicate.Param.Selectable q) => Data.Type.Predicate.Provable (Data.Type.Predicate.Param.Found (Data.Type.Predicate.Param.AndP p q))
- Data.Type.Universe: data ISnd (a :: (j, k)) (b :: k) :: forall j k. () => (j, k) -> k -> Type
- Data.Type.Universe: data IRight (a :: Either j k) (b :: k) :: forall j k. () => Either j k -> k -> Type
- Data.Type.Universe: data IIdentity (a :: Identity k) (b :: k) :: forall k. () => Identity k -> k -> Type
- Data.Type.Universe: data IJust (a :: Maybe k) (b :: k) :: forall k. () => Maybe k -> k -> Type
- Data.Type.Universe: data NEIndex (a :: NonEmpty k) (b :: k) :: forall k. () => NonEmpty k -> k -> Type
- Data.Type.Universe: data Index (a :: [k]) (b :: k) :: forall k. () => [k] -> k -> Type
+ Data.Type.Predicate: data Evident :: Predicate k
+ Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.NERec Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PEither Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PIdentity Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PMaybe Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PTup Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Vinyl.Core.Rec Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred Data.Singletons.Internal.WrappedSing)
+ Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.NERec Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PEither Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PIdentity Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PMaybe Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PTup Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Vinyl.Core.Rec Data.Singletons.Internal.WrappedSing))
+ Data.Type.Predicate: instance Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred Data.Singletons.Internal.WrappedSing)
+ Data.Type.Predicate: instance forall j k1 (p :: j Data.Singletons.Internal.~> *) (f :: k1 Data.Singletons.Internal.~> j). (Data.Type.Predicate.Decidable p, Data.Singletons.Internal.SingI f) => Data.Type.Predicate.Decidable (Data.Type.Predicate.PMap f p)
+ Data.Type.Predicate: instance forall j k1 (p :: j Data.Singletons.Internal.~> *) (f :: k1 Data.Singletons.Internal.~> j). (Data.Type.Predicate.Provable p, Data.Singletons.Internal.SingI f) => Data.Type.Predicate.Provable (Data.Type.Predicate.PMap f p)
+ Data.Type.Predicate: instance forall k (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Decidable p => Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.NERec (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall k (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Decidable p => Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PIdentity (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall k (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Decidable p => Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PMaybe (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall k (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Provable p => Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.NERec (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall k (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Provable p => Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PIdentity (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall k (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Provable p => Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PMaybe (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall k j (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Decidable p => Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PEither (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall k j (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Decidable p => Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PTup (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall k j (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Provable p => Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PEither (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall k j (p :: k Data.Singletons.Internal.~> *). Data.Type.Predicate.Provable p => Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PTup (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall u (p :: u Data.Singletons.Internal.~> *). Data.Type.Predicate.Decidable p => Data.Type.Predicate.Decidable (Data.Type.Predicate.TyPred (Data.Vinyl.Core.Rec (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate: instance forall u (p :: u Data.Singletons.Internal.~> *). Data.Type.Predicate.Provable p => Data.Type.Predicate.Provable (Data.Type.Predicate.TyPred (Data.Vinyl.Core.Rec (Data.Type.Predicate.Wit p)))
+ Data.Type.Predicate.Auto: instance forall j k (as :: (j, k)) (p :: k Data.Singletons.Internal.~> *). (Data.Singletons.Internal.SingI as, Data.Type.Predicate.Provable p) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PTup (Data.Type.Predicate.Wit p))) as
+ Data.Type.Predicate.Auto: instance forall j k (as :: (j, k)). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PTup Data.Singletons.Internal.WrappedSing)) as
+ Data.Type.Predicate.Auto: instance forall j k (as :: Data.Either.Either j k) (p :: k Data.Singletons.Internal.~> *). (Data.Singletons.Internal.SingI as, Data.Type.Predicate.Provable p) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PEither (Data.Type.Predicate.Wit p))) as
+ Data.Type.Predicate.Auto: instance forall j k (as :: Data.Either.Either j k). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PEither Data.Singletons.Internal.WrappedSing)) as
+ Data.Type.Predicate.Auto: instance forall j k (p :: Data.Type.Predicate.Predicate j) (f :: k Data.Singletons.Internal.~> j) (a :: k). Data.Type.Predicate.Auto.Auto p (f Data.Singletons.Internal.@@ a) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.PMap f p) a
+ Data.Type.Predicate.Auto: instance forall j k (p :: Data.Type.Predicate.Predicate j) (f :: k Data.Singletons.Internal.~> j) (a :: k). Data.Type.Predicate.Auto.AutoNot p (f Data.Singletons.Internal.@@ a) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Not (Data.Type.Predicate.PMap f p)) a
+ Data.Type.Predicate.Auto: instance forall j v k (p :: Data.Type.Predicate.Param.ParamPred j v) (f :: k Data.Singletons.Internal.~> j) (a :: k). Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Param.Found p) (f Data.Singletons.Internal.@@ a) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Param.Found (Data.Type.Predicate.Param.PPMap f p)) a
+ Data.Type.Predicate.Auto: instance forall j v k (p :: Data.Type.Predicate.Param.ParamPred j v) (f :: k Data.Singletons.Internal.~> j) (a :: k). Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Param.NotFound p) (f Data.Singletons.Internal.@@ a) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Param.NotFound (Data.Type.Predicate.Param.PPMap f p)) a
+ Data.Type.Predicate.Auto: instance forall k (as :: Data.Functor.Identity.Identity k) (p :: k Data.Singletons.Internal.~> *). (Data.Singletons.Internal.SingI as, Data.Type.Predicate.Provable p) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PIdentity (Data.Type.Predicate.Wit p))) as
+ Data.Type.Predicate.Auto: instance forall k (as :: Data.Functor.Identity.Identity k). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PIdentity Data.Singletons.Internal.WrappedSing)) as
+ Data.Type.Predicate.Auto: instance forall k (as :: GHC.Base.NonEmpty k) (p :: k Data.Singletons.Internal.~> *). (Data.Singletons.Internal.SingI as, Data.Type.Predicate.Provable p) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.NERec (Data.Type.Predicate.Wit p))) as
+ Data.Type.Predicate.Auto: instance forall k (as :: GHC.Base.NonEmpty k). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.NERec Data.Singletons.Internal.WrappedSing)) as
+ Data.Type.Predicate.Auto: instance forall k (as :: GHC.Maybe.Maybe k) (p :: k Data.Singletons.Internal.~> *). (Data.Singletons.Internal.SingI as, Data.Type.Predicate.Provable p) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PMaybe (Data.Type.Predicate.Wit p))) as
+ Data.Type.Predicate.Auto: instance forall k (as :: GHC.Maybe.Maybe k). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Type.Functor.Product.PMaybe Data.Singletons.Internal.WrappedSing)) as
+ Data.Type.Predicate.Auto: instance forall k j (a :: k). Data.Singletons.Internal.SingI a => Data.Type.Predicate.Auto.Auto Data.Type.Universe.IsRight ('Data.Either.Right a)
+ Data.Type.Predicate.Auto: instance forall k v (f :: * -> *) (as :: f k) (p :: Data.Type.Predicate.Param.ParamPred k v). (Data.Singletons.Internal.SingI as, Data.Type.Predicate.Auto.AutoAll f (Data.Type.Predicate.Not (Data.Type.Predicate.Param.Found p)) as) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.Not (Data.Type.Predicate.Param.Found (Data.Type.Predicate.Param.AnyMatch f p))) as
+ Data.Type.Predicate.Auto: instance forall u (as :: [u]) (p :: u Data.Singletons.Internal.~> *). (Data.Singletons.Internal.SingI as, Data.Type.Predicate.Provable p) => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Vinyl.Core.Rec (Data.Type.Predicate.Wit p))) as
+ Data.Type.Predicate.Auto: instance forall u (as :: [u]). Data.Singletons.Internal.SingI as => Data.Type.Predicate.Auto.Auto (Data.Type.Predicate.TyPred (Data.Vinyl.Core.Rec Data.Singletons.Internal.WrappedSing)) as
+ Data.Type.Predicate.Logic: data Evident :: Predicate k
+ Data.Type.Predicate.Param: instance forall k1 v u (p :: Data.Type.Predicate.Param.ParamPred k1 v) (q :: Data.Type.Predicate.Param.ParamPred k1 u). (Data.Type.Predicate.Param.Searchable p, Data.Type.Predicate.Param.Searchable q) => Data.Type.Predicate.Decidable (Data.Type.Predicate.Param.Found (Data.Type.Predicate.Param.AndP p q))
+ Data.Type.Predicate.Param: instance forall k1 v u (p :: Data.Type.Predicate.Param.ParamPred k1 v) (q :: Data.Type.Predicate.Param.ParamPred k1 u). (Data.Type.Predicate.Param.Selectable p, Data.Type.Predicate.Param.Selectable q) => Data.Type.Predicate.Provable (Data.Type.Predicate.Param.Found (Data.Type.Predicate.Param.AndP p q))
+ Data.Type.Universe: data IIdentity (a :: Identity k) (b :: k)
+ Data.Type.Universe: data IJust (a :: Maybe k) (b :: k)
+ Data.Type.Universe: data IRight (a :: Either j k) (b :: k)
+ Data.Type.Universe: data ISnd (a :: (j, k)) (b :: k)
+ Data.Type.Universe: data Index (a :: [k]) (b :: k)
+ Data.Type.Universe: data NEIndex (a :: NonEmpty k) (b :: k)
- Data.Type.Predicate: type BoolPred (p :: k ~> Bool) = (PMap p (EqualTo 'True) :: Predicate k)
+ Data.Type.Predicate: type BoolPred (p :: k ~> Bool) = (PMap p (EqualTo 'True) :: Predicate k)
- Data.Type.Predicate.Quantification: WitAll :: (forall a. Elem f as a -> p @@ a) -> WitAll f p
+ Data.Type.Predicate.Quantification: WitAll :: (forall a. Elem f as a -> p @@ a) -> WitAll f p (as :: f k)
- Data.Type.Predicate.Quantification: [runWitAll] :: WitAll f p -> forall a. Elem f as a -> p @@ a
+ Data.Type.Predicate.Quantification: [runWitAll] :: WitAll f p (as :: f k) -> forall a. Elem f as a -> p @@ a
- Data.Type.Universe: WitAll :: (forall a. Elem f as a -> p @@ a) -> WitAll f p
+ Data.Type.Universe: WitAll :: (forall a. Elem f as a -> p @@ a) -> WitAll f p (as :: f k)
- Data.Type.Universe: [IId] :: forall k (a :: Identity k) (b :: k). () => IIdentity (Identity b) b
+ Data.Type.Universe: [IId] :: forall k (b :: k). IIdentity ('Identity b) b
- Data.Type.Universe: [IJust] :: forall k (a :: Maybe k) (b :: k). () => IJust (Just b) b
+ Data.Type.Universe: [IJust] :: forall k (b :: k). IJust ('Just b) b
- Data.Type.Universe: [IRight] :: forall j k (a :: Either j k) (b :: k). () => IRight (Right b :: Either j k) b
+ Data.Type.Universe: [IRight] :: forall k j (b :: k). IRight ('Right b :: Either j k) b
- Data.Type.Universe: [IS] :: forall k (a :: [k]) (b :: k) (bs :: [k]) (b1 :: k). () => Index bs b -> Index (b1 : bs) b
+ Data.Type.Universe: [IS] :: forall k (bs :: [k]) (b :: k) (b1 :: k). Index bs b -> Index (b1 : bs) b
- Data.Type.Universe: [ISnd] :: forall j k (a :: (j, k)) (b :: k) (a1 :: j). () => ISnd ((,) a1 b) b
+ Data.Type.Universe: [ISnd] :: forall j k (a1 :: j) (b :: k). ISnd '(a1, b) b
- Data.Type.Universe: [IZ] :: forall k (a :: [k]) (b :: k) (as :: [k]). () => Index (b : as) b
+ Data.Type.Universe: [IZ] :: forall k (b :: k) (as :: [k]). Index (b : as) b
- Data.Type.Universe: [NEHead] :: forall k (a :: NonEmpty k) (b :: k) (as :: [k]). () => NEIndex (b :| as) b
+ Data.Type.Universe: [NEHead] :: forall k (b :: k) (as :: [k]). NEIndex (b :| as) b
- Data.Type.Universe: [NETail] :: forall k (a :: NonEmpty k) (b :: k) (as :: [k]) (b1 :: k). () => Index as b -> NEIndex (b1 :| as) b
+ Data.Type.Universe: [NETail] :: forall k (as :: [k]) (b :: k) (b1 :: k). Index as b -> NEIndex (b1 :| as) b
- Data.Type.Universe: [runWitAll] :: WitAll f p -> forall a. Elem f as a -> p @@ a
+ Data.Type.Universe: [runWitAll] :: WitAll f p (as :: f k) -> forall a. Elem f as a -> p @@ a
- Data.Type.Universe.Subset: WitSubset :: (forall a. Elem f as a -> Decision (p @@ a)) -> WitSubset f p
+ Data.Type.Universe.Subset: WitSubset :: (forall a. Elem f as a -> Decision (p @@ a)) -> WitSubset f p (as :: f k)
- Data.Type.Universe.Subset: [runWitSubset] :: WitSubset f p -> forall a. Elem f as a -> Decision (p @@ a)
+ Data.Type.Universe.Subset: [runWitSubset] :: WitSubset f p (as :: f k) -> forall a. Elem f as a -> Decision (p @@ a)

Files

CHANGELOG.md view
@@ -1,6 +1,20 @@ Changelog ========= +Version 0.3.0.0+---------------++*Feburary 2, 2020*++<https://github.com/mstksg/decidable/releases/tag/v0.3.0.0>++*   Update to work with *singletons-2.6*, the type family update+*   Change `Evident` to now be a defunctionalization symbol for `Sing`, instead+    of a type synonym with `TyPred`, to match with *singletons-2.6*.  Most code+    in practice should be the same.+*   Fix instances for `FProd`s: now can prove and decide any `FProd f (Wit p)`,+    and can prove and decide and auto any `FProd f WrappedSing`.+ Version 0.2.1.0 --------------- 
decidable.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 6ed0b9a421c5cd0cbd622790a067c8e7f30ed4bda6034a6471ad2064980be446+-- hash: d32fc68e2c0f9fc18f6d1c665774f308fc7e98fa1f9d71d0de5ffe287b57bae7  name:           decidable-version:        0.2.1.0+version:        0.3.0.0 synopsis:       Combinators for manipulating dependently-typed predicates. description:    This library provides combinators and typeclasses for working and manipulating                 type-level predicates in Haskell, which are represented as matchable type-level@@ -22,7 +22,7 @@ copyright:      (c) Justin Le 2018 license:        BSD3 license-file:   LICENSE-tested-with:    GHC >= 8.6+tested-with:    GHC >= 8.8 build-type:     Simple extra-source-files:     README.md@@ -47,9 +47,9 @@       src   ghc-options: -Wall -Wredundant-constraints -Wcompat -Werror=incomplete-patterns   build-depends:-      base >=4.11 && <5-    , functor-products+      base >=4.13 && <5+    , functor-products >=0.1.1     , microlens-    , singletons >=2.5+    , singletons >=2.6     , vinyl   default-language: Haskell2010
src/Data/Type/Predicate.hs view
@@ -134,7 +134,8 @@ -- @ -- 'Evident' :: 'Predicate' k -- @-type Evident = (TyPred Sing :: Predicate k)+data Evident :: Predicate k+type instance Apply Evident a = Sing a  -- | The always-false predicate --@@ -361,36 +362,118 @@ instance Provable Evident where     prove = id --- | @since 2.0.0-instance Provable (TyPred (Rec Sing)) where-    prove = singProd--- | @since 2.0.0-instance Decidable (TyPred (Rec Sing))--- | @since 2.0.0-instance Provable (TyPred (PMaybe Sing)) where-    prove = singProd--- | @since 2.0.0-instance Decidable (TyPred (PMaybe Sing))--- | @since 2.0.0-instance Provable (TyPred (NERec Sing)) where-    prove = singProd--- | @since 2.0.0-instance Decidable (TyPred (NERec Sing))--- | @since 2.0.0-instance Provable (TyPred (PIdentity Sing)) where-    prove = singProd--- | @since 2.0.0-instance Decidable (TyPred (PIdentity Sing))--- | @since 2.0.0-instance Provable (TyPred (PEither Sing)) where-    prove = singProd--- | @since 2.0.0-instance Decidable (TyPred (PEither Sing))--- | @since 2.0.0-instance Provable (TyPred (PTup Sing)) where-    prove = singProd--- | @since 2.0.0-instance Decidable (TyPred (PTup Sing))+-- | @since 3.0.0+instance Decidable (TyPred WrappedSing)+-- | @since 3.0.0+instance Provable (TyPred WrappedSing) where+    prove = WrapSing+    ++-- | @since 3.0.0+instance Provable p => Provable (TyPred (Rec (Wit p))) where+    prove = mapProd (Wit . prove @p) . singProd+-- | @since 3.0.0+instance Decidable p => Decidable (TyPred (Rec (Wit p))) where+    decide = \case+      SNil         -> Proved RNil+      x `SCons` xs -> case decide @p x of+        Proved p -> case decideTC xs of+          Proved ps -> Proved $ Wit p :& ps+          Disproved vs -> Disproved $ \case+            _ :& ps -> vs ps+        Disproved v -> Disproved $ \case+          Wit p :& _ -> v p++-- | @since 3.0.0+instance Provable (TyPred (Rec WrappedSing)) where+    prove = mapProd WrapSing . singProd+-- | @since 3.0.0+instance Decidable (TyPred (Rec WrappedSing))++-- | @since 3.0.0+instance Provable p => Provable (TyPred (PMaybe (Wit p))) where+    prove = mapProd (Wit . prove @p) . singProd+-- | @since 3.0.0+instance Decidable p => Decidable (TyPred (PMaybe (Wit p))) where+    decide = \case+      SNothing -> Proved PNothing+      SJust x  -> mapDecision (PJust . Wit) (\case PJust (Wit p) -> p)+                . decide @p+                $ x++-- | @since 3.0.0+instance Provable (TyPred (PMaybe WrappedSing)) where+    prove = mapProd WrapSing . singProd+-- | @since 3.0.0+instance Decidable (TyPred (PMaybe WrappedSing))++-- | @since 3.0.0+instance Provable p => Provable (TyPred (NERec (Wit p))) where+    prove = mapProd (Wit . prove @p) . singProd+-- | @since 3.0.0+instance Decidable p => Decidable (TyPred (NERec (Wit p))) where+    decide = \case+      x NE.:%| xs -> case decide @p x of+        Proved p -> case decideTC xs of+          Proved ps -> Proved $ Wit p :&| ps+          Disproved vs -> Disproved $ \case+            _ :&| ps -> vs ps+        Disproved v -> Disproved $ \case+          Wit p :&| _ -> v p++-- | @since 3.0.0+instance Provable (TyPred (NERec WrappedSing)) where+    prove = mapProd WrapSing . singProd+-- | @since 3.0.0+instance Decidable (TyPred (NERec WrappedSing))++-- | @since 3.0.0+instance Provable p => Provable (TyPred (PIdentity (Wit p))) where+    prove = mapProd (Wit . prove @p) . singProd+-- | @since 3.0.0+instance Decidable p => Decidable (TyPred (PIdentity (Wit p))) where+    decide = \case+      SIdentity x -> mapDecision (PIdentity . Wit) (\case PIdentity (Wit p) -> p)+                   . decide @p+                   $ x++-- | @since 3.0.0+instance Provable (TyPred (PIdentity WrappedSing)) where+    prove = mapProd WrapSing . singProd+-- | @since 3.0.0+instance Decidable (TyPred (PIdentity WrappedSing))++-- | @since 3.0.0+instance Provable p => Provable (TyPred (PEither (Wit p))) where+    prove = mapProd (Wit . prove @p) . singProd+-- | @since 3.0.0+instance Decidable p => Decidable (TyPred (PEither (Wit p))) where+    decide = \case+      SLeft  x -> Proved $ PLeft x+      SRight y -> mapDecision (PRight . Wit) (\case PRight (Wit p) -> p)+                . decide @p+                $ y++-- | @since 3.0.0+instance Provable (TyPred (PEither WrappedSing)) where+    prove = mapProd WrapSing . singProd+-- | @since 3.0.0+instance Decidable (TyPred (PEither WrappedSing))++-- | @since 3.0.0+instance Provable p => Provable (TyPred (PTup (Wit p))) where+    prove = mapProd (Wit . prove @p) . singProd+-- | @since 3.0.0+instance Decidable p => Decidable (TyPred (PTup (Wit p))) where+    decide (STuple2 x y) = mapDecision (PTup x . Wit) (\case PTup _ (Wit p) -> p)+                         . decide @p+                         $ y++-- | @since 3.0.0+instance Provable (TyPred (PTup WrappedSing)) where+    prove = mapProd WrapSing . singProd+-- | @since 3.0.0+instance Decidable (TyPred (PTup WrappedSing))  instance (Decidable p, SingI f) => Decidable (PMap f p) where     decide = decide @p . applySing (sing :: Sing f)
src/Data/Type/Predicate/Auto.hs view
@@ -180,7 +180,7 @@     autoElem = IId  instance AutoElem f as a => Auto (In f as) a where-    auto = autoElem @f @as @a+    auto = autoElem @_ @f @as @a  -- | Helper class for deriving 'Auto' instances for 'All' predicates; each -- 'Universe' instance is expected to implement these if possible, to get@@ -200,7 +200,7 @@ instance (Auto p a, AutoAll [] p as) => AutoAll [] p (a ': as) where     autoAll = WitAll $ \case         IZ   -> auto @_ @p @a-        IS i -> runWitAll (autoAll @[] @p @as) i+        IS i -> runWitAll (autoAll @_ @[] @p @as) i  instance AutoAll Maybe p 'Nothing where     autoAll = WitAll $ \case {}@@ -217,7 +217,7 @@ instance (Auto p a, AutoAll [] p as) => AutoAll NonEmpty p (a ':| as) where     autoAll = WitAll $ \case         NEHead   -> auto @_ @p @a-        NETail i -> runWitAll (autoAll @[] @p @as) i+        NETail i -> runWitAll (autoAll @_ @[] @p @as) i  instance Auto p a => AutoAll ((,) j) p '(w, a) where     autoAll = WitAll $ \case ISnd -> auto @_ @p @a@@ -227,7 +227,7 @@  -- | @since 0.1.2.0 instance AutoAll f p as => Auto (All f p) as where-    auto = autoAll @f @p @as+    auto = autoAll @_ @f @p @as  -- | @since 0.1.2.0 instance SingI a => Auto (NotNull []) (a ': as) where@@ -301,7 +301,7 @@  -- | @since 0.1.2.0 instance (SingI as, AutoAll f (Not p) as) => Auto (Not (Any f p)) as where-    auto = allNotNone sing $ autoAll @f @(Not p) @as+    auto = allNotNone sing $ autoAll @_ @f @(Not p) @as  -- | Helper function to generate a @'Not' ('All' f p)@ if you can pick out -- a specific @a@ in @as@ where the predicate is disprovable at compile-time.@@ -321,21 +321,40 @@     auto = mapRefuted (\(s :&: WitAny i p) -> WitAny i (s :&: p))          $ auto @_ @(Not (Any f (Found p))) @as --- | @since 2.0.0-instance SingI as => Auto (TyPred (Rec Sing)) as where-    auto = singProd sing--- | @since 2.0.0-instance SingI as => Auto (TyPred (PMaybe Sing)) as where-    auto = singProd sing--- | @since 2.0.0-instance SingI as => Auto (TyPred (NERec Sing)) as where-    auto = singProd sing--- | @since 2.0.0-instance SingI as => Auto (TyPred (PEither Sing)) as where-    auto = singProd sing--- | @since 2.0.0-instance SingI as => Auto (TyPred (PTup Sing)) as where-    auto = singProd sing--- | @since 2.0.0-instance SingI as => Auto (TyPred (PIdentity Sing)) as where-    auto = singProd sing+-- | @since 3.0.0+instance SingI as => Auto (TyPred (Rec WrappedSing)) as where+    auto = proveTC sing+-- | @since 3.0.0+instance SingI as => Auto (TyPred (PMaybe WrappedSing)) as where+    auto = proveTC sing+-- | @since 3.0.0+instance SingI as => Auto (TyPred (NERec WrappedSing)) as where+    auto = proveTC sing+-- | @since 3.0.0+instance SingI as => Auto (TyPred (PEither WrappedSing)) as where+    auto = proveTC sing+-- | @since 3.0.0+instance SingI as => Auto (TyPred (PTup WrappedSing)) as where+    auto = proveTC sing+-- | @since 3.0.0+instance SingI as => Auto (TyPred (PIdentity WrappedSing)) as where+    auto = proveTC sing++-- | @since 3.0.0+instance (SingI as, Provable p) => Auto (TyPred (Rec (Wit p))) as where+    auto = proveTC sing+-- | @since 3.0.0+instance (SingI as, Provable p) => Auto (TyPred (PMaybe (Wit p))) as where+    auto = proveTC sing+-- | @since 3.0.0+instance (SingI as, Provable p) => Auto (TyPred (NERec (Wit p))) as where+    auto = proveTC sing+-- | @since 3.0.0+instance (SingI as, Provable p) => Auto (TyPred (PEither (Wit p))) as where+    auto = proveTC sing+-- | @since 3.0.0+instance (SingI as, Provable p) => Auto (TyPred (PTup (Wit p))) as where+    auto = proveTC sing+-- | @since 3.0.0+instance (SingI as, Provable p) => Auto (TyPred (PIdentity (Wit p))) as where+    auto = proveTC sing
src/Data/Type/Predicate/Logic.hs view
@@ -42,7 +42,6 @@  import           Data.Singletons import           Data.Singletons.Decide-import           Data.Singletons.Prelude.Bool (Sing(..)) import           Data.Type.Predicate import           Data.Void