{-# LANGUAGE DeriveGeneric, DefaultSignatures, Strict, StandaloneDeriving, BangPatterns #-}
module Data.SPointer where
import Data.SymbolicExpression
import Base
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.IntMap as IM
import qualified Data.IntSet as IS
import Data.Word
import Data.List
import GHC.Generics
import qualified Data.Serialize as Cereal
import Data.Bits (testBit)
import qualified Data.Set.NonEmpty as NES
import qualified Data.Foldable as F
import Control.DeepSeq
data SPointer =
Ptr_Concrete SimpleExpr
| Ptr_Base SimpleExpr
| Ptr_Top
deriving (SPointer -> SPointer -> Bool
(SPointer -> SPointer -> Bool)
-> (SPointer -> SPointer -> Bool) -> Eq SPointer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SPointer -> SPointer -> Bool
== :: SPointer -> SPointer -> Bool
$c/= :: SPointer -> SPointer -> Bool
/= :: SPointer -> SPointer -> Bool
Eq,Eq SPointer
Eq SPointer =>
(SPointer -> SPointer -> Ordering)
-> (SPointer -> SPointer -> Bool)
-> (SPointer -> SPointer -> Bool)
-> (SPointer -> SPointer -> Bool)
-> (SPointer -> SPointer -> Bool)
-> (SPointer -> SPointer -> SPointer)
-> (SPointer -> SPointer -> SPointer)
-> Ord SPointer
SPointer -> SPointer -> Bool
SPointer -> SPointer -> Ordering
SPointer -> SPointer -> SPointer
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SPointer -> SPointer -> Ordering
compare :: SPointer -> SPointer -> Ordering
$c< :: SPointer -> SPointer -> Bool
< :: SPointer -> SPointer -> Bool
$c<= :: SPointer -> SPointer -> Bool
<= :: SPointer -> SPointer -> Bool
$c> :: SPointer -> SPointer -> Bool
> :: SPointer -> SPointer -> Bool
$c>= :: SPointer -> SPointer -> Bool
>= :: SPointer -> SPointer -> Bool
$cmax :: SPointer -> SPointer -> SPointer
max :: SPointer -> SPointer -> SPointer
$cmin :: SPointer -> SPointer -> SPointer
min :: SPointer -> SPointer -> SPointer
Ord,(forall x. SPointer -> Rep SPointer x)
-> (forall x. Rep SPointer x -> SPointer) -> Generic SPointer
forall x. Rep SPointer x -> SPointer
forall x. SPointer -> Rep SPointer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SPointer -> Rep SPointer x
from :: forall x. SPointer -> Rep SPointer x
$cto :: forall x. Rep SPointer x -> SPointer
to :: forall x. Rep SPointer x -> SPointer
Generic)
instance Show SPointer where
show :: SPointer -> String
show (Ptr_Concrete SimpleExpr
a) = SimpleExpr -> String
forall a. Show a => a -> String
show SimpleExpr
a
show (Ptr_Base SimpleExpr
b) = SimpleExpr -> String
forall a. Show a => a -> String
show SimpleExpr
b String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"+..."
show SPointer
Ptr_Top = String
"top"
instance Cereal.Serialize SPointer
instance NFData SPointer