- SPIR-V dialect spec
- SPIR-V dialect base tablegen
- SPIR-V dialect header
- SPIR-V dialect cpp
- SPIR-V types header
- SPIR-V types cpp
- What stops someone from defining a printer that is completely different from what the parser wants?
data Expr b
= Var Id
| Lit Literal
| App (Expr b) (Arg b)
| Lam b (Expr b)
| Let (Bind b) (Expr b)
| Case (Expr b) b Type [Alt b] -- See #case_invariants#
| Cast (Expr b) Coercion
| Tick (Tickish Id) (Expr b)
| Type Type
| Coercion Coercion
deriving Data
type Arg b = Expr b
type Alt b = (AltCon, [b], Expr b)
data AltCon = DataAlt DataCon | LitAlt Literal | DEFAULT
data Bind b = NonRec b (Expr b) | Rec [(b, (Expr b))]
To run these, first install the GHC plugin from ghc-dump
. This installs
both the plugin that is loaded with -fplugin GhcDump.Plugin
[The package ghc-dump-core
]
as well as the utility tool for dumping these called ghc-dump
[The package ghc-dump-util
].
# install tool and compiler plugin
$ cd ghc-dump && cabal install --lib all && cabal install all
Then run the makefile:
# run the makefile, generate the dump, pretty print the dump
$ cd hask-programs && make && ghc-dump --show fib.pass-0000.cbor
- Parse
case x of { ... }
style input. - Parse
let var = val in ...
input. - Add
PrimInt
type. - Get factorial up and running.
- Get a notion of explicit GC.