Commit Graph

7787 Commits

Author SHA1 Message Date
Arya Irani
2f13ea1f84 stripping and unknotting some stuff
- moved everything that depended on V1 `Reference` into `FileCodebase` namespace, duplicating a lot of code for better or worse.
- pulled these into their own modules:
    - Codebase (types) into `Codebase.Type`; `Codebase` module re-exports them
    - `Codebase.Branch.Merge`,
    - `Codebase.Branch.Names` (Branch shouldn't depend on `Names`)
    - `Codebase.BuiltinAnnotation`
    - `Codebase.Causal.FoldHistory`
    - `Codebase.CodeLookup.Util` (remove `CodeLookup` dependency on `UnisonFile`)
    - `Codebase.DataDeclaration.ConstructorId` trying to use this alias in relevant places
    - `Codebase.Init`
    - `CodebasePath`, the `FilePath` alias.
    - `Lexer.Pos` (because `AnnotatedText`, `Range`, `Parser.Ann` shouldn't depend on the whole lexer)
    - `Names.ResolutionResult` (`Type` shouldn't depend on `Names`)
    - `PrettyPrintEnv.FQN`
    - `PrettyPrintEnv.Names` (pulled out references to `Names` from `PPE`)
    - `PPE.Util` not 100% sure what's happening here
    - `PrettyPrintEnvDecl` pull this data type and supporting functions into separate module
    - `Path.Parse` (`Path` shouldn't depend on the lexer)
    - `Path.Convert`, `Path.Parse` into `Unison.Util.Convert`
    - `Parser.Ann` (`Codebase`, etc. etc. shouldn't depend on `Parser`)
    - `Referent'` (`SyntaxText`/`ColorText` shouldn't depend on `Reference`)
        - `Referent` module re-exports stuff from `Referent'`, hard-coded to `Reference`.
    - removed `SyntaxText.SyntaxText`
    - `TermEdit.Typing` (because `TermEdit` shouldn't depend on the full typechecker)
    - `UnisonFile` / `TypecheckedUnisonFile` (types into `UnisonFile.Type`)
    - `UnisonFile.Env`
    - `UnisonFile.Error`
    - `UnisonFile.Names`
    - `Var.WatchKind`
    - `Var.refNamed`
- Deleted unused `Codebase.Classes` typeclasses wip
- Deleted unused `Unison.Util.Menu`, ancient modal stuff
- Moved `Codebase.makeSelfContained` into `UnisonFile` module, since it deals with `UnisonFile` and not with `Codebase`.
- split up `GitError` into a more codebase-agnostic hierarchy (see `Codebase.Type.GitError`)
- changed `bindNames` to `bindReferences` in some cases; `bindNames` remains in `.Names` compatibility module
- move `Unison.Var.refNamed` into `Unison.Term`
- tweaked GitError to separate obviously codebase-format specific errors from non-obviously-corbase-format-specific errors.
- tweaked `Reflog.Entry` to support anything that's coercible to `Unison.Hash`, but also changed its kind
- removed `DebugBranchHistoryI` input because I didn't want to maintain its implementation
- removed `ShortBranchHash` dependency on `Hash`, and let it work on anything coercible to `Hash`.  P.S./todo This class should be called ShortHash; the existing ShortHash is really a ShortReference!
- removed SyntaxText dependency on Reference
- cleaned up `Path` somewhat
- held off on:
    - move `DD.updateDependencies`
    - splitting up `Path` into the billion different components
        - e.g. `Path` becomes `RelativePath`, `Path'` becomes `Path`, and `Absolute` wraps `RelativePath`
        - `Split` / `Split'` maybe rename to `Path.NonEmpty`?
    - rename `Branch.getPatch` / `.getMaybePatch`
    - split out `Name.Parse`, `Name.Convert`, substitute a lot of specific functions like `Path.hqSplitFromName'` with `Convert.parse`.
- todo:
    - clear unreferenced junk
    - restore:
        - `NameEdit`?
        - `PatternCompat`?
2021-08-30 12:17:26 -04:00
Paul Chiusano
18599ba54c
Merge pull request #2246 from unisonweb/topic/remoterepo-revamp
finer-grained types for `RemoteRepo`
2021-07-16 23:01:26 -04:00
Arya Irani
79e12c222e finer-grained types for RemoteRepo
motivation: you can read from any "write" uri, but not write to any "read" uri (it may contain a read-only hash)

eliminates a lot of error code, but adds a lot of discrimination code
2021-07-16 15:12:26 -07:00
Paul Chiusano
19125d7c2f
Merge pull request #2240 from unisonweb/fix/2238
Don't allow docEval and docEvalInline to use other abilities
2021-07-16 13:17:21 -04:00
Paul Chiusano
e190567d8f update the second example in the transcript to fail for the right reasons 2021-07-16 12:20:46 -04:00
Paul Chiusano
a8d76dc2d5 Update pretty-printer to detect use of old functions 2021-07-16 12:13:01 -04:00
Paul Chiusano
4fe34d4001 Fix, transcript now passes 2021-07-16 11:57:05 -04:00
Paul Chiusano
7365c5aa79 added failing regression test 2021-07-16 11:46:13 -04:00
Arya Irani
52561397d1
Merge pull request #2217 from unisonweb/topic/redundant-package-dependencies
delete some unused package dependencies
2021-07-15 16:41:13 -07:00
mergify[bot]
ce3b0c0c18
Merge pull request #2116 from unisonweb/feature/2112
Add docs to `getDefinition` endpoint
2021-07-15 22:25:56 +00:00
Paul Chiusano
913a82abfc Merge remote-tracking branch 'origin/trunk' into feature/2112 2021-07-15 18:09:33 -04:00
Paul Chiusano
30ca0517c8 cleanup - didnt need MaybeT after all 2021-07-15 18:09:03 -04:00
mergify[bot]
c8a849707c
Merge pull request #2233 from unisonweb/topic/natdivmod
Test `Nat./` and `Nat.mod`
2021-07-15 15:33:16 +00:00
Rúnar
0b879846e2 Add a test 2021-07-15 11:02:49 -04:00
mergify[bot]
341ff8dede
Merge pull request #2226 from unisonweb/topic/natdivmod
Fix division and modulus for Nat
2021-07-15 14:44:42 +00:00
Rúnar
971c2abbba Fix division and modulus for Nat 2021-07-14 23:47:35 -04:00
Paul Chiusano
c7b67bd460
Merge pull request #2222 from unisonweb/topic/delete-codecs
delete `Codecs.hs`
2021-07-14 17:09:55 -04:00
Arya Irani
e567f2c113 close #2221 2021-07-13 22:10:25 -07:00
Paul Chiusano
1427a0f4ea fix bug due to not evaluating the doc first 2021-07-14 00:37:41 -04:00
Paul Chiusano
ffbfa7ba81 debugging 2021-07-14 00:21:38 -04:00
Paul Chiusano
fa88db9dda Cleanup and fill in todo 2021-07-13 23:58:05 -04:00
Paul Chiusano
9a1d3669d6 Fix incorrect comment 2021-07-13 22:58:58 -04:00
Paul Chiusano
59739c66e3 revert change to optimized flag, use stack build --fast if needed 2021-07-13 22:40:26 -04:00
Paul Chiusano
a2995c70dd refresh transcripts 2021-07-13 22:26:56 -04:00
Paul Chiusano
203078c0fd Merge remote-tracking branch 'origin/trunk' into feature/2112 2021-07-13 22:00:20 -04:00
Paul Chiusano
8967923713 It compiles!!! 2021-07-13 21:59:49 -04:00
Paul Chiusano
26031f5f14 checkpoint noncompiling trying to add extra field to BuiltinObject for type signature 2021-07-13 16:25:54 -04:00
Arya Irani
572b65dd90 delete some unused package dependencies 2021-07-13 09:39:20 -07:00
Paul Chiusano
27c383a6f5 filled in typeDeclHeader, in theory this has no remaining todos end-to-end 2021-07-13 11:39:14 -04:00
Paul Chiusano
b1bf9943e7 Plumb the runtime through to the codebase server, so it can evaluate expressions in docs
Have one remaining todo to fetch decl headers for search results
2021-07-13 11:23:03 -04:00
Paul Chiusano
787feb1639 Noncompiling inscrutable type error hell trying to get puzzle pieces to fit 2021-07-13 00:16:32 -04:00
Paul Chiusano
f7ea984479 Noncompiling wip of eval 2021-07-13 00:00:41 -04:00
Paul Chiusano
3a34bfae8f Convenience function for loading watches from regular or test watch 2021-07-13 00:00:16 -04:00
Paul Chiusano
977840e761 It typechecks!!! Ship it. 2021-07-12 23:45:29 -04:00
Paul Chiusano
a2dd77a550
Merge pull request #2197 from unisonweb/fix/abilities
Fix some ability checking regressions.
2021-07-12 21:34:33 -04:00
Paul Chiusano
860c2f9a58 generating names of docs to load / eval 2021-07-12 15:46:06 -04:00
mergify[bot]
cd77bcdfcd
Merge pull request #2191 from BlockScope/remove/namespace-files-2819
Delete 9 files with namespace blocks.
2021-07-12 18:57:06 +00:00
Dan Doel
99ff320820 Add tests 2021-07-12 10:45:07 -04:00
Arya Irani
e8dd1d5b7d
Merge pull request #2192 from unisonweb/topic/reference-complete
`{-#COMPLETE#-}` seems to have been fixed
2021-07-09 21:48:07 -07:00
Arya Irani
2c12f7b98c
suspect CI .stack-work caching issue 2021-07-09 23:35:27 -04:00
Arya Irani
68eae21813 {-#COMPLETE#-} seems to have been fixed
at some point between 8.4.3 and 8.10.4
2021-07-09 20:23:52 -07:00
Dan Doel
f5ce1c75d2 Propagate necessary existentials out of matches
- Match branches do some context manipulation which can cause
  existentials to be dropped from the context even though they are still
  necessary to make sense of the wanted abilities. This change re-adds
  those existentials to the context to ensure that the abilities remain
  sensical.
2021-07-09 17:34:17 -04:00
Phil de Joux
1b666516b7 Delete 9 files with namespace blocks, #2189. 2021-07-09 15:18:40 -04:00
Dan Doel
f5c454216a Sort before pruning abilities
- Handling concrete ability unification before variables seems more
  likely to produce good results, since the concrete ability equality is
  more restrictive about how variables must behave, and will narrow
  things down more.
2021-07-08 15:22:30 -04:00
mergify[bot]
4560abd271
Merge pull request #2182 from unisonweb/fix/value-loading
Fix bad calling convention for `Value.load`
2021-07-08 16:13:43 +00:00
Dan Doel
c1596f3e7f Add test to codeops.md 2021-07-08 11:51:10 -04:00
Dan Doel
de2b83eeb7 Made some FFI related code evaluate things more.
- Previously some foreign values were wrapped up as thunks, which moved
  around where runtime errors occured a bit.
2021-07-08 10:35:27 -04:00
Dan Doel
1c2cdd4a87 Fix an issue in the value loading code
- The code was calculating `Reference` values that are missing from the
  value that it tried to load, and was sending them back directly as
  term links. However, a term link is a `Referent`, and the reference
  must be wrapped in an additional constructor. Since things get
  coerced, this led to segfaults.
2021-07-08 10:33:32 -04:00
Paul Chiusano
a43378c5ca
Merge pull request #2178 from unisonweb/add-codebase-ui-readme-detail
Updating README.md with codebase-ui details for developers who build from source
2021-07-08 10:29:37 -04:00
Rúnar
f1e5a630a8
Merge pull request #2179 from unisonweb/fix/faster-fzf
Avoid rebuilding term and type relations on each call to fuzzy find
2021-07-08 09:54:12 -04:00