Commit Graph

126 Commits

Author SHA1 Message Date
Chris Penner
3e87dc3854 Fix unused-binding-detection in case patterns 2024-08-02 10:57:16 -07:00
Greg Pfeil
b1cf12330a
Split TranscriptParser into three modules
- `Transcript` – the data model
- `Transcript.Parser` – the parser and printer
- `Transcript.Runner` – the runner

There is unfortunately still some printing tightly coupled to the
runner, but this makes it more obvious. Also, the runner is the only
component tied to the CLI.
2024-07-16 19:35:02 -06:00
Greg Pfeil
00f6c8c954
Refactoring TranscriptParser
A bunch of small changes in TranscriptParser

- remove dead code
- don’t use `Show` for formatted output
- put processed blocks in a separate sum type from unprocessed blocks
- remove `Transcript` from identifiers (changed importers to use
 `qualified as Transcript`)
- deduplicated some error reporting

And one happy fix, IMO – got rid of the `Text.init` that plagued me in
2024-07-16 19:31:01 -06:00
Chris Penner
11208f5284 Add unused binding test 2024-07-12 14:48:18 -07:00
Chris Penner
09ecc74ce0 Fix test build 2024-07-10 09:52:23 -07:00
Chris Penner
951f31867d preload branches into the branch cache when switching projects 2024-07-09 15:54:22 -07:00
Chris Penner
927b76bd59 Get tests building again. 2024-07-05 18:02:05 -07:00
Greg Pfeil
5a7e001d7c
Merge remote-tracking branch 'upstream/trunk' into restrict-NameSegment 2024-05-31 15:43:27 -06:00
Greg Pfeil
78816fdc3a
Remove Reference from StructuredArgument
Almost everywhere we produce a `Reference` for numbered args, we also have a
`HashQualified Name` handy, which is much more consumable by commands.

The only case we don’t have an `HQ` is in the `todo` command output, so that now explicitly builds
a `HQ.HashOnly`.

This also fixes an issue with `StructuredArgument` handling where `alias.term`
and `alias.type` wouldn’t make an alias to a `HQ.HashOnly` `StructuredArgument`.

Fixes #4898.
2024-05-29 17:11:05 -06:00
Greg Pfeil
e9d2a21d8a
Merge remote-tracking branch 'upstream/trunk' into structured-numbered-args 2024-05-29 16:28:32 -06:00
Chris Penner
1f90eb365e Clean up tests and transcripts 2024-05-28 10:16:43 -07:00
Chris Penner
1b5c93da11 remove git push/pull 2024-05-28 10:09:52 -07:00
Greg Pfeil
b9c62164f8
Restrict NameSegment operations
With `OverloadedStrings` enabled globally and an `IsString` instance, the
`newtype` was rendered useless.

This extracts the `NameSegment` constructor/eliminator to a `.Internal` module,
has `Unison.NameSegment` only re-export the type, and moves the `*Segment`
members to `Unison.Syntax.NameSegment`.

This forces cascading changes, including eliminating a bunch of magic literals
scattered throughout the code.
2024-05-24 15:50:17 -06:00
Greg Pfeil
9d5ee42094
Merge remote-tracking branch 'upstream/trunk' into structured-numbered-args 2024-05-22 23:12:37 -06:00
Greg Pfeil
e250d05980
Maintain NumberedArgs as structured data
This is the first step toward avoiding printing/parsing the values provided via
`NumberedArgs`. It simply adds a new sum type to hold all of the types that can
be in numbered args and stores it alongside the `Text` representation.

