Commit Graph

292 Commits

Author SHA1 Message Date
Chris Gibbs
f304ff5d0a Add TODO comments for bugs found testing pretty-printer on contents of unison-src 2018-11-26 21:29:36 +00:00
Paul Chiusano
4bd3442453 another pending test 2018-11-12 13:39:12 -05:00
Paul Chiusano
35614bf8e3 another pending test 2018-11-12 12:16:11 -05:00
Paul Chiusano
58e8f928c2 add another pending test 2018-11-11 22:21:05 -05:00
Runar Bjarnason
d8c44ca78b Fixed serialization of lambdas 2018-11-06 16:06:32 -05:00
Runar Bjarnason
cefdd2d29f Added a test for TDNR with data constructors 2018-11-05 13:00:53 -05:00
Paul Chiusano
64b68ba149 added a couple demo files, working up to a distributed sort function
also spotted runtime bug, added pending test
2018-11-04 13:30:08 -05:00
Paul Chiusano
b9a04335f9 rename Stream.to-sequence to Stream.toSequence
Want to move to using camelCase and simplify identifiers to not allow dashes
2018-11-04 12:12:58 -05:00
Paul Chiusano
b72a082238 lexer change for a comment that extends to end of file 2018-10-22 15:19:03 -04:00
Arya Irani
7fd0b700c3 pending test 2018-10-15 12:07:54 -04:00
Runar Bjarnason
51d3a5e617 Added a test for local TDNR 2018-10-11 16:59:15 -04:00
Paul Chiusano
425075a369 add pending test 2018-10-02 13:53:45 -04:00
Paul Chiusano
45766f0e25 add pending test 2018-09-24 16:30:57 -04:00
Paul Chiusano
17309cdd44 Rename Text.concatenate to Text.++ 2018-09-24 14:38:03 -04:00
Paul Chiusano
f09da9d84d rename Int64 to just Int 2018-09-24 13:36:13 -04:00
Paul Chiusano
66962863b5 rename UInt64 to Nat 2018-09-24 13:15:40 -04:00
Paul Chiusano
dc75192bf8 added ability as a keyword alias for effect, will remove effect later 2018-09-20 19:12:39 -04:00
Paul Chiusano
e23c0cadff
remove outdated comment 2018-09-12 09:49:40 -04:00
Paul Chiusano
d8a4ba9d8e fix issue with Lambda.compose not working in presence of effects 2018-09-05 15:21:05 -04:00
Paul Chiusano
5291996c83 unpending some tests 2018-09-05 14:49:14 -04:00
Arya Irani
880d521ae4 consolidate nested Apply in scala pretty-printer 2018-09-04 17:22:15 -04:00
Arya Irani
d5b1cccc4e guess this was fixed in the previous commit 2018-09-04 15:46:16 -04:00
Arya Irani
231055d146 fix tests/state2a-min.u by calling Components.minimize' in block
and also by fixing Components.minimize'
2018-09-04 15:42:04 -04:00
Arya Irani
90c4fd7d67 fix off-by-two error in dataConstructorish 2018-09-04 14:27:59 -04:00
Arya Irani
e534a5581c
Merge pull request #243 from unisonweb/fix/effect-instantiation2
Misc typechecker bugfixes
2018-09-04 10:18:13 -04:00
Arya Irani
9ba1e249f8
Merge pull request #244 from unisonweb/wip/pretty-errors
misc fixes & cleanup
2018-09-04 10:17:53 -04:00
Arya Irani
7bcbd48807 fix off-by-one in Sequence.at 2018-09-04 10:06:16 -04:00
Paul Chiusano
3b369ec295 Merge remote-tracking branch 'origin/master' into fix/effect-instantiation2 2018-09-01 10:54:25 -04:00
Arya Irani
7d4c37f71b
Merge pull request #242 from unisonweb/fix/effect-instantiation
Fix issue with ability instantiation
2018-08-31 17:11:37 -04:00
Paul Chiusano
53d735d84a fix to instantiateL/R which was completely forgetting to instantiate effects
This appears to have been masking another error with effect inference in map-reduce.u, which is now failing with an ability check again
2018-08-31 13:36:48 -04:00
Arya Irani
a48fa3bd82 add two pending tests
unison-src/test1.u became a-tale-of-two-optionals.uu
2018-08-31 12:16:38 -04:00
Paul Chiusano
25dc69272e Merge remote-tracking branch 'origin/master' into fix/effect-instantiation 2018-08-31 12:01:37 -04:00
Arya Irani
3935b36638 add two pending tests, one poor error message, un-pend a test, and add description to a pending test
also watch *.uu files from ./scripts/watchany.sh
2018-08-31 11:37:29 -04:00
Paul Chiusano
5ae98f7f2a fixed, but want to clean up inferred types a bit to eliminate unneeded effect vars 2018-08-31 10:12:49 -04:00
Paul Chiusano
2819c206ac started on language reference file 2018-08-30 22:48:37 -04:00
Paul Chiusano
30f89c2be6 Add a couple pending tests 2018-08-30 10:41:58 -04:00
Paul Chiusano
940504a476 builtins are effect polymorphic 2018-08-30 10:32:06 -04:00
Paul Chiusano
35b5945a77 fixed regression in map-reduce due to overagressive generalizeEffects impl even if user has already provided effect variables in the signature 2018-08-30 10:05:42 -04:00
Paul Chiusano
794c98c03e seems to be working but regression in map-reduce.u 2018-08-29 23:39:46 -04:00
Paul Chiusano
d258fb01fc WIP, still not quite working 2018-08-29 17:42:04 -04:00
Paul Chiusano
367bae9f2f Merge branch 'master' into topic/effect-improvements 2018-08-29 11:30:07 -04:00
Paul Chiusano
18639e9e8f test no longer pending 2018-08-29 11:29:42 -04:00
Paul Chiusano
2d30e74525 Merge branch 'master' into topic/effect-improvements 2018-08-29 11:27:39 -04:00
Paul Chiusano
882b972e96 add new pending test 2018-08-29 09:45:00 -04:00
Paul Chiusano
e739e9e0e2 remove hack that would prevent effect inference of more than two concrete effects 2018-08-27 17:12:54 -04:00
Paul Chiusano
45f21b15a4
Merge pull request #237 from unisonweb/wip/stanzas
Parsing improvement - type and effect decls can be intermingled with term definitions, `use` can appear anywhere in a block
2018-08-27 15:21:00 -04:00
Chris Gibbs
b3c30bf16b Remove incorrect tests 2018-08-26 21:14:32 +01:00
Chris Gibbs
eac377537a A few failing typechecker tests
- tests/delay_parse.uu - () -> {T} '() does not parse - interaction between the ' and the {T}
- tests/match_unit.uu - can't match on () in a pattern
- tests/hole.u - holes don't seem to be supported yet
- errors/effect_unknown_type.uu - no error when using an unknown type in an effect declaration

