module Hermod.ReCon.Common.Types (NatValue, IntValue, VariableIdentifier, Parser, BinRel(..)) where

import           Data.Int (Int64)
import           Data.Text (Text)
import           Data.Void (Void)
import           Data.Word (Word64)
import           Text.Megaparsec (Parsec)

type NatValue = Word64

-- | The numeric type used for integer event property values and polynomial
--   arithmetic throughout the framework.
type IntValue = Int64

-- | The type of variable identifiers used throughout the framework
--   (LTL property variables and polynomial integer variables).
type VariableIdentifier = Text

type Parser = Parsec Void Text

-- | Binary comparison relation on an ordered type.
data BinRel = Eq | Lt | Lte | Gt | Gte deriving (Int -> BinRel -> ShowS
[BinRel] -> ShowS
BinRel -> String
(Int -> BinRel -> ShowS)
-> (BinRel -> String) -> ([BinRel] -> ShowS) -> Show BinRel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BinRel -> ShowS
showsPrec :: Int -> BinRel -> ShowS
$cshow :: BinRel -> String
show :: BinRel -> String
$cshowList :: [BinRel] -> ShowS
showList :: [BinRel] -> ShowS
Show, BinRel -> BinRel -> Bool
(BinRel -> BinRel -> Bool)
-> (BinRel -> BinRel -> Bool) -> Eq BinRel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BinRel -> BinRel -> Bool
== :: BinRel -> BinRel -> Bool
$c/= :: BinRel -> BinRel -> Bool
/= :: BinRel -> BinRel -> Bool
Eq, Eq BinRel
Eq BinRel =>
(BinRel -> BinRel -> Ordering)
-> (BinRel -> BinRel -> Bool)
-> (BinRel -> BinRel -> Bool)
-> (BinRel -> BinRel -> Bool)
-> (BinRel -> BinRel -> Bool)
-> (BinRel -> BinRel -> BinRel)
-> (BinRel -> BinRel -> BinRel)
-> Ord BinRel
BinRel -> BinRel -> Bool
BinRel -> BinRel -> Ordering
BinRel -> BinRel -> BinRel
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 :: BinRel -> BinRel -> Ordering
compare :: BinRel -> BinRel -> Ordering
$c< :: BinRel -> BinRel -> Bool
< :: BinRel -> BinRel -> Bool
$c<= :: BinRel -> BinRel -> Bool
<= :: BinRel -> BinRel -> Bool
$c> :: BinRel -> BinRel -> Bool
> :: BinRel -> BinRel -> Bool
$c>= :: BinRel -> BinRel -> Bool
>= :: BinRel -> BinRel -> Bool
$cmax :: BinRel -> BinRel -> BinRel
max :: BinRel -> BinRel -> BinRel
$cmin :: BinRel -> BinRel -> BinRel
min :: BinRel -> BinRel -> BinRel
Ord)