Generate code for functions and variables
authorLuke Lau <luke_lau@icloud.com>
Sat, 18 May 2019 23:23:31 +0000 (00:23 +0100)
committerLuke Lau <luke_lau@icloud.com>
Mon, 3 Jun 2019 23:11:03 +0000 (00:11 +0100)
commitf9d2ceca9d10a17f0d658c00d186e073c3cfc466
treec27ea26f3f2ed7b710bc1c0a7701867e7392da13
parentb1b900373ddd43adf3687a997904e6b8cf3eb9fd
Generate code for functions and variables

Now that we're generating functions, variables can now be bound. This
means we will have to somehow keep track of what variables are available
in scope (i.e. passed to us in 'funciton'), so we've wrapped our
IRBuilderT in a ReaderT (Map String Operand).

For now if the variable doesn't exist in scope, we just crash the
program. But later on we will introduce a mechanism for errors, and tidy
up the transformer stack.
Main.hs