| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
Embedder.Builtins
Synopsis
- data Builtin
- = Error
- | Extern
- | Cryptol
- | Bind
- | Return
- | Put
- | Get
- | Signal
- | Lift
- | Extrude
- | VecFromList
- | VecReplicate
- | VecReverse
- | VecSlice
- | VecRSlice
- | VecIndex
- | VecIndexProxy
- | VecConcat
- | VecMap
- | VecGenerate
- | Finite
- | FiniteMinBound
- | FiniteMaxBound
- | ToFinite
- | ToFiniteMod
- | FromFinite
- | NatVal
- | Bits
- | Resize
- | BitSlice
- | BitIndex
- | Add
- | Sub
- | Mul
- | Div
- | Mod
- | Pow
- | LAnd
- | LOr
- | And
- | Or
- | XOr
- | XNor
- | LShift
- | RShift
- | RShiftArith
- | Eq
- | Gt
- | GtEq
- | Lt
- | LtEq
- | LNot
- | Not
- | RAnd
- | RNAnd
- | ROr
- | RNor
- | RXOr
- | RXNor
- | MSBit
- builtinName :: Builtin -> Text
- builtins :: [(Text, Builtin)]
- data TyBuiltin
- s2tb :: Text -> Maybe TyBuiltin
- tb2s :: TyBuiltin -> Text
- tybuiltins :: [(Text, TyBuiltin)]
- builtinUserQName :: [(Builtin, Text)]
- builtinUserName :: [(Builtin, Text)]
- data RWUserOp
- = RWBuiltin Builtin
- | CompDot
- | CompDol
- | BindI
- | BindS
- | BindR
- | BindRInf
- | Seq
- | SeqI
- | SeqS
- | SeqR
- | SeqRInf
- | RBindI
- | RBindS
- | RBindR
- | RBindRInf
- | ReturnI
- | ReturnS
- | ReturnR
- | LiftS
- | LiftR
- | WordIndexProxy
- | WordIndexFin
- | BAnd
- | BOr
- | BXOr
- | FinAdd
- | FinSub
- | FinMul
- | FinDiv
- | FinEq
- | FinLt
- | WordSlice
- | WordIndex
- | NEq
- | Update
- | VecLastIndexProxy
- rwu2s :: RWUserOp -> Maybe Text
- s2rwu :: Text -> Maybe RWUserOp
- rwu2qn :: RWUserOp -> Maybe Text
- qn2rwu :: Text -> Maybe RWUserOp
Documentation
Constructors
Instances
builtinName :: Builtin -> Text #
Type builtins type (+), type GHC.Monad, type GHC.MonadTrans, KnownNat Identity, ReacT, StateT, Vec, Finite, Ref (..), Proxy (..) Maybe, Either, Bool Products?
Primitives Defined Types/Data structs: Monad, MonadTrans, Ref a=Ref String, Proxy (n::Nat)=Proxy Imported Types/Data structs: type(+),type(Nat),Identity, ReacT, StateT, Integer, String, Bool, Vec=Vector, KnownNat, Finite
Constructors
| TyInteger | |
| TyString | |
| TyBool | |
| TyUnit | |
| TyFun | |
| TyReacT | |
| TyStateT | |
| TyIdentity | |
| TyState | |
| TyRe | |
| TyDev | |
| TyStateDev | |
| TyS | |
| TyProd | |
| TyList | |
| TyVec | |
| TyProxy | |
| TyFin | |
| TyPlus | |
| TyNeg | |
| TyRef |
Instances
| NFData TyBuiltin Source # | |||||
Defined in Embedder.Builtins | |||||
| Data TyBuiltin Source # | |||||
Defined in Embedder.Builtins Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyBuiltin -> c TyBuiltin # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyBuiltin # toConstr :: TyBuiltin -> Constr # dataTypeOf :: TyBuiltin -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyBuiltin) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyBuiltin) # gmapT :: (forall b. Data b => b -> b) -> TyBuiltin -> TyBuiltin # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyBuiltin -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyBuiltin -> r # gmapQ :: (forall d. Data d => d -> u) -> TyBuiltin -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyBuiltin -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyBuiltin -> m TyBuiltin # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyBuiltin -> m TyBuiltin # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyBuiltin -> m TyBuiltin # | |||||
| Bounded TyBuiltin Source # | |||||
| Enum TyBuiltin Source # | |||||
Defined in Embedder.Builtins Methods succ :: TyBuiltin -> TyBuiltin # pred :: TyBuiltin -> TyBuiltin # fromEnum :: TyBuiltin -> Int # enumFrom :: TyBuiltin -> [TyBuiltin] # enumFromThen :: TyBuiltin -> TyBuiltin -> [TyBuiltin] # enumFromTo :: TyBuiltin -> TyBuiltin -> [TyBuiltin] # enumFromThenTo :: TyBuiltin -> TyBuiltin -> TyBuiltin -> [TyBuiltin] # | |||||
| Generic TyBuiltin Source # | |||||
Defined in Embedder.Builtins Associated Types
| |||||
| Show TyBuiltin Source # | |||||
| Eq TyBuiltin Source # | |||||
| Ord TyBuiltin Source # | |||||
| Hashable TyBuiltin Source # | |||||
Defined in Embedder.Builtins | |||||
| Pretty TyBuiltin Source # | |||||
Defined in Embedder.Builtins | |||||
| TextShow TyBuiltin Source # | |||||
| type Rep TyBuiltin Source # | |||||
Defined in Embedder.Builtins type Rep TyBuiltin = D1 ('MetaData "TyBuiltin" "Embedder.Builtins" "rewire-embedder-2.8-G94ytt72LAgDf9UAeQPb84" 'False) ((((C1 ('MetaCons "TyInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyString" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TyBool" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TyUnit" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyFun" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TyReacT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyStateT" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TyIdentity" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TyState" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyRe" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "TyDev" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyStateDev" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TyS" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TyProd" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyList" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TyVec" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TyProxy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyFin" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TyPlus" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TyNeg" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyRef" 'PrefixI 'False) (U1 :: Type -> Type)))))) | |||||
tybuiltins :: [(Text, TyBuiltin)] Source #
builtinUserQName :: [(Builtin, Text)] Source #
Note: this is not injective (e.g., VecConcat has two notations)
Note: there are Builtins that don't have direct corresponding notations (e.g. Bits is used in lit, but not directly)
builtinUserName :: [(Builtin, Text)] Source #
Cases where we need to include specific handling for rewire-user definitions:
- We need to print punctuation and infix notations carefully
- We may need to differentiate based on type information in some circumstances: a. We can't define a single operator over different monads (or can we?) b. We need to differentiate between vector and word operations
- We include Builtins because we handle them at the same junctures
We can handle other cases by writing a function or synonym in the Isabelle ReWire session (rewire-embedder/targets/isabelle/thys)
Constructors
| RWBuiltin Builtin | |
| CompDot | |
| CompDol | |
| BindI | |
| BindS | |
| BindR | |
| BindRInf | |
| Seq | |
| SeqI | |
| SeqS | |
| SeqR | |
| SeqRInf | |
| RBindI | |
| RBindS | |
| RBindR | |
| RBindRInf | |
| ReturnI | |
| ReturnS | |
| ReturnR | |
| LiftS | |
| LiftR | |
| WordIndexProxy | |
| WordIndexFin | |
| BAnd | |
| BOr | |
| BXOr | |
| FinAdd | |
| FinSub | |
| FinMul | |
| FinDiv | |
| FinEq | |
| FinLt | |
| WordSlice | |
| WordIndex | |
| NEq | |
| Update | |
| VecLastIndexProxy |
Instances
| NFData RWUserOp Source # | |||||
Defined in Embedder.Builtins | |||||
| Data RWUserOp Source # | |||||
Defined in Embedder.Builtins Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RWUserOp -> c RWUserOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RWUserOp # toConstr :: RWUserOp -> Constr # dataTypeOf :: RWUserOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RWUserOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RWUserOp) # gmapT :: (forall b. Data b => b -> b) -> RWUserOp -> RWUserOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RWUserOp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RWUserOp -> r # gmapQ :: (forall d. Data d => d -> u) -> RWUserOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RWUserOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RWUserOp -> m RWUserOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RWUserOp -> m RWUserOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RWUserOp -> m RWUserOp # | |||||
| Generic RWUserOp Source # | |||||
Defined in Embedder.Builtins Associated Types
| |||||
| Show RWUserOp Source # | |||||
| Eq RWUserOp Source # | VecEmpty | VecSingleton | VecCons | VecSnoc | VecHead | VecLastIndex | VecLastIndexProxy | VecTake | VecDrop | VecInit | VecTail | VecZipWith | VecZipWith3 | VecPackLo | VecPackHi | VecUnpackLo | VecUnpackHi Additional notation: FiniteComp: even, odd Bits: zero, one, bit, lit, rotR, rotL, even, odd, Lit=W128 | ||||
| Ord RWUserOp Source # | |||||
Defined in Embedder.Builtins | |||||
| Hashable RWUserOp Source # | |||||
Defined in Embedder.Builtins | |||||
| TextShow RWUserOp Source # | |||||
| type Rep RWUserOp Source # | |||||
Defined in Embedder.Builtins type Rep RWUserOp = D1 ('MetaData "RWUserOp" "Embedder.Builtins" "rewire-embedder-2.8-G94ytt72LAgDf9UAeQPb84" 'False) (((((C1 ('MetaCons "RWBuiltin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Builtin)) :+: C1 ('MetaCons "CompDot" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CompDol" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BindI" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BindS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BindR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BindRInf" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Seq" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SeqI" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "SeqS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SeqR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SeqRInf" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RBindI" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "RBindS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RBindR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RBindRInf" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ReturnI" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ReturnS" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "ReturnR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LiftS" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LiftR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WordIndexProxy" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "WordIndexFin" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BAnd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BOr" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BXOr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FinAdd" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "FinSub" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FinMul" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FinDiv" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FinEq" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FinLt" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "WordSlice" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WordIndex" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NEq" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Update" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VecLastIndexProxy" 'PrefixI 'False) (U1 :: Type -> Type))))))) | |||||