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

Grisette.IR.SymPrim.Data.TabularFun

Description

 
Synopsis

Documentation

data a =-> b infixr 0 Source #

Functions as a table. Use the # operator to apply the function.

>>> :set -XTypeOperators
>>> let f = TabularFun [(1, 2), (3, 4)] 0 :: Int =-> Int
>>> f # 1
2
>>> f # 2
0
>>> f # 3
4

Constructors

TabularFun 

Fields

Instances

Instances details
Generic1 ((=->) a :: Type -> Type) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Associated Types

type Rep1 ((=->) a) :: k -> Type #

Methods

from1 :: forall (a0 :: k). (a =-> a0) -> Rep1 ((=->) a) a0 #

to1 :: forall (a0 :: k). Rep1 ((=->) a) a0 -> a =-> a0 #

NFData a => NFData1 ((=->) a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

liftRnf :: (a0 -> ()) -> (a =-> a0) -> () #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (UnionM (ca =-> cb)) (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

toSym :: UnionM (ca =-> cb) -> sa =~> sb Source #

(Lift a, Lift b) => Lift (a =-> b :: Type) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

lift :: Quote m => (a =-> b) -> m Exp #

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

Generic (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Associated Types

type Rep (a =-> b) :: Type -> Type #

Methods

from :: (a =-> b) -> Rep (a =-> b) x #

to :: Rep (a =-> b) x -> a =-> b #

(Show a, Show b) => Show (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

showsPrec :: Int -> (a =-> b) -> ShowS #

show :: (a =-> b) -> String #

showList :: [a =-> b] -> ShowS #

(NFData a, NFData b) => NFData (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

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

(Eq a, Eq b) => Eq (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

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

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

Eq a => Function (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Associated Types

type Arg (a =-> b) Source #

type Ret (a =-> b) Source #

Methods

(#) :: (a =-> b) -> Arg (a =-> b) -> Ret (a =-> b) Source #

(SupportedPrim a, SupportedPrim b) => SupportedPrim (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Associated Types

type PrimConstraint (a =-> b) Source #

Methods

withPrim :: proxy (a =-> b) -> (PrimConstraint (a =-> b) => a0) -> a0 Source #

termCache :: Cache (Term (a =-> b)) Source #

pformatCon :: (a =-> b) -> String Source #

pformatSym :: TypedSymbol (a =-> b) -> String Source #

defaultValue :: a =-> b Source #

defaultValueDynamic :: proxy (a =-> b) -> ModelValue Source #

(SymRep a, SymRep b) => SymRep (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType (a =-> b) Source #

(Hashable a, Hashable b) => Hashable (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

hashWithSalt :: Int -> (a =-> b) -> Int #

hash :: (a =-> b) -> Int #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Solvable (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

con :: (ca =-> cb) -> sa =~> sb Source #

conView :: (sa =~> sb) -> Maybe (ca =-> cb) Source #

ssym :: String -> sa =~> sb Source #

isym :: String -> Int -> sa =~> sb Source #

sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> sa =~> sb Source #

iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> sa =~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToCon (sa =~> sb) (ca =-> cb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: (sa =~> sb) -> Maybe (ca =-> cb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: (ca =-> cb) -> sa =~> sb Source #

(LinkedRep ca sa, LinkedRep cb sb) => LinkedRep (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

underlyingTerm :: (sa =~> sb) -> Term (ca =-> cb) Source #

wrapTerm :: Term (ca =-> cb) -> sa =~> sb Source #

type Rep1 ((=->) a :: Type -> Type) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type Rep1 ((=->) a :: Type -> Type) = D1 ('MetaData "=->" "Grisette.IR.SymPrim.Data.TabularFun" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'False) (C1 ('MetaCons "TabularFun" 'PrefixI 'True) (S1 ('MetaSel ('Just "funcTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 ((,) a)) :*: S1 ('MetaSel ('Just "defaultFuncValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Rep (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type Rep (a =-> b) = D1 ('MetaData "=->" "Grisette.IR.SymPrim.Data.TabularFun" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'False) (C1 ('MetaCons "TabularFun" 'PrefixI 'True) (S1 ('MetaSel ('Just "funcTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(a, b)]) :*: S1 ('MetaSel ('Just "defaultFuncValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)))
type Arg (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type Arg (a =-> b) = a
type Ret (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type Ret (a =-> b) = b
type PrimConstraint (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type SymType (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type SymType (a =-> b) = SymType a =~> SymType b