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>
Sun, 19 May 2019 13:17:16 +0000 (14:17 +0100)
commit8cd4f6315dc3efd76822337e935b7d465a134a5e
treec27ea26f3f2ed7b710bc1c0a7701867e7392da13
parentfb7d66e2e530c51a6a20239f8f2cd644f40fecea
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