grisette-0.11.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2021-2024
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Grisette.Internal.Core.Data.UnionBase

Description

 
Synopsis

The union data structure.

Please consider using Union instead.

data UnionBase a where Source #

The base union implementation, which is an if-then-else tree structure.

Constructors

UnionSingle :: forall a. a -> UnionBase a

A single value

UnionIf

A if value

Fields

Instances

Instances details
Eq1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

liftEq :: (a -> b -> Bool) -> UnionBase a -> UnionBase b -> Bool #

Show1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> UnionBase a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [UnionBase a] -> ShowS #

NFData1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

liftRnf :: (a -> ()) -> UnionBase a -> () #

Applicative UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

Methods

pure :: a -> UnionBase a #

(<*>) :: UnionBase (a -> b) -> UnionBase a -> UnionBase b #

liftA2 :: (a -> b -> c) -> UnionBase a -> UnionBase b -> UnionBase c #

(*>) :: UnionBase a -> UnionBase b -> UnionBase b #

(<*) :: UnionBase a -> UnionBase b -> UnionBase a #

Functor UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

Methods

fmap :: (a -> b) -> UnionBase a -> UnionBase b #

(<$) :: a -> UnionBase b -> UnionBase a #

Monad UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

Methods

(>>=) :: UnionBase a -> (a -> UnionBase b) -> UnionBase b #

(>>) :: UnionBase a -> UnionBase b -> UnionBase b #

return :: a -> UnionBase a #

PlainUnion UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

Mergeable1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

PPrint1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> UnionBase a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [UnionBase a] -> Doc ann Source #

SimpleMergeable1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> UnionBase a -> UnionBase a -> UnionBase a Source #

SymBranching UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

TryMerge UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

AllSyms1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> UnionBase a -> [SomeSym] -> [SomeSym] Source #

Hashable1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> UnionBase a -> Int #

Generic1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

Lift a => Lift (UnionBase a :: Type) Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

Methods

lift :: Quote m => UnionBase a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => UnionBase a -> Code m (UnionBase a) #

(Mergeable a, Serial a) => Binary (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

put :: UnionBase a -> Put #

get :: Get (UnionBase a) #

putList :: [UnionBase a] -> Put #

(Mergeable a, Serial a) => Serial (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

serialize :: MonadPut m => UnionBase a -> m () #

deserialize :: MonadGet m => m (UnionBase a) #

(Mergeable a, Serial a) => Serialize (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

put :: Putter (UnionBase a) #

get :: Get (UnionBase a) #

NFData a => NFData (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

rnf :: UnionBase a -> () #

Generic (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

Methods

from :: UnionBase a -> Rep (UnionBase a) x #

to :: Rep (UnionBase a) x -> UnionBase a #

Show a => Show (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Eq a => Eq (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

Methods

(==) :: UnionBase a -> UnionBase a -> Bool #

(/=) :: UnionBase a -> UnionBase a -> Bool #

Mergeable a => Mergeable (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

PPrint a => PPrint (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

pformat :: UnionBase a -> Doc ann Source #

pformatPrec :: Int -> UnionBase a -> Doc ann Source #

pformatList :: [UnionBase a] -> Doc ann Source #

Mergeable a => SimpleMergeable (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

AllSyms a => AllSyms (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Hashable a => Hashable (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Data.UnionBase

Methods

hashWithSalt :: Int -> UnionBase a -> Int #

hash :: UnionBase a -> Int #

type Rep1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

type Rep (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Decl.Core.Data.UnionBase

ifWithLeftMost :: Bool -> SymBool -> UnionBase a -> UnionBase a -> UnionBase a Source #

Build UnionIf with leftmost cache correctly maintained.

Usually you should never directly try to build a UnionIf with its constructor.

ifWithStrategy :: MergingStrategy a -> SymBool -> UnionBase a -> UnionBase a -> UnionBase a Source #

Use a specific strategy to build a UnionIf value.

The merged invariant will be maintained in the result.

fullReconstruct :: MergingStrategy a -> UnionBase a -> UnionBase a Source #

Fully reconstruct a Union to maintain the merged invariant.