Leonardo de Moura
e54a207986
refactor: provide Options to lean_eval_const
...
add `ImportM` monad for `addImportedFn`
cc @Kha
2020-10-19 10:21:38 -07:00
Leonardo de Moura
14414e3400
feat: nested do parser
2020-10-15 17:04:35 -07:00
Leonardo de Moura
60e4f4fee1
feat: improve notFollowedBy error messages
2020-10-15 17:01:10 -07:00
Leonardo de Moura
ef01053d58
fix: set mainModuleName in the new frontend
2020-10-15 15:30:03 -07:00
Leonardo de Moura
5d3e08d43a
chore: documented modification needed to enable the elaboration of commands containing syntax errors
...
cc @Kha
2020-10-14 13:20:01 -07:00
Sebastian Ullrich
78ffc72150
chore: remove ppGroups beneficial only for group but not fill
2020-10-14 14:24:47 +02:00
Leonardo de Moura
77ce42548b
fix: add nonReservedSymbol
2020-10-13 12:52:18 -07:00
Leonardo de Moura
d2e5c1c300
feat: improve dbgTrace! macro
2020-10-13 12:38:04 -07:00
Leonardo de Moura
39f6aae306
fix: interpolatedStrFn
2020-10-13 12:19:10 -07:00
Leonardo de Moura
63edecf106
feat: expand initialize macro
2020-10-10 08:23:49 -07:00
Leonardo de Moura
698c3db655
chore: take doSeq at initialize
2020-10-10 07:41:44 -07:00
Leonardo de Moura
9538772c1c
chore: do not use string interpolation by default at dbgTrace!
...
It is nice to be able to write `dbgTrace! x` instead of `dbgTrace! "{x}"`
2020-10-09 20:49:39 -07:00
Leonardo de Moura
bca81714fe
feat: println! and dbgTrace! macros with string interpolation
2020-10-09 17:19:04 -07:00
Leonardo de Moura
3bd75d51d5
feat: add ParserDescr.noWs
2020-10-09 16:26:49 -07:00
Leonardo de Moura
e021a7d011
chore: remove symbolNoWs
...
@Kha This is a leftover from the time precedence was associated with
tokens instead of parsers.
2020-10-09 16:17:56 -07:00
Leonardo de Moura
7013ea4098
feat: add interpolatedStr to ParserDescr and Syntax
2020-10-09 14:04:53 -07:00
Leonardo de Moura
36696d726d
feat: add String Interpolation
2020-10-09 13:40:35 -07:00
Leonardo de Moura
8a6cb1842f
feat: expand doTry
...
@Kha I did not implement support for reassignments and `continue`,
`break`, `return` inside the `finally` clause. It is doable, but it
feels like unnecessary complexity. We currently don't have any
instance in our code base where this would be useful.
2020-10-08 19:39:36 -07:00
Leonardo de Moura
7f5af84660
chore: add doElem quotation parser
2020-10-08 13:45:53 -07:00
Leonardo de Moura
5d8764dd92
feat: take doElem at doLetArrow and doReassignArrow
2020-10-07 16:49:28 -07:00
Sebastian Ullrich
064c9b2e0b
chore: binder spacing
2020-10-07 09:46:47 +02:00
Sebastian Ullrich
21f1a66ceb
feat: add & use ppDedent parser combinator
2020-10-07 09:46:47 +02:00
Sebastian Ullrich
88164a5e91
feat: more pp tweaks
2020-10-07 09:44:05 +02:00
Sebastian Ullrich
5d76a981b0
chore: adjust pp spacing
2020-10-07 09:44:04 +02:00
Sebastian Ullrich
bdff53fdf5
feat: use ppLine
2020-10-07 09:43:05 +02:00
Leonardo de Moura
294a750110
feat: expand doMatch
2020-10-06 19:07:47 -07:00
Leonardo de Moura
db5fdd15c4
feat: add let* parser and add some support for it at Binders.lean
2020-10-06 14:42:47 -07:00
Leonardo de Moura
ef2d9b4d59
feat: add ensureExpectedType! parser
2020-10-06 09:31:21 -07:00
Leonardo de Moura
10fc908463
chore: use Tactic.seq1 instead of Tactic.tacticSeq1Indented
...
Reason: antiquotations.
2020-10-06 08:28:41 -07:00
Leonardo de Moura
c3b0e9936c
chore: group many elements
2020-10-06 08:28:40 -07:00
Leonardo de Moura
5c74c408ae
chore: remove nodeSepBy1Unbox combinator
2020-10-06 08:28:40 -07:00
Leonardo de Moura
93dc94b3b0
chore: remove nodeSepBy1Unbox hack
2020-10-06 07:22:28 -07:00
Leonardo de Moura
cebadf9efd
chore: group many elements
...
TODO: the parser combinators `many` and `sepBy` should do it.
2020-10-06 06:43:19 -07:00
Leonardo de Moura
7325dcd630
feat: use do at for-in and unless notations
2020-10-05 09:43:11 -07:00
Leonardo de Moura
9a551d9219
feat: add withForbidden and withoutForbidden parser combinators
2020-10-05 09:36:28 -07:00
Leonardo de Moura
4e7fd4b4bf
chore: add doSeqIndent kind
2020-10-03 08:22:02 -07:00
Leonardo de Moura
a5daaee3ed
chore: do syntax adjustments
2020-10-03 07:33:18 -07:00
Leonardo de Moura
96f5c51a3e
fix: doElem issues
2020-10-02 18:58:43 -07:00
Leonardo de Moura
c40ec0128d
fix: return value is optional
2020-10-02 18:09:42 -07:00
Leonardo de Moura
35e401e915
chore: naming consistency
2020-10-02 15:47:12 -07:00
Leonardo de Moura
40640b85bd
fix: doSeqBracketed parser
...
It was failing to parse
```
def f2 (x : Nat) : IO Nat := do {
let y := 1;
if x > 0 then
y := y + 1;
IO.println y
}
```
cc @Kha
2020-10-02 15:05:22 -07:00
Leonardo de Moura
379e34a910
feat: do reassignment parsers
2020-10-02 13:16:55 -07:00
Leonardo de Moura
6db45891e2
feat: add typeOf! and ensureTypeOf! parsers
2020-10-01 14:33:04 -07:00
Leonardo de Moura
4e72530ce7
chore: let rec in do blocks
2020-10-01 10:40:11 -07:00
Leonardo de Moura
75cb42d8be
chore: improve try parser
2020-09-30 07:12:04 -07:00
Leonardo de Moura
0911b9bc80
feat: add missing features to do notation parser
2020-09-30 06:51:25 -07:00
Leonardo de Moura
e1ad5a948b
feat: add focus tactic parser
2020-09-28 17:11:00 -07:00
Leonardo de Moura
e10edde5cd
feat: optional ; in terms
2020-09-28 17:10:59 -07:00
Leonardo de Moura
d4c1432574
fix: tacticSeqBracketed
2020-09-28 17:10:59 -07:00
Leonardo de Moura
2755972447
fix: missing checkColGt and tests
2020-09-28 17:10:59 -07:00