Commit graph

17 commits

Author SHA1 Message Date
Leonardo de Moura
a28679358e refactor: remove MonadError 2020-09-18 09:58:13 -07:00
Leonardo de Moura
9c8f57f322 fix: preserve info messages from candidates that failed to be elaborated
@Kha Not sure whether we should have an option for supressing this
information or not.
We need this information for diagnosing problems. For example, I was trying to
understand why the elaborator was looping. I suspected it was the
TC module, but I was not getting any trace messages since the symbol
was overloaded, and the case that did not work was the expensive one :(
2020-09-17 17:08:14 -07:00
Sebastian Ullrich
f4e6635f2b chore: getMessageStringEx: show exception 2020-09-17 08:12:28 -07:00
Leonardo de Moura
e10cd085f4 feat: use sanitizeNames at ppGoal 2020-09-16 13:39:06 -07:00
Leonardo de Moura
18a7f5a489 feat: new name sanitizer 2020-09-16 11:57:55 -07:00
Leonardo de Moura
0abca5475f refactor: move ppExpr to IO
@Kha I am also tracking `currNamespace` and `openDecls`.

BTW, I also tried an experiment where I added `currNamespace` and
`openDecls` to `Meta.Context`, but it looked weird. This information
is only needed in the elaborator and pretty printer.
The `PPContext` object should contain everything you need. You
can put `currNamespace` and `openDecls` in the `Delaborator.Context`.
2020-09-15 18:48:21 -07:00
Leonardo de Moura
19a7927f10 feat: sanitizeNames
@Kha I am using `_shadowed.<idx>` suffix for marking variables that
have been shadowed. It is a bit verbose, but at least it is easy to
understand understand error messages such as
```
shadow.lean:4:0: error: type mismatch
  h
has type
  x._shadowed.1 = x._shadowed.1
but it is expected to have type
  x = x
```
It is better than the old cryptic version
```
shadow.lean:4:0: error: type mismatch
  h
has type
  x = x
but it is expected to have type
  x = x
```
2020-09-15 16:28:50 -07:00
Leonardo de Moura
61bd10997a feat: add coercions for the new frontend 2020-09-10 13:24:13 -07:00
Leonardo de Moura
b136c519e2 fix: scope and improve error message 2020-09-09 16:44:43 -07:00
Leonardo de Moura
e5c35d3a4e feat: add AddMessageDataContext 2020-08-28 18:05:42 -07:00
Leonardo de Moura
5349a73655 chore: add MessageData.nestD
"default nest"
2020-08-27 11:22:47 -07:00
Leonardo de Moura
40ec0b7ae4 feat: add helper functions and generalize 2020-08-19 09:53:45 -07:00
Leonardo de Moura
e423533bca chore: improve DepElim trace messages 2020-08-06 11:02:57 -07:00
Leonardo de Moura
20210928da fix: missing line breaks 2020-07-24 11:18:28 -07:00
Leonardo de Moura
11ed7c6195 chore: move PersistentArray to Std 2020-06-25 13:02:21 -07:00
Leonardo de Moura
249bda16c0 chore: remove prelude commands from Lean package 2020-06-25 11:21:17 -07:00
Leonardo de Moura
4ccc3fef52 chore: move Init.Lean files to Lean package 2020-05-26 15:04:35 -07:00
Renamed from src/Init/Lean/Message.lean (Browse further)