Patrick Thomson
7f5460bdd1
wrong infix operator
2018-03-23 11:38:38 -04:00
Patrick Thomson
3e3ad4f078
very bad, no good hack to fix a lot of the tests
2018-03-23 11:25:05 -04:00
Patrick Thomson
15cc860ad1
Merge remote-tracking branch 'origin/master' into preludes-and-subclassing
2018-03-23 10:31:51 -04:00
Patrick Thomson
5eab8a1caa
Merge pull request #1667 from github/multiple-inheritance
...
Implement multiple inheritance.
2018-03-22 17:15:34 -04:00
Patrick Thomson
75bf3bebe4
Merge pull request #1666 from github/fix-python-member-call
...
Fix Python method calls.
2018-03-22 16:34:42 -04:00
Patrick Thomson
178da2959e
Implement multiple inheritance.
...
Python is the only language that we support that permits multiple
inheritance, which is probably good, since MI is generally considered
a sign of a poorly-designed object hierarchy. But there's no reason
not to support it. This algorithm is more simplistic than Python's
actual method-resolution lookup, but it's fine for now, and the
behavior for simple cases matches that of Python.
2018-03-22 15:54:21 -04:00
Patrick Thomson
bd939d2579
Fix Python method calls.
...
`identifier` in the Python assignment module was too eager to reduce a
nested Attribute into a dotted identifier. Removing it fixes method
calls, which now have a unit test.
2018-03-22 15:35:08 -04:00
Patrick Thomson
693045439a
Add test suite.
2018-03-22 13:02:39 -04:00
Patrick Thomson
1e2fc5f6d3
Merge remote-tracking branch 'origin/master' into preludes-and-subclassing
2018-03-22 12:50:16 -04:00
Patrick Thomson
ec4b01d04c
Merge pull request #1656 from github/subclassing
...
Implement single-inheritance subclassing.
2018-03-22 12:48:28 -04:00
Patrick Thomson
089403d25f
Merge branch 'master' into subclassing
2018-03-22 12:40:29 -04:00
Timothy Clem
fb65cff4c7
Merge pull request #1648 from github/php-namespaces
...
PHP includes and other import-like semantics
2018-03-22 09:39:21 -07:00
Patrick Thomson
ba67556ce6
Merge branch 'master' into subclassing
2018-03-22 12:37:49 -04:00
Patrick Thomson
9d97b8f6c7
Add a spec for subclassing
2018-03-22 12:31:53 -04:00
Timothy Clem
9a91728d4e
Only one require/load
...
Co-Authored-By: Josh Vera <vera@github.com>
2018-03-22 09:28:19 -07:00
Josh Vera
3ef6366649
Merge branch 'master' into php-namespaces
2018-03-22 12:23:57 -04:00
Josh Vera
7950a6b7aa
Merge pull request #1661 from github/app-semigroup
...
App/AppMerge semigroups
2018-03-22 12:23:26 -04:00
Patrick Thomson
d76033e50b
fix unused import
2018-03-22 12:15:16 -04:00
Patrick Thomson
3511aa1898
add needed extensions
2018-03-22 12:09:10 -04:00
Patrick Thomson
6f0f20deea
thread default environments properly throughout the stack
2018-03-22 12:03:17 -04:00
Rob Rix
d645481dcf
📝 AppMerge is a Monoid too.
2018-03-21 17:29:48 -04:00
Rob Rix
6a785e0b30
Remove the Monoid instance for App, as it’s unlawful.
2018-03-21 17:26:32 -04:00
Rob Rix
aab509cf63
Test the identity properties.
2018-03-21 17:26:07 -04:00
Rob Rix
b55010c2c1
Define shrinking.
2018-03-21 17:22:34 -04:00
Patrick Thomson
91c6731921
add evaluateWith
2018-03-21 17:21:59 -04:00
Rob Rix
6be056bd9a
Swap the order of the types.
2018-03-21 17:16:31 -04:00
Rob Rix
c6148c6cad
Test the associativity of the semigroup instances.
2018-03-21 17:16:09 -04:00
Rob Rix
69a4e4cc2e
🔥 Imperative.
2018-03-21 17:08:52 -04:00
Rob Rix
256623a818
eval lists in App.
2018-03-21 17:08:25 -04:00
Rob Rix
e0245ed752
Define a Monoid instance for App.
2018-03-21 17:08:14 -04:00
Rob Rix
3329bd0a51
Define a Semigroup instance for App.
2018-03-21 17:08:06 -04:00
Rob Rix
5ea6482e96
📝 App.
2018-03-21 17:07:55 -04:00
Rob Rix
6399cb3c58
Define an App semigroup.
2018-03-21 17:07:49 -04:00
Patrick Thomson
d39db0db06
fix comment
2018-03-21 16:56:52 -04:00
Rob Rix
8f22cb26f8
Explicitly list the exports.
2018-03-21 16:44:35 -04:00
Rob Rix
88230df1fe
Define a Monoid instance for AppMerge.
2018-03-21 16:41:49 -04:00
Rob Rix
794a03a49c
📝 AppMerge.
2018-03-21 16:41:41 -04:00
Rob Rix
541e230431
Define a Semigroup instance for AppMerge.
2018-03-21 16:41:32 -04:00
Rob Rix
0b2b27ff21
Stub in an AppMerge semigroup.
2018-03-21 16:40:56 -04:00
Timothy Clem
166c66766e
Whitespace
2018-03-21 09:20:07 -07:00
Timothy Clem
a740f2938a
Don't change assignment for namespaces just yet
2018-03-21 09:19:32 -07:00
Patrick Thomson
b59fc64dd8
Implement single-inheritance subclassing.
...
Pretty straightforward stuff: we augment `klass` to take an optional
superclass, match to ensure it's a class, then, when defining that new
class, push its definition onto the environment provided by the superclass.
2018-03-21 12:17:16 -04:00
Timothy Clem
74596f174a
Merge branch 'master' into php-namespaces
2018-03-21 09:01:17 -07:00
Patrick Thomson
b94d89fb74
lint
2018-03-21 11:11:48 -04:00
Patrick Thomson
bf7f06a9f4
missing push
2018-03-21 10:59:23 -04:00
Patrick Thomson
4187810a1a
First stab at a prelude that enables subclassing.
...
This appears to work, though the evaluation order in
evaluatePreludedRubyFile is off somehow.
2018-03-21 10:52:37 -04:00
Timothy Clem
cdd0a9f35e
Remove this
2018-03-20 16:47:36 -07:00
Timothy Clem
69e2eda8db
Couple more tests
2018-03-20 16:46:32 -07:00
Timothy Clem
038af3ccb2
Ruby require/load now return proper values too
2018-03-20 16:34:46 -07:00
Timothy Clem
8d3de3e640
PHP includes can now return proper values
2018-03-20 16:34:31 -07:00