clash-ghc-1.8.1: Clash: a functional hardware description language - GHC frontend

Copyright | (C) 2020 QBayLogic B.V.
License | BSD2 (see the file LICENSE)
Maintainer | QBayLogic B.V. <devops@qbaylogic.com>
Safe Haskell | Safe-Inferred
Language | Haskell2010

Clash.GHC.PartialEval.Primitive

Description

Evaluation of primitive operations in the partial evaluator. This is used by the Clash.GHC.PartialEval.Eval module to implement fully applied primitives.

Synopsis

- evalPrimitive :: (Term -> Eval Value) -> PrimInfo -> Args Value -> Eval Value

# Documentation

evalPrimitive Source #

Arguments

:: (Term -> Eval Value) | Evaluation function for forcing arguments
-> PrimInfo | The primitive to evaluate
-> Args Value | The arguments supplied to the primitive
-> Eval Value | The result of evaluating the primitive

Evaluate a primitive with the given arguments. See NOTE [Evaluating primitives] for more information.