Commit Graph

16942 Commits

Author SHA1 Message Date
Rúnar
8a70414fdf More parens around do blocks 2024-08-23 19:17:24 -04:00
Rúnar
eefacbf48b Remove comments 2024-08-23 15:51:26 -04:00
Rúnar
c8414eb9ce Simpler infix printer 2024-08-21 00:39:07 -04:00
Rúnar
da75484dd2 Merge branch 'trunk' of https://github.com/unisonweb/unison into precedence 2024-08-20 14:44:53 -04:00
Rúnar
4c166f05d3 Add exponentiation operators 2024-08-20 13:58:50 -04:00
Rúnar
3e40cb174f Add roundtrip tests 2024-08-20 08:47:17 -04:00
Rúnar
b64ac8be62 Get rid of commented-out code 2024-08-20 08:34:42 -04:00
Rúnar
f48880ff42 More parens for do blocks 2024-08-20 08:29:53 -04:00
Arya Irani
e388786b48
Merge pull request #5282 from sellout/fix-blank-identifiers
Change handling of “blank” identifiers
2024-08-18 17:06:22 -04:00
Arya Irani
1c5a4e6c67
Merge pull request #5285 from unisonweb/24-08-15-namespace-directive
feat: namespace directive
2024-08-18 12:30:15 -04:00
Rúnar
3e896408e9 transcripts 2024-08-17 22:03:57 -04:00
Rúnar
29981373ee Transcripts 2024-08-17 22:02:41 -04:00
Rúnar
1470085d3f Get rid of confusing precedence levels 2024-08-16 23:44:19 -04:00
Mitchell Rosen
df2c76aa42 rerun generic-parse-errors transcript 2024-08-16 15:25:59 -04:00
Mitchell Rosen
2f82c7eb85 fix file ordering 2024-08-16 15:19:36 -04:00
Mitchell Rosen
699a16acdd move a binding 2024-08-16 15:07:32 -04:00
Mitchell Rosen
7b3b65f55e implement namespace directive 2024-08-16 15:06:34 -04:00
Rúnar
d43288a1e2 Adapt old infix printer to new rules 2024-08-16 13:10:45 -04:00
Greg Pfeil
eff07ae662
Improve the Show (BlockTree a) instance
This makes it much easier to read the output when debugging the lexer.
And it should be `Read`-compatible..

There’s still room for improvement, though:
```haskell
Block (Open "scratch.u")
  [
    [
      Leaf (WordyId (NameOnly (Name Relative (NameSegment {toUnescapedText = "dontMap"} :| [])))),
      Leaf (WordyId (NameOnly (Name Relative (NameSegment {toUnescapedText = "f"} :| [])))),
      Block (Open "=")
        [
          [
            Block (Open "cases")
              [
                [
                  Leaf (WordyId (NameOnly (Name Relative (NameSegment {toUnescapedText = "None"} :| [])))),
                  Block (Open "->")
                    [
                      [
                        Leaf (Reserved "false"),
                      ],
                    ]
                    (Just Close),
                  Leaf (Semi True),
                ],
                [
                  Leaf (WordyId (NameOnly (Name Relative (NameSegment {toUnescapedText = "Some"} :| [])))),
                  Leaf (WordyId (NameOnly (Name Relative (NameSegment {toUnescapedText = "_unused"} :| [])))),
                  Block (Open "->")
                    [
                      [
                        Leaf (WordyId (NameOnly (Name Relative (NameSegment {toUnescapedText = "f"} :| [])))),
                        Leaf (Numeric "2"),
                      ],
                    ]
                    (Just Close),
                ],
              ]
              (Just Close),
          ],
        ]
        (Just Close),
    ],
  ]
  (Just Close)
```
2024-08-16 08:27:36 -06:00
Greg Pfeil
ebda5ae6e3
Change handling of “blank” identifiers
Previously, they were tokenized separately from other identifiers, but
then most handling checked both tokens anyway. This now always parses
“blanks” as normal identifiers and checks their blankness at the few
places we care about it.

