Copyright | (c) Sirui Lu 2021-2024 |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | siruilu@cs.washington.edu |
Stability | Experimental |
Portability | GHC only |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Grisette.Internal.Core.Data.Class.SubstSym
Description
Synopsis
- class SubstSym a where
- substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> a -> a
- class (forall a. SubstSym a => SubstSym (f a)) => SubstSym1 (f :: Type -> Type) where
- liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> f a -> f a
- substSym1 :: forall f a cb sb (knd :: SymbolKind). (SubstSym1 f, SubstSym a, LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> f a -> f a
- class (forall a. SubstSym a => SubstSym1 (f a)) => SubstSym2 (f :: Type -> Type -> Type) where
- liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> f a b -> f a b
- substSym2 :: forall f a b cb sb (knd :: SymbolKind). (SubstSym2 f, SubstSym a, SubstSym b, LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> f a b -> f a b
- data family SubstSymArgs arity (knd :: SymbolKind) a cb sb
- class GSubstSym arity (f :: Type -> Type) where
- gsubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs arity knd a cb sb -> TypedSymbol knd cb -> sb -> f a -> f a
- genericSubstSym :: forall a cb sb (knd :: SymbolKind). (Generic a, GSubstSym Arity0 (Rep a), LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> a -> a
- genericLiftSubstSym :: forall f cb sb (knd :: SymbolKind) a. (Generic1 f, GSubstSym Arity1 (Rep1 f), LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> f a -> f a
Substituting symbolic constants
class SubstSym a where Source #
Substitution of symbols (symbolic constants) to a symbolic value.
>>>
a = "a" :: TypedAnySymbol Bool
>>>
v = "x" .&& "y" :: SymBool
>>>
substSym a v (["a" .&& "b", "a"] :: [SymBool])
[(&& (&& x y) b),(&& x y)]
Note 1: This type class can be derived for algebraic data types.
You may need the DerivingVia
and DerivingStrategies
extensions.
data X = ... deriving Generic deriving SubstSym via (Default X)
Methods
substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> a -> a Source #
Instances
class (forall a. SubstSym a => SubstSym (f a)) => SubstSym1 (f :: Type -> Type) where Source #
Lifting of SubstSym
to unary type constructors.
Methods
liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> f a -> f a Source #
Lift a symbol substitution function to unary type constructors.
Instances
substSym1 :: forall f a cb sb (knd :: SymbolKind). (SubstSym1 f, SubstSym a, LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> f a -> f a Source #
Lifting the standard substSym
to unary type constructors.
class (forall a. SubstSym a => SubstSym1 (f a)) => SubstSym2 (f :: Type -> Type -> Type) where Source #
Lifting of SubstSym
to binary type constructors.
Methods
liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> f a b -> f a b Source #
Lift a symbol substitution function to binary type constructors.
Instances
SubstSym2 Either Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> Either a b -> Either a b Source # | |
SubstSym2 (,) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a, b) -> (a, b) Source # | |
SubstSym a => SubstSym2 ((,,) a) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a0 b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a, a0, b) -> (a, a0, b) Source # | |
(SubstSym a1, SubstSym a2) => SubstSym2 ((,,,) a1 a2) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a, b) -> (a1, a2, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3) => SubstSym2 ((,,,,) a1 a2 a3) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a, b) -> (a1, a2, a3, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4) => SubstSym2 ((,,,,,) a1 a2 a3 a4) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a, b) -> (a1, a2, a3, a4, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4, SubstSym a5) => SubstSym2 ((,,,,,,) a1 a2 a3 a4 a5) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a5, a, b) -> (a1, a2, a3, a4, a5, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4, SubstSym a5, SubstSym a6) => SubstSym2 ((,,,,,,,) a1 a2 a3 a4 a5 a6) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a5, a6, a, b) -> (a1, a2, a3, a4, a5, a6, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4, SubstSym a5, SubstSym a6, SubstSym a7) => SubstSym2 ((,,,,,,,,) a1 a2 a3 a4 a5 a6 a7) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a5, a6, a7, a, b) -> (a1, a2, a3, a4, a5, a6, a7, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4, SubstSym a5, SubstSym a6, SubstSym a7, SubstSym a8) => SubstSym2 ((,,,,,,,,,) a1 a2 a3 a4 a5 a6 a7 a8) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a5, a6, a7, a8, a, b) -> (a1, a2, a3, a4, a5, a6, a7, a8, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4, SubstSym a5, SubstSym a6, SubstSym a7, SubstSym a8, SubstSym a9) => SubstSym2 ((,,,,,,,,,,) a1 a2 a3 a4 a5 a6 a7 a8 a9) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a, b) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4, SubstSym a5, SubstSym a6, SubstSym a7, SubstSym a8, SubstSym a9, SubstSym a10) => SubstSym2 ((,,,,,,,,,,,) a1 a2 a3 a4 a5 a6 a7 a8 a9 a10) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a, b) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4, SubstSym a5, SubstSym a6, SubstSym a7, SubstSym a8, SubstSym a9, SubstSym a10, SubstSym a11) => SubstSym2 ((,,,,,,,,,,,,) a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a, b) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4, SubstSym a5, SubstSym a6, SubstSym a7, SubstSym a8, SubstSym a9, SubstSym a10, SubstSym a11, SubstSym a12) => SubstSym2 ((,,,,,,,,,,,,,) a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a, b) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a, b) Source # | |
(SubstSym a1, SubstSym a2, SubstSym a3, SubstSym a4, SubstSym a5, SubstSym a6, SubstSym a7, SubstSym a8, SubstSym a9, SubstSym a10, SubstSym a11, SubstSym a12, SubstSym a13) => SubstSym2 ((,,,,,,,,,,,,,,) a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13) Source # | |
Defined in Grisette.Internal.Internal.Impl.Core.Data.Class.SubstSym Methods liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a, b) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a, b) Source # |
substSym2 :: forall f a b cb sb (knd :: SymbolKind). (SubstSym2 f, SubstSym a, SubstSym b, LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> f a b -> f a b Source #
Lifting the standard substSym
to binary type constructors.
Generic SubstSym
data family SubstSymArgs arity (knd :: SymbolKind) a cb sb Source #
The arguments to the generic substSym
function.
Instances
data SubstSymArgs Arity0 _ _1 _2 _3 Source # | |
newtype SubstSymArgs Arity1 knd a cb sb Source # | |
class GSubstSym arity (f :: Type -> Type) where Source #
The class of types where we can generically substitute the symbols in a value.
Methods
gsubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs arity knd a cb sb -> TypedSymbol knd cb -> sb -> f a -> f a Source #
Instances
genericSubstSym :: forall a cb sb (knd :: SymbolKind). (Generic a, GSubstSym Arity0 (Rep a), LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> a -> a Source #
Generic substSym
function.
genericLiftSubstSym :: forall f cb sb (knd :: SymbolKind) a. (Generic1 f, GSubstSym Arity1 (Rep1 f), LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> f a -> f a Source #
Generic liftSubstSym
function.