Commit graph

5210 commits

Author SHA1 Message Date
Leonardo de Moura
8e84a8c9ec feat: Float from big numbers 2020-04-06 14:05:17 -07:00
Leonardo de Moura
746615d81d chore: remove as alternative for => 2020-04-06 13:45:22 -07:00
Leonardo de Moura
582fe3ac8a test: add test that exposed unboxing issue 2020-04-03 18:24:48 -07:00
Leonardo de Moura
51f1893a8c test: add basic float tests 2020-04-03 17:39:47 -07:00
Leonardo de Moura
22fc56f5c8 chore: fix test 2020-03-31 10:10:57 -07:00
Leonardo de Moura
af8bc28be0 fix: typo at IR.Expr.alphaEqv 2020-03-31 10:04:59 -07:00
Daniel Selsam
722ea2b694 failing test for suspicious behavior 2020-03-31 10:03:22 -07:00
Sebastian Ullrich
b6fc9428f1 fix: support Windows newlines and '\r' escape 2020-03-27 13:21:21 -07:00
Leonardo de Moura
0595e8a78a feat: add tryPureCoe
@Kha It seems to work reasonably well. It didn't break any test.
2020-03-27 11:20:43 -07:00
Sebastian Ullrich
fcdbdeecaf feat: delaborator: use implicit lambdas where possible
/cc @leodemoura it's not bullet-proof (unless `pp.explicit` is set), but let's
see if it is good enough in practice
2020-03-27 14:55:46 +01:00
Sebastian Ullrich
db93638a96 feat: delab forallE 2020-03-27 11:59:58 +01:00
Leonardo de Moura
02acdee9ce feat: disable implicit lambda insertion for fun containing {} or []
cc @Kha
2020-03-26 14:32:12 -07:00
Leonardo de Moura
b4b5f2736f feat: elaborate [] and {} binder annotations in lambda abstractions
We can simulate Lean3 behavior.
2020-03-26 14:20:39 -07:00
Leonardo de Moura
07ffa535fe refactor: decide whether to insert implicit lambdas AFTER macro expansion
cc @Kha
2020-03-26 13:53:15 -07:00
Leonardo de Moura
2b3bdbe0cf test: implicit lambdas + notation 2020-03-26 12:31:04 -07:00
Leonardo de Moura
e682c1c88f fix: make sure @ disable new syntax and macros too
cc @Kha
2020-03-26 12:14:55 -07:00
Leonardo de Moura
6625656940 refactor: remove support for fun {a : A} => ...
The semantics was weird. It seems Agda is also having problems with
it. Here is an example that demonstrates how weird the semantics is:

```lean
check (fun {β α} (a : α) (b : β) => (b, a) : {α : Type} → {β : Type} → (a : α) → (b : β) → β × α)

-- Same example using `def`
def f : {α : Type} → {β : Type} → α → β → β × α :=
fun {β : Type} {α : Type} (a : α) (b : β) => (b, a)
```

Both commands were being accepted before this commit. Note that it
flips `β` and `α`.

Here is an example that did not work before this commit and would
confuse users.

```lean
check
  let id := fun {α} (a : α) => a;
  id [id 1]
```

users would have to write

```lean
check
  let id {α} (a : α) := a;
  id [id 1]
```

@Kha The Delaborator.lean test broke and I "fixed" by removing the
`{}` from it, and copying `produced` over `expected`. Please make sure
it still makes sense.
2020-03-26 10:40:16 -07:00
Leonardo de Moura
d79cfa38e3 test: generalizeTelescope tests 2020-03-25 16:00:55 -07:00
Sebastian Ullrich
6ffe310c48 feat: delab coercions 2020-03-24 17:27:10 +01:00
Sebastian Ullrich
3c71c4f0ea chore: fix benchmark 2020-03-24 17:27:02 +01:00
Sebastian Ullrich
fdc03c9d74 feat: delab projections 2020-03-24 17:27:02 +01:00
Leonardo de Moura
2ca347fcd6 chore: fix test 2020-03-23 15:47:51 -07:00
Leonardo de Moura
dc80b76106 feat: add IO.FS.lines 2020-03-23 14:53:27 -07:00
Leonardo de Moura
41949ee801 refactor: String.toNat ==> String.toNat? and String.toNat! 2020-03-23 14:29:48 -07:00
Leonardo de Moura
94f016a3e8 fix: readLine and test 2020-03-23 14:06:17 -07:00
Leonardo de Moura
db914052ce fix: IO.getLine 2020-03-23 12:26:09 -07:00
Leonardo de Moura
4296e1d83e feat: add tests for Closure.lean 2020-03-20 18:32:04 -07:00
Sebastian Ullrich
b1d9e37d66 test: add re-elaborating delaborator PoC to playground 2020-03-19 17:18:46 -07:00
Sebastian Ullrich
7f09973d43 feat: basic delaborator 2020-03-19 17:17:34 -07:00
Sebastian Ullrich
ed14375dad feat: sort and deduplicate "expected" tokens in parser error messages 2020-03-19 17:17:08 -07:00
Leonardo de Moura
eaaaaabc60 feat: allow Lean.Parser.Term.id to be used in binders
cc @Kha
2020-03-18 20:54:08 -07:00
Leonardo de Moura
2954f6ad3e feat: add MetaHasEval instance for TermElabM
cc @Kha
2020-03-18 20:09:14 -07:00
Leonardo de Moura
5d35b2c419 test: decide! tests 2020-03-18 16:48:28 -07:00
Leonardo de Moura
736925bbce feat: allow decide! and nativeDecide! take _ as an argument
We use the expected type in this case.
2020-03-18 16:00:06 -07:00
Leonardo de Moura
c8b51b0fb3 feat: elab decide! 2020-03-18 15:48:22 -07:00
Leonardo de Moura
5b350d52ee feat: elaborate nativeDecide! 2020-03-18 15:39:23 -07:00
Leonardo de Moura
bfe7d1ffe8 chore: add kernel WHNF test 2020-03-18 11:07:24 -07:00
Leonardo de Moura
6f62986368 feat: add isDefEqStringLit 2020-03-18 11:05:44 -07:00
Leonardo de Moura
cee478dc94 feat: MetaM support for expanding String literal at recursors 2020-03-18 10:29:52 -07:00
Leonardo de Moura
b4942fcd30 feat: add ToExpr instances 2020-03-18 10:22:24 -07:00
Leonardo de Moura
72ec0ec3ad feat: string literal support on recursors and kernel isDefEq 2020-03-17 17:23:33 -07:00
Leonardo de Moura
78b5e714c5 test: add rfl tests 2020-03-17 16:18:18 -07:00
Leonardo de Moura
3df7f35dd0 test: kernel isDefEq support for Nat operations 2020-03-17 13:38:06 -07:00
Leonardo de Moura
7a82318d37 fix: to_pattern_fn bug 2020-03-17 12:58:08 -07:00
Leonardo de Moura
97b8d8551d feat: elaborate nativeRefl! macro 2020-03-16 16:21:51 -07:00
Leonardo de Moura
acee5719af test: proofs by reflection 2020-03-16 14:33:30 -07:00
Leonardo de Moura
b69c851a5a feat: add Expr.foldConsts 2020-03-16 14:33:30 -07:00
Leonardo de Moura
596a547e57 feat: add helper theorems 2020-03-16 11:17:41 -07:00
Leonardo de Moura
fba18edfa3 feat: add support for Lean.reduceNat and Lean.reduceBool at MetaM isDefEq 2020-03-16 10:58:14 -07:00
Leonardo de Moura
87f8ae99eb test: reduceBool test 2020-03-14 15:07:14 -07:00