rewire-frontend-2.8: A Haskell-to-Verilog/VHDL compiler, front end (GHC driver, Eidos, Synolon)
Safe HaskellSafe
LanguageHaskell2010

ReWire.Eidos.PrimBasis

Description

The primitive datatype basis for Eidos programs: the built-in type constructors (with their data constructors, where they have any) that bridged programs may reference without declaring — the unit and tuple families, Bool, Maybe/Either (base names, as the bridge emits them), the abstract width-bearing types (Vec, Finite, Proxy), and the reactive stack types (which exist in Eidos only; Synolon's type grammar bans them). The bridge prepends these to every program so the linter can resolve constructor occurrences.

The basis' type-variable uniques are NEGATIVE: the bridge mints non-negative uniques, so basis binders can never collide with program binders (the uniqueness lint checks both together).

Synopsis

Documentation

addPrims :: Program -> Program Source #

Prepend the primitive basis (dropping any duplicate declarations, which the bridge does not produce but hand-written .eir might).