Leonardo de Moura
5ffbada3df
feat: add Lean.MonadEnv, Lean.MonadError, and Lean.MonadOptions
...
This is the first set of polymorphic methods. I will add more later,
and keep reducing code duplication.
cc @Kha
2020-08-22 16:00:43 -07:00
Leonardo de Moura
37571edce5
fix: remove unnecessary dependencies
2020-08-22 15:15:10 -07:00
Leonardo de Moura
0c6c3fb3b8
chore: update stage0
2020-08-22 14:46:12 -07:00
Leonardo de Moura
095d022fe2
chore: increase threshold
2020-08-22 14:44:18 -07:00
Leonardo de Moura
39a14aee0f
refactor: move Lean.Core.Exception to Lean.Exception
2020-08-22 13:36:15 -07:00
Leonardo de Moura
003966a9e9
refactor: simpler monad stack for FormatterM and ParenthesizerM
...
Motivation: make sure the code base is more uniform and will simplify
other code reorgs we want to do.
cc @Kha
2020-08-22 13:30:20 -07:00
Leonardo de Moura
5cc173788e
chore: remove ECoreM
2020-08-21 17:29:13 -07:00
Leonardo de Moura
9b27d3201f
chore: remove liftCoreM and liftMetaM
2020-08-21 17:21:25 -07:00
Leonardo de Moura
7eca64c251
chore: dead code
2020-08-21 17:10:12 -07:00
Leonardo de Moura
80374382d8
chore: update stage0
2020-08-21 17:04:19 -07:00
Leonardo de Moura
f46c5d01b1
feat: uniform Exceptions
2020-08-21 17:02:21 -07:00
Leonardo de Moura
1ac65a0aeb
feat: register exceptions ids
2020-08-21 13:19:30 -07:00
Leonardo de Moura
04eab3c705
chore: remove dead code
2020-08-21 13:08:49 -07:00
Leonardo de Moura
4faaa392b3
feat: add InternalExceptionId.lean
2020-08-21 13:06:31 -07:00
Leonardo de Moura
510cfb2a57
refactor: simplify Elab.Exception
...
TODO: remove unnecessary `Exception` types.
2020-08-21 12:53:01 -07:00
Leonardo de Moura
1de9ab3a5a
feat: update stage0
2020-08-21 12:13:50 -07:00
Leonardo de Moura
0fc30f83f6
chore: remove dead file
2020-08-21 12:11:42 -07:00
Leonardo de Moura
afed2bb827
chore: remove dead code
...
`StateRefT` doesn't need a `MonadIO` instance anymore.
2020-08-21 12:06:16 -07:00
Leonardo de Moura
ae5b4defb1
chore: simplify isExprDefEqStuck and isLevelDefEqStuck
2020-08-21 12:03:51 -07:00
Leonardo de Moura
32a55d5b9c
refactor: remove special support for IO errors
...
They are now just regular errors.
2020-08-21 11:55:58 -07:00
Leonardo de Moura
97692be811
fix: throwError missing addContext
...
This commit also remove `Exception.kernel`
2020-08-21 11:24:46 -07:00
Leonardo de Moura
b39803f46d
chore: cleanup liftTermElabM
2020-08-21 09:43:21 -07:00
Leonardo de Moura
916b395d1b
chore: cleanup
2020-08-21 09:29:09 -07:00
Sebastian Ullrich
e5de32c2dd
feat: auto-generate header formatter
2020-08-21 16:43:55 +02:00
Sebastian Ullrich
fc9b39e48c
chore: update stage0
2020-08-21 16:40:21 +02:00
Sebastian Ullrich
5f30d62d9b
feat: [runParserAttributeHooks]
2020-08-21 16:38:41 +02:00
Sebastian Ullrich
55b043cabe
chore: update cross benchsuite
2020-08-21 16:05:40 +02:00
Sebastian Ullrich
14211cc932
refactor: more core
2020-08-21 15:51:37 +02:00
Sebastian Ullrich
786d90ac80
refactor: move parenthesizer and formatter into CoreM
...
/cc @leodemoura
2020-08-21 14:23:58 +02:00
Sebastian Ullrich
2a1d9b392f
fix: test
2020-08-21 10:31:56 +02:00
Sebastian Ullrich
7a44ba7bdd
fix: pretty printer knot arity
2020-08-21 10:27:43 +02:00
Leonardo de Moura
d519a5d526
chore: use MetaM.toIO
2020-08-20 19:20:11 -07:00
Leonardo de Moura
c018c333b4
chore: update stage0
2020-08-20 19:15:52 -07:00
Leonardo de Moura
cafb200296
chore: fix some tests
2020-08-20 19:13:47 -07:00
Leonardo de Moura
1aa8466b79
fix: liftCoreM and liftTermElabM
2020-08-20 19:07:22 -07:00
Leonardo de Moura
d6b96b4d8b
chore: fix some tests
2020-08-20 18:36:29 -07:00
Leonardo de Moura
05a0e7f6d0
refactor: build all main monads on top of ECoreM
2020-08-20 18:36:04 -07:00
Leonardo de Moura
ad376773e6
chore: update stage0
2020-08-20 16:01:07 -07:00
Leonardo de Moura
d85a28fc55
chore: remove unnecessary instance arguments
...
`IO.Ref` operations are now in `EIO Empty`. Thus, they work for any
exception `ε`
2020-08-20 15:59:28 -07:00
Leonardo de Moura
44f5182f76
chore: fix tests
...
We have removed `MetaIO`. We use use `CoreM` instead.
2020-08-20 15:56:29 -07:00
Leonardo de Moura
fad6235abb
feat: give a name to EIO Empty
...
@Kha I am calling it `ST` for lack of a better name. It makes some
sense since only the `IO.Ref` operations are in `EIO Empty` :)
That being said, it may confuse Haskell users.
BTW, I had to give the name to avoid a nontermination in the TC
procedure when using
```lean
instance EIOEmpty.monadLift {ε} : HasMonadLift (EIO Empty) (EIO ε) :=
{ monadLift := fun α => fromEmptyEIO }
```
2020-08-20 15:47:27 -07:00
Leonardo de Moura
ca1982441f
feat: add support for to be added ST
...
`ST` will be `EIO Empty`
2020-08-20 13:45:58 -07:00
Leonardo de Moura
9f3f727a3f
chore: update stage0
2020-08-20 13:17:40 -07:00
Leonardo de Moura
eebc611391
chore: remove unnecessary workaround
2020-08-20 13:15:11 -07:00
Leonardo de Moura
968457ac1c
feat: make sure StateRefT can be used with any base EIO Exception
2020-08-20 13:11:12 -07:00
Leonardo de Moura
d36ccb166c
feat: use EIO Empty instead of IO at IO.Ref primitives
2020-08-20 12:54:15 -07:00
Leonardo de Moura
354334639c
chore: update stage0
2020-08-20 12:50:22 -07:00
Leonardo de Moura
8349c72686
feat: add support for EIO
2020-08-20 12:48:39 -07:00
Leonardo de Moura
c55376a1ba
chore: more conventional MonadIO
2020-08-20 11:13:10 -07:00
Leonardo de Moura
4e736bcca0
feat: use trick to inform compiler that a builtin doesn't throw exceptions
2020-08-20 11:05:11 -07:00