Commit Graph

235 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
203078c0fd Merge remote-tracking branch 'origin/trunk' into feature/2112 2021-07-13 22:00:20 -04:00
Paul Chiusano
860c2f9a58 generating names of docs to load / eval 2021-07-12 15:46:06 -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
Paul Chiusano
0010b6b585 Avoid calling mapRan and doing relation building on each call to fuzzy find 2021-07-06 18:18:43 -04:00
Dan Doel
370e7529fe Remove polarity info from existential variables
- It ended up not being used
2021-06-28 14:34:06 -04:00
Dan Doel
7c4dda9aea Merge branch 'trunk' into topic/abilities-fixes 2021-06-07 15:15:48 -04:00
Paul Chiusano
6bc2796a96 Default to optimized = true 2021-06-03 11:23:51 -05:00
Arya Irani
a166d718c0 remove redundant stuff 2021-05-10 20:48:56 -06:00
Arya Irani
5e7b4aa08e
Write out the Ord instance
Co-authored-by: Paul Chiusano <paul.chiusano@gmail.com>
2021-05-10 20:43:00 -06:00
Arya Irani
c267f27af3 easy peasy. fixes #1926 2021-05-10 19:50:45 -06:00
Arya Irani
c9e5650a55 upgrading stack from 2.5.1 to 2.7.1
caused some minor hpack output diffs
2021-05-10 09:09:33 -06:00
mergify[bot]
98f2ed3b74
Merge pull request #1895 from unisonweb/wip/codebase2-cleanup
v2 (sqlite) codebase format
2021-05-07 06:07:51 +00:00
Dan Doel
ebe4943152 Fix some possible variable capture problems
- Unison.ABT.changeVars is not capture avoiding substitution, but was
  being used as such.
- Sequence pattern compilation needs to make up variables sometimes, and
  it may not have been avoiding all possible conflicts.
2021-05-05 13:36:32 -04:00
Arya Irani
509cc78a1a Merge remote-tracking branch 'origin/trunk' into wip/codebase2-cleanup
# Conflicts:
#	parser-typechecker/unison-parser-typechecker.cabal
2021-04-28 03:53:08 -06:00
Paul Chiusano
d730346893
Merge pull request #1887 from unisonweb/topic/docs-command-fix
Fix to anonymous doc name selection
2021-04-26 11:19:33 -05:00
Mitchell Rosen
f4e353f925 ⅄ trunk → codebase2-merge-trunk 2021-04-25 20:46:03 -04:00
Paul Chiusano
f587657adf Fix to anonymous doc name selection
Also allow docs command to use suffixed names from the latest file
2021-04-23 13:48:27 -05:00
Dan Doel
24a6e926c7 Eliminate context-based ability checking
- Keeping track of abilities in the context allowed them to escape the
  variable scoping rules necessary in the context. This would lead to
  tryinig to unify types that aren't valid in the context.
- Instead, this patch threads the wanted abilities through the
  synthesis and checking procedures, so that they can be pruned as
  needed when variables go out of scope. Due to the way abilities can be
  elided, even checking a type against a term may need to synthesize the
  abilities needed in that term.
- The type checker has been refactored quite a bit as part of this
  rework, mainly trying to eliminate large functions nested inside a
  where clause.
- Some tests/transcript still do not work. Most of them seem to be error
  message related, with only a few errors related to tricky type
  checking cases.
2021-04-21 15:37:33 -04:00
Rúnar
64deff76c5 revert some useless changes 2021-04-15 14:25:46 -04:00
Rúnar
fb97726ddb Add generated cabal files 2021-04-15 13:22:30 -04:00
Rúnar
b437e09a53 Merge branch 'trunk' of github.com:unisonweb/unison into topic/fzf-endpoint 2021-04-15 10:41:55 -04:00
Rúnar
42a13baebb Add best names and type definitions to fzf 2021-04-12 15:00:44 -04:00
Paul Chiusano
acca802f4e Including source
Still needs pretty-printer support, and the display is getting mangled somehow
2021-04-07 14:12:33 -05:00
Paul Chiusano
3337b3d7d8 Various rendering and pretty-printing fixes 2021-04-07 13:20:55 -05:00
Paul Chiusano
27de53e1ec Merge remote-tracking branch 'origin/trunk' into topic/doc2a 2021-04-06 21:21:04 -05:00
Arya Irani
10d506208b Merge branch 'trunk' into wip/codebase2
# Conflicts:
#	parser-typechecker/package.yaml
#	parser-typechecker/src/Unison/Codebase/FileCodebase.hs
#	parser-typechecker/transcripts/Transcripts.hs
#	parser-typechecker/unison-parser-typechecker.cabal
#	stack.yaml
#	unison-core/unison-core1.cabal
2021-04-06 16:23:45 -06:00
Paul Chiusano
46d5a94bc7 Doc2 prettyprinting WIP 2021-04-06 14:18:37 -05:00
Paul Chiusano
6aad4e79d4 Moar doc pretty printing helpers 2021-04-06 10:54:45 -05:00
Arya Irani
aa1628844f update copyright(?) and tweak flags 2021-04-05 12:04:35 -06:00
Arya Irani
6791242ae1 use hpack package.yaml to generate .cabal files 2021-04-05 10:05:48 -06:00
Paul Chiusano
97a3d51756 Fix misc doc rendering issues 2021-04-05 09:25:45 -05:00
Paul Chiusano
270fc5cb69 Sometime compiles for the docs command (untested) 2021-03-29 16:11:20 -05:00
Paul Chiusano
764fa2f17d Display now takes a term rather than a referent, to support displaying terms from the file 2021-03-25 20:21:42 -05:00
Paul Chiusano
8813da9369 DisplayValues works with unannotated terms now
This is prep for allowing the cache used by display to work with whole terms rather than just references
2021-03-25 16:27:41 -05:00
Rúnar
f097a24803 Sort correctly 2021-03-23 12:20:10 -04:00
Rúnar
66872fbcd6 Fuzzyfind endpoint 2021-03-23 01:05:33 -04:00
Arya Irani
1225e1ecc5 finished? 2021-03-22 16:30:37 -04:00
Arya Irani
281a657166 wip v1 > v2 conversion 2021-03-22 16:03:30 -04:00
Arya Irani
eebd3b8b6a wip v1 > v2 conversion 2021-03-19 14:36:32 -04:00
Paul Chiusano
42bc5d55aa Merge remote-tracking branch 'origin/trunk' into topic/doc2 2021-03-15 15:34:58 -05:00
Arya Irani
d1ddcfef45 Merge remote-tracking branch 'origin/trunk' into wip/codebase2
# Conflicts:
#	parser-typechecker/src/Unison/Codebase.hs
#	parser-typechecker/src/Unison/Codebase/Branch.hs
#	parser-typechecker/src/Unison/Codebase/Editor/HandleCommand.hs
#	parser-typechecker/tests/Unison/Test/ANF.hs
#	parser-typechecker/unison-parser-typechecker.cabal
#	parser-typechecker/unison/Main.hs
#	stack.yaml
2021-03-10 13:57:04 -05:00
Arya Irani
28f48be943 split out git-specific vs filecodebase-specific git code
also MonadIO'ed stuff
2021-03-09 11:48:58 -05:00
Paul Chiusano
f941687229
Merge pull request #1827 from nini-faroux/seq-list 2021-03-06 06:51:38 -06:00
Ian Grant Jeffries
7ee453af18 Add some Haddocks for key declarations 2021-03-04 18:14:23 -05:00
ninifaroux
f4b8e87258 add consistent list naming 2021-03-03 19:19:47 +00:00
Paul Chiusano
8465458625 sync with trunk 2021-03-02 10:20:28 -06:00
runarorama
dcc8954fe5 Revert Referent data constructors 2021-02-24 22:58:22 -05:00
Dan Doel
e25c6ea34a Merge branch 'trunk' into topic/abilities-fixes 2021-02-23 14:29:29 -05:00
Arya Irani
11a9d60515 term1to2 was encoding Term.Request as Constructor 2021-02-12 15:27:37 -05:00