These are the things I found while getting the following to compile, which it now does! :-)  It's a sketch of how the Remote API might break down in to constituent effects.

https://gist.github.com/atacratic/99fb707a7cb96bcd714cc1c024a7e08e
2018-08-26 21:14:32 +01:00
Paul Chiusano
9f03e7d31c forgot to add tests that exercise this to the commit 2018-08-24 09:26:12 -04:00
Rúnar Óli Bjarnason
16ca2932d0 Fixed console.uu 2018-08-23 14:56:50 -04:00
Rúnar
4acf38abfc
Merge pull request #235 from unisonweb/topic/patterntypes
More robust implementation of pattern typechecking
2018-08-23 10:02:34 -04:00
Rúnar Óli Bjarnason
9fcc4f9bf0 everything compiling with new pattern checking but tests not passing in effect pattern inference 2018-08-22 15:51:09 -04:00
Paul Chiusano
06a53f232a added some pending tests 2018-08-22 10:57:18 -04:00
Paul Chiusano
f78bc60ca0
Merge pull request #232 from unisonweb/topic/tdnr
Fix bug in TDNR
2018-08-18 08:05:01 -04:00
Runar Bjarnason
b23f166769 Actually fail when TDNR has suggestions. 2018-08-17 22:21:51 -04:00
Paul Chiusano
3821ef658f added some verbiage about issue with console.uu 2018-08-17 13:07:14 -04:00
Paul Chiusano
a0f5facc74 resurrect old tictactoe.uu since it was a failing test case, needed to debug 2018-08-17 13:01:46 -04:00
Arya Irani
40d7255d45 pending test of importing local definitions 2018-08-16 19:24:55 -04:00
Arya Irani
43a4cd04b4 tictactoe.uu update (thanks @atacratic!)
glad someone is paying attention ;-)
2018-08-16 19:19:29 -04:00
Runar Bjarnason
28ec096a4e Kill the computer 2018-08-16 12:42:38 -04:00
Arya Irani
184065d87b add some pattern matching tests 2018-08-16 11:34:37 -04:00
Arya Irani
c579ad9345 add pending tictactoe.uu program 2018-08-16 11:32:01 -04:00
Runar Bjarnason
e351635722 Merge branch 'master' into topic/tdnr2 2018-08-16 10:42:26 -04:00
Runar Bjarnason
955f525703 Type-directed name resolution, phase 2 2018-08-15 16:40:13 -04:00
Runar Bjarnason
15a526b894 wip with writer monad 2018-08-14 21:13:07 -04:00
Paul Chiusano
5af38fb39b Merge branch 'master' into wip/effects
# Conflicts:
#	parser-typechecker/src/Unison/PrintError.hs
#	parser-typechecker/src/Unison/Typechecker/Context.hs
#	parser-typechecker/tests/Unison/Test/Typechecker.hs
2018-08-14 16:13:50 -04:00
Runar Bjarnason
4f5f0ed1be TDNR actually does work. Phase 1. Phase 2 is fixpoint. 2018-08-14 10:47:37 -04:00
Runar Bjarnason
b938e1f530 Remove notes that we're handling in tdnr 2018-08-13 19:56:27 -04:00
Runar Bjarnason
7c55d507b7 TDNR seems to work! 2018-08-13 14:18:12 -04:00
Runar Bjarnason
4721d06c28 Merge branch 'topic/pretty-errors' of github.com:unisonweb/unison into topic/type-directed 2018-08-10 16:11:24 -04:00
Arya Irani
3b5217674f unison-src/errors/state3.uu currently typechecks, even though it uses but doesn't handle the effect-pure case 2018-08-09 16:19:01 -04:00
Arya Irani
a5f9c9729d moved the last of the tests from Unison.Test.Typechecker into individual files 2018-08-09 16:08:51 -04:00
Arya Irani
90be707834 add a couple tests, and shuffled some others around. 2018-08-08 22:21:57 -04:00
Arya Irani
2fd89ae6ee moved a couple typechecker tests to .u files 2018-08-07 13:25:05 -04:00
Paul Chiusano
4697c27c8e forgot to add this to commit, updated test file for new syntax 2018-08-05 19:10:59 -04:00
Paul Chiusano
aea87a6e07 simplify syntax 2018-08-03 03:50:54 -04:00
Paul Chiusano
52bc19143e imports, can appear at start of any block
import Monoid.[zero, +]
import Math.sqrt
2018-08-03 03:50:54 -04:00
Arya Irani
28b4af17ff move bootstrap.sh and test.sh to scripts/ and add watch.sh also 2018-08-03 03:50:54 -04:00
Paul Chiusano
2dc12661dd Added syntax sugar: 'x for () -> x, !x for x(), and a delay layout block 2018-08-01 23:16:53 -04:00
Arya Irani
6622df402e debugging the error display for unison-src/tests/if.uu 2018-08-01 17:32:45 -04:00
Paul Chiusano
a222a46353 fix scala tests to for new Foo.+ (vs +_Foo) syntax for qualified operators, also reduced test sizes for Sequence a bit so they don't take forever 2018-07-30 09:30:13 -04:00
Arya Irani
a91b6c81a8 no more stack allocations for Stream
`fp_s` and `fppp_s` accept a function returning `EnvTo[Foo]`.
The environment is passed to the resulting `EnvTo[Foo]` before
encoding the `Foo` as normal.
2018-07-07 17:49:59 -04:00
Arya Irani
dcbe3cc4d8 seems to have largely fixed itself in my sleep
the typedecl parser for builtins seems to work fine
fixed prettyprinting of tuples
fixed logic error in OptionalTC.isEmpty
added tuple.u and unfold.u tests
2018-07-07 13:00:39 -04:00
Arya Irani
ea3b4291b5 wip/failing attempt to implement Stream.unfold, which requires an Option type
Somehow I broke Pair, or something to do with Pair wrapped in Option?
2018-07-06 23:58:12 -04:00
Arya Irani
a4ef66e645 bugfix and tests for Stream.flatMap 2018-07-05 23:10:30 -04:00
Arya Irani
1f556f0bb1 add tests for Stream.takeWhile/dropWhile/zipWith
untested: flatMap/constant (doesnt terminate)
2018-07-05 13:22:45 -04:00
Arya Irani
510e0c07aa add Stream.sum/append 2018-07-04 22:42:20 -04:00
Arya Irani
3063e7e57f add more Stream builtins and thread env through (see more...)
added `fs_p`, `fpps_p`, etc and the `StackDecode` typeclass, which describes how
  to decode a value which needs access to a stack.

builtin function adapter helper naming convention guide:
`u` = unison unboxed
`b` = Scala Boolean as unboxed booleana
`l` = Scala Long as unboxed int64
`n` = Scala Int as unboxed uint64
`d` = Scala Double as unboxed float
`p` = "polymorphic", some generic type not known to be unboxed
`s` = "stack decode", some input parameter requiring access to the runtime stack to be decoded
`z` = laZy, a result type for which the decompiled form has to be recorded with each operation, as opposed to being derived from a Value.

`p` is used when a function accepts a an `Env => Stream` that will not be consumed
`s` is used when a function accepts a `Stream` (no `Env`) that will be consumed
`z` is used when a function returns a `Stream`

add pretty printing for `Tuple` and `Sequence`
2018-07-04 21:32:56 -04:00
Arya Irani
724e93e1c8 boost HOF stack size and un-minify stream test 2018-06-29 18:44:57 -04:00
Arya Irani
593c7a6631 testing up the tests 2018-06-29 17:57:58 -04:00
Arya Irani
1d0f546a53 comments 2018-06-29 17:09:51 -04:00
Arya Irani
21935173d3 runtime FileCompilationTests 2018-06-29 15:42:59 -04:00