There were two places that treated `Blank` differently than `WordyId`,
and those are preserved. There were also two places where `Blank ""`
(`_`) was treated differently than `Blank n` (`_withSomeSuffix`), and
those have been eliminated.

Fixes #2822.
2024-08-16 08:27:36 -06:00
Greg Pfeil
50429143d1
Add a failing transcript for #2822 2024-08-15 18:48:23 -06:00
Rúnar
725ee3b6d5 Modify infix printer 2024-08-15 14:59:44 -04:00
Arya Irani
f2adc77e39
Merge pull request #5277 from unisonweb/24-08-13-merge-tweaks 2024-08-13 15:50:48 -04:00
Mitchell Rosen
cc48213b1b distinguish between type and term dependencies in UF.dependencies 2024-08-13 14:05:22 -04:00
mitchellwrosen
6325d4586b automatically run ormolu 2024-08-13 16:47:27 +00:00
Mitchell Rosen
28543adcdd reuse unique type guids in merge after all 2024-08-13 12:46:42 -04:00
Mitchell Rosen
4c30192553 inline Mergeblob2.conflictsNames and Mergeblob2.conflictsIds 2024-08-13 12:11:32 -04:00
Mitchell Rosen
7b315c3b34 delete unused Mergeblob2.lcaDeclNameLookup field 2024-08-13 12:05:52 -04:00
Arya Irani
e0b35f51a8
Merge pull request #5259 from unisonweb/24-08-01-merge-api 2024-08-13 11:33:27 -04:00
Arya Irani
ed555a3ea1 Merge branch 'trunk' into 24-08-01-merge-api 2024-08-13 10:50:02 -04:00
Rúnar
b92dede21a Improve comments 2024-08-13 00:29:32 -04:00
Rúnar
8736c4ab49 Comments 2024-08-13 00:24:25 -04:00
Rúnar
7012cc4ba1 Proper algorithm for reassociation 2024-08-13 00:03:14 -04:00
Arya Irani
2187b2e4e8
Merge pull request #5275 from unisonweb/cp/fix-reflog-sorting 2024-08-12 12:51:52 -04:00
Chris Penner
fce96a5401 Fix non-deterministic sorting of rows in transcripts 2024-08-12 09:12:35 -07:00
Rúnar
8efd8d5cb9 Add comments 2024-08-10 22:45:19 -04:00
Rúnar
9d4e2ebe25 Cleanup 2024-08-10 22:38:48 -04:00
Rúnar
24b5aa5513 Added precedence rules to term parser 2024-08-10 22:29:59 -04:00
Arya Irani
d5d9d9d9ab
Merge pull request #5270 from unisonweb/arya/fix-3424 2024-08-10 00:37:32 -04:00
Arya Irani
c4f8ffcf39 clear latestTypecheckedFile on update
fixes #3424
2024-08-09 15:50:38 -04:00
Arya Irani
01cae7efdb failing transcript 2024-08-09 15:44:35 -04:00
Arya Irani
096aeea2b9
Merge pull request #5269 from unisonweb/cp/restrict-annotation-changes-in-diffs 2024-08-09 14:57:41 -04:00
Chris Penner
c341cc431e Add regression test 2024-08-09 10:58:47 -07:00
Mitchell Rosen
1741ffbbd6 ⅄ trunk → 24-08-01-merge-api 2024-08-08 14:55:17 -04:00
Chris Penner
bcf0ff68f4 Only emit annotation changes if it's a hash change 2024-08-08 11:34:33 -07:00
Mitchell Rosen
0d560d209a delete unused import 2024-08-08 13:34:18 -04:00
Mitchell Rosen
c230be29aa move more code around 2024-08-08 12:19:53 -04:00
Mitchell Rosen
a40bfd64ad move the rest of the mergeblobs over 2024-08-08 11:57:14 -04:00
mitchellwrosen
2b33116163 automatically run ormolu 2024-08-08 15:51:13 +00:00
Mitchell Rosen
3b37c4b349 move some of the mergeblob API over to unison-merge 2024-08-08 11:50:26 -04:00