It currently gets discarded when we actually expand the arguments.
2024-05-22 17:50:51 -06:00
Mitchell Rosen
5cd8904247 fix compiler errors in test suites 2024-05-01 10:24:32 -04:00
Dan Doel
9905eb829f Fix ucm tests w/r/t/ previous additions 2024-02-12 11:28:20 -05:00
Chris Penner
4fe7fb1c6b Don't replace numbered args list with an empty one. 2024-01-10 11:12:37 -08:00
Mitchell Rosen
b7d43cf40f remove a bunch of metadata-related code 2024-01-03 20:44:55 -05:00
Mitchell Rosen
8e97fc693d allow pulling <project>/releases/latest 2023-08-29 00:34:42 -04:00
Mitchell Rosen
e02b7672bd fix lsp test 2023-07-18 14:07:33 -04:00
Mitchell Rosen
5443781e7c finish tying together unique type guid reuse 2023-07-18 12:59:37 -04:00
Mitchell Rosen
607e152aa3 add uniqueTypeGuid stub to parsing env 2023-07-18 11:18:54 -04:00
Mitchell Rosen
5ae45600c2 add monad type variable to ParsingEnv 2023-07-17 15:31:20 -04:00
Mitchell Rosen
2d677d0ba3 fix compilation errors in tests 2023-07-17 13:53:41 -04:00
Mitchell Rosen
ac8b4c08dd push ShouldUseTndr down into FileParsers 2023-07-13 12:08:16 -04:00
Mitchell Rosen
3ed4eff29c don't export typecheckFileWithoutTNDR either 2023-07-12 17:09:38 -04:00
Mitchell Rosen
b894375345 remove typecheckFileWithTNDR in favor of computeTypecheckingEnvironment 2023-07-12 17:04:04 -04:00
Mitchell Rosen
01dfa75c0c remove typecheck function 2023-07-11 16:07:20 -04:00
Mitchell Rosen
e7535ab704 ⅄ trunk → 23-06-26-reuse-unique-type-guids 2023-07-11 14:43:56 -04:00
Arya Irani
67e237450d
Merge pull request #3881 from unisonweb/lsp/binding-annotations 2023-07-07 12:22:17 -04:00
Chris Penner
1317020a57 Fix transcript in tests 2023-07-05 13:09:34 -06:00
Chris Penner
f51840e6fd Merge remote-tracking branch 'origin/trunk' into lsp/binding-annotations 2023-07-05 10:57:10 -06:00
Mitchell Rosen
8456196e7b delete typecheck, rename typecheckHelper to typecheck 2023-06-29 15:18:07 -04:00
Mitchell Rosen
c38a6e3a48 fix tests 2023-06-23 17:26:23 -04:00
Mitchell Rosen
fba25430d0 delete all code related to downloading base on startup 2023-06-23 14:36:58 -04:00
Chris Penner
fd104bde54 Add dummy file annotations in tests 2023-06-23 10:24:06 -06:00
Mitchell Rosen
b5702b9f88 ormolu the world 2023-05-25 15:02:20 -04:00
Mitchell Rosen
7473fdacc8 fix parsing of write-repo git(...) 2023-04-24 14:30:59 -04:00
Mitchell Rosen
373a24f2ae delete weird right bracket from test 2023-03-30 09:29:01 -04:00
Mitchell Rosen
615cecb732 fix remote repo parser 2023-03-30 08:28:54 -04:00
Chris Penner
02095670c3 Merge remote-tracking branch 'origin/trunk' into topic/projects 2023-03-29 14:19:06 -06:00
Mitchell Rosen
2ab431ce38 more refining names of remote repo types 2023-03-16 16:20:25 -04:00
Travis Staton
184e47f447
make pattern match complete in LSP test 2023-02-28 09:56:53 -05:00
Paul Chiusano
88ef0a8d37 Ormolu-ify the codebase and update development.markdown docs 2023-02-13 13:03:08 -06:00
Chris Penner
c2c70b0819 Merge remote-tracking branch 'origin/trunk' into cp/hover-fix 2023-02-03 09:05:00 -06:00
Chris Penner
4f817610d6
Work-around for Effect annotations bug. (#3789)
* Failing effect list annotation tests

* Workaround for incorrect effect issues
2023-02-03 09:03:44 -06:00
Chris Penner
84183cd146 Merge branch 'cp/effect-anns-2' into cp/hover-experiments-2 2023-02-02 13:34:52 -06:00
Chris Penner
53dfe47599 Fix remainder of destructuring binding problems! 2023-02-02 11:29:58 -06:00
Chris Penner
71f104a1f4 Add support and tests for pattern nodes 2023-02-02 10:45:51 -06:00