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.UnionBase
Contents
Description
Synopsis
- data UnionBase a where
- ifWithLeftMost :: Bool -> SymBool -> UnionBase a -> UnionBase a -> UnionBase a
- ifWithStrategy :: MergingStrategy a -> SymBool -> UnionBase a -> UnionBase a -> UnionBase a
- fullReconstruct :: MergingStrategy a -> UnionBase a -> UnionBase a
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 |
Instances
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.