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)
commit29c339d21438a250d1734e5ddade1b3e2aa18c35
treec27ea26f3f2ed7b710bc1c0a7701867e7392da13
parent714bbc1dface9aa8b32394b9980ad77af96df663
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