rlmark
ac2bc29849
fixes tests and transcripts
2021-08-24 11:33:27 -07:00
Dan Doel
fc5b8b86ef
Disallow floating point patterns, with an informative error
2021-08-05 18:00:50 -04:00
Paul Chiusano
168afdc0ee
update pretty-printer to use multi-guard syntax and improve tests
2021-07-20 00:45:03 -04:00
Paul Chiusano
f31f89085e
make AbsN a complete pattern
2021-07-20 00:44:26 -04:00
Paul Chiusano
eb489a2bca
Allow multiple guards to be attached to a case in the parser
2021-07-19 17:56:36 -04:00
Paul Chiusano
4418667b79
Merge pull request #1780 from unisonweb/topic/abilities-fixes
...
New ability inference algorithm that better handles recursive functions
2021-06-29 16:22:21 -04:00
Dan Doel
66ecee2e55
Add a signature to a test that now requires it
2021-06-28 11:42:02 -04:00
Dan Doel
2e84249fef
Fix EQLF and LEQF implementations
...
They were writing back 0.0 and 1.0 to the stack as boolean proxies,
rather than integer 0 and 1.
2021-06-21 12:59:34 -04:00
Dan Doel
994f38d10b
Add tests
2021-06-11 14:18:00 -04:00
Dan Doel
7c4dda9aea
Merge branch 'trunk' into topic/abilities-fixes
2021-06-07 15:15:48 -04:00
Dan Doel
5915f7c8b8
Tweak stream.u type signatures
...
- The definitions in this file used a combination of signatures that was
very hard to make work, with no annotations on some functions, and
annotations with unnecessarily general rows in others.
- The checking could possibly be made better, but in an effort to keep
things from getting too complicated for now, just tweak the type
signatures.
2021-06-07 11:26:05 -04:00
Dan Doel
4a31323811
Add some matching tests
2021-05-12 11:35:33 -04:00
Dan Doel
112cdb4de7
Add a test case for the as patter mixup
2021-05-05 16:10:36 -04:00
Hans Schuster
3ee004bd72
Allow redundant commas in lists
...
Allows multiple commas leading, trailing and between elements (Issue 1841)
2021-03-24 19:35:12 +01:00
Dan Doel
e25c6ea34a
Merge branch 'trunk' into topic/abilities-fixes
2021-02-23 14:29:29 -05:00
Dan Doel
5878c61410
Fix a corner case in abilityCheck'
2021-02-17 15:50:33 -05:00
Dan Doel
86fdd87eb3
More matching in the pattern-matching test
2021-02-10 16:07:57 -05:00
Paul Chiusano
84e10dd436
Merge remote-tracking branch 'origin/trunk' into topic/abilities-fixes
...
# Conflicts:
# parser-typechecker/src/Unison/Typechecker/Context.hs
2021-01-04 14:20:19 -05:00
Dan Doel
4632c10791
Add a test case
2020-12-09 11:06:22 -05:00
Paul Chiusano
e784107d64
Implement fix. There were lots of tests that were inadvertently relying on the bug.
2020-10-22 22:33:12 -04:00
Rúnar
8c1c57e195
Merge pull request #1732 from unisonweb/fix/1578
...
Allow suffix-based name resolution to refer to definitions in the current file
2020-10-21 20:21:57 -04:00
Dan Doel
6f8a365695
Add a small test case for proper handler floating
2020-10-21 11:05:12 -04:00
Paul Chiusano
608ad4830c
fix unit tests and regenerate transcripts
...
I was puzzled about the change to the blocks.md transcript at first. What's happening: the previous version of the transcript was going through TDNR, and was failing the cycle check for mutually recursive lambdas. The new version isn't going through TDNR at all, it's just doing ordinary typechecking of a cycle, and cycles don't have access to any abilities so it's failing with the expected error now. Arguably, the example should have used the FQN so TDNR wasn't involved in the previous example.
2020-10-20 18:26:46 -04:00
Paul Chiusano
333b040c09
fixup tests to not use namespace blocks
2020-09-27 20:39:26 -04:00
Paul Chiusano
289fc3e175
Merge remote-tracking branch 'origin/trunk' into topic/abilities-fixes
2020-09-22 17:13:52 -04:00
Paul Chiusano
5404bda421
Merge pull request #1662 from unisonweb/fix/1613
...
Fix issue #1613
2020-09-09 14:54:31 -04:00
Dan Doel
87cd27062a
Add to abilities.u test case
...
- Multiple abilities handled at once, as well as no abilities
- New runtime fails one of the cases. Looking into it.
2020-09-04 12:06:23 -04:00
Dan Doel
a5f96edba6
Make Int.leading/trailingZeros actually yield Nat
...
- Fix expected test output for proper implementation
2020-08-24 16:51:19 -04:00
Paul Chiusano
fae001df80
Fix #1640 and also fix unreported pattern parsing bug and add test for it
...
Issue was actually in the parser. A pattern like `Foo Bar a b c` was being parsed as `Foo (Bar a b c)`. The pattern parser just needed to be factored a bit differently to fix.
2020-07-29 10:15:06 -04:00
Paul Chiusano
6db10fdf99
Add failing test
2020-07-29 09:31:38 -04:00
Paul Chiusano
6292cc6a1f
Add failing test which should start passing once we hook up the fix
2020-05-12 07:38:38 -04:00
Stew O'Connor
c799ca25d4
additional bitwise operations for Int, Nat
...
This adds a few bitwise operations to both Int and Nat:
and or xor compliment leadingZeros trailingZeros.
2020-04-22 14:43:13 -07:00
Stew O'Connor
4e06966fde
Changes suggested by Paul
...
* exponents are all typed as Nat instead of Int
* renamme <<, >> to shiftLeft, shiftRight
* add Nat.{pow,shiftRight,shiftLeft}
* add source tests for Int / Nat
(Thanks @pchiusano!)
2020-04-14 14:16:30 -07:00
Aaron Novstrup
30c22c484a
fix stray handle .. in
instances in unison-src
2020-02-21 17:05:18 -08:00
Aaron Novstrup
5a841f30f5
fix stray case .. of
instances and opportunities for cases
in unison-src
2020-02-21 17:05:18 -08:00
Aaron Novstrup
93b0d2a353
replace case .. of
syntax with match .. with
2020-02-07 18:59:37 -08:00
pete-ts
36ec976511
addresses the typo in 'delimiter'
2020-02-02 11:20:20 +00:00
Aaron Novstrup
ec87a60254
fix pretty-printing of handle blocks and fix tests broken by handle-with syntax
2020-01-18 00:49:15 -08:00
Paul Chiusano
a10f540975
tweak to orderedComponents implementation
2019-12-11 14:07:08 -05:00
Noah Haasis
eb1ff619ee
Add implementation for Nat.toFloat
2019-12-02 14:48:08 +00:00
Paul Chiusano
d6b903cdca
hook up suffix-based resolution to the parser + add test case for it
2019-11-11 16:33:31 -08:00
Paul Chiusano
41ef402e4f
Added test case
2019-10-28 21:18:17 -04:00
Noah Haasis
dcbf1dee25
Allow boolean operators to be used in sequence
2019-10-27 10:47:49 +00:00
Paul Chiusano
b28fad6172
Merge pull request #883 from noahhaasis/char-comparison
...
Implement ordering for char literals (fix #850 )
2019-10-21 13:45:31 -04:00
Noah Haasis
c6c8c46798
test char comparison
2019-10-21 17:06:07 +00:00
Paul Chiusano
130519b258
Merge pull request #880 from noahhaasis/infix-boolean-operators
...
Infix boolean operators (Fix #530 )
2019-10-21 11:32:32 -04:00
Noah Haasis
f312f8fc62
Update tests to use infix boolean operators and backtrack on failure
2019-10-20 14:16:33 +00:00
George Marrows
8abeb68331
Add Char test to literals.u
2019-10-20 15:16:58 +03:00
Noah Haasis
b12f3e9f77
Allow boolean operators in pattern guards
2019-10-19 13:53:44 +00:00
Arya Irani
a570e63baf
fix #868 , #870
2019-10-16 15:23:16 -04:00