clash-lib-1.8.4: Clash: a functional hardware description language - As a library

Safe Haskell | None
Language | Haskell2010

Clash.Core.TermInfo

Synopsis

- termSize :: Term -> Word
- multPrimErr :: PrimInfo -> String
- splitMultiPrimArgs :: HasCallStack => MultiPrimInfo -> [Either Term Type] -> ([Either Term Type], [Id])
- multiPrimInfo' :: HasCallStack => TyConMap -> PrimInfo -> MultiPrimInfo
- multiPrimInfo :: TyConMap -> PrimInfo -> Maybe MultiPrimInfo
- isFun :: TyConMap -> Term -> Bool
- isPolyFun :: TyConMap -> Term -> Bool
- isLet :: Term -> Bool
- isVar :: Term -> Bool
- isLocalVar :: Term -> Bool
- isCon :: Term -> Bool
- isPrim :: Term -> Bool
- isTick :: Term -> Bool
- isCast :: Term -> Bool

# Documentation

termSize :: Term -> Word Source #

multPrimErr :: PrimInfo -> String Source #

splitMultiPrimArgs :: HasCallStack => MultiPrimInfo -> [Either Term Type] -> ([Either Term Type], [Id]) Source #

multiPrimInfo' :: HasCallStack => TyConMap -> PrimInfo -> MultiPrimInfo Source #

Same as `multiPrimInfo`, but produced an error if it could not produce a `MultiPrimInfo`.

multiPrimInfo :: TyConMap -> PrimInfo -> Maybe MultiPrimInfo Source #

Produce `MutliPrimInfo` for given primitive

isFun :: TyConMap -> Term -> Bool Source #

Does a term have a function type?

isPolyFun :: TyConMap -> Term -> Bool Source #

Does a term have a function or polymorphic type?

isLet :: Term -> Bool Source #

Is a term a recursive let-binding?

isVar :: Term -> Bool Source #

Is a term a variable reference?

isLocalVar :: Term -> Bool Source #

isCon :: Term -> Bool Source #

Is a term a datatype constructor?

isPrim :: Term -> Bool Source #

Is a term a primitive?

isTick :: Term -> Bool Source #

Is a term a tick?

isCast :: Term -> Bool Source #

Is a term a cast?