Kim Morrison
72e952eadc
chore: avoid runtime array bounds checks ( #6134 )
...
This PR avoids runtime array bounds checks in places where it can
trivially be done at compile time.
None of these changes are of particular consequence: I mostly wanted to
learn how much we do this, and what the obstacles are to doing it less.
2024-11-21 05:04:52 +00:00
Kim Morrison
f85c66789d
feat: Array.insertIdx/eraseIdx take a tactic-provided proof ( #6133 )
...
This PR replaces `Array.feraseIdx` and `Array.insertAt` with
`Array.eraseIdx` and `Array.insertIdx`, both of which take a `Nat`
argument and a tactic-provided proof that it is in bounds. We also have
`eraseIdxIfInBounds` and `insertIdxIfInBounds` which are noops if the
index is out of bounds. We also provide a `Fin` valued version of
`Array.findIdx?`. Together, these quite ergonomically improve the array
indexing safety at a number of places in the compiler/elaborator.
2024-11-20 09:52:38 +00:00
Henrik Böving
23e49eb519
perf: add prelude to all Lean modules
2024-02-18 14:55:17 -08:00
Mario Carneiro
e0893b70e5
fix: incorrect type for SpecInfo.argKinds
2023-06-21 22:50:29 -07:00
Mario Carneiro
391aef5cd7
feat: automatic extension names
2022-10-06 17:19:30 -07:00
Leonardo de Moura
85c468c853
fix: remove internal name hack at [specialize] and [inline] attributes
2022-09-23 20:25:16 -07:00
Leonardo de Moura
19f5fe6f42
feat: add getSpecializationArgs?
2022-09-07 16:08:45 -07:00
Leonardo de Moura
55171a893a
feat: elaborate specialization arguments
2022-09-07 15:22:56 -07:00
Leonardo de Moura
735dabdb3f
refactor: use ParametricAttribute to implement [specialize]
2022-09-07 13:17:24 -07:00
Leonardo de Moura
ee70805c35
feat: add LCNF missing cases
2022-08-06 20:23:29 -07:00
Mario Carneiro
603b7486e3
feat: add go-to-def for simple attributes
2022-07-31 16:36:54 +02:00
Leonardo de Moura
041827bed5
chore: unused variables
2022-06-07 17:54:10 -07:00
Leonardo de Moura
78aa3d8e72
chore: use deriving BEq
2020-12-22 18:10:20 -08:00
Leonardo de Moura
04a07c15b9
chore: use deriving Inhabited
2020-12-13 11:57:59 -08:00
Leonardo de Moura
0869f38de4
chore: update structure, class, inductive
2020-11-27 15:09:30 -08:00
Leonardo de Moura
c305c2691f
chore: use :=
2020-11-19 07:22:31 -08:00
Leonardo de Moura
898a08a0c1
chore: avoid Has prefix in type classes
...
closes #203
2020-10-27 18:29:19 -07:00
Leonardo de Moura
13c2a8ff51
chore: remove #lang lean4 header
2020-10-25 09:54:07 -07:00
Leonardo de Moura
c7dc61adb9
chore: cleanup
2020-10-23 10:00:23 -07:00
Leonardo de Moura
1495f403a1
chore: use builtin_initialize instead of initialize at src/Lean
2020-10-19 15:17:02 -07:00
Leonardo de Moura
d2803d13d3
chore: move to new frontend
2020-10-17 07:10:05 -07:00
Leonardo de Moura
049ff2b022
fix: bad message
2020-09-25 18:48:23 -07:00
Leonardo de Moura
68a4c145f7
refactor: implement attribute hooks using CoreM
...
We were using a mix of `IO` and `Except`
2020-08-19 14:44:54 -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