Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
fd166b4
Add a transcript testing the behaivour of `todo` and `bug`
noahhaasis Nov 9, 2019
98d4f50
Move TypeVar to Typechecker. Make Term and Type not depend on TypeVar.
TomasMikula Sep 6, 2019
408f4ca
#936 pretty-print doc literals - done, with some snags remaining
atacratic Nov 24, 2019
a4c6dde
Merge branch 'master' into topic/docs-936-pretty-literals
atacratic Nov 24, 2019
02f3048
#936 pretty-print doc literals - merge through suffixy names
atacratic Nov 24, 2019
91f2870
Fix type propagation so that it does something
runarorama Nov 22, 2019
b38ac5f
Merge branch 'master' into demote-TypeVar
TomasMikula Nov 25, 2019
edd410a
Use a short hash in the `names` command (shows the hash and aliases o…
aryairani Nov 26, 2019
777d876
cleanup outdated defns in IOSource
aryairani Nov 26, 2019
c8e6a5a
Merge branch 'master' into ucm-signal-handling
aryairani Nov 26, 2019
60f0e99
Fix #970
runarorama Nov 27, 2019
471cb9a
Merge pull request #1003 from unisonweb/topic/cleanup-iosource
pchiusano Nov 27, 2019
17bac52
Merge pull request #1002 from unisonweb/topic/shorthash-for-names-com…
pchiusano Nov 27, 2019
ee99040
Remove traces
runarorama Nov 27, 2019
8e798c0
Fix term printer for delayed bindings. Fixes #642
runarorama Nov 27, 2019
5a08f21
Fix term printer for delayed bindings. Fixes #642 (#1007)
runarorama Nov 28, 2019
e021b02
Fixed pretty printing of Char when it is part of a pattern
alvaroc1 Nov 29, 2019
5faef31
Updated contributors file
alvaroc1 Nov 29, 2019
8797e5c
Merge pull request #1008 from alvaroc1/fix-char-pretty-print
pchiusano Nov 29, 2019
4912a18
Merge branch 'master' into topic/docs-936-pretty-literals
atacratic Nov 30, 2019
8ee3ea3
\:] to escape :] in doc literals
atacratic Nov 30, 2019
eb1ff61
Add implementation for Nat.toFloat
noahhaasis Dec 2, 2019
cd79643
Merge branch 'master' of github.com:unisonweb/unison
runarorama Dec 2, 2019
fe7f58c
Merge pull request #1012 from noahhaasis/nat-to-float
aryairani Dec 3, 2019
6137d3a
add InputPatterns.diffNamespace and BranchDiff.diff0
aryairani Dec 4, 2019
5c40135
Switch to more robust debouncing logic for file events.
pchiusano Dec 4, 2019
89ce4d4
Fix #987 but has some prettyprinting tests failing that I need to inv…
pchiusano Dec 4, 2019
83af257
Carve out unison-core package
mitchellwrosen Dec 4, 2019
054fd29
convert to LetBlock in immediateChildBlockTerms, however that doesn't…
pchiusano Dec 5, 2019
f73334f
Merge pull request #1022 from mitchellwrosen/master
pchiusano Dec 5, 2019
6841df0
Merge pull request #1019 from unisonweb/fix/625
pchiusano Dec 5, 2019
fdbbc1d
Merge branch 'master' into topic/bug991
aryairani Dec 5, 2019
1885e4b
Merge remote-tracking branch 'origin/master' into diff.namespace
pchiusano Dec 5, 2019
5b7d542
Start of `DiffNamesace` implementation, needed to adjust input to tak…
pchiusano Dec 5, 2019
1707074
stub out BranchDiffOutput
pchiusano Dec 5, 2019
ae34e09
Merge remote-tracking branch 'origin/master' into fix/987
pchiusano Dec 6, 2019
d6161a3
IsPropagated metadata type & some writeup
aryairani Dec 6, 2019
172e8e7
minimizeOrdered function
pchiusano Dec 6, 2019
8ab5ff3
remove some dead parser code
mitchellwrosen Sep 6, 2019
7fb5c70
Merge pull request #996 from unisonweb/topic/bug991
pchiusano Dec 6, 2019
8a25c53
Merge remote-tracking branch 'origin/master' into diff.namespace
aryairani Dec 6, 2019
1bde90b
started implementing BranchDiff.toOutput
aryairani Dec 6, 2019
39143b2
progress on BranchDiff.toOutput
aryairani Dec 6, 2019
da513e6
Read .unisonConfig from where the codebase is
pt2121 Dec 7, 2019
6ce288b
Continuation of fix to #987 - tweak handling of let blocks in use ins…
atacratic Dec 7, 2019
b8c2678
Output fewer blank lines when only whitespace is input
mitchellwrosen Dec 8, 2019
863138d
Fix selectedTerms
mitchellwrosen Dec 8, 2019
c6f59e0
Delete term/type refactor
mitchellwrosen Dec 8, 2019
5ed5346
Merge pull request #1036 from unisonweb/mitchellwrosen/delete-term-ty…
aryairani Dec 8, 2019
2976e3c
Merge pull request #1034 from unisonweb/mitchellwrosen-fix-selected-t…
aryairani Dec 8, 2019
603ffb0
Merge pull request #1032 from unisonweb/mitchellwrosen/fewer-blank-lines
aryairani Dec 8, 2019
e38f304
Move Unison.Codebase.SearchResult from unison-core to unison-parser-t…
mitchellwrosen Dec 8, 2019
0810c61
Merge pull request #1033 from unisonweb/mitchellwrosen/move-search-re…
aryairani Dec 8, 2019
7dbf6d4
Merge branch 'master' into ucm-signal-handling
aryairani Dec 8, 2019
f1f5ead
Merge pull request #1024 from unisonweb/mitchellwrosen/dead-parser-code
pchiusano Dec 8, 2019
e42be27
Merge branch 'fix/987' of https://github.com/unisonweb/unison into fi…
pchiusano Dec 8, 2019
914e919
Down to 3 test failures after tweaking runtime to reorder top level b…
pchiusano Dec 8, 2019
536d16f
Refactor: replace _ patterns with DerivedId{}
mitchellwrosen Dec 8, 2019
aadd858
all tests passing and greatly simplified handling of use of.ordered v…
pchiusano Dec 8, 2019
8b72eb3
added.transcript
pchiusano Dec 8, 2019
dab8d8e
Merge pull request #1039 from unisonweb/mitchellwrosen/reference-patt…
pchiusano Dec 8, 2019
40afe19
Merge pull request #1031 from pt2121/pt/917-unisonConfig
pchiusano Dec 8, 2019
6d8ea06
Add 'delete' command, which combines 'delete.term' and 'delete.type'
mitchellwrosen Dec 8, 2019
dbc1006
Move Unison.Paths to unison-core
mitchellwrosen Dec 9, 2019
0da6515
Merge pull request #1046 from unisonweb/mitchellwrosen/paths-to-core
aryairani Dec 9, 2019
b4d3cd5
Merge pull request #1040 from unisonweb/mitchellwrosen/omni-delete
pchiusano Dec 9, 2019
68fa185
Merge remote-tracking branch 'origin/master' into diff.namespace
aryairani Dec 9, 2019
e46ceb8
Merge remote-tracking branch 'origin/master' into fix/987
pchiusano Dec 9, 2019
5cd328b
refresh transcripts - these changed because root namespace hash changed
pchiusano Dec 9, 2019
705bb08
Merge branch 'master' into demote-TypeVar
TomasMikula Dec 9, 2019
df0fc25
Improve delete term/type feedback
mitchellwrosen Dec 8, 2019
93287ec
Merge pull request #959 from TomasMikula/demote-TypeVar
pchiusano Dec 10, 2019
64691fb
Merge pull request #1037 from unisonweb/mitchellwrosen/improve-delete…
pchiusano Dec 10, 2019
f153890
Add transcript output for todo-bug-builtins
noahhaasis Dec 10, 2019
7dd8cb7
Merge branch 'master' of https://www.github.com/unisonweb/unison into…
noahhaasis Dec 10, 2019
6d43893
Update all changed transcript outputs
noahhaasis Dec 10, 2019
b363ca4
Remove spaces from the ends of lines
runarorama Dec 10, 2019
2a4d034
Merge branch 'master' of github.com:unisonweb/unison
runarorama Dec 10, 2019
823a39c
first pass at implementing from datalog
aryairani Dec 10, 2019
54707a5
comments
aryairani Dec 10, 2019
5309aea
sorting out NamespceSlice and DiffSlice
aryairani Dec 11, 2019
239c066
Update todo bultin transcript to run deterministically
noahhaasis Dec 11, 2019
7dd79ed
Update todo-bug-builtins.md
aryairani Dec 11, 2019
f77836c
Update todo-bug-builtins.output.md
aryairani Dec 11, 2019
81668b6
Merge branch 'master' into topic/docs-936-pretty-literals
atacratic Dec 11, 2019
a10f540
tweak to orderedComponents implementation
pchiusano Dec 11, 2019
109fbdb
Added extensive. transcript
pchiusano Dec 11, 2019
c6d887e
fix view for doc literals containing @[source] for a type
atacratic Dec 11, 2019
e7a7604
Merge pull request #881 from noahhaasis/todo-builtin
pchiusano Dec 12, 2019
7814fd4
Merge remote-tracking branch 'origin/master' into fix/987
pchiusano Dec 12, 2019
da3b8c6
Create .mergify.yml
pchiusano Dec 12, 2019
d1893df
Update .mergify.yml
pchiusano Dec 12, 2019
5754377
Update .mergify.yml
pchiusano Dec 12, 2019
9eb245e
Merge pull request #1020 from unisonweb/fix/987
mergify[bot] Dec 12, 2019
5e08e0a
ucm run: do not set up interactive environment
int-index Dec 12, 2019
3b9de97
Merge branch 'master' into ucm-signal-handling
sloane-shark Dec 13, 2019
3db0403
tweak verbiage of hello transcript
pchiusano Dec 13, 2019
227c103
Refactored deep{Terms,Types} into Relation4 & started refactoring Han…
aryairani Dec 13, 2019
c442523
building cleanly, but one test is failing due to `undefined`somewhere
aryairani Dec 14, 2019
2adb598
Merge pull request #912 from matthewess/ucm-signal-handling
aryairani Dec 14, 2019
6be8932
#936 pretty-print doc literals - unindent docs after parsing - unfini…
atacratic Dec 14, 2019
24adf50
Make Name an abstract type
mitchellwrosen Dec 14, 2019
c4a10bb
Show branch diff after delete
mitchellwrosen Dec 15, 2019
3041a0d
Merge pull request #1068 from unisonweb/mitchell/show-delete-diff
aryairani Dec 15, 2019
834f4f6
Merge pull request #1065 from unisonweb/mitchell/abstract-name
mitchellwrosen Dec 15, 2019
764b2f4
Show term/type hashes (for adds/removes) in diff output, if ambiguous
mitchellwrosen Dec 15, 2019
8f284d9
#936 pretty-print doc literals - unbuggify doc unindenting
atacratic Dec 15, 2019
618c3ff
Update .mergify.yml
aryairani Dec 15, 2019
18e6939
Merge pull request #1069 from unisonweb/mitchell/diff-show-hashes-if-…
mitchellwrosen Dec 15, 2019
6e55482
Move Unison.Codebase.NameSegment to unison-core
mitchellwrosen Dec 15, 2019
d206b3d
Make tab completion also list types
mitchellwrosen Dec 15, 2019
8e99b0b
Better duplicate definitions error message
mitchellwrosen Dec 16, 2019
64a3262
Merge pull request #1077 from unisonweb/mitchell/duplicate-definition…
pchiusano Dec 16, 2019
498476d
Merge pull request #1067 from unisonweb/mitchell/move-name-segment-to…
pchiusano Dec 16, 2019
67254cc
Merge pull request #1076 from unisonweb/mitchell/fix-delete-tab-complete
pchiusano Dec 16, 2019
ae23874
split up deepTerms/deepTermMetadata
aryairani Dec 16, 2019
e1e8a59
Merge branch 'master' into diff.namespace
aryairani Dec 16, 2019
8b6430e
fixup deepR4ToSlice
aryairani Dec 16, 2019
a988bd1
uncommented patchDiff logic
aryairani Dec 16, 2019
901bccb
delete comments
aryairani Dec 16, 2019
776af61
#936 pretty-print doc literals - spec out modified paragraph reflow/w…
atacratic Dec 16, 2019
ba85e9a
update transcripts output for metadata.IsPropagated
aryairani Dec 17, 2019
337fb21
redesigning and fleshing out Output.BranchDiff.toOutput
aryairani Dec 17, 2019
516c5e3
Switch BranchDiff.metadata to Relation3
aryairani Dec 18, 2019
c039a51
rejiggered Codebase.BranchDiff
aryairani Dec 18, 2019
aee88ca
I left some "undefined"s in Output.BranchDiff.toOutput
aryairani Dec 18, 2019
81ce53a
#936 pretty-print doc literals - paragraphyText now uses wrapPreserve…
atacratic Dec 19, 2019
89ffd55
cleanup
aryairani Dec 19, 2019
0b95e69
deprecate Names2.hq{Term,Type}Name...
aryairani Dec 19, 2019
bd94212
fix name lookups in BranchDiff.toOutput
aryairani Dec 19, 2019
d839766
Output.branchDiff.toOutput.updatedTypes
aryairani Dec 19, 2019
5b24bae
updated terms
aryairani Dec 19, 2019
6865e78
filled in the rest of Output.BranchDiff.toOutput
aryairani Dec 19, 2019
b24066c
Remove ‘show’ alias for ‘display’ command (#992)
anovstrup Dec 19, 2019
0215397
fleshed out HandleInput.DiffNamespaceI
aryairani Dec 19, 2019
ce90914
Don’t use `less` to display output triggered by external events (#1027)
anovstrup Dec 21, 2019
df8b30e
Change Notify’ command to NotifyUnpaged
anovstrup Dec 21, 2019
f61d9e6
Add anovstrup to CONTRIBUTORS.markdown
anovstrup Dec 21, 2019
27a0b9e
Merge pull request #1087 from anovstrup/fix/1027-dont-use-less
pchiusano Dec 21, 2019
69e13a2
Merge pull request #1084 from anovstrup/fix/992-remove-show-alias
pchiusano Dec 21, 2019
e0d49ea
#936 pretty-print doc literals - draft of parse-time doc normalizatio…
atacratic Dec 21, 2019
f1cb1c9
Merge branch 'master' into topic/docs-936-pretty-literals
atacratic Dec 21, 2019
2d8d221
speed up todo output if there is nothing to do
mitchellwrosen Dec 21, 2019
778f6e9
Fill in partial type sig
mitchellwrosen Dec 21, 2019
4c40438
Fix transcript tests
mitchellwrosen Dec 21, 2019
ca6cbb0
Add NoConflictsOrEdits output constructor
mitchellwrosen Dec 22, 2019
6c171d7
Fix delete empty branch
mitchellwrosen Dec 22, 2019
8d9879c
Merge pull request #1088 from unisonweb/mitchell/speed-up-todo
aryairani Dec 23, 2019
6287c4d
OutputMessages ShowDiffNamespace WIP
aryairani Dec 23, 2019
0ef6881
compiles with warnings (still incomplete)
pchiusano Dec 23, 2019
90991d4
finished with metadata-only type updates
pchiusano Dec 23, 2019
7b98c34
Merge pull request #1090 from unisonweb/mitchell/fix-delete-empty-branch
mitchellwrosen Dec 23, 2019
b5b5ef7
finish prettyUpdateTypes draft
pchiusano Dec 23, 2019
b1f042d
box art around the type updates
pchiusano Dec 23, 2019
1a4533a
prettyUpdate{Type,Term}
aryairani Dec 23, 2019
0f19798
stubbed out more of showDiffNamespace
aryairani Dec 23, 2019
05a3a42
🎄 the boxes come _after_ the numbers; and add has grouping
aryairani Dec 25, 2019
bc21a66
filled in removed definitions diff output
aryairani Dec 25, 2019
5534acf
updated/added/removed patches
aryairani Dec 25, 2019
7932c4b
Add load command (#1028)
anovstrup Dec 26, 2019
74bc2d1
Add `add.preview` and `update.preview` commands.
anovstrup Dec 27, 2019
c6a146d
fill in moves, copies
aryairani Dec 29, 2019
760585d
it might even work! ...scratch that, it does not work.
aryairani Dec 29, 2019
cbbb2d2
foldl1' bombs on an empty input
aryairani Dec 29, 2019
f3bad37
fix a render thing
aryairani Dec 30, 2019
d54bd3c
fill in HandleInput.numberOutputDiff and added `debug.numberedArgs` c…
aryairani Dec 30, 2019
9b70846
add NotifyNumbered command; expects the output layer to produce numbe…
aryairani Jan 2, 2020
7b352d2
prefix/absolute paths for patches in diff.namespace output
aryairani Jan 2, 2020
09afe1e
Show aliases when searching by type
mitchellwrosen Jan 5, 2020
fa61077
adds punctuation to 'codebase exist' and 'already a code base in' err…
Jan 5, 2020
e4a6e3b
Improve performance of a few branch functions
mitchellwrosen Jan 5, 2020
5d669a5
Move unionWithM to Unison.Util.Map
mitchellwrosen Jan 5, 2020
04117ac
Add Unison.Codebase.Branch export list
mitchellwrosen Jan 5, 2020
3bdf24d
Merge pull request #1126 from unisonweb/mitchell/2020-01-05/util-map
pchiusano Jan 6, 2020
5105b61
Merge pull request #1125 from unisonweb/mitchell/2020-01-05/faster-mo…
pchiusano Jan 6, 2020
5be1ebb
Merge pull request #1124 from unisonweb/mitchell/2020-01-05/branch-ex…
pchiusano Jan 6, 2020
8920dd5
implements endSentence in terms of group
Jan 6, 2020
989ff9a
Merge pull request #1123 from unisonweb/mitchell/2020-01-04/find-by-type
pchiusano Jan 6, 2020
d764cdd
Merge pull request #1114 from unisonweb/topic/notify-numbered
pchiusano Jan 6, 2020
3cfbc6a
cleanup
aryairani Jan 6, 2020
4691eb1
make debug.numberedArgs output not a hack
aryairani Jan 6, 2020
df88d72
make numberedArgs use absolute names
aryairani Jan 6, 2020
9bebe4e
#936 pretty-print doc literals - some fixes - will be finished Real …
atacratic Jan 1, 2020
8b46831
remove unix dependency; load source files directly
anovstrup Jan 7, 2020
9f77f72
simplify implementation of LoadI handler
anovstrup Jan 7, 2020
aaabdf8
Drop input descriptions for LoadI, PreviewAddI, PreviewUpdateI
anovstrup Jan 7, 2020
8027d0e
Merge pull request #1099 from anovstrup/fix/1028-load-command
aryairani Jan 7, 2020
6d2ac72
implements endSentence to receive Pretty as input
Jan 7, 2020
c5fb52b
updates contributors
Jan 8, 2020
f6145de
Merge pull request #1122 from pete-ts/bug/1112
pchiusano Jan 8, 2020
3adbc47
Merge remote-tracking branch 'origin/master' into diff.namespace
pchiusano Jan 8, 2020
1b8023c
WIP on transcript, some formatting tweaks to diff output
pchiusano Jan 8, 2020
720ba7a
calculate leftNumsWidth based on lazy state result 🤯
aryairani Jan 8, 2020
4bcd58e
fleshed out transcript some more, fixed a number of bugs
pchiusano Jan 8, 2020
2012f1b
more formatting fixes, pulled out `column3M` and using that in diff f…
pchiusano Jan 9, 2020
3a4d276
fix some dif.namespace output things (?)
aryairani Jan 10, 2020
6cc988a
some output tweak proposals
pchiusano Jan 10, 2020
30ee10c
tune up diff output for add/remove groups
aryairani Jan 10, 2020
20bc394
Merge branch 'diff.namespace' of github.com:unisonweb/unison into dif…
aryairani Jan 10, 2020
5c5cf6b
use BranchDiff.allNameChanges to compute adds, removes, and renames
aryairani Jan 10, 2020
8da280e
working on rename groups
aryairani Jan 10, 2020
6fa73ad
tweaked formatting of name changes section
pchiusano Jan 10, 2020
a0844d7
fix bug: deleted terms with metadata being shown in updates section
pchiusano Jan 10, 2020
8b98458
Tweak ordering or adds/removes section - constructors come first
pchiusano Jan 10, 2020
cdb6108
clear cached typechecked file on parsing/typechecking error
anovstrup Jan 11, 2020
9f81ec9
Merge pull request #1138 from anovstrup/fix/clear-typecheck-cache-on-…
aryairani Jan 11, 2020
e56bc7e
#936 pretty-print doc literals - some fixes to whitespace/wrap normal…
atacratic Jan 11, 2020
e219138
#936 pretty-print doc literals - remove some tracing
atacratic Jan 12, 2020
f9c21df
partially switched over to new diff command
aryairani Jan 14, 2020
19181bf
finish up the various ShowDiff* outputs
aryairani Jan 14, 2020
f1a6f16
switch tallnamespaceUpdates representation & trying to fix bugs
aryairani Jan 14, 2020
0c345c4
couple more issues to fix :(
aryairani Jan 14, 2020
b4e6e32
filters listed directories for existence, to prevent getModificationT…
Jan 15, 2020
eb0df15
update checklist
aryairani Jan 15, 2020
c42d972
Merge pull request #1144 from pete-ts/bug/1021
aryairani Jan 15, 2020
5e1e84a
adding in isPropagated metadata during propagation
pchiusano Jan 15, 2020
5460482
deleting isPropagated metadata when user does an update for a hash an…
pchiusano Jan 15, 2020
8f66210
split updatedTerms into updatedTerms, newTermConflicts, resolvedTermC…
aryairani Jan 16, 2020
96c556c
tried to fix regression in Update vs Add/Remove, but not quite there …
aryairani Jan 16, 2020
84207dc
don't separately list changed metadata of a definition as part of an …
aryairani Jan 16, 2020
af3f72a
hide isPropagated in updates, + cleanup
aryairani Jan 16, 2020
c8136c0
fix hq bracket alignment and hide some blank lines
aryairani Jan 16, 2020
e0da5f8
#936 pretty-print doc literals - small fix
atacratic Jan 16, 2020
e9139bc
#936 pretty-print doc literals - brittany code formatting
atacratic Jan 16, 2020
530df50
passes a preserve flag into runTranscripts
Jan 16, 2020
22802b9
#936 pretty-print doc literals - last tests and fixes
atacratic Jan 16, 2020
2aedaa2
remove traces and fix OBD.isEmpty
aryairani Jan 16, 2020
7fe916f
Merge branch 'master' into diff.namespace
aryairani Jan 16, 2020
22ebf28
#936 pretty-print doc literals - improve commenting
atacratic Jan 16, 2020
52ef068
Merge branch 'master' into topic/docs-936-pretty-literals
atacratic Jan 16, 2020
b715aa4
handles non existent transcript, pretty prints unknown command and pa…
Jan 16, 2020
c141338
Merge pull request #994 from unisonweb/topic/docs-936-pretty-literals
pchiusano Jan 17, 2020
b3b43e1
Merge remote-tracking branch 'origin/master' into diff.namespace
pchiusano Jan 17, 2020
5bf4a20
sort adds, removes, renames by name
aryairani Jan 17, 2020
96ec4c5
Merge branch 'diff.namespace' of github.com:unisonweb/unison into dif…
aryairani Jan 17, 2020
11bd7ba
comments
aryairani Jan 17, 2020
8b2d7b6
removed unused -Wno-unused-local-binds
aryairani Jan 17, 2020
73ed39e
delete commented code
aryairani Jan 17, 2020
ee82ea3
delete out-of-date design comments
aryairani Jan 17, 2020
de10551
update the transcript outputs after the sorting changes in 5bf4a200
aryairani Jan 17, 2020
e42267f
Merge pull request #1064 from unisonweb/diff.namespace
mergify[bot] Jan 17, 2020
df7193c
Replace `handle h in b` syntax with `handle b with h` syntax
anovstrup Jan 18, 2020
e387411
updates flag and description
Jan 18, 2020
5272c51
removes cleanup message and wrapper
Jan 18, 2020
ec87a60
fix pretty-printing of handle blocks and fix tests broken by handle-w…
anovstrup Jan 18, 2020
d1d134a
updates the local die error message
Jan 18, 2020
a6013eb
Merge pull request #1159 from anovstrup/topic/handle-with-syntax
pchiusano Jan 19, 2020
a0294b8
use the transcript and not current directory to build a failure message
Jan 19, 2020
467dcf5
adds missing space
Jan 19, 2020
e1d94eb
Merge pull request #1155 from pete-ts/feature/975
aryairani Jan 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pull_request_rules:
- name: automatic merge on CI success and review
conditions:
- status-success=continuous-integration/travis-ci/pr
- label=ready-to-merge
- "#approved-reviews-by>=1"
actions:
merge:
method: merge
# - name: delete head branch after merge
# conditions: []
# actions:
# delete_head_branch: {}
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ install:
- stack --no-terminal exec tests
- stack --no-terminal exec transcripts
# fail if running transcripts modified any versioned files
- x=`git status --porcelain -uno` bash -c 'if [[ -n $x ]]; then echo "$x" && false; fi'
- git diff
- x=`git status --porcelain -uno` bash -c 'if [[ -n $x ]]; then echo "$x" && false; fi'
5 changes: 5 additions & 0 deletions CONTRIBUTORS.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ The format for this list: name, GitHub handle, and then optional blurb about wha
* Jonas De Vuyst (@jdevuyst)
* George Marrows (@georgemarrows)
* Florian Thurm (@0xflotus)
* Mat Ess (@matthewess)
* Evan Burchard (@evanburchard)
* Alvaro Carrasco (@alvaroc1)
* Vladislav Zavialov (@int-index)
* Aaron Novstrup (@anovstrup)
* Pete Tsamouris (@pete-ts)
35 changes: 21 additions & 14 deletions parser-typechecker/src/Unison/Builtin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module Unison.Builtin
,names0
,builtinDataDecls
,builtinEffectDecls
,builtinConstructorType
,builtinTypeDependents
,builtinTermsByType
,builtinTermsByTypeMention
Expand Down Expand Up @@ -75,7 +76,8 @@ typeLookup =
(Map.fromList $ map snd builtinEffectDecls)

constructorType :: R.Reference -> Maybe CT.ConstructorType
constructorType = TL.constructorType (typeLookup @Symbol)
constructorType r = TL.constructorType (typeLookup @Symbol) r
<|> Map.lookup r builtinConstructorType

-- | parse some builtin data types, and resolve their free variables using
-- | builtinTypes' and those types defined herein
Expand Down Expand Up @@ -122,7 +124,7 @@ builtinTypes :: [(Name, R.Reference)]
builtinTypes = Map.toList . Map.mapKeys Name.unsafeFromText
$ foldl' go mempty builtinTypesSrc where
go m = \case
B' r -> Map.insert r (R.Builtin r) m
B' r _ -> Map.insert r (R.Builtin r) m
D' r -> Map.insert r (R.Builtin r) m
Rename' r name -> case Map.lookup name m of
Just _ -> error . Text.unpack $
Expand All @@ -144,21 +146,23 @@ builtinTypes = Map.toList . Map.mapKeys Name.unsafeFromText
-- WARNING: Don't delete any of these lines, only add corrections.
builtinTypesSrc :: [BuiltinTypeDSL]
builtinTypesSrc =
[ B' "Int"
, B' "Nat"
, B' "Float"
, B' "Boolean"
, B' "Sequence", Rename' "Sequence" "List"
, B' "Text"
, B' "Char"
, B' "Effect", Rename' "Effect" "Request"
, B' "Bytes"
, B' "Link.Term"
, B' "Link.Type"
[ B' "Int" CT.Data
, B' "Nat" CT.Data
, B' "Float" CT.Data
, B' "Boolean" CT.Data
, B' "Sequence" CT.Data, Rename' "Sequence" "List"
, B' "Text" CT.Data
, B' "Char" CT.Data
, B' "Effect" CT.Data, Rename' "Effect" "Request"
, B' "Bytes" CT.Data
, B' "Link.Term" CT.Data
, B' "Link.Type" CT.Data
]

builtinConstructorType :: Map R.Reference CT.ConstructorType
builtinConstructorType = Map.fromList [ (R.Builtin r, ct) | B' r ct <- builtinTypesSrc ]

data BuiltinTypeDSL = B' Text | D' Text | Rename' Text Text | Alias' Text Text
data BuiltinTypeDSL = B' Text CT.ConstructorType | D' Text | Rename' Text Text | Alias' Text Text


data BuiltinDSL v
Expand Down Expand Up @@ -309,6 +313,9 @@ builtinsSrc =
, B "Universal.>=" $ forall1 "a" (\a -> a --> a --> boolean)
, B "Universal.<=" $ forall1 "a" (\a -> a --> a --> boolean)

, B "bug" $ forall1 "a" (\a -> forall1 "b" (\b -> a --> b))
, B "todo" $ forall1 "a" (\a -> forall1 "b" (\b -> a --> b))

, B "Boolean.not" $ boolean --> boolean

, B "Text.empty" text
Expand Down
18 changes: 9 additions & 9 deletions parser-typechecker/src/Unison/Codebase.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import qualified Unison.Codebase.Branch as Branch
import qualified Unison.Codebase.CodeLookup as CL
import qualified Unison.Codebase.Reflog as Reflog
import qualified Unison.DataDeclaration as DD
import Unison.Name ( Name(..) )
import qualified Unison.Name as Name
import qualified Unison.Names2 as Names
import Unison.Reference ( Reference )
import qualified Unison.Reference as Reference
Expand Down Expand Up @@ -89,8 +89,8 @@ data Codebase m v a =
, branchHashesByPrefix :: ShortBranchHash -> m (Set Branch.Hash)
}

bootstrapNames :: Names.Names0
bootstrapNames =
bootstrapNames :: Names.Names0
bootstrapNames =
Builtin.names0 <> UF.typecheckedToNames0 IOSource.typecheckedFile

-- | Write all of the builtins types and IO types into the codebase. Returns the names of builtins
Expand All @@ -110,7 +110,7 @@ initializeCodebase :: forall m. Monad m => Codebase m Symbol Parser.Ann -> m ()
initializeCodebase c = do
initializeBuiltinCode c
let b0 = BranchUtil.addFromNames0
(Names.prefix0 (Name "builtin") bootstrapNames)
(Names.prefix0 (Name.unsafeFromText "builtin") bootstrapNames)
Branch.empty0
putRootBranch c (Branch.one b0)

Expand All @@ -129,7 +129,7 @@ addDefsToCodebase c uf = do
goType :: (t -> Decl v a) -> (Reference.Reference, t) -> m ()
goType f (ref, decl) = case ref of
Reference.DerivedId id -> putTypeDeclaration c id (f decl)
_ -> pure ()
Reference.Builtin{} -> pure ()

getTypeOfConstructor ::
(Monad m, Ord v) => Codebase m v a -> Reference -> Int -> m (Maybe (Type v a))
Expand All @@ -155,7 +155,7 @@ typeLookupForDependencies codebase = foldM go mempty
Just (Right dd) ->
pure $ TypeLookup mempty (Map.singleton ref dd) mempty
Nothing -> pure mempty
go tl _builtin = pure tl -- codebase isn't consulted for builtins
go tl Reference.Builtin{} = pure tl -- codebase isn't consulted for builtins

-- todo: can this be implemented in terms of TransitiveClosure.transitiveClosure?
-- todo: add some tests on this guy?
Expand Down Expand Up @@ -186,7 +186,7 @@ transitiveDependencies code seen0 r = if Set.member r seen0
Just (Right dd) -> foldM (transitiveDependencies code)
seen
(DD.dependencies dd)
_ -> pure seen
Reference.Builtin{} -> pure seen

toCodeLookup :: Codebase m v a -> CL.CodeLookup v m a
toCodeLookup c = CL.CodeLookup (getTerm c) (getTypeDeclaration c)
Expand All @@ -205,12 +205,12 @@ makeSelfContained' code uf = do
deps <- foldM (transitiveDependencies code) Set.empty (Set.unions deps0)
decls <- fmap catMaybes . forM (toList deps) $ \case
r@(Reference.DerivedId rid) -> fmap (r, ) <$> CL.getTypeDeclaration code rid
_ -> pure Nothing
Reference.Builtin{} -> pure Nothing
let (es1, ds1) = partitionEithers [ bimap (r,) (r,) d | (r, d) <- decls ]
bs1 <- fmap catMaybes . forM (toList deps) $ \case
r@(Reference.DerivedId rid) ->
fmap (r, ) <$> CL.getTerm code rid
_ -> pure Nothing
Reference.Builtin{} -> pure Nothing
let
allVars = Set.unions
[ UF.allVars uf
Expand Down
Loading