Commit graph

12 commits

Author SHA1 Message Date
Leonardo de Moura
c3e4bc0d55 fix: enableTracing 2019-10-22 16:45:23 -07:00
Leonardo de Moura
d51c291f2a refactor: simplify traceCtx 2019-10-22 16:36:18 -07:00
Leonardo de Moura
6498055656 chore: helper instances 2019-10-22 16:18:28 -07:00
Leonardo de Moura
45e21168d2 feat: hierarchical trace kinds 2019-10-22 15:13:57 -07:00
Leonardo de Moura
0a0bc0b7b9 fix: remove unused parameter and add missing disableTracing 2019-10-22 15:04:44 -07:00
Leonardo de Moura
13faf9fdf6 feat: add trace prefix to options 2019-10-22 14:43:02 -07:00
Leonardo de Moura
3cd8dc6366 fix: minor issues and add MonadTracer test 2019-10-22 14:33:07 -07:00
Leonardo de Moura
f74195fd50 refactor: new MonadTracer and helper classes/instances 2019-10-22 10:18:18 -07:00
Leonardo de Moura
b5d7f9a763 chore: cleanup Trace
- State was not used linearly.
- `TraceState` must be non-backtrackable. That is, we should never use `TraceT (ExceptT E m A)`.
  Thus, we add a new instance for lifting MonadTracer.
- Avoid `Thunk`.

Pending issues:

- API is too expensive.
  a) We need to create closure.
  b) We eagerly create `Message`s even when tracing is disabled.

- `Message` collides with structure defined at `Messages.lean`

- Need convenient way of writing new `MonadTracer` instances.

- `traceRoot` requires a `Position` and a class.
  Thus, only modules that have access to `Position` may turn on
  tracing. The module `TypeContext` will not have access to position
  information, but we want to generate trace messages.
2019-10-21 14:56:36 -07:00
Leonardo de Moura
0714716477 fix: file and import names, tests and stage0
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2019-10-04 17:04:02 -07:00
Leonardo de Moura
a2abbdbf9a chore: fix imports using script
This is just a draft.
```
for f in `find . -name '*.lean'`; do echo $f; gsed "/^import/s/\b\(.\)/\u\1/g" $f > tmp; gsed "/^Import/s/Import/import/g" tmp > $f; done
```
2019-10-04 14:34:58 -07:00
Leonardo de Moura
de4d3152f1 chore: use CamelCase to name files and directories 2019-10-04 14:23:08 -07:00
Renamed from library/init/lean/trace.lean (Browse further)