Commit graph

25 commits

Author SHA1 Message Date
Joscha
91fd370380 Add support for short lambdas
Now, "\a b.a" is the same as "\a.\b.a".
2017-11-25 22:36:46 +00:00
Joscha
511ab62af5 Organize code into a Lambda module 2017-11-25 20:19:39 +00:00
Joscha
46d74f73f2 Clean up function names
Also create separate showExpression function
2017-11-25 20:19:22 +00:00
Joscha
fec6dcb7cf Clean up unused code and comments 2017-11-25 19:11:03 +00:00
Joscha
218fbdabb4 Interpret expressions from stdin 2017-11-25 19:06:39 +00:00
Joscha
d9b50527b1 Fix parsing of expressions
Previously, expressions like "\a.a b c" would wrongly get parsed to
something like "(\a.a) b c" or "(\a.a b) c".
2017-11-25 19:04:16 +00:00
Joscha
3dca4c2166 Parse strings containing lambda expressions 2017-11-25 18:06:41 +00:00
Joscha
577a4e5a71 Fix Show and Eq instances for Expression
Show now outputs according to usual lambda calculus notation.
Eq now tests for alpha equivalency
2017-11-18 10:53:58 +00:00
Joscha
705df975b0 Document and reorganize some functions 2017-11-13 16:01:30 +00:00
Joscha
6cf3c70a44 Make Expression an instance of Eq typeclass 2017-11-12 23:36:21 +00:00
Joscha
a23a0ed008 Use reference representation for expressions
This changes most of the logic for dealing with expressions, so I've
begun to reimplement pretty much everything.
2017-11-12 23:09:48 +00:00
Garmelon
0dc3dbb46d
Fix typo in README 2017-11-07 20:11:31 +00:00
Garmelon
165aa9d623
Merge pull request #5 from CylonicRaider/master
Add README
2017-11-07 20:10:50 +00:00
CylonicRaider
553a9e804a Add README 2017-11-07 19:51:16 +01:00
Joscha
43a926b716 Add gitignore 2017-11-05 19:25:22 +00:00
Joscha
b9075b1adc Add evaluate 2017-11-05 18:43:20 +00:00
Joscha
d5bc202681 Compare eexpressions 2017-11-05 17:34:18 +00:00
Joscha
8a23c2e875 Clean up some function logic 2017-11-05 17:32:29 +00:00
Joscha
cf0ed21144 Add back Symbol typeclass 2017-11-05 17:31:57 +00:00
Joscha
2bacb8f9d6 Experiment with symbol name simplification 2017-11-05 17:31:11 +00:00
Joscha
7ea64c86b7 Simplify expressions 2017-11-05 17:30:31 +00:00
Joscha
6619a0a4f7 Fix some bugs and add more testing output 2017-11-05 17:29:40 +00:00
Joscha
a68a8519ca Apply expressions 2017-11-05 17:28:44 +00:00
Joscha
0024751094 Remove Symbol typeclass 2017-11-05 17:27:48 +00:00
Joscha
6e09b77cc1 Initial commit 2017-11-05 17:27:10 +00:00