Leonardo de Moura
db75c8e5cf
chore(library/init/data/list): renamed basic_aux ==> basicaux
...
@kha we are currently avoiding `_` in file names.
I am not super happy with names such as `neverextractattr.lean`.
I am open to a new name convention for .lean files in the stdlib.
2019-10-02 10:07:26 -07:00
Sebastian Ullrich
cae1009175
fix(library/init/data/list/aux): rename to basic_aux.lean
...
`aux` is a reserved filename on Windows
/cc @leodemoura
2019-10-02 12:30:29 +02:00
Leonardo de Moura
fdab3b90b9
refactor(library/init/data/array): new name convention for Array functions
2019-10-01 16:46:05 -07:00
Leonardo de Moura
411f397654
refactor(library/init/data/list): new name convention for List functions
...
cc @dselsam @kha
2019-10-01 15:15:02 -07:00
Leonardo de Moura
6ad9d58b0f
fix(library/init/lean/compiler/neverextractattr): auxiliary declarations should inherit @[neverExtract] attribute
2019-10-01 14:57:16 -07:00
Leonardo de Moura
70a90ca73e
feat(library/init/lean/parser/identifier): allow ! and ? in the identifiers
2019-10-01 14:45:07 -07:00
Leonardo de Moura
9d2eadc754
chore(library/init/lean/compiler): delete @[effectful]
2019-10-01 14:08:31 -07:00
Leonardo de Moura
81847302a7
feat(library/compiler): replace @[effectful] with @[neverExtract]
2019-10-01 14:06:08 -07:00
Leonardo de Moura
80d3ca9d77
feat(library/init/lean/compiler): add @[neverExtract] attribute
...
It will replace `@[effectful]`
cc @kha
2019-10-01 14:00:02 -07:00
Leonardo de Moura
a507145eb1
feat(library/init/lean/level): add instance : HasBeq Level
2019-10-01 09:47:44 -07:00
Leonardo de Moura
55fad9452f
feat(library/init/util): add @[effectful] to dbgTrace and dbgTraceIfShared
2019-10-01 01:18:12 -07:00
Leonardo de Moura
92b39e7161
chore(library/init): add findD variants
...
@cc @dselsam
2019-09-30 17:26:27 -07:00
Leonardo de Moura
97419f5cc5
feat(library/init/util): add panicWithPos
...
It will be used by the macro `panic!`.
@kha @dselsam: I think the attribute `@[effectful]` is a bad name.
It is quite misleading. Any suggestions for a new name?
2019-09-30 17:06:07 -07:00
Leonardo de Moura
3d7a7c7e91
feat(library/init/util): add panic primitive
2019-09-30 16:23:18 -07:00
Leonardo de Moura
e451c4dc78
feat(library/init/lean/compiler): add @[effectful]
...
This attribute is used for low-level primitives like unsafeIO
2019-09-30 16:12:41 -07:00
Leonardo de Moura
2b252a441e
feat(library/init/lean/declaration): add ConstantInfo.instantiateTypeUnivParams and ConstantInfo.instantiateValueUnivParams
...
cc @dselsam
See new test for an example.
2019-09-30 15:46:19 -07:00
Leonardo de Moura
864b9c730c
feat(library/init/lean/expr): helper functions
...
cc @dselsam
Notes:
- x.isAppOrConst => x.isApp || x.isConst
- x.isPi => x.isForall
2019-09-30 15:16:40 -07:00
Leonardo de Moura
faebe15a7f
feat(library/init/lean/expr): add efficient instantiate1
...
cc: @dselsam
2019-09-30 14:33:32 -07:00
Leonardo de Moura
d6ea1d1a3f
feat(frontends/lean/builtin_cmds): add #synth command
2019-09-24 11:32:43 +08:00
Leonardo de Moura
28c905f684
chore(library/init/lean): add typeclass skelethon
2019-09-24 11:19:02 +08:00
Leonardo de Moura
18e6a106f4
feat(library/init/lean/smap): implement SMap using PHashMap instead of RBMap
2019-09-20 14:22:03 -07:00
Leonardo de Moura
a4b860b92a
fix(runtime): missing Array.data primitive
2019-09-19 10:27:10 -07:00
Leonardo de Moura
a7d616605a
fix(runtime/lean): missing primitive
2019-09-19 09:54:03 -07:00
Sebastian Ullrich
f22c17e94b
chore(library/init/data/string/basic): remove broken lineColumn obsoleted by FileMap
2019-09-19 18:12:51 +02:00
Sebastian Ullrich
62d1cdcff9
chore(library/init/data/repr): fix String.Iterator.HasRepr
2019-09-19 17:50:24 +02:00
Leonardo de Moura
02e4abb24a
feat(library/init/lean/elaborator): convertForall skeleton
2019-09-17 17:17:46 -07:00
Leonardo de Moura
06bb3a82d3
feat(library/init/lean/localcontext): add LocalContext.mkLambda and LocalContext.mkForall
2019-09-17 17:17:46 -07:00
Leonardo de Moura
eebc722f57
feat(library/init/lean/expr): add abstractRange
2019-09-17 17:17:46 -07:00
Leonardo de Moura
1d1ad8e2ed
chore(library/init): auxiliary combinators
2019-09-17 17:17:46 -07:00
Leonardo de Moura
fdb1bf84b4
refactor(library/init/data/array/basic): cleanup names and types, add monadic versions
2019-09-17 17:17:46 -07:00
Leonardo de Moura
75e5f5bfd8
feat(library/init/lean/expr): expose abstract
2019-09-16 18:34:45 -07:00
Leonardo de Moura
704f90d728
feat(library/init/lean/expr): expose instantiate and instantiateRev
2019-09-16 18:29:43 -07:00
Leonardo de Moura
2996d306c9
feat(library/init): add more general modify: modifyGet
...
This commit also adds a few helper elaboration functions.
2019-09-16 15:14:02 -07:00
Leonardo de Moura
bd7ee8b01b
feat(library/init/lean/elaborator/term): add elabList, and fix elabTermAux
2019-09-14 08:41:49 -07:00
Sebastian Ullrich
560e7af128
fix(library/init/lean/compiler/ir/compilerm): borrow annotations on extern decls do not do anything right now
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
9015fc1e34
chore(library/compiler/ir_interpreter): add step-level trace
2019-09-12 18:26:15 +02:00
Sebastian Ullrich
1a99fc5c5d
feat(init/lean/compiler): export some internals
2019-09-12 18:22:02 +02:00
Leonardo de Moura
8e47b6396f
chore(library/init/lean/compiler/ir): simplify mkCase, the xType field is set by explicitBoxing
2019-09-12 08:55:09 -07:00
Leonardo de Moura
ca54240843
fix(library/init/lean/compiler/ir): the xType field at FnBody.case must be set by explicitBoxing
2019-09-12 08:47:58 -07:00
Leonardo de Moura
0284d4a7a2
chore(library/compiler/ir): use new mkCase
2019-09-12 08:23:29 -07:00
Leonardo de Moura
a16d3f09cf
feat(library/init/lean/compiler/ir): store scrutinee type at FnBody.case
2019-09-12 08:07:47 -07:00
Leonardo de Moura
56e0c0efae
chore(library/init/lean/compiler/ir/boxing): apply elimDead
2019-09-11 11:55:38 -07:00
Leonardo de Moura
3aeeadd255
chore(library/init/lean/compiler/ir/boxing): cleanup
2019-09-11 11:11:33 -07:00
Leonardo de Moura
f39220ac01
feat(library/init/lean/compiler/ir/boxing): ignore "cheap" cases when caching boxing operations
2019-09-11 10:56:37 -07:00
Leonardo de Moura
61a3ea61c4
perf(library/init/lean/compiler/ir/boxing): create auxiliary constants for caching the value of boxed/unboxed literals and constants
...
For example, in the new test `qsort64.lean`, the new optimization
prevents the repeated execution of `box UInt64.inhabited`.
On my machine
```
./run.sh qsort64.lean 2000000
```
Goes from 1.22s to 0.355s
2019-09-11 10:37:35 -07:00
Leonardo de Moura
e8cdd2b29f
fix(library/init/lean/compiler/ir/default): missing explicitRC
2019-09-09 10:53:34 -07:00
Leonardo de Moura
f7af9a73bd
chore(library/init/lean/compiler/ir): move addBoxedVersion to entry point file
2019-09-09 10:35:52 -07:00
Leonardo de Moura
7dfec3c724
feat(library/init/lean/compiler/ir): add persistent field to inc/dec
...
If `persistent == true`, then object is known to be persistent at
compilation time. `emitc` omits `inc/dec` operations to
persistent objects. The interpreter does not to avoid memory leaks.
2019-09-09 07:42:06 -07:00
Leonardo de Moura
a188bb8497
chore(library/init/lean/compiler/ir): remove emitcpp
2019-09-07 19:46:22 -07:00
Leonardo de Moura
09d8dd536c
fix(library/init/lean/compiler/ir/emitc): invisible unicode character
2019-08-24 07:40:55 -07:00