Runar Bjarnason
2c6c19ca25
parse Handlers
2018-07-23 16:26:19 -04:00
Runar Bjarnason
925c32bb6a
Lam
2018-07-23 16:23:23 -04:00
Runar Bjarnason
8881f76f2a
Term parser wip
2018-07-23 15:49:13 -04:00
Runar Bjarnason
8ea9f850dd
Parser for annotated types
2018-07-23 11:45:52 -04:00
Runar Bjarnason
d5ea88758b
Merge branch 'master' of https://github.com/unisonweb/unison into topic/parser
2018-07-23 10:06:59 -04:00
Arya Irani
e758dcdfc4
broke up "grab bag" into separate tests
2018-07-20 11:45:51 -04:00
Runar Bjarnason
f2ab36cbb4
wip
2018-07-20 10:52:11 -04:00
Runar Bjarnason
4fa4372aa4
Revert "Track position in parser state like an adult"
...
This reverts commit 14c00213e3
.
2018-07-20 10:11:25 -04:00
Paul Chiusano
befcb2ce0d
better names + docs
2018-07-20 03:53:10 -04:00
Paul Chiusano
1f8ed3a8ad
Rework typechecker Note type to be in more convenient form for display and analysis
...
Root cause is readily available along with list of path elements for additional detail
2018-07-20 03:40:42 -04:00
Paul Chiusano
76d1cf47cf
generalize Result a bit to not care about the note type
2018-07-20 03:05:42 -04:00
Paul Chiusano
0278682684
Fix stray use of non-minimized term in check
2018-07-19 21:43:58 -04:00
Paul Chiusano
b9a577f4d4
fix issue that was causing ill-formed contexts
...
Ill formed contexts (not types) were causing a number of tests to fail.
During let rec checking / inference, we were using the same variable for both the marker and the first binding of the let rec. This resulted in contexts being ill-formed if the binding had a user-provided annotation but worked fine as long as the first binding was being inferred.
As for why we didn't notice this before, I think we have a typo in when we are calling minimize' (to eliminate needless let rec), so the let rec is not being removed and we are hitting a case that wasn't hit before.
2018-07-19 21:34:40 -04:00
Arya Irani
ce339463e5
refactor "bombs" test in typechecker
2018-07-19 19:47:08 -04:00
Paul Chiusano
7dfab33fa1
fix warning and add test that should be failing
2018-07-19 19:28:27 -04:00
Paul Chiusano
bcf3dcb055
implemented verifyClosedTerm and unscrambled synthesize (effect/constructor)
2018-07-19 19:14:26 -04:00
Paul Chiusano
e4b6cef44c
Refactoring to get tests passing
2018-07-19 18:35:05 -04:00
Arya Irani
e45fe8f60b
a little moar stuff
2018-07-19 17:39:47 -04:00
Paul Chiusano
8782f7ef4a
moar progress
2018-07-19 17:32:50 -04:00
Runar Bjarnason
14c00213e3
Track position in parser state like an adult
2018-07-19 17:03:00 -04:00
Runar Bjarnason
9684e355af
wip
2018-07-19 16:36:23 -04:00
Arya Irani
1c2015d1a4
noncompiling WIP trying to fix failing tests
2018-07-19 16:12:22 -04:00
Paul Chiusano
7ea0851279
IT COMPILES
2018-07-19 15:27:00 -04:00
Paul Chiusano
67f58ba967
main project compiles, now working on tests
2018-07-19 15:09:34 -04:00
Arya Irani
09dc4955bc
futzing with data and effect declaration lookups in FileParsers.hs
2018-07-19 14:20:31 -04:00
Arya Irani
15c50a89e3
move Result and Note to Unison.Result
2018-07-19 14:00:43 -04:00
Arya Irani
e6db7284bf
removed Note class from Typechecker
2018-07-19 13:50:38 -04:00
Arya Irani
de80b7a200
started replacing Context with Context2 (non-compiling)
2018-07-18 17:44:05 -04:00
Runar Bjarnason
9ce9e0e41a
Merge branch 'topic/typechecker2' into topic/parser
2018-07-18 16:44:59 -04:00
Runar Bjarnason
93ca412010
Merge branch 'topic/typechecker2' into topic/parser
2018-07-18 16:43:51 -04:00
Runar Bjarnason
47855264c0
Type parser
2018-07-18 16:43:22 -04:00
Arya Irani
774721d4bb
synthesize Match terms
2018-07-18 15:46:58 -04:00
Arya Irani
c276833e5e
great.
2018-07-18 15:36:19 -04:00
Arya Irani
8cb1207cbf
Renamed app and ann to app_ and _ann and app' and ann' to app and ann
2018-07-18 12:40:24 -04:00
Arya Irani
ebec32218a
move pattern LetRecNamedAnnotated'
2018-07-18 12:31:41 -04:00
Arya Irani
e14c55e3be
*now* did Term.letRec
2018-07-18 12:29:04 -04:00
Arya Irani
86ca9fd7cc
refactoring Term.lam/let1/letrec
2018-07-18 12:27:36 -04:00
Arya Irani
ef58064093
updated smart constructors for Term.{apps,iff,lam,effectPure,effectBind}
2018-07-18 12:10:08 -04:00
Paul Chiusano
06733122f9
Term.vector
2018-07-18 11:50:24 -04:00
Paul Chiusano
c9c5bb5c16
Term.and/or and fixed warnings
2018-07-18 11:45:49 -04:00
Paul Chiusano
0784c0e694
Term.handle
2018-07-18 11:39:03 -04:00
Paul Chiusano
a2da4664af
Term.match
2018-07-18 11:34:58 -04:00
Paul Chiusano
9453fb9aa2
Term.constructor now annotated
2018-07-18 11:31:58 -04:00
Paul Chiusano
0d918e4633
update more Term smart constructors to take an annotation
2018-07-18 11:24:05 -04:00
Paul Chiusano
edd0e84e70
Term.builtin/derived/ref smart constructors now take annotations.
2018-07-18 11:16:10 -04:00
Paul Chiusano
5b38f58a23
WIP converting Term smart constructors (compiling)
2018-07-18 11:09:38 -04:00
Paul Chiusano
7823eff70c
Surgically added locations to patterns without breaking any uses
...
New code should import PatternP module, old code can use Pattern module as is
2018-07-18 10:52:53 -04:00
Arya Irani
99d99b880d
synthesize EffectPure, EffectBind using pretty unconvincing annotations; Handle. Start on checkCase
2018-07-17 17:53:05 -04:00
Arya Irani
70224f8506
synthesize Let, Lam, LecRec, If, And, Or
2018-07-17 16:46:59 -04:00
Runar Bjarnason
fe634fb257
Parser stream instance
2018-07-17 15:19:21 -04:00
Paul Chiusano
bde5e3c8ba
filled in synthesize for let of binding that is a closed expression
2018-07-17 13:35:23 -04:00
Paul Chiusano
71d5c68c8f
ported synthesizeApp and filled in a bit more of synthesize
2018-07-17 11:12:33 -04:00
Arya Irani
3088658df8
part of synthesize
2018-07-16 18:15:00 -04:00
Arya Irani
18e2782d74
instantiateR
2018-07-16 17:22:00 -04:00
Arya Irani
5254bf43b4
add solve and instantiateL
2018-07-16 17:03:34 -04:00
Paul Chiusano
2b260a84d9
generalized Components.minimize to work for annotated terms
2018-07-16 16:25:44 -04:00
Paul Chiusano
0341209a07
handle block checking uncommented
2018-07-16 13:47:52 -04:00
Paul Chiusano
810a1de7f5
uncommenting more of check and removed redundant loc parameter from subtype
2018-07-16 13:14:49 -04:00
Paul Chiusano
8347983776
more progress
2018-07-16 13:03:28 -04:00
Paul Chiusano
4f2e362b81
uncommenting check line by line
2018-07-16 12:32:43 -04:00
Paul Chiusano
84a69597f8
annotateLetRecBindings
2018-07-16 12:24:23 -04:00
Paul Chiusano
3e11768fcf
generalizeExistentials ported
2018-07-16 12:07:19 -04:00
Paul Chiusano
5644f47622
code compiling with the Type smart constructor changes
2018-07-16 11:48:28 -04:00
Runar Bjarnason
a155954e92
Added end positions to lexer
2018-07-15 13:39:15 -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
a20011a1c0
apply is done and also abilityCheck
2018-07-09 16:48:40 -04:00
Paul Chiusano
a4a1f6973c
modify type smart constructors to set annotations
2018-07-09 16:30:29 -04:00
Paul Chiusano
591317fff4
Merge remote-tracking branch 'origin/master' into topic/typechecker2
...
# Conflicts:
# parser-typechecker/src/Unison/Builtin.hs
# parser-typechecker/src/Unison/FileParser.hs
2018-07-09 13:08:48 -04:00
Paul Chiusano
e6b8651f95
progress on implementing subtype
2018-07-09 12:56:53 -04:00
Paul Chiusano
87738bf546
revamped compilerCrash to return notes
2018-07-09 11:12:41 -04:00
Paul Chiusano
c1c84b8cbb
switching to version of typechecking monad which can fail
2018-07-09 10:13:18 -04:00
Arya Irani
7deab18a05
refactoring Builtins slightly in anticipation of replacing our current builtin data constructors with hashes
2018-07-07 15:09:58 -04:00
Arya Irani
28cbbdd306
want to parse type () = ()
but can't
2018-07-07 13:43:24 -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
Paul Chiusano
7cc248c69c
compiling with location-aware typechecker, about 1/3 of the way through moving over stuff from Context
2018-07-03 19:20:55 -04:00
Arya Irani
a65b809b8c
(noncompiling) WIP on refactoring typechecker to be able to plumb location info around and report multiple errors
2018-07-03 17:40:34 -04:00
Arya Irani
21935173d3
runtime FileCompilationTests
2018-06-29 15:42:59 -04:00
Paul Chiusano
971d9c4b1f
lexer draft done (REPL-tested only)
2018-06-28 22:35:01 -04:00
Paul Chiusano
4d75f509df
Merge branch 'topic/parser' of https://github.com/unisonweb/unison into topic/parser
2018-06-28 17:01:26 -04:00
Paul Chiusano
04a46d2edc
more progress on lexer
2018-06-28 17:01:15 -04:00
Runar Bjarnason
c717ff4ee3
Merge branch 'topic/parser' of https://github.com/unisonweb/unison into topic/parser
2018-06-28 16:32:59 -04:00
Runar Bjarnason
87d69697e1
Parser2
2018-06-28 16:32:42 -04:00
Paul Chiusano
84d4adf40b
progress
2018-06-28 15:32:31 -04:00
Paul Chiusano
943d6a290c
minor update to return type - tokens returns a [(Token, Position)] where Position is (Line, Column)
2018-06-28 12:29:32 -04:00
Runar Bjarnason
814309179c
Slight modification to the lexer
2018-06-28 12:21:00 -04:00
Paul Chiusano
f6cb382888
stubbed out lexer interface
2018-06-28 11:41:34 -04:00
Arya Irani
41497a1240
remove some debug tracing from tests
2018-06-27 11:52:32 -04:00
Arya Irani
d6c2f167c6
add easytest "pending" combinator to hide our shame
2018-06-27 11:34:21 -04:00
Arya Irani
006f302393
bind builtin types in file parser
2018-06-27 10:53:07 -04:00
Arya Irani
53dea9f616
add UnisonFile.bindBuiltins
and another failing test
2018-06-27 10:21:50 -04:00
Arya Irani
ff2fc7a1c1
produce non-zero exit code when parser/typechecker fails
2018-06-25 19:29:06 -04:00
Paul Chiusano
7b634bac54
added failing test
2018-06-25 10:12:06 -04:00
Paul Chiusano
3128445e56
better test for nullary effects
2018-06-23 15:48:53 -04:00
Paul Chiusano
6e8cba1c9f
allow nullary effects
2018-06-23 15:45:37 -04:00
Paul Chiusano
5710b64adc
cleanup
2018-06-23 15:28:25 -04:00
Paul Chiusano
88a0380206
cleanup
2018-06-23 01:38:49 -04:00
Paul Chiusano
01afde5f20
tests passing
2018-06-23 01:27:30 -04:00
Paul Chiusano
70401e634b
some cleanup of diagnostics
2018-06-22 21:34:04 -04:00
Paul Chiusano
18b94eb3de
much simpler implementation of Handle block synthesis
2018-06-22 17:35:43 -04:00
Paul Chiusano
fc762e0ab6
debugging
2018-06-22 17:26:30 -04:00
Paul Chiusano
c20a2a89ef
test of using map
with an effectful traverse with multiple effects
2018-06-22 16:58:05 -04:00
Paul Chiusano
b01ed23906
existentials can be instantiated to effect types now
2018-06-22 16:53:29 -04:00
Paul Chiusano
5a78126401
let1 was missing a context retraction of the variable it introduced
2018-06-22 09:14:07 -04:00
Paul Chiusano
012b765604
change inference of _
- it is just synthesized to a fresh existential
2018-06-22 09:13:25 -04:00
Paul Chiusano
9c13fa1196
added some tests that should fail (but aren't)
2018-06-21 22:54:26 -04:00
Paul Chiusano
96b328e924
Improving diagnostics a bit
2018-06-21 21:52:57 -04:00
Paul Chiusano
aa5fe6917c
test of List.map
2018-06-21 21:22:26 -04:00
Paul Chiusano
248c618600
cleanup
2018-06-21 21:03:39 -04:00
Paul Chiusano
0afb4b094a
tests passing
2018-06-21 20:55:17 -04:00
Paul Chiusano
e0e0534449
test passes, but there seems to be some bug where body of a let doesn't get access to the same effects as the bindings
2018-06-21 19:29:27 -04:00
Paul Chiusano
06528814c9
deleted complicated logic for instantiateR, since effect checking is now handled in subtype and all effects are eliminated before reaching instantiateL/R
2018-06-21 18:42:34 -04:00
Paul Chiusano
b24e8b218e
fix typo in test (Int instead of Int64)
2018-06-21 18:31:05 -04:00
Paul Chiusano
ae72fa22c7
report free type vars before starting typechecking
2018-06-21 18:30:43 -04:00
Paul Chiusano
a38ebba0e2
fix typo in test
2018-06-21 18:05:53 -04:00
Paul Chiusano
4f074273fc
progress, fixed issue with subtyping of Effect types and also issue with checking of handle blocks
2018-06-21 18:02:47 -04:00
Paul Chiusano
5901c2f8e5
added an additional test
2018-06-21 17:44:55 -04:00
Paul Chiusano
d1f653dd01
got one additional test passing, added a few more tests
2018-06-21 16:58:03 -04:00
Paul Chiusano
8e3370e228
got some more tests working - checking of handle blocks was WRONG
2018-06-21 16:18:26 -04:00
Paul Chiusano
accdf4b74d
added some failing tests
2018-06-21 15:45:59 -04:00
Runar Bjarnason
e6d0c6031f
Improved checking of letrecs.
2018-06-21 13:52:48 -04:00
Runar Bjarnason
d03e48a77b
Debugging letrec typechecking
2018-06-21 12:49:12 -04:00
Paul Chiusano
19c20553f1
some debugging / diagnostics
2018-06-20 17:39:43 -04:00
Paul Chiusano
b9456e8dce
hopefully more correct version of Handle synthesis
2018-06-20 12:23:27 -04:00
Paul Chiusano
ccb9c97f99
added failing test
2018-06-20 12:22:58 -04:00
Paul Chiusano
c9f6a7373d
Added a case in instantiateR to deal with effects
2018-06-20 11:40:56 -04:00
Paul Chiusano
f1dd38d72e
when checking body of Handle, the body is checked against a type {e} t
, where e
is the type introduced by the handler
2018-06-19 17:17:42 -04:00
Rúnar Óli Bjarnason
3e70472812
Unifying abilities with subabilities
2018-06-19 16:46:29 -04:00
Rúnar Óli Bjarnason
8d60ce52d3
Disabling ability checks in fake pattern effect terms
2018-06-19 15:31:08 -04:00
Rúnar Óli Bjarnason
9a8a3384c5
Ability checks on function application
2018-06-19 12:24:11 -04:00
Rúnar Óli Bjarnason
dea790f54a
Checking handler blocks
2018-06-19 11:49:07 -04:00
Arya Irani
4c59e4df93
add withEffects
2018-06-19 11:32:22 -04:00
Paul Chiusano
6c46ecf7db
Typechecker compiles with new typechecking monad that can read a set of ambient abilities, not hooked up anywhere yet
2018-06-18 17:29:18 -04:00
Rúnar Óli Bjarnason
4d267330eb
Failing handler test
2018-06-18 16:39:10 -04:00
Rúnar Óli Bjarnason
8eb057c92a
Pattern matching on an effect typechecks!
2018-06-18 15:53:57 -04:00
Rúnar Óli Bjarnason
279b6a9ed2
Typechecking effect patterns
2018-06-18 15:13:52 -04:00
Arya Irani
8d8966a732
Merge pull request #196 from unisonweb/topic/refactor-bootstrap
...
factor pure stuff out of parser-typechecker Bootstrap
2018-06-18 10:56:08 -04:00
Arya Irani
b79b80cbca
Merge pull request #193 from unisonweb/topic/typechecker
...
merge topic/typechecker into wip/typechecker
2018-06-18 10:53:06 -04:00
Arya Irani
d29a3cb897
-Wall
warnings for parser-typechecker bootstrap target
2018-06-17 14:37:05 -04:00
Arya Irani
5af27e2e33
factor pure stuff out of parser-typechecker Bootstrap
2018-06-17 14:28:21 -04:00
Runar Bjarnason
f7ccfb67ee
Synthesizing effect patterns
2018-06-15 17:03:13 -04:00
Paul Chiusano
80e71a987a
Merge pull request #190 from unisonweb/topic/varlong-arrays
...
use VarLong for lengths and backref Pos
2018-06-15 10:32:30 -05:00
Runar Bjarnason
416c28a1e8
Very wip
2018-06-15 00:38:29 -04:00
Runar Bjarnason
a7cf7f74f5
Typechecking guards
2018-06-15 00:00:13 -04:00
Runar Bjarnason
db0bd927b8
Tuple patterns
2018-06-14 22:23:56 -04:00
Arya Irani
8c5c4847ab
use _updated_ body of synthesized UnisonFile when serializing
2018-06-14 19:46:41 -04:00
Runar Bjarnason
823cb434ba
Tuple literals parse
2018-06-14 17:40:27 -04:00
Runar Bjarnason
046074d2ba
As-patterns
2018-06-14 17:25:17 -04:00
Runar Bjarnason
910a70f3a9
More pattern type checking tests
2018-06-14 17:05:56 -04:00
Runar Bjarnason
5c1e4d6543
Plumbing to get typechecker tests working
2018-06-14 15:22:09 -04:00
Arya Irani
bfd05da1ba
refactor towards adding typechecking tests having data declarations
2018-06-14 13:34:38 -04:00
Paul Chiusano
88d62e43c4
patterns now checked against scrutinee inferred type
2018-06-13 21:48:39 -04:00
Paul Chiusano
8d1e6c22f7
Typechecker working again with more general term type - existential vars are now allowed in type annotations
2018-06-13 21:38:25 -04:00
Paul Chiusano
64954ca8aa
generalize a number of smart constructors to not assume type variables and term variables are the same type
2018-06-13 21:37:24 -04:00
Paul Chiusano
cebe6c637d
another helper function - Term.vtmap, for mapping over the type variables of a term's annotations
2018-06-13 21:04:52 -04:00
Paul Chiusano
ecd1b72b85
generalized some ABT functions in prep for allowing existential and universal type vars to appear in type annotations on terms
2018-06-13 20:54:59 -04:00
Runar Bjarnason
cf7aa13102
Rewrote checkCase
2018-06-13 15:47:29 -04:00
Arya Irani
97562ff0a7
we are debugging typechecking of patterns
2018-06-13 14:24:49 -04:00
Arya Irani
efe34fd8d7
check for free type vars in data decls before typechecking, subst them away in bootstrap
2018-06-13 10:41:30 -04:00
Paul Chiusano
3b6630d1ab
Removed defunct check logic for Match, just falling back to synthesis for now. Added synthesis case for Term.Constructor.
2018-06-12 22:59:06 -04:00
Arya Irani
e2557cfac4
remove Builtin.resolveBuiltins
in favor of Term.bindBuiltins
and Type.bindBuiltins
...
note: arguably more efficient to only `subst` away the free vars,
and maybe we should use `Map v (Term v)` in various places instead
2018-06-12 18:24:51 -04:00
Arya Irani
8dd5350e1f
including that one
2018-06-12 17:41:14 -04:00
Arya Irani
59255f1393
Take builtin substitutions out of Unison.{Parsers, FileParser}
2018-06-12 17:38:27 -04:00
Arya Irani
92f43221d3
typechecking for pattern-matching (untested)
2018-06-12 17:01:00 -04:00
Paul Chiusano
2da9ace1d5
WIP on typechecking case expressions
2018-06-12 14:24:02 -04:00
Paul Chiusano
a2ddd994b4
fix parser bug where =
in bindings was not required to be followed by a space
2018-06-12 11:33:07 -04:00
Paul Chiusano
4ff9a686e0
added todo to reshuffle module structure a bit
2018-06-12 11:23:57 -04:00
Paul Chiusano
f76fcec5a9
move anf to Term module
2018-06-11 23:06:51 -04:00
Paul Chiusano
616741d9c9
filled in more of compile
2018-06-11 22:58:02 -04:00
Paul Chiusano
29b551343e
implemented ANF conversion
2018-06-11 22:45:48 -04:00
Arya Irani
5b601a4248
update codecs to use VarInt encoding for Text and Array lengths
...
Note that the max sizes for these on the JVM are <= 31 bits
2018-06-11 18:54:39 -04:00
Arya Irani
dcd15f8c73
use VarInt encoding for backrefs and sequence lengths
2018-06-11 18:19:22 -04:00
Paul Chiusano
deaecaacac
finished filling in Apply compilation
2018-06-11 17:15:57 -04:00
Paul Chiusano
f5b4fe5fe8
added some convenience functions to ABT
2018-06-11 12:21:15 -04:00
Paul Chiusano
b2de0a3caf
start on compilation
2018-06-11 12:20:37 -04:00
Paul Chiusano
d0f044350b
draft of simple Haskell-based interpreter
2018-06-11 11:14:14 -04:00
Arya Irani
3fe58f25b1
weird
2018-06-10 16:11:47 -04:00
Arya Irani
e1e84bc9fa
add more traced
toward fixing new failing test
2018-06-10 16:06:24 -04:00
Arya Irani
c0839e6c27
add typechecking phase to bootstrap program
2018-06-10 16:04:56 -04:00
Arya Irani
39fdaf92d5
move parsers which depend on both Builtins and other parsers from Parsers to Parsers2 (name tbd)
2018-06-10 16:04:11 -04:00
Arya Irani
3e81af5601
clean up tests by temporarily enabling GHC warnings
2018-06-08 12:34:21 -04:00
Arya Irani
b6f4a38db6
Split UnisonFile
data structure / non-parsing-related out of FileParser
2018-06-08 12:30:25 -04:00
Arya Irani
59acd4d5da
test parsing and typechecking sequences let-expressions
...
refactor to eliminate a dependency loop between Unison.Builtins and Unison.Parsers
move `unsafe*Parse*` from `FileParser` to `Parsers`
add `builtinEnv` parameter to `FileParser.file`
make `let` a keyword, or else maybe parsing precedence needs to change to be unambiguous
2018-06-07 18:47:34 -04:00
Arya Irani
9cbbf58bdd
Merge remote-tracking branch 'origin/topic/typechecker' into wip/typechecker2
2018-06-06 17:58:36 -04:00
Arya Irani
de47993345
Context.synthesize
for if
, and
, or
2018-06-06 17:50:20 -04:00
Arya Irani
b075d58e26
typechecking for Text literals
2018-06-06 17:09:50 -04:00
Arya Irani
d2e85729ac
split bootstrap into non-overlapping source tree
...
helps intellij plugin and reduces `.cabal` length
2018-06-06 14:27:41 -04:00
Arya Irani
b3c922df36
substed in Terms for user-defined Data and Effect constructors
2018-06-05 18:47:15 -04:00
Arya Irani
64ddd5d02d
renamed some builtins, ran harder program; problem with local data decls
2018-06-05 18:02:04 -04:00
Arya Irani
41ba5c10c5
fixed true/false parsing
2018-06-05 17:49:49 -04:00
Arya Irani
25c52d169d
3++ == 4
2018-06-05 17:40:15 -04:00
Runar Bjarnason
e7d45eac41
Making progress substing builtins
2018-06-05 17:30:58 -04:00
Arya Irani
349030fb56
added text builtins in Haskell
2018-06-05 17:11:31 -04:00
Arya Irani
0937cef79c
add some of the builtins
2018-06-05 17:05:14 -04:00
Arya Irani
0586babb25
fairly successful cross-platform serialize/deserialize
...
still need to subst away builtins on the haskell side
2018-06-05 16:50:26 -04:00
Arya Irani
d961ddf8a2
Incremento!
2018-06-05 12:59:36 -04:00
Arya Irani
596a6bf8a6
delete
2018-06-05 12:06:56 -04:00
Arya Irani
e7a38949f8
implement serializeFile :: UnisonVile v -> m ()
untested
2018-06-05 12:06:24 -04:00
Arya Irani
df91671f3b
add the "more instructions" marker, most of the time
2018-06-05 10:58:27 -04:00
Paul Chiusano
3de9756900
filled in rest of serializeTerm
2018-06-04 18:15:10 -04:00
Paul Chiusano
89ed94257e
finished filling in serializePattern
2018-06-04 18:01:23 -04:00
Rúnar Óli Bjarnason
3390382ae5
filled in most of term serialization
2018-06-04 17:33:07 -04:00
Arya Irani
bc2cc50069
started a file
2018-06-04 14:34:35 -04:00
Arya Irani
58302ae563
update parser to be able to use data/effect decls it encounters
2018-06-04 14:23:44 -04:00
Arya Irani
dcf6acb372
add canonicalization tests for data type hashing
...
also have the test suite take a scope prefix on the command-line
2018-06-04 12:27:22 -04:00
Arya Irani
2f52572c75
implemented hashing of effect types and added some better docs
2018-05-31 18:01:12 -04:00
Arya Irani
03febf45e7
implemented Accumulate Hash
using cryptonite
2018-05-31 17:10:24 -04:00
Rúnar Óli Bjarnason
e39f83c6d8
Preparing for hashing data declarations
2018-05-31 15:35:35 -04:00
Arya Irani
68d2549480
initial pass at structural hashing of data declaration cycles
2018-05-30 18:08:38 -04:00
Paul Chiusano
7521201256
added some diagnostics
2018-05-29 17:23:05 -04:00
Paul Chiusano
80b30b7ec1
Convenience function for reading / parsing a whole file, also spotted needless attempt in effect pattern parser
2018-05-29 16:20:19 -04:00
Paul Chiusano
82453d1b8c
tests all passing
2018-05-29 14:31:29 -04:00
Paul Chiusano
b01b6f1af6
switch to enable/disable tracing of parsing
2018-05-29 14:26:16 -04:00
Paul Chiusano
559daffe50
added effects to Type AST, trying to get everything parsing
...
There seems to be an issue with virtual semicolon parsing at end of file
2018-05-29 13:07:43 -04:00
Paul Chiusano
b77311dc8f
uncommented some tests, still have to implement effect types and parser for these types
2018-05-24 17:33:11 -04:00
Paul Chiusano
75e227f3ae
Fixed issue with virtual_rbrace not handling eof properly, data decl example passes
2018-05-24 17:28:28 -04:00
Arya Irani
8726f22012
trying to get FileParser working without breaking anything else
...
limited success
2018-05-24 16:46:19 -04:00
Arya Irani
4cd6f71b12
stubbed out FileParser
2018-05-24 13:35:30 -04:00
Arya Irani
532064f5cb
Type annotations parser test
2018-05-24 11:15:27 -04:00
Rúnar Óli Bjarnason
14e90f9049
effect patterns for handlers working
2018-05-23 17:09:49 -04:00
Rúnar Óli Bjarnason
c1801ccf94
parse and
2018-05-23 16:11:03 -04:00
Rúnar Óli Bjarnason
63fe1eb329
Ifthenelse blocks and case blocks tests
2018-05-23 16:01:11 -04:00
Rúnar Óli Bjarnason
2234079b71
Fixed all warnings
2018-05-23 15:22:57 -04:00
Rúnar Óli Bjarnason
3b07bc54ae
Added guards to the term language
2018-05-23 13:13:19 -04:00
Rúnar Óli Bjarnason
5db0940de6
Pattern rhs are blocks
2018-05-23 12:13:06 -04:00
Rúnar Óli Bjarnason
fb13e246fa
I think it's that
2018-05-23 12:07:21 -04:00
Arya Irani
fee110dec2
data constructor pattern parsing compiles
2018-05-22 17:42:51 -04:00
Arya Irani
3e5c736ef5
thread penv0 through parsers
2018-05-22 17:12:28 -04:00
Arya Irani
8bcfc1dd3f
add ABT.absChain and start on parsing of Patterns
2018-05-22 15:46:21 -04:00
Arya Irani
3c3ab7c868
add show implementation for handle term
2018-05-22 14:11:28 -04:00
Paul Chiusano
004926efd4
got some layout blocks working, still some lingering bugs
2018-05-22 13:02:45 -04:00
Paul Chiusano
f1583e8637
cleanup test
2018-05-21 17:32:53 -04:00
Paul Chiusano
bd86eb02e1
braced block tests passing, layout block test is failing
2018-05-21 17:31:43 -04:00
Rúnar Óli Bjarnason
40a24ff246
Braces and semicolons?
2018-05-21 16:06:49 -04:00
Rúnar Óli Bjarnason
aa3d7ff04c
Parses blocks correctly
2018-05-21 13:25:00 -04:00
Paul Chiusano
e2c3a4a278
TermParsers.block compiling, also deleted some unused old parsers
2018-05-17 18:23:58 -04:00
Rúnar Óli Bjarnason
ba0c3de5dc
Blocks?
2018-05-17 15:47:08 -04:00
Paul Chiusano
9214b63aca
Updated the Type AST and did some refactoring - the parser now has no knowledge of the set of builtin functions and types
2018-05-17 13:01:01 -04:00
Paul Chiusano
0f32611d3a
smart constructors
2018-05-17 12:04:23 -04:00
Paul Chiusano
d764fe0c85
Added a bunch of stuff to the term syntax tree, code still compiles
2018-05-17 12:01:38 -04:00
Paul Chiusano
59cdabf799
haskell code compiling again and tests passing, ready for merge
2018-05-16 23:13:58 -04:00
Paul Chiusano
42ea0604d2
started deleting and cleanup, not compiling yet
2018-05-16 18:20:27 -04:00