From: Luke Lau Date: Sat, 18 May 2019 16:54:06 +0000 (+0100) Subject: Parse defs and externs X-Git-Url: https://git.lukelau.me/?p=kaleidoscope-hs.git;a=commitdiff_plain;h=8a66ac4f81c3d1eab3b13a9e58cee0098573eff1;hp=8a66ac4f81c3d1eab3b13a9e58cee0098573eff1 Parse defs and externs They both share a common prototype so we can split that out into a separate definition. We also want to be able to parse top level expressions, so we add constructor for that in AST. Hopefully now you can see the beauty of monadic parsing: Function <$> readPrec <*> readPrec ---