rewire-backend-2.8: A Haskell-to-Verilog/VHDL compiler, the Hyle backend
Safe HaskellSafe
LanguageHaskell2010

ReWire.Hyle.Parse

Description

Parser for the Hyle concrete syntax (doc/hyle.md, section 10).

The concrete syntax does not carry per-node widths, so parsing is followed by an elaboration pass that reconstructs the cached sizes bottom-up: variable sizes from binders, call result sizes from the signatures of the named defns and externs. Full well-formedness checking (ReWire.Hyle.Check) is separate; elaboration only fails where a size cannot be reconstructed at all.

Synopsis

Documentation

parseHyleDefns :: MonadError AstError m => Text -> FilePath -> m [Defn] Source #

Parse a defns-only Hyle fragment (no device declaration): the interchange format for definitions generated outside the fold (the rwcry Cryptol translator). The fragment must be self-contained -- elaboration resolves calls against the fragment's own definitions (and externs, if any) only.