Arya Irani
430af55865
fix for some false negatives on function application arg type errors
2018-09-24 22:23:07 -04:00
Arya Irani
a242094992
watchwatch will reload the last processed unison file after a haskell/scala build event...
...
watchwatch.sh also accepts an initial unison file as a command-line arg, e.g.
./scripts/watchwatch.sh scratch.u
2018-09-24 21:54:40 -04:00
Paul Chiusano
04c310638b
Merge pull request #250 from unisonweb/wip/prettyprint.hs
...
Type pretty-printer
2018-09-24 19:16:51 -04:00
Chris Gibbs
190f1579dd
Code review markups on Type pretty-printer
...
* (previous commit) backed out 'ambient round trip test' CPP thing in Builtin.hs - also it turned out
it was anyway only kicking in on my tests and on parsing of Builtins! Would need to make it kick in during file parsing.
* Nest and group App chains properly
* Some extra nesting/grouping in foralls
Also fix rendering of unary tuples so they come out as `Pair a ()` rather than the ambiguous `(a)`.
2018-09-24 23:22:15 +01:00
Chris Gibbs
bfb2cb8d2e
Revert "Scaffold for round-trip test of TypePrinter"
...
This reverts commit a6706b6829
.
2018-09-24 21:13:07 +01:00
Paul Chiusano
17309cdd44
Rename Text.concatenate to Text.++
2018-09-24 14:38:03 -04:00
Paul Chiusano
f09da9d84d
rename Int64 to just Int
2018-09-24 13:36:13 -04:00
Paul Chiusano
66962863b5
rename UInt64 to Nat
2018-09-24 13:15:40 -04:00
Paul Chiusano
83f9ce500c
a bit of error message tweaks
2018-09-24 12:58:45 -04:00
Paul Chiusano
fd2fb0968f
wordsmithing error message
2018-09-24 11:57:27 -04:00
Paul Chiusano
065ecc4e62
Merge remote-tracking branch 'origin/topic/java-streaming-bootstrap' into topic/notebook
2018-09-24 11:41:22 -04:00
Paul Chiusano
02e6a389e3
Merge remote-tracking branch 'origin/topic/java-streaming-bootstrap' into topic/notebook
2018-09-24 11:19:45 -04:00
Paul Chiusano
aa85bbe706
Merge remote-tracking branch 'origin/topic/error-message-updates' into topic/notebook
2018-09-24 11:19:12 -04:00
Arya Irani
c1e045a3ea
un-accidentally commit debugNote True stuff
2018-09-24 11:16:34 -04:00
Arya Irani
97c8513b34
Merge branch 'topic/error-message-updates' into topic/java-streaming-bootstrap
2018-09-24 11:15:09 -04:00
Arya Irani
6a095d4dc0
added Settings.demoHideVarNumber
2018-09-24 11:14:36 -04:00
Runar Bjarnason
315442713e
TDNR should solve all blanks
2018-09-24 10:56:34 -04:00
Paul Chiusano
f6bc7db824
Merge remote-tracking branch 'origin/master' into topic/notebook
2018-09-23 20:52:33 -04:00
Arya Irani
6a606f3dbe
introduced some error message debug flags in Unison.Settings...
2018-09-23 12:34:14 -04:00
Paul Chiusano
e34e9a2ad0
fix parser bug where blocks that didn't end with an expression were getting their bindings reversed
2018-09-23 02:43:09 -04:00
Paul Chiusano
bfb04ae6a9
got rid of Watch
AST node, it's just a builtin function now
2018-09-23 02:26:19 -04:00
Paul Chiusano
5fac61d934
Polish and bugfixes, feels pretty nice
2018-09-23 01:38:59 -04:00
Paul Chiusano
bade2b1050
grabbing current line for watch message now
2018-09-22 15:22:51 -04:00
Paul Chiusano
e65b4cb794
parser fix
2018-09-22 14:35:50 -04:00
Paul Chiusano
7f014cf12a
always terminating top-level term with ()
in the file parser
2018-09-22 14:06:21 -04:00
Paul Chiusano
7e86d28c99
no need to reorder watch expressions within a block
2018-09-22 13:53:09 -04:00
Paul Chiusano
a571cba9c3
added Watch
AST node, this ended up being a much less hacky approach, and more flexible too
2018-09-21 22:55:56 -04:00
Chris Gibbs
0fed33475b
A few more Type pretty-printer tests (some still pending)
2018-09-22 00:00:43 +01:00
Chris Gibbs
a6706b6829
Scaffold for round-trip test of TypePrinter
...
Adding a #define line to Builtin.hs (see the code), and running the tests, instruments
every call to Builtin.t, to test that the pretty-printer and parser are consistent, i.e.
that `parse . pretty = id` on that input.
Running this didn't throw up any new problems in the Type pretty-printer. (It did throw up
a known limitation - lack of reversal of generalizeEffects - which is also covered by a pending
test in the suite.)
People may prefer that I take this code out again?
2018-09-22 00:00:38 +01:00
Chris Gibbs
14be343515
More work on Type pretty-printer
...
* Various tidy-ups.
* Fix bug with nested arrows.
* Enable ' sugar for delay even for chained delays.
* Add a 'Group' node everywhere parentheses might be output.
Also added a note to say I need to make it undo the effect of generalizeEffects. But I plan to leave that til after the Term printer is done.
2018-09-22 00:00:37 +01:00
Chris Gibbs
026dc21a2e
More work on effect and delay rendering in Type pretty-printer
...
Got through the confusion that was preventing me debug the "a ->{e} 'b" case.
Worked around lexer limitation in "a ->'{e} b" by rendering as "a -> '{e} b".
Realised that failure of "''a" is just a lexer limitation - "'('a)" works - so
intend to remove the code I added to prevent pretty-printer outputting chained
delays using the ' sugar.
2018-09-22 00:00:35 +01:00
Chris Gibbs
05f362e359
More work on effect and delay rendering in Type pretty-printer
...
Tricky interactions between the two...
Possibly uncovered a parser issue - see Test\TypePrinter.hs.
2018-09-22 00:00:34 +01:00
Chris Gibbs
7304708255
Add support for tuple and delay sugar to type-printer
...
The latter is unfinished.
Also fix a bug in the Pure' type smart pattern.
2018-09-22 00:00:32 +01:00
Chris Gibbs
0b18e0eb3e
Code review markups on Type pretty-printer
...
Making changes as per Paul's comments at df938b2d85
2018-09-22 00:00:31 +01:00
Chris Gibbs
4fd2350f51
Integrate the Type pretty-printer with PrettyPrint.hs
...
Add line-break points at
* the space in a function application
* the space before the -> of an arrow
* the space after a comma in an effect list.
Presumably we might one day want to be able to express a preference between
breaking lines at these various points, and be able to control where
we indent to after the line break.
Still need to re-sugar pairs (,) and delay '
Also look into a regression where it seems like "Pair a b" is being parsed
as "Pair a (Pair b ())" (or at least printed that way).
2018-09-22 00:00:27 +01:00
Chris Gibbs
3db821f8f1
Add precedence support to the Type pretty-printer
...
...not that there are many levels of precedence to support - just 0 (normal) and 10 (type operator application).
Also render `Sequence a` as `[a]`.
2018-09-22 00:00:22 +01:00
Chris Gibbs
1c3ea375f3
Add EffectfulArrows' pattern for matching on Type
...
As per Paul's comment, except the for the extra `Maybe` so we can spot the difference between `a -> b` and `a ->{} b`.
So the pattern returns the following
`(AnnotatedType v a, [(Maybe [AnnotatedType v a], AnnotatedType v a)])`
which gives the spine of function arguments, plus optional ability specifications on each arrow.
Plus use of this pattern in the Type pretty-printer.
2018-09-22 00:00:21 +01:00
Chris Gibbs
6dc1fe58bc
Add basic pretty-printer for Types
...
Add pretty-printer for types, currently lacking precedence-awareness to suppress superfluous parentheses, and lacking integration with PrettyPrint.hs for line-breaking.
Next step is to fix those omissions, then move on to pretty-printing Terms, and data and effect declarations.
2018-09-22 00:00:19 +01:00
Arya Irani
c9e2f82041
start of PrettyPrinter.hs
2018-09-22 00:00:17 +01:00
Paul Chiusano
ae83ebfad9
update file parser
2018-09-21 18:58:16 -04:00
Paul Chiusano
fc69dc45df
Merge remote-tracking branch 'origin/topic/java-streaming-bootstrap' into topic/notebook
2018-09-21 17:51:02 -04:00
Paul Chiusano
af0eab0f49
relax parser to not require blocks to end in an expression (instead get helpful msg from typechecker)
2018-09-21 17:50:09 -04:00
Arya Irani
ce2a02f259
fix watcher to not bomb on parse errors
2018-09-21 17:48:18 -04:00
Paul Chiusano
bc7b5ff0ce
Merge remote-tracking branch 'origin/topic/java-streaming-bootstrap' into topic/notebook
2018-09-21 16:52:22 -04:00
Paul Chiusano
5d2f3bbb73
some groundwork for revamping file parser to have interleaved watch expressions
2018-09-21 16:52:01 -04:00
Arya Irani
ddd626bb07
create stack executable "watcher" which automatically evaluates .u files in the project root
2018-09-21 16:30:48 -04:00
Paul Chiusano
dc75192bf8
added ability
as a keyword alias for effect
, will remove effect
later
2018-09-20 19:12:39 -04:00
Paul Chiusano
7c6dc750f8
fix bug with Source.fromSocketChannel/fromByteBuffer interaction
2018-09-20 18:42:48 -04:00
Paul Chiusano
751e2b7037
now actually spawning the java process, just need to know the class name
2018-09-20 17:10:51 -04:00
Paul Chiusano
439ab64d9a
server for watching files and evaluating them
2018-09-20 16:50:04 -04:00
Paul Chiusano
04ce0e95d4
Merge remote-tracking branch 'origin/topic/codebase-editor' into topic/java-streaming-bootstrap
2018-09-20 15:35:03 -04:00
Rúnar Óli Bjarnason
21df3334a2
Added a file watcher
2018-09-20 13:30:40 -04:00
Arya Irani
8bb84327bf
what even _is_ a Branch.sequence
2018-09-20 10:36:41 -04:00
Paul Chiusano
2dcb0031ab
Added n-way merge ctor and do flattening in <>, and fix before
...
Previous implementation of `before` would look only for exact subgraph match, which could incorrectly return false depending on how the two graphs were factored. By flattening the two graphs at merge points, this source of incidental differences goes away. You only need to check for submaps at each merge point.
2018-09-19 23:32:49 -04:00
Arya Irani
477f382b22
trying to work out Branch.sequence
2018-09-19 21:11:40 -04:00
Arya Irani
7fba4e3e09
added a few things
2018-09-19 17:58:39 -04:00
Paul Chiusano
42a73ce940
started on haskell code for codebase editor
2018-09-19 15:58:40 -04:00
Paul Chiusano
56356a844a
Merge remote-tracking branch 'origin/master' into topic/haskell-runtime
...
# Conflicts:
# parser-typechecker/src/Unison/ABT.hs
2018-09-11 23:13:16 -04:00
Paul Chiusano
8e02bc46a3
Convert lambda application to let, get rid of Apply instruction
...
Calls to known functions are converted to let bindings
2018-09-11 23:10:00 -04:00
Paul Chiusano
248ebf1e0c
made IR closed
2018-09-09 16:18:58 -04:00
Paul Chiusano
f3ff3b4ae6
Revert "simplify"
...
This reverts commit 6c54fe3933
.
2018-09-09 15:43:28 -04:00
Paul Chiusano
6c54fe3933
simplify
2018-09-09 15:27:11 -04:00
Paul Chiusano
169c14f784
builtins
2018-09-09 15:05:14 -04:00
Paul Chiusano
f057e59df2
added separate static / dynamic apply IR
2018-09-07 23:41:13 -04:00
Paul Chiusano
2b1bd38246
successfully evaluated (x y -> x) 42 0
2018-09-07 16:55:52 -04:00
Paul Chiusano
5291996c83
unpending some tests
2018-09-05 14:49:14 -04:00
Arya Irani
1f3f405274
better fix for tests/state2a-min.u (effects in non-recursive let rec)
2018-09-04 16:15:32 -04:00
Arya Irani
231055d146
fix tests/state2a-min.u by calling Components.minimize' in block
...
and also by fixing Components.minimize'
2018-09-04 15:42:04 -04:00
Paul Chiusano
388d0a3a54
Merge remote-tracking branch 'origin/master' into topic/haskell-runtime
2018-09-04 13:49:28 -04:00
Arya Irani
e534a5581c
Merge pull request #243 from unisonweb/fix/effect-instantiation2
...
Misc typechecker bugfixes
2018-09-04 10:18:13 -04:00
Arya Irani
9ba1e249f8
Merge pull request #244 from unisonweb/wip/pretty-errors
...
misc fixes & cleanup
2018-09-04 10:17:53 -04:00
Paul Chiusano
2561265d36
Merge branch 'fix/effect-instantiation2' into topic/haskell-runtime
2018-09-01 14:13:37 -04:00
Paul Chiusano
3b369ec295
Merge remote-tracking branch 'origin/master' into fix/effect-instantiation2
2018-09-01 10:54:25 -04:00
Paul Chiusano
26f06a644a
remove debugging statements
2018-09-01 10:53:27 -04:00
Paul Chiusano
58b9b37573
fix regression in map-reduce
2018-09-01 10:50:11 -04:00
Paul Chiusano
0d5727a641
fix test that was causing <<loop>> due to circular annotation definition in the typechecker
2018-08-31 18:51:05 -04:00
Arya Irani
7d4c37f71b
Merge pull request #242 from unisonweb/fix/effect-instantiation
...
Fix issue with ability instantiation
2018-08-31 17:11:37 -04:00
Arya Irani
bd7f713545
more cleanup
2018-08-31 15:24:31 -04:00
Paul Chiusano
53d735d84a
fix to instantiateL/R which was completely forgetting to instantiate effects
...
This appears to have been masking another error with effect inference in map-reduce.u, which is now failing with an ability check again
2018-08-31 13:36:48 -04:00
Arya Irani
a48fa3bd82
add two pending tests
...
unison-src/test1.u became a-tale-of-two-optionals.uu
2018-08-31 12:16:38 -04:00
Paul Chiusano
731319ae2e
nicer inferred types for lambdas that don't mention pointless effect variables
2018-08-31 12:01:27 -04:00
Paul Chiusano
5ae98f7f2a
fixed, but want to clean up inferred types a bit to eliminate unneeded effect vars
2018-08-31 10:12:49 -04:00
Arya Irani
e9eceff67a
more final cleanup
2018-08-30 19:18:44 -04:00
Arya Irani
20c39ce084
final cleanup
2018-08-30 18:58:14 -04:00
Arya Irani
183f0e4264
a couple more tests
2018-08-30 18:25:41 -04:00
Arya Irani
171cbdc6cc
add some regression tests to ensure/refute specific type errors
2018-08-30 18:19:27 -04:00
Arya Irani
7162382ade
wired up "wrong argument type" message with polymorphicTypeInfo
2018-08-30 17:45:40 -04:00
Arya Irani
994ff0249f
Merge remote-tracking branch 'origin/master' into wip/pretty-errors
2018-08-30 13:55:32 -04:00
Arya Irani
cb2dee86fa
Merge remote-tracking branch 'origin/master' into wip/pretty-errors
2018-08-30 13:55:00 -04:00
Paul Chiusano
940504a476
builtins are effect polymorphic
2018-08-30 10:32:06 -04:00
Paul Chiusano
35b5945a77
fixed regression in map-reduce due to overagressive generalizeEffects impl even if user has already provided effect variables in the signature
2018-08-30 10:05:42 -04:00
Paul Chiusano
794c98c03e
seems to be working but regression in map-reduce.u
2018-08-29 23:39:46 -04:00
Arya Irani
48f61bc76c
wired up "wrong argument type" error; polymorphicTypeInfo bit still needs debugging
2018-08-29 18:52:38 -04:00
Paul Chiusano
d258fb01fc
WIP, still not quite working
2018-08-29 17:42:04 -04:00
Paul Chiusano
3d42a79f3d
shouldn't generalize over unused effect vars
2018-08-29 17:06:02 -04:00
Paul Chiusano
dc1bb44900
moar progress
2018-08-29 14:30:20 -04:00
Paul Chiusano
2cc88157ed
implement generalizeEffects (not hooked up to typechecker yet)
2018-08-29 13:43:49 -04:00
Arya Irani
1858b5161f
wired up case guard message
2018-08-29 12:32:40 -04:00
Arya Irani
69ac1fa0da
add match guard, match body errors
...
bugfixes:
- fix SubseqExtractor >>=
- more robust extractor pattern for boolean / existential mismatches
2018-08-29 12:16:15 -04:00
Paul Chiusano
2d30e74525
Merge branch 'master' into topic/effect-improvements
2018-08-29 11:27:39 -04:00
Arya Irani
53f10c7525
wired up ifBody and vectorBody type mismatch errors
2018-08-29 10:29:32 -04:00
Paul Chiusano
6f01bccbba
fix for parse bug if keyword not followed by a space
2018-08-29 10:12:30 -04:00
Arya Irani
d42b955b5b
flesh out some stuff for ExistentialMismatch errors
2018-08-29 09:33:15 -04:00
Arya Irani
2dc77ba2f1
Merge branch 'master' into wip/pretty-errors
2018-08-29 07:47:12 -04:00
Arya Irani
b97bc7349b
error extractor for overapplied function
2018-08-28 22:24:05 -04:00
Arya Irani
33815dd72b
if/and/cond working again with extractors probably
2018-08-28 10:45:40 -04:00
Arya Irani
59555c8bc7
wip
2018-08-27 23:29:59 -04:00
Paul Chiusano
526904223f
started on Type.generalizeEffects
2018-08-27 17:39:45 -04:00
Paul Chiusano
e739e9e0e2
remove hack that would prevent effect inference of more than two concrete effects
2018-08-27 17:12:54 -04:00
Paul Chiusano
bb5c99a033
tests pass!!!
2018-08-27 17:06:32 -04:00
Paul Chiusano
bfaf9b8bd3
trying out new better approach to effect typechecking
2018-08-27 16:57:02 -04:00
Arya Irani
135a921066
refactoring error extractor
2018-08-25 18:54:33 -05:00
Paul Chiusano
dad98b2a3a
moar progress
2018-08-24 17:13:55 -04:00
Paul Chiusano
df54b0defc
filled in decompile and more of compile, including lambdas (untested)
2018-08-24 14:09:27 -04:00
Paul Chiusano
0a3f8aa625
Merge branch 'wip/stanzas' into topic/haskell-runtime
...
# Conflicts:
# parser-typechecker/src/Unison/ABT.hs
# parser-typechecker/src/Unison/Term.hs
# parser-typechecker/unison-parser-typechecker.cabal
2018-08-24 10:46:16 -04:00
Paul Chiusano
fb44a09d53
a bit of cleanup of Lexer.tree error reporting
2018-08-23 22:52:29 -04:00
Paul Chiusano
60af643c1c
define debugLex in terms of Lexer.T show instance
2018-08-23 22:18:21 -04:00
Paul Chiusano
afb98b5354
Tests all passing, also converted a few tests to intermingle type/effect/use statements
2018-08-23 22:10:26 -04:00
Paul Chiusano
f123140346
Merge remote-tracking branch 'origin/master' into wip/stanzas
2018-08-23 21:52:11 -04:00
Paul Chiusano
02c1bac920
untested draft of lexer reordering
2018-08-23 20:34:44 -04:00
Rúnar Óli Bjarnason
16ca2932d0
Fixed console.uu
2018-08-23 14:56:50 -04:00
Arya Irani
f693f8cc5a
split TypeError extraction from printing; skeleton for regression tests
2018-08-23 10:23:17 -04:00
Paul Chiusano
eec237ba1e
fix Type.unTuple to not crash on tuple types with variables
2018-08-22 22:00:25 -04:00
Paul Chiusano
5b6231df5e
get rid of EffectPure and EffectBind from term AST
2018-08-22 21:17:28 -04:00
Paul Chiusano
bbfff95c17
fix issue in case checking where scrutineeType and outputType weren't being refined after each branch
2018-08-22 20:58:49 -04:00
Paul Chiusano
7beb1ed09c
wip on lexer improvements
2018-08-22 18:07:58 -04:00
Rúnar Óli Bjarnason
9fcc4f9bf0
everything compiling with new pattern checking but tests not passing in effect pattern inference
2018-08-22 15:51:09 -04:00
Rúnar Óli Bjarnason
2ff4404be3
Adding a marker to checkCase
2018-08-22 12:27:25 -04:00
Rúnar Óli Bjarnason
544fd5511b
Checking patterns
2018-08-22 12:25:01 -04:00
Rúnar Óli Bjarnason
426675a5a0
wip
2018-08-21 17:33:22 -04:00
Rúnar Óli Bjarnason
8c4539a999
Typechecking patterns directly instead of synthing
...
a fake term.
2018-08-21 17:18:58 -04:00
Arya Irani
20c5fce4b3
rearrange and flesh out Extractor slightly
2018-08-21 15:25:19 -04:00
Paul Chiusano
709f44e5b2
minor fixes as part of tracking down problem with console.uu
2018-08-21 14:15:37 -04:00
Arya Irani
73d7164278
add InSynthesizeApps
2018-08-20 16:36:53 -04:00
Arya Irani
e448532a2b
pretty error for unknown type
2018-08-20 14:09:00 -04:00
Arya Irani
41e82b9747
Merge remote-tracking branch 'origin/master' into wip/pretty-errors
2018-08-20 13:21:43 -04:00
Paul Chiusano
bc507a748e
fix issue where continuation in handler was not being appropriately constrained
2018-08-20 12:21:33 -04:00
Arya Irani
45acb0fbc6
wip - pretty errors for ill-typed function applications
2018-08-19 22:52:44 -04:00
Arya Irani
726f11b6f1
partial improvement of parse error messages
2018-08-19 12:32:32 -04:00
Arya Irani
a4bab5f392
Set all the elements of Builtins' annotations to Intrinsic
2018-08-19 12:31:24 -04:00
Arya Irani
5a21c76ad7
pretty error for when applying args to something that isn't a function
2018-08-18 19:42:02 -04:00
Paul Chiusano
c00f4e51e5
Merge pull request #233 from unisonweb/topic/pretty-errors
...
one round of errors improvement
2018-08-18 08:07:44 -04:00
Arya Irani
202ce84251
render typechecker context with hash substitution
...
Γ
|start|
'start
|let-rec-marker66|
state5 : s -> Effect (State s) a -> a
'y73
'e74 = State UInt64
'i75 = Text
'a76 = Text
's77 = UInt64
vs
Γ
|start|
'start
|let-rec-marker66|
state5 : (a. (s. s -> Effect (#32xTLAhY s) a -> a))
'y73
'e74 = #32xTLAhY UInt64
'i75 = Text
'a76 = Text
's77 = UInt64
2018-08-17 23:10:34 -04:00
Arya Irani
da9d46001b
minor cleanup
2018-08-17 22:30:00 -04:00
Runar Bjarnason
b23f166769
Actually fail when TDNR has suggestions.
2018-08-17 22:21:51 -04:00
Runar Bjarnason
8561295191
We don't need monad-morph after all
2018-08-17 21:15:21 -04:00
Runar Bjarnason
f0bd066c16
cleanup
2018-08-17 21:11:39 -04:00
Runar Bjarnason
4b2d8e89de
OK, TDNR working correctly this time
2018-08-17 21:08:09 -04:00
Arya Irani
d85de446b6
improved error for mismatched case body types
2018-08-17 18:54:28 -04:00
Runar Bjarnason
501d940b99
Maybe this solves TDNR bugs
2018-08-17 18:26:15 -04:00
Arya Irani
a66ed121f7
pretty errors for ill-typed pattern guard
2018-08-17 18:14:36 -04:00
Arya Irani
b8d7cca267
pretty errors for vector element mismatch
2018-08-17 17:41:37 -04:00
Arya Irani
84f059dd3d
render Sequence a
as [a]
2018-08-17 16:45:30 -04:00
Runar Bjarnason
8b900db65d
Wip wip
2018-08-17 16:43:55 -04:00
Arya Irani
59f24188f6
if/and/or-related type errors should be working now
...
code looking a bit less ugly too.
2018-08-17 16:39:33 -04:00
Arya Irani
b56b8b1dc3
fix false positive on or
errors
...
still need to update for cond/and, and start using (<|>)
2018-08-17 16:14:07 -04:00
Runar Bjarnason
b3e9f23194
Fuller API for Result monad
2018-08-17 15:45:56 -04:00
Arya Irani
1c682f55b5
sketched out cases for ExistentialMismatch (if/vector/case)*
...
* the checks yield false positives, see https://app.asana.com/0/781300632285932/783413200023835/f
- factored out "fromOverHere" to do a right thing for 0, 1, 2 other locations
- still haven't found a great model for extractors, but fixing the above bug may lead to something.
2018-08-17 14:32:58 -04:00
Arya Irani
b1bba8f8cc
sharing code for if/and/or; split if-typchecking into two steps
2018-08-17 10:48:10 -04:00
Arya Irani
6020ff2a72
added and- and or- specific type errors, but somehow broke Blockquote coloring?
2018-08-16 23:18:15 -04:00
Arya Irani
5ee2ab20a9
Merge branch 'master' into topic/pretty-errors
...
# Conflicts:
# parser-typechecker/src/Unison/PrintError.hs
2018-08-16 19:00:53 -04:00
Arya Irani
bfffd2f52d
add ex1.u discussion of recursive/interactive type errors
...
also remove columns and "colored"
2018-08-16 17:45:50 -04:00
Runar Bjarnason
28ec096a4e
Kill the computer
2018-08-16 12:42:38 -04:00
Arya Irani
8f94c4bb27
render hash types in unknown term message
2018-08-16 10:48:41 -04:00
Runar Bjarnason
e351635722
Merge branch 'master' into topic/tdnr2
2018-08-16 10:42:26 -04:00
Runar Bjarnason
955f525703
Type-directed name resolution, phase 2
2018-08-15 16:40:13 -04:00
Runar Bjarnason
f3f9dd2b9a
Wip with TDNR figuring out foo x y = x + 1 + y + 2
2018-08-14 22:03:20 -04:00
Runar Bjarnason
15a526b894
wip with writer monad
2018-08-14 21:13:07 -04:00
Runar Bjarnason
9f5135a97d
Actually look up types of references
2018-08-14 20:02:11 -04:00
Arya Irani
5590f5238a
add type signatures to tests to eliminate repl warnings
2018-08-14 16:39:42 -04:00
Paul Chiusano
5af38fb39b
Merge branch 'master' into wip/effects
...
# Conflicts:
# parser-typechecker/src/Unison/PrintError.hs
# parser-typechecker/src/Unison/Typechecker/Context.hs
# parser-typechecker/tests/Unison/Test/Typechecker.hs
2018-08-14 16:13:50 -04:00
Paul Chiusano
53a726c8a8
remove debugging statements
2018-08-14 12:58:08 -04:00
Paul Chiusano
1751383915
Revert "further simplified ability check"
...
This reverts commit bdd6097286
.
2018-08-14 12:54:43 -04:00
Runar Bjarnason
4f5f0ed1be
TDNR actually does work. Phase 1. Phase 2 is fixpoint.
2018-08-14 10:47:37 -04:00
Paul Chiusano
012d1b6de8
added inference of multiple effects
2018-08-13 22:41:01 -04:00
Paul Chiusano
bdd6097286
further simplified ability check
2018-08-13 22:27:04 -04:00
Paul Chiusano
55b5c608ce
simplifying ability check
2018-08-13 22:18:01 -04:00
Paul Chiusano
773d4a421e
tests passing
2018-08-13 22:12:43 -04:00
Paul Chiusano
50d1f385a2
all but one test passing
2018-08-13 20:04:21 -04:00
Runar Bjarnason
b938e1f530
Remove notes that we're handling in tdnr
2018-08-13 19:56:27 -04:00
Paul Chiusano
ac55ce1dc6
possibly more progress
2018-08-13 18:30:37 -04:00
Paul Chiusano
7ffb9c3ce7
more progress
2018-08-13 18:22:33 -04:00
Paul Chiusano
f8d48205f6
allowing effect variables in type signatures to be instantiated to multiple effects
2018-08-13 16:32:02 -04:00
Runar Bjarnason
7c55d507b7
TDNR seems to work!
2018-08-13 14:18:12 -04:00
Runar Bjarnason
03f2beb6aa
Merge branch 'topic/pretty-errors' of github.com:unisonweb/unison into topic/type-directed
2018-08-13 14:13:56 -04:00
Paul Chiusano
c87997e482
tests all pass
2018-08-13 12:38:53 -04:00
Arya Irani
f3e3e60b1e
debugging hidden highlighting
2018-08-13 12:25:34 -04:00
Arya Irani
7d843f1660
minor cleanup
2018-08-13 12:25:16 -04:00
Paul Chiusano
c29742a958
simplify synthesizeApp
2018-08-13 10:51:44 -04:00
Paul Chiusano
289781827f
diagnostics
2018-08-11 14:43:41 -04:00
Paul Chiusano
93e701365d
withAbilityCheckFor is a bit more sophisticated now - it removes from ambient any effect it will shadow
2018-08-11 01:00:10 -04:00
Paul Chiusano
b9923b3be9
huzzah
2018-08-11 00:41:01 -04:00
Paul Chiusano
46c6fac08c
woot
2018-08-11 00:17:17 -04:00
Paul Chiusano
227a545214
simple test for effect inference
2018-08-11 00:15:22 -04:00
Paul Chiusano
165123514d
withoutAbilityChecksFor now correctly chains
2018-08-10 23:50:34 -04:00
Runar Bjarnason
4721d06c28
Merge branch 'topic/pretty-errors' of github.com:unisonweb/unison into topic/type-directed
2018-08-10 16:11:24 -04:00
Arya Irani
5bb74984b7
Unison.Test.Typechecker now renders error messages on failure
2018-08-10 16:01:05 -04:00
Runar Bjarnason
47b8e5c7d3
Merge branch 'topic/typechecker-test2' of github.com:unisonweb/unison into topic/type-directed
2018-08-10 14:25:21 -04:00
Paul Chiusano
9e3148937b
all but one test passing, something with handle inference
2018-08-10 13:12:12 -04:00
Paul Chiusano
713fbe8396
Merge remote-tracking branch 'origin/topic/pretty-errors' into wip/effects
2018-08-10 11:25:29 -04:00
Paul Chiusano
528976e9cc
simplify subtype, add effect inference, still debugging a couple failing tests
2018-08-10 11:25:13 -04:00
Arya Irani
0e302bb040
rename Unison.Test.Typechecker2 to Typechecker
2018-08-09 16:09:46 -04:00
Arya Irani
a5f9c9729d
moved the last of the tests from Unison.Test.Typechecker into individual files
2018-08-09 16:08:51 -04:00
Runar Bjarnason
f7bd352b2f
TDNR while synthing a file
2018-08-09 15:39:18 -04:00
Arya Irani
69106535d0
misc fixes:
...
- can call bootstrap without output file if no output file is desired
- look up References when rendering the file body type printed by bootstrap
- generalize PrintError.{renderType,renderType',renderKind,showRef'}
- add original note to AbilityCheckFailure for debugging
2018-08-09 15:33:46 -04:00
Runar Bjarnason
f9287ed216
Synth and resolve
2018-08-09 15:02:20 -04:00
Runar Bjarnason
9ac1901d61
remove stray typew
2018-08-09 14:37:37 -04:00
Runar Bjarnason
d2a7745a90
I think that solves TDNR
2018-08-09 14:36:49 -04:00
Paul Chiusano
f2abb2af53
tests pass
2018-08-09 09:06:56 -04:00
Paul Chiusano
fd43238e80
redo instantiateL/R
2018-08-09 08:47:22 -04:00
Paul Chiusano
693578e87c
effect inference wip
2018-08-09 08:30:08 -04:00
Runar Bjarnason
7900702347
well, it typechecks.
2018-08-08 21:28:03 -04:00
Paul Chiusano
3ac74f3db0
in progress on effect inference
2018-08-07 17:10:52 -04:00
Paul Chiusano
84ea1fc232
tests passing after refactoring
2018-08-07 13:26:29 -04:00
Arya Irani
2fd89ae6ee
moved a couple typechecker tests to .u files
2018-08-07 13:25:05 -04:00
Arya Irani
680b418073
some lovely cleanup in PrintError
2018-08-07 13:22:59 -04:00
Paul Chiusano
c8855b42a8
wip
2018-08-07 11:42:32 -04:00
Paul Chiusano
6b03258508
fix tests, make map/traverse test pending
2018-08-06 22:09:05 -04:00
Paul Chiusano
51470c980f
fix a test that was previously pending
2018-08-06 21:22:06 -04:00
Paul Chiusano
2159030820
Merge pull request #224 from unisonweb/topic/typechecker-test2
...
typechecker tests from files on disk
2018-08-06 21:14:06 -04:00
Paul Chiusano
1ce7420724
fix issue with let rec checking/inference
...
previously, we were inferring a completely incorrect type for bindings with a user-provided annotation
2018-08-06 21:12:42 -04:00
Arya Irani
ee644e79a0
Unison.Test.Typechecker2 typechecks unison files from unison-src/{tests,errors}
2018-08-06 19:47:09 -04:00
Paul Chiusano
949eb25280
uncomment logContext and fix instances for debugging
2018-08-06 18:32:52 -04:00
Paul Chiusano
307225677e
Merge remote-tracking branch 'origin/topic/pretty-errors' into fix/effects
...
# Conflicts:
# parser-typechecker/src/Unison/PrintError.hs
2018-08-06 18:09:28 -04:00
Arya Irani
7aee925a83
add unison-src/errors/X-array.u
program which passes typechecking when it shouldn't
2018-08-06 17:51:43 -04:00
Arya Irani
2506bf12ce
add note debug summary to type mismatch error
2018-08-06 17:50:48 -04:00
Arya Irani
cb0d2efbe7
fix bug describing Type1/Type2; break up type mismatch message
2018-08-06 17:49:54 -04:00
Arya Irani
163da591ff
simplify calls to PrintError.renderType
2018-08-06 16:11:29 -04:00
Runar Bjarnason
54789edc46
Keep unqualified names in env
2018-08-06 13:55:51 -04:00
Paul Chiusano
ad24ecac1f
Merge remote-tracking branch 'origin/topic/pretty-errors' into fix/effects
2018-08-06 13:26:44 -04:00
Arya Irani
6dc37b45fa
render types in ability check failure error
2018-08-06 13:26:32 -04:00
Paul Chiusano
097f130036
Merge remote-tracking branch 'origin/topic/pretty-errors' into fix/effects
2018-08-06 13:21:20 -04:00
Arya Irani
6a5263941d
resolve References to names in error printout?
2018-08-06 13:17:29 -04:00
Paul Chiusano
a4b17f0a0e
fix typechecking of EffectBind
2018-08-06 13:14:32 -04:00
Arya Irani
2d4ef88d4a
Merge remote-tracking branch 'origin/fix/effects' into topic/pretty-errors
2018-08-06 13:12:45 -04:00
Arya Irani
5fe4f6b5c9
render errors with 6 lines of separation before dropping lines from excerpt
2018-08-06 12:18:52 -04:00
Paul Chiusano
9f86399e70
fail gracefully in EffectBind checking rather than crashing the compiler
2018-08-06 12:18:30 -04:00
Paul Chiusano
2bbd9453ac
substitute the context before printing type errors
2018-08-06 09:59:54 -04:00
Paul Chiusano
0076fb2bab
synthesizeApp should strip any effects from the function type
2018-08-05 23:55:31 -04:00
Paul Chiusano
bfbff8eec8
fix unArrows and add a simple test for it
2018-08-05 22:40:23 -04:00
Paul Chiusano
9f2a040c72
Merge remote-tracking branch 'origin/topic/pretty-errors' into topic/delay
2018-08-05 21:44:37 -04:00
Paul Chiusano
e93aa9822e
got rid of delay keyword! works to just make ' bind looser than keyword based blocks
...
so you can just write `spawn 'let <block>`
2018-08-05 08:59:18 -04:00
Arya Irani
0942f7ad9d
added more hopefully helpful typechecker output
2018-08-04 08:15:23 -04:00
Arya Irani
db7c8f74b5
more tweaking of message i've never seen displayed
2018-08-04 00:00:47 -04:00
Arya Irani
92dca8ca8c
tweaked message slightly
2018-08-03 23:54:49 -04:00
Arya Irani
1cc02f7f78
add some more basic output for previously unhandled type errors
2018-08-03 23:50:39 -04:00
Arya Irani
4cc8848270
stack's incremental recompilation failed me
2018-08-03 19:31:59 -04:00
Arya Irani
5a9afe4611
Eliminated the P.ShowErrorComponent instance and replaced with first cut of AnnotatedText stuff
2018-08-03 19:24:07 -04:00
Arya Irani
9495e9790b
(not compiling) filled in something for PrintError.prettyParseError
2018-08-03 18:40:40 -04:00
Arya Irani
d635dcf6b2
Merge branch 'topic/delay' of github.com:unisonweb/unison into topic/pretty-errors (noncompiling)
...
# Conflicts:
# parser-typechecker/src/Unison/PrintError.hs
2018-08-03 18:28:14 -04:00