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 | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data ModelValue where
- ModelValue :: forall v. (Show v, Eq v, Hashable v) => TypeRep v -> v -> ModelValue
- toModelValue :: forall a. (Show a, Eq a, Hashable a, Typeable a) => a -> ModelValue
- unsafeFromModelValue :: forall a. Typeable a => ModelValue -> a
Documentation
data ModelValue where Source #
A value with its type information.
ModelValue :: forall v. (Show v, Eq v, Hashable v) => TypeRep v -> v -> ModelValue |
Instances
Show ModelValue Source # | |
Defined in Grisette.Internal.SymPrim.Prim.ModelValue showsPrec :: Int -> ModelValue -> ShowS # show :: ModelValue -> String # showList :: [ModelValue] -> ShowS # | |
Eq ModelValue Source # | |
Defined in Grisette.Internal.SymPrim.Prim.ModelValue (==) :: ModelValue -> ModelValue -> Bool # (/=) :: ModelValue -> ModelValue -> Bool # | |
PPrint ModelValue Source # | |
Defined in Grisette.Internal.Core.Data.Class.PPrint pformat :: ModelValue -> Doc ann Source # pformatPrec :: Int -> ModelValue -> Doc ann Source # pformatList :: [ModelValue] -> Doc ann Source # | |
Hashable ModelValue Source # | |
Defined in Grisette.Internal.SymPrim.Prim.ModelValue hashWithSalt :: Int -> ModelValue -> Int # hash :: ModelValue -> Int # |
toModelValue :: forall a. (Show a, Eq a, Hashable a, Typeable a) => a -> ModelValue Source #
Convert to a model value.
unsafeFromModelValue :: forall a. Typeable a => ModelValue -> a Source #
Convert from a model value. Crashes if the types does not match.