Commit Graph

114 Commits

Author SHA1 Message Date
Runar Bjarnason
28ec096a4e Kill the computer 2018-08-16 12:42:38 -04:00
Arya Irani
184065d87b add some pattern matching tests 2018-08-16 11:34:37 -04:00
Arya Irani
c579ad9345 add pending tictactoe.uu program 2018-08-16 11:32:01 -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
15a526b894 wip with writer monad 2018-08-14 21:13:07 -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
Runar Bjarnason
4f5f0ed1be TDNR actually does work. Phase 1. Phase 2 is fixpoint. 2018-08-14 10:47:37 -04:00
Paul Chiusano
60ae54c0b5 updating map reduce 2018-08-13 23:40:03 -04:00
Runar Bjarnason
b938e1f530 Remove notes that we're handling in tdnr 2018-08-13 19:56:27 -04:00
Runar Bjarnason
7c55d507b7 TDNR seems to work! 2018-08-13 14:18:12 -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
Paul Chiusano
713fbe8396 Merge remote-tracking branch 'origin/topic/pretty-errors' into wip/effects 2018-08-10 11:25:29 -04:00
Arya Irani
3b5217674f unison-src/errors/state3.uu currently typechecks, even though it uses but doesn't handle the effect-pure case 2018-08-09 16:19:01 -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
Arya Irani
5f8e093917 a couple more error examples 2018-08-08 23:20:38 -04:00
Arya Irani
90be707834 add a couple tests, and shuffled some others around. 2018-08-08 22:21:57 -04:00
Arya Irani
2fd89ae6ee moved a couple typechecker tests to .u files 2018-08-07 13:25:05 -04:00
Paul Chiusano
69e026ac55 update test files 2018-08-07 13:09:35 -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
Arya Irani
ee644e79a0 Unison.Test.Typechecker2 typechecks unison files from unison-src/{tests,errors} 2018-08-06 19:47:09 -04:00
Paul Chiusano
06f9c91525 simpler failing example 2018-08-06 18:23:17 -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
Paul Chiusano
2bbd9453ac substitute the context before printing type errors 2018-08-06 09:59:54 -04:00
Paul Chiusano
4697c27c8e forgot to add this to commit, updated test file for new syntax 2018-08-05 19:10:59 -04:00
Paul Chiusano
30dcb4ccd7 started on map-reduce example, hit a bunch of bugs along the way 2018-08-03 18:47:12 -04:00
Arya Irani
02ccef19b8 Merge branch 'topic/delay' of github.com:unisonweb/unison into topic/pretty-errors
# Conflicts:
#	parser-typechecker/src/Unison/PrintError.hs
#	parser-typechecker/src/Unison/Util/ColorText.hs
2018-08-03 13:54:30 -04:00
Arya Irani
d402ecbc13 map Intrinsic over builtin types; make some tweaks to typemismatch error 2018-08-03 11:51:43 -04:00
Arya Irani
88086f6e3c fix off-by-one highlight end issue 2018-08-03 10:43:08 -04:00
Paul Chiusano
aea87a6e07 simplify syntax 2018-08-03 03:50:54 -04:00
Paul Chiusano
52bc19143e imports, can appear at start of any block
import Monoid.[zero, +]
import Math.sqrt
2018-08-03 03:50:54 -04:00
Arya Irani
28b4af17ff move bootstrap.sh and test.sh to scripts/ and add watch.sh also 2018-08-03 03:50:54 -04:00
Arya Irani
21e01fecf8 move bootstrap.sh and test.sh to scripts/ and add watch.sh also 2018-08-02 16:45:54 -04:00
Paul Chiusano
545f1c08c0 Merge remote-tracking branch 'origin/topic/pretty-errors' into topic/delay 2018-08-01 23:17:36 -04:00
Paul Chiusano
2dc12661dd Added syntax sugar: 'x for () -> x, !x for x(), and a delay layout block 2018-08-01 23:16:53 -04:00
Arya Irani
3924123584 syntax error in example 2018-08-01 22:21:30 -04:00
Arya Irani
1f6c4d86ec use splitAndRenderWithColor to minimize source output 2018-08-01 21:53:31 -04:00
Arya Irani
0e03bbd8e6 fix missing unparenthesized types in PrintError.renderType.paren 2018-08-01 21:45:50 -04:00
Arya Irani
74faf73c9f added example type
errors
2018-08-01 19:01:08 -04:00
Arya Irani
6622df402e debugging the error display for unison-src/tests/if.uu 2018-08-01 17:32:45 -04:00
Paul Chiusano
a222a46353 fix scala tests to for new Foo.+ (vs +_Foo) syntax for qualified operators, also reduced test sizes for Sequence a bit so they don't take forever 2018-07-30 09:30:13 -04:00
Paul Chiusano
ee3c8bd29a Added some notes and example errors, generalized Term a bit to allow type annotations to contain locations.
Moving `check` over to Context2 and still fixing compiler errors there
2018-07-10 17:36:10 -04:00
Arya Irani
a91b6c81a8 no more stack allocations for Stream
`fp_s` and `fppp_s` accept a function returning `EnvTo[Foo]`.
The environment is passed to the resulting `EnvTo[Foo]` before
encoding the `Foo` as normal.
2018-07-07 17:49:59 -04:00
Arya Irani
dcbe3cc4d8 seems to have largely fixed itself in my sleep
the typedecl parser for builtins seems to work fine
fixed prettyprinting of tuples
fixed logic error in OptionalTC.isEmpty
added tuple.u and unfold.u tests
2018-07-07 13:00:39 -04:00
Arya Irani
ea3b4291b5 wip/failing attempt to implement Stream.unfold, which requires an Option type
Somehow I broke Pair, or something to do with Pair wrapped in Option?
2018-07-06 23:58:12 -04:00
Arya Irani
a4ef66e645 bugfix and tests for Stream.flatMap 2018-07-05 23:10:30 -04:00
Arya Irani
1f556f0bb1 add tests for Stream.takeWhile/dropWhile/zipWith
untested: flatMap/constant (doesnt terminate)
2018-07-05 13:22:45 -04:00
Arya Irani
510e0c07aa add Stream.sum/append 2018-07-04 22:42:20 -04:00
Arya Irani
3063e7e57f add more Stream builtins and thread env through (see more...)
added `fs_p`, `fpps_p`, etc and the `StackDecode` typeclass, which describes how
  to decode a value which needs access to a stack.

builtin function adapter helper naming convention guide:
`u` = unison unboxed
`b` = Scala Boolean as unboxed booleana
`l` = Scala Long as unboxed int64
`n` = Scala Int as unboxed uint64
`d` = Scala Double as unboxed float
`p` = "polymorphic", some generic type not known to be unboxed
`s` = "stack decode", some input parameter requiring access to the runtime stack to be decoded
`z` = laZy, a result type for which the decompiled form has to be recorded with each operation, as opposed to being derived from a Value.

`p` is used when a function accepts a an `Env => Stream` that will not be consumed
`s` is used when a function accepts a `Stream` (no `Env`) that will be consumed
`z` is used when a function returns a `Stream`

add pretty printing for `Tuple` and `Sequence`
2018-07-04 21:32:56 -04:00
Arya Irani
724e93e1c8 boost HOF stack size and un-minify stream test 2018-06-29 18:44:57 -04:00