| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
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
- parseHyle :: (MonadError AstError m, MonadIO m) => FilePath -> m Program
- parseHyleText :: MonadError AstError m => Text -> FilePath -> m Program
- parseHyleDefns :: MonadError AstError m => Text -> FilePath -> m [Defn]
Documentation
parseHyleText :: MonadError AstError m => Text -> FilePath -> m Program Source #
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.