clash-lib
Safe HaskellSafe-Inferred
LanguageHaskell2010

Clash.Core.TermInfo

Synopsis

Documentation

termSizeSmallerThan :: Word -> Term -> Bool Source #

termSizeSmallerThan n t is termSize t < n, but stops traversing t as soon as the size reaches n. Use this instead of termSize when comparing against a limit: inlining heuristics routinely compare very large terms against small limits, and only the first n nodes decide the answer.

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?

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?