Rob Rix
9b91c742b2
Merge pull request #1559 from github/import-environments
...
Import environments
2018-03-14 09:38:59 -04:00
Rob Rix
5f86831c28
🔥 Interface values.
2018-03-14 09:31:05 -04:00
Rob Rix
5e5599c9e8
Copy my changes back.
2018-03-14 09:30:45 -04:00
Rob Rix
6833ac039e
Merge branch 'master' into import-environments
2018-03-14 09:07:46 -04:00
Patrick Thomson
0d248e2aab
Make sure we match Rationals in liftNumeric.
2018-03-13 20:55:46 -04:00
Patrick Thomson
6a604628d0
Merge branch 'master' into symbol-eval
2018-03-13 19:19:41 -04:00
Patrick Thomson
ca96b02869
strictness annotations. will this do anything? only time will tell
2018-03-13 19:03:00 -04:00
Patrick Thomson
f9e8edddff
Merge remote-tracking branch 'origin/master' into rationals
2018-03-13 18:24:25 -04:00
Patrick Thomson
92a7b4ca93
Add Evaluatable instance for Rational and unify numerical interface.
...
This one's kind of a doozy. We pull in a GADT that wraps an `Integer`,
`Rational`, or `String`, and change the interpreted value types to
hold instances of this GADT (`Number`). We also provide a rank-2
wrapper that hides the type parameter when necessary.
The upshot of this patch is that we get support for rational numbers
and a cleaner interface in MonadValue, without sacrificing a mote of
type safety: interpreted `Integer` values are guaranteed to contain a
Haskell `Integer`.
On the other hand, it's kind of a monstrosity. Please let me know if
you spot any places where I can simplify these constructs or document
the code more fully.
To test in Ruby, evaluate `3r ** 4r`.
2018-03-13 18:13:38 -04:00
Timothy Clem
4599dd7ce5
Remove extraneous plainImport
2018-03-13 14:33:51 -07:00
Rob Rix
2ecc371f8d
Revert "Subterm takes a parameter for the monadic context."
...
This reverts commit 1d3e72a833681f3010446cd636af86e005290745.
2018-03-13 17:09:18 -04:00
Rob Rix
d6c6662283
Subterm takes a parameter for the monadic context.
2018-03-13 17:05:38 -04:00
Timothy Clem
0fd2c3eb05
Specify default-language for benchmarks target
2018-03-13 14:04:39 -07:00
Timothy Clem
ffd7a780e2
Merge remote-tracking branch 'origin/master' into import-language-tour
2018-03-13 14:04:22 -07:00
Rob Rix
caa0848aff
Add a letrec construct.
2018-03-13 16:58:50 -04:00
Timothy Clem
3cbd4d004d
Merge pull request #1535 from github/typescript-exports
...
Typescript exports
2018-03-13 13:57:04 -07:00
Timothy Clem
62de6d1ca5
Actually remove this
2018-03-13 13:47:13 -07:00
Josh Vera
91a5f87742
Merge branch 'master' into symbol-eval
2018-03-13 15:42:13 -05:00
joshvera
fbe80583ad
Merge branch 'typescript-exports' of https://github.com/github/semantic-diff into typescript-exports
2018-03-13 13:39:38 -07:00
Josh Vera
a8534f481f
Merge branch 'master' into typescript-exports
2018-03-13 15:32:19 -05:00
joshvera
b094d4c0f6
Add Exports constraint to MonadEnvironment instance
2018-03-13 13:21:50 -07:00
Timothy Clem
1309ccd217
Slightly nicer way to express this
2018-03-13 13:19:48 -07:00
joshvera
f93243f5b5
Merge remote-tracking branch 'origin/master' into typescript-exports
2018-03-13 13:13:53 -07:00
Rob Rix
1e1495a507
Use while
to define forLoop
.
2018-03-13 16:10:20 -04:00
Timothy Clem
f3b2e0cd2a
Store a list of terms in the unevaluted module table to allow multi file module imports
2018-03-13 13:09:04 -07:00
Patrick Thomson
16ecd27814
Merge pull request #1556 from github/while-evaluation
...
Evaluatable instance for While and DoWhile.
2018-03-13 16:05:40 -04:00
Rob Rix
b597ef909a
Merge branch 'import-environments' of https://github.com/github/semantic-diff into import-environments
2018-03-13 16:00:02 -04:00
Rob Rix
a8b6528f67
Commit the right name ✋ 😞
2018-03-13 15:59:52 -04:00
Rob Rix
cee2e78ee5
Merge branch 'master' into import-environments
2018-03-13 15:58:17 -04:00
Rob Rix
a968fa05ac
Tidy up bindEnv.
2018-03-13 15:57:57 -04:00
Patrick Thomson
eb364317cb
move logic out of eval and into a helper
2018-03-13 15:57:08 -04:00
Patrick Thomson
d72c1807a2
stylistic changes
2018-03-13 15:42:47 -04:00
Patrick Thomson
611f1a9a6f
Merge remote-tracking branch 'origin/evaluate-for-loops' into while-evaluation
...
Thanks to @robrix for the fixed eval instance.
2018-03-13 15:40:34 -04:00
Rob Rix
2ee1c7d472
Eval Module using [] to print the last value.
2018-03-13 15:36:02 -04:00
Rob Rix
e846675b5b
Eval using [] to print the last value.
2018-03-13 15:34:50 -04:00
Rob Rix
9448cb437f
Bind variables in for loops.
...
Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
2018-03-13 15:33:46 -04:00
Rob Rix
fb7946714c
Unify equal types.
2018-03-13 15:33:18 -04:00
Rob Rix
b40eda1551
liftComparison promotes its operands.
2018-03-13 15:32:46 -04:00
Rob Rix
a6b4e5490a
Eval using [] to print the last value.
2018-03-13 15:32:23 -04:00
Rob Rix
b8a31a21fb
Add a typechecking entry point for TypeScript.
2018-03-13 15:31:36 -04:00
Rob Rix
6c5650b950
Merge remote-tracking branch 'origin/while-evaluation' into evaluate-for-loops
2018-03-13 15:06:47 -04:00
Patrick Thomson
6f9a6cb6b8
Evaluatable instance for symbols.
...
Deferring the decision on whether to intern symbols to some later date
when we really get into the weeds re. Ruby semantics.
2018-03-13 14:45:20 -04:00
Timothy Clem
6a8cee384e
Organize SpecHelper, remove unused imports
2018-03-13 11:18:05 -07:00
Timothy Clem
579a447961
Test out go import evaling
2018-03-13 11:14:55 -07:00
Timothy Clem
bbff8d45ed
More spec import cleanup
2018-03-13 11:10:50 -07:00
Timothy Clem
993ae92a75
Clean up IntegrationSpec imports
2018-03-13 11:04:58 -07:00
Timothy Clem
1b79ed205e
TOCSpec import cleanup
2018-03-13 10:59:20 -07:00
Timothy Clem
740d092271
Whitespace
2018-03-13 10:59:06 -07:00
Timothy Clem
61edbb020a
Don't clash unnecessarily with existing Language data type
2018-03-13 10:58:57 -07:00
Patrick Thomson
d84e5d2043
otiose comments
2018-03-13 13:41:29 -04:00