Commit graph

53 commits

Author SHA1 Message Date
Leonardo de Moura
be841a7cad chore: throwError! => throwError, throwErrorAt! => throwErrorAt
@Kha I marked the corresponding methods as `protected`.
I currently can't stand `throw_error`, and I am optimistic about
server highlighting feature you are working on :)
2021-03-11 11:59:45 -08:00
Leonardo de Moura
68143ca8ba chore: trace[...]! ==> trace[...]
@Kha I think this one is a good change, there is no real reason for
using the `!` suffix here.
2021-03-10 18:44:43 -08:00
Leonardo de Moura
08fc25217d chore: cleanup, fix docs 2021-03-07 09:01:54 -08:00
Leonardo de Moura
d770c55326 feat: universe level parameters in instances are outParam by default
This commit makes sure Lean 4 treats universe level parameters in
instances as `outParam`s. This the behavior in Lean 3.

fixes #319
2021-02-25 13:21:53 -08:00
Leonardo de Moura
d9d948087f fix: use TransparencyMode.instances at SynthInstance 2021-02-25 13:08:51 -08:00
Leonardo de Moura
e415cfa632 chore: increase synthInstance.maxHeartbeats default 2021-02-04 17:36:12 -08:00
Leonardo de Moura
a58ff18a5b refactor: pos at time_task::time_task was a dead field 2021-01-30 11:10:18 -08:00
Leonardo de Moura
6c119a1921 chore: use register_builtin_option 2021-01-26 18:24:56 -08:00
Leonardo de Moura
f53e83b182 feat: add options maxHeartbeats and synthInstance.maxHeartbeats 2021-01-24 17:45:50 -08:00
Leonardo de Moura
74a9331571 feat: use left-to-right resolution 2021-01-13 16:33:30 -08:00
Sebastian Ullrich
a6c319a25c chore: remove message_builder from time_task 2021-01-12 09:51:14 -08:00
Leonardo de Moura
498dae8fab chore: add trace messages 2020-12-19 12:26:37 -08:00
Leonardo de Moura
7c865e7bd9 feat: sort instances by priority 2020-12-16 10:45:27 -08:00
Leonardo de Moura
0fa262bb93 feat: add priority to InstanceEntry 2020-12-16 10:40:58 -08:00
Leonardo de Moura
3b6d65c3c3 chore: use deriving Inhabited 2020-12-13 10:09:20 -08:00
Leonardo de Moura
63ab55289e chore: remove "liftable methods"
The new frontend "auto lifting" feature makes them obsolete.
2020-12-09 15:06:07 -08:00
Leonardo de Moura
cbf2b6c0db feat: change synthinstance threshold
Before this commit, the threshold was the amount of "fuel".
Now, it is the maximum number of instances used to solve a TC problem.
We have two thresholds
- `maxInstSize`: default 128
- `maxCoeSize`: default 16. It is similar to `maxInstSize`, but used for automatic coercions.

cc @Kha
2020-12-07 10:45:08 -08:00
Leonardo de Moura
9d304df757 feat: heterogeneous Append experiment
@Kha This one required a bunch of manual fixes. The main issue is that
before we added the string interpolation feature, we created
`MessageData`s using `++` and coercions. For example, given
`(e : Expr)`, we would write
```
let msg : MessageData := "type: " ++ e
```
and rely on the coercions `String -> MessageData` and
`Expr -> MessageData`, and the instance `Append MessageData`.
However, heterogeneous operators "block" the expected type propagation downwards.
This kind of code is obsolete now since we can write a more compact
version using string interpolation
```
let msg := m!"type: {e}"
```
2020-12-01 16:32:41 -08:00
Leonardo de Moura
0869f38de4 chore: update structure, class, inductive 2020-11-27 15:09:30 -08:00
Leonardo de Moura
d6f778bec4 refactor: arbitrary without explicit arguments
@Kha I was tired of writing `arbitrary _` :)
There 0 places in the stdlib where the type needs to be provided.
If in the future we need to specify the type we can use
`arbitrary (α := <type>)`
2020-11-25 09:07:38 -08:00
Leonardo de Moura
6830291fd5 chore: remove dead code at Class.lean used by old frontend 2020-11-20 16:51:44 -08:00
Leonardo de Moura
f67c93191f feat: use |>. 2020-11-19 08:38:47 -08:00
Leonardo de Moura
c305c2691f chore: use := 2020-11-19 07:22:31 -08:00
Leonardo de Moura
f17e226638 chore: naming convention
Example: `mkNameStr` => `Name.mkStr`

cc @Kha
2020-11-11 10:08:55 -08:00
Leonardo de Moura
2d2d39c78e chore: use mut 2020-11-07 17:32:13 -08:00
Leonardo de Moura
81d6e065e7 chore: adjust files and tests 2020-11-07 17:32:12 -08:00
Leonardo de Moura
5ea49c92bb chore: cleanup 2020-10-27 13:26:21 -07:00
Leonardo de Moura
13c2a8ff51 chore: remove #lang lean4 header 2020-10-25 09:54:07 -07:00
Sebastian Ullrich
fc5f93331d feat: profile new frontend 2020-10-23 18:34:47 +02:00
Leonardo de Moura
af968c60e6 chore: cleanup 2020-10-22 07:32:23 -07:00
Leonardo de Moura
82ee2e361b chore: cleanup 2020-10-21 18:43:47 -07:00
Leonardo de Moura
ea829b75c0 chore: remove coercions for old frontend 2020-10-21 17:37:35 -07:00
Leonardo de Moura
27205ddff7 chore: move to new frontend 2020-10-20 09:33:50 -07:00
Leonardo de Moura
ef18b0ab49 chore: use [builtinInit] 2020-10-19 14:58:38 -07:00
Leonardo de Moura
27be7e6812 fix: leaking isDefEqStuckExceptionId 2020-09-25 18:48:23 -07:00
Leonardo de Moura
59bf4defc6 fix: default value 2020-09-17 15:58:29 -07:00
Leonardo de Moura
c3623e9a0a chore: reduce default max steps 2020-09-13 16:18:53 -07:00
Leonardo de Moura
5da7f0b50b fix: set constApprox := false at SynthInstance
We don't want contraints such as
```
?m a =?= Nat
```
to be solved as
```
?m := fun a => Nat
```
durint type class resolution.
2020-09-13 16:11:27 -07:00
Leonardo de Moura
a5c99b7601 fix: bug at getInstances 2020-09-10 17:49:17 -07:00
Leonardo de Moura
813a964767 refactor: move polymorphic Meta methods back to Meta namespace 2020-08-25 14:57:58 -07:00
Leonardo de Moura
cf0149a1a7 refactor: use MonadControlT 2020-08-25 13:54:42 -07:00
Leonardo de Moura
49f5e4db20 refactor: cleanup 2020-08-24 17:47:27 -07:00
Leonardo de Moura
eaed6ba6a3 refactor: polymorphic MetaM combinators 2020-08-24 17:03:54 -07:00
Leonardo de Moura
ac565de96c refactor: add MonadMetaM class 2020-08-24 12:17:47 -07:00
Leonardo de Moura
9b27d3201f chore: remove liftCoreM and liftMetaM 2020-08-21 17:21:25 -07:00
Leonardo de Moura
f46c5d01b1 feat: uniform Exceptions 2020-08-21 17:02:21 -07:00
Leonardo de Moura
ae5b4defb1 chore: simplify isExprDefEqStuck and isLevelDefEqStuck 2020-08-21 12:03:51 -07:00
Leonardo de Moura
916b395d1b chore: cleanup 2020-08-21 09:29:09 -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
f934a86646 feat: add (ref : Syntax) to Meta.Exception.other
@Kha The Syntax is here just to provide possition information. The
goal is to improve error message location information in code such as `DepElim`.
2020-08-06 09:40:16 -07:00