Copyright | (c) Sirui Lu 2021-2023 |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | siruilu@cs.washington.edu |
Stability | Experimental |
Portability | GHC only |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- class ToCon a b where
- class (forall a b. ToCon a b => ToCon (f1 a) (f2 b)) => ToCon1 f1 f2 where
- toCon1 :: (ToCon1 f1 f2, ToCon a b) => f1 a -> Maybe (f2 b)
- class (forall a b. ToCon a b => ToCon1 (f1 a) (f2 b)) => ToCon2 f1 f2 where
- liftToCon2 :: (a -> Maybe b) -> (c -> Maybe d) -> f1 a c -> Maybe (f2 b d)
- toCon2 :: (ToCon2 f1 f2, ToCon a b, ToCon c d) => f1 a c -> Maybe (f2 b d)
- data family ToConArgs arity a b :: Type
- class GToCon arity f1 f2 where
- genericToCon :: (Generic a, Generic b, GToCon Arity0 (Rep a) (Rep b)) => a -> Maybe b
- genericLiftToCon :: (Generic1 f1, Generic1 f2, GToCon Arity1 (Rep1 f1) (Rep1 f2)) => (a -> Maybe b) -> f1 a -> Maybe (f2 b)
Converting to concrete values
class ToCon a b where Source #
Convert a symbolic value to concrete value if possible.
toCon :: a -> Maybe b Source #
Convert a symbolic value to concrete value if possible.
If the symbolic value cannot be converted to concrete, the result will be Nothing
.
>>>
toCon (ssym "a" :: SymInteger) :: Maybe Integer
Nothing
>>>
toCon (con 1 :: SymInteger) :: Maybe Integer
Just 1
toCon
works on complex types too.
>>>
toCon ([con 1, con 2] :: [SymInteger]) :: Maybe [Integer]
Just [1,2]
>>>
toCon ([con 1, ssym "a"] :: [SymInteger]) :: Maybe [Integer]
Nothing
Instances
ToCon All All Source # | |
ToCon Any Any Source # | |
ToCon Int16 Int16 Source # | |
ToCon Int32 Int32 Source # | |
ToCon Int64 Int64 Source # | |
ToCon Int8 Int8 Source # | |
ToCon Word16 Word16 Source # | |
ToCon Word32 Word32 Source # | |
ToCon Word64 Word64 Source # | |
ToCon Word8 Word8 Source # | |
ToCon ByteString ByteString Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon toCon :: ByteString -> Maybe ByteString Source # | |
ToCon Ordering Ordering Source # | |
ToCon AssertionError AssertionError Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon VerificationConditions VerificationConditions Source # | |
ToCon FPRoundingMode FPRoundingMode Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon SymBool SymBool Source # | |
ToCon SymBool Bool Source # | |
ToCon SymFP32 Float Source # | |
ToCon SymFP64 Double Source # | |
ToCon SymFPRoundingMode FPRoundingMode Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon SymFPRoundingMode SymFPRoundingMode Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon SymInteger SymInteger Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon toCon :: SymInteger -> Maybe SymInteger Source # | |
ToCon SymInteger Integer Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon Text Text Source # | |
ToCon Integer Integer Source # | |
ToCon () () Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon Bool Bool Source # | |
ToCon Char Char Source # | |
ToCon Double Double Source # | |
ToCon Float Float Source # | |
ToCon Int Int Source # | |
ToCon Word Word Source # | |
ToCon v v Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon a b => ToCon a (Identity b) Source # | |
(Generic a, Generic b, GToCon Arity0 (Rep a) (Rep b)) => ToCon a (Default b) Source # | |
ToCon a b => ToCon (Identity a) b Source # | |
(ToCon a b, Mergeable a) => ToCon (Union a) b Source # | |
ToCon (SymIntN 8) Int8 Source # | |
ToCon (SymIntN 16) Int16 Source # | |
ToCon (SymIntN 32) Int32 Source # | |
ToCon (SymIntN 64) Int64 Source # | |
ToCon (SymIntN 64) Int Source # | |
ToCon (SymWordN 8) Word8 Source # | |
ToCon (SymWordN 16) Word16 Source # | |
ToCon (SymWordN 32) Word32 Source # | |
ToCon (SymWordN 64) Word64 Source # | |
ToCon (SymWordN 64) Word Source # | |
ToCon a b => ToCon (Identity a) (Identity b) Source # | |
ToCon a_1 a_2 => ToCon (First a_1) (First a_2) Source # | |
ToCon a_1 a_2 => ToCon (Last a_1) (Last a_2) Source # | |
ToCon a_1 a_2 => ToCon (Down a_1) (Down a_2) Source # | |
ToCon a_1 a_2 => ToCon (Dual a_1) (Dual a_2) Source # | |
ToCon a_1 a_2 => ToCon (Product a_1) (Product a_2) Source # | |
ToCon a_1 a_2 => ToCon (Sum a_1) (Sum a_2) Source # | |
ToCon p0 p => ToCon (Par1 p0) (Par1 p) Source # | |
ToCon a b => ToCon (Union a) (Union b) Source # | |
(KnownNat n, 1 <= n) => ToCon (IntN n) (IntN n) Source # | |
(KnownNat n, 1 <= n) => ToCon (WordN n) (WordN n) Source # | |
(forall (n :: Nat). (KnownNat n, 1 <= n) => ToCon (sbv n) (cbv n)) => ToCon (SomeBV sbv) (SomeBV cbv) Source # | |
(KnownNat n, 1 <= n) => ToCon (SymIntN n) (IntN n) Source # | |
(KnownNat n, 1 <= n) => ToCon (SymIntN n) (SymIntN n) Source # | |
(KnownNat n, 1 <= n) => ToCon (SymWordN n) (WordN n) Source # | |
(KnownNat n, 1 <= n) => ToCon (SymWordN n) (SymWordN n) Source # | |
ToCon a_1 a_2 => ToCon (Maybe a_1) (Maybe a_2) Source # | |
ToCon a_1 a_2 => ToCon [a_1] [a_2] Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(Generic1 f1, Generic1 f2, GToCon Arity1 (Rep1 f1) (Rep1 f2), ToCon a b) => ToCon (f1 a) (Default1 f2 b) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2) => ToCon (Either a_1 b_1) (Either a_2 b_2) Source # | |
(ToCon e1 e2, ToCon a1 a2) => ToCon (Either e1 a1) (CBMCEither e2 a2) Source # | |
ToCon (U1 p0) (U1 p) Source # | |
ToCon (V1 p0) (V1 p) Source # | |
(ToCon e1 e2, ToCon a1 a2) => ToCon (CBMCEither e1 a1) (Either e2 a2) Source # | |
(ToCon e1 e2, ToCon a1 a2) => ToCon (CBMCEither e1 a1) (CBMCEither e2 a2) Source # | |
Defined in Grisette.Internal.Core.Control.Monad.CBMCExcept toCon :: CBMCEither e1 a1 -> Maybe (CBMCEither e2 a2) Source # | |
ValidFP eb sb => ToCon (FP eb sb) (FP eb sb) Source # | |
ValidFP eb sb => ToCon (SymFP eb sb) (FP eb sb) Source # | |
ValidFP eb sb => ToCon (SymFP eb sb) (SymFP eb sb) Source # | |
(SupportedPrim a, SupportedPrim b) => ToCon (a -~> b) (a -~> b) Source # | |
(SupportedPrim (ca --> cb), LinkedRep ca sa, LinkedRep cb sb) => ToCon (sa -~> sb) (ca --> cb) Source # | |
(SupportedPrim a, SupportedPrim b) => ToCon (a =~> b) (a =~> b) Source # | |
(SupportedPrim (ca =-> cb), LinkedRep ca sa, LinkedRep cb sb) => ToCon (sa =~> sb) (ca =-> cb) Source # | |
(ToCon1 m1 m2, ToCon a b) => ToCon (MaybeT m1 a) (MaybeT m2 b) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2) => ToCon (a_1, b_1) (a_2, b_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon (m1 (CBMCEither e1 a)) (Either e2 b) => ToCon (CBMCExceptT e1 m1 a) (Either e2 b) Source # | |
ToCon (m1 (Either e1 a)) (Either e2 b) => ToCon (ExceptT e1 m1 a) (Either e2 b) Source # | |
ToCon a0 a => ToCon (Const a0 b0) (Const a b) Source # | |
ToCon (f0 a0) (f a) => ToCon (Ap f0 a0) (Ap f a) Source # | |
ToCon (f0 a0) (f a) => ToCon (Alt f0 a0) (Alt f a) Source # | |
ToCon (f0 p0) (f p) => ToCon (Rec1 f0 p0) (Rec1 f p) Source # | |
ToCon (m1 (CBMCEither e1 a)) (m2 (CBMCEither e2 b)) => ToCon (CBMCExceptT e1 m1 a) (CBMCExceptT e2 m2 b) Source # | |
Defined in Grisette.Internal.Core.Control.Monad.CBMCExcept toCon :: CBMCExceptT e1 m1 a -> Maybe (CBMCExceptT e2 m2 b) Source # | |
(ToCon1 m1 m2, ToCon e1 e2, ToCon a b) => ToCon (ExceptT e1 m1 a) (ExceptT e2 m2 b) Source # | |
(ToCon1 m m1, ToCon a b) => ToCon (IdentityT m a) (IdentityT m1 b) Source # | |
(ToCon1 m1 m2, ToCon a b, ToCon s1 s2) => ToCon (WriterT s1 m1 a) (WriterT s2 m2 b) Source # | |
(ToCon1 m1 m2, ToCon a b, ToCon s1 s2) => ToCon (WriterT s1 m1 a) (WriterT s2 m2 b) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2) => ToCon (a_1, b_1, c_1) (a_2, b_2, c_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon (l0 a0) (l a), ToCon (r0 a0) (r a)) => ToCon (Product l0 r0 a0) (Product l r a) Source # | |
(ToCon (l0 a0) (l a), ToCon (r0 a0) (r a)) => ToCon (Sum l0 r0 a0) (Sum l r a) Source # | |
(ToCon (f0 p0) (f p), ToCon (g0 p0) (g p)) => ToCon ((f0 :*: g0) p0) ((f :*: g) p) Source # | |
(ToCon (f0 p0) (f p), ToCon (g0 p0) (g p)) => ToCon ((f0 :+: g0) p0) ((f :+: g) p) Source # | |
ToCon c0 c => ToCon (K1 i0 c0 p0) (K1 i c p) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2) => ToCon (a_1, b_1, c_1, d_1) (a_2, b_2, c_2, d_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon (f0 (g0 a0)) (f (g a)) => ToCon (Compose f0 g0 a0) (Compose f g a) Source # | |
ToCon (f0 (g0 p0)) (f (g p)) => ToCon ((f0 :.: g0) p0) ((f :.: g) p) Source # | |
ToCon (f0 p0) (f p) => ToCon (M1 i0 c0 f0 p0) (M1 i c f p) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2) => ToCon (a_1, b_1, c_1, d_1, e_1) (a_2, b_2, c_2, d_2, e_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1) (a_2, b_2, c_2, d_2, e_2, f_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2, ToCon n_1 n_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2, ToCon n_1 n_2, ToCon o_1 o_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1, o_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2, o_2) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon |
class (forall a b. ToCon a b => ToCon (f1 a) (f2 b)) => ToCon1 f1 f2 where Source #
Lifting of ToCon
to unary type constructors.
liftToCon :: (a -> Maybe b) -> f1 a -> Maybe (f2 b) Source #
Lift a conversion to concrete function to unary type constructors.
Instances
ToCon1 Identity Identity Source # | |
ToCon1 First First Source # | |
ToCon1 Last Last Source # | |
ToCon1 Down Down Source # | |
ToCon1 Dual Dual Source # | |
ToCon1 Product Product Source # | |
ToCon1 Sum Sum Source # | |
ToCon1 Union Union Source # | |
ToCon1 Maybe Maybe Source # | |
ToCon1 List List Source # | |
(Generic1 f1, Generic1 f2, GToCon Arity1 (Rep1 f1) (Rep1 f2)) => ToCon1 f1 (Default1 f2) Source # | |
ToCon a_1 a_2 => ToCon1 (Either a_1) (Either a_2) Source # | |
ToCon1 m1 m2 => ToCon1 (MaybeT m1) (MaybeT m2) Source # | |
ToCon a_1 a_2 => ToCon1 ((,) a_1) ((,) a_2) Source # | |
ToCon a0 a => ToCon1 (Const a0 :: Type -> Type) (Const a :: Type -> Type) Source # | |
ToCon1 f0 f => ToCon1 (Ap f0) (Ap f) Source # | |
ToCon1 f0 f => ToCon1 (Alt f0) (Alt f) Source # | |
(ToCon1 m1 m2, ToCon e1 e2) => ToCon1 (ExceptT e1 m1) (ExceptT e2 m2) Source # | |
ToCon1 m m1 => ToCon1 (IdentityT m) (IdentityT m1) Source # | |
(ToCon1 m1 m2, ToCon s1 s2) => ToCon1 (WriterT s1 m1) (WriterT s2 m2) Source # | |
(ToCon1 m1 m2, ToCon s1 s2) => ToCon1 (WriterT s1 m1) (WriterT s2 m2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2) => ToCon1 ((,,) a_1 b_1) ((,,) a_2 b_2) Source # | |
(ToCon1 l0 l, ToCon1 r0 r) => ToCon1 (Product l0 r0) (Product l r) Source # | |
(ToCon1 l0 l, ToCon1 r0 r) => ToCon1 (Sum l0 r0) (Sum l r) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2) => ToCon1 ((,,,) a_1 b_1 c_1) ((,,,) a_2 b_2 c_2) Source # | |
(ToCon1 f0 f, ToCon1 g0 g) => ToCon1 (Compose f0 g0) (Compose f g) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2) => ToCon1 ((,,,,) a_1 b_1 c_1 d_1) ((,,,,) a_2 b_2 c_2 d_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2) => ToCon1 ((,,,,,) a_1 b_1 c_1 d_1 e_1) ((,,,,,) a_2 b_2 c_2 d_2 e_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2) => ToCon1 ((,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1) ((,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2) => ToCon1 ((,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1) ((,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2) => ToCon1 ((,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1) ((,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2) => ToCon1 ((,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1) ((,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2) => ToCon1 ((,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1) ((,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2) => ToCon1 ((,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1) ((,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2) => ToCon1 ((,,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1 l_1) ((,,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2 l_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2) => ToCon1 ((,,,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1 l_1 m_1) ((,,,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2 l_2 m_2) Source # | |
(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2, ToCon n_1 n_2) => ToCon1 ((,,,,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1 l_1 m_1 n_1) ((,,,,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2 l_2 m_2 n_2) Source # | |
toCon1 :: (ToCon1 f1 f2, ToCon a b) => f1 a -> Maybe (f2 b) Source #
Lift the standard toCon
to unary type constructors.
class (forall a b. ToCon a b => ToCon1 (f1 a) (f2 b)) => ToCon2 f1 f2 where Source #
Lifting of ToCon
to binary type constructors.
liftToCon2 :: (a -> Maybe b) -> (c -> Maybe d) -> f1 a c -> Maybe (f2 b d) Source #
Lift conversion to concrete functions to binary type constructors.
Instances
ToCon2 Either Either Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon2 (,) (,) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
ToCon a b => ToCon2 ((,,) a) ((,,) b) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
(ToCon a c, ToCon b d) => ToCon2 ((,,,) a b) ((,,,) c d) Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon |
toCon2 :: (ToCon2 f1 f2, ToCon a b, ToCon c d) => f1 a c -> Maybe (f2 b d) Source #
Lift the standard toCon
to binary type constructors.
Generic ToCon
data family ToConArgs arity a b :: Type Source #
The arguments to the generic toCon
function.
Instances
data ToConArgs Arity0 _ _1 Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon | |
newtype ToConArgs Arity1 a b Source # | |
Defined in Grisette.Internal.Core.Data.Class.ToCon |
class GToCon arity f1 f2 where Source #
The class of types that can be generically converted to concrete values.
Instances
GToCon Arity1 Par1 Par1 Source # | |
GToCon arity (U1 :: Type -> Type) (U1 :: Type -> Type) Source # | |
GToCon arity (V1 :: Type -> Type) (V1 :: Type -> Type) Source # | |
ToCon1 f1 f2 => GToCon Arity1 (Rec1 f1) (Rec1 f2) Source # | |
(GToCon arity a b, GToCon arity c d) => GToCon arity (a :*: c) (b :*: d) Source # | |
(GToCon arity a b, GToCon arity c d) => GToCon arity (a :+: c) (b :+: d) Source # | |
ToCon a b => GToCon arity (K1 i a :: Type -> Type) (K1 i b :: Type -> Type) Source # | |
(ToCon1 f1 f2, GToCon Arity1 g1 g2) => GToCon Arity1 (f1 :.: g1) (f2 :.: g2) Source # | |
GToCon arity a b => GToCon arity (M1 i c1 a) (M1 i c2 b) Source # | |