sdiehl / write-you-a-haskell

Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
MIT License
3.34k stars 256 forks source link

Fix parsing of binop #113

Open faustind opened 3 years ago

faustind commented 3 years ago

Related to #110

Using Tok.integer causes the operators to be eaten before they are seen as infixOps. By reading numbers as naturals the operators + and - are treated as we expect.