Commit Graph

2653 Commits

Author SHA1 Message Date
Chris Gibbs
eac377537a A few failing typechecker tests
- tests/delay_parse.uu - () -> {T} '() does not parse - interaction between the ' and the {T}
- tests/match_unit.uu - can't match on () in a pattern
- tests/hole.u - holes don't seem to be supported yet
- errors/effect_unknown_type.uu - no error when using an unknown type in an effect declaration

These are the things I found while getting the following to compile, which it now does! :-)  It's a sketch of how the Remote API might break down in to constituent effects.

https://gist.github.com/atacratic/99fb707a7cb96bcd714cc1c024a7e08e
2018-08-26 21:14:32 +01: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
9f03e7d31c forgot to add tests that exercise this to the commit 2018-08-24 09:26:12 -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
217439dcf6
Merge pull request #236 from unisonweb/fix/console.uu
Fixed console.uu
2018-08-23 15:11:12 -04:00
Rúnar Óli Bjarnason
16ca2932d0 Fixed console.uu 2018-08-23 14:56:50 -04:00
Rúnar Óli Bjarnason
55eb29ad18 Added editor support for vim 2018-08-23 10:43:52 -04:00
Arya Irani
f693f8cc5a split TypeError extraction from printing; skeleton for regression tests 2018-08-23 10:23:17 -04:00
Rúnar
4acf38abfc
Merge pull request #235 from unisonweb/topic/patterntypes
More robust implementation of pattern typechecking
2018-08-23 10:02:34 -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
7d1a46eefe test now passing 2018-08-22 21:08:53 -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
Paul Chiusano
06a53f232a added some pending tests 2018-08-22 10:57:18 -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
95214e66f1 simpler console.uu example 2018-08-21 14:16:35 -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
452fa3066a ./scripts/watchany.sh
- watches for changes to any .u, .hs, or .scala file
- initial .u file can be provided as command-line argument, otherwise most-recently modified .u file will be used
- defer building scala runtime until .u typechecks or .scala files are edited
2018-08-20 21:46:28 -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
d2399a46d1 update ./scripts/watch2.sh
continue watching for changes even if initial haskell build fails
2018-08-19 22:52:26 -04:00
Paul Chiusano
c3ad188ffd
Merge pull request #234 from unisonweb/topic/pretty-errors
pretty error for when applying args to something that isn't a function
2018-08-19 22:03:42 -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
Paul Chiusano
f78bc60ca0
Merge pull request #232 from unisonweb/topic/tdnr
Fix bug in TDNR
2018-08-18 08:05:01 -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