grisette-0.1.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
(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) #

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

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

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

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 #

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 #

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type Arg (a =~> b) Source #

type Ret (a =~> b) Source #

Methods

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

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 #

(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 #

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.1.0.0-7JmpZvRpjzaDDLSSjCfe9O" '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.1.0.0-7JmpZvRpjzaDDLSSjCfe9O" '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.SymPrim

type Arg (a =~> b) = Sym a
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.SymPrim

type Ret (a =~> b) = Sym b
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