Commit graph

289 commits

Author SHA1 Message Date
Leonardo de Moura
8349c72686 feat: add support for EIO 2020-08-20 12:48:39 -07:00
Leonardo de Moura
cdc2dbe28d chore: use leadingNode and trailingNode in the old frontend 2020-06-10 15:05:22 -07:00
Leonardo de Moura
7a323a0c7b feat: allow parser! and tparser! to set the parser precedence 2020-06-03 18:11:13 -07:00
Leonardo de Moura
e22af8d1ef feat: add FloatArray
cc @dselsam
2020-04-07 18:05:54 -07:00
Leonardo de Moura
60d84660e6 feat: add support for Float in the compiler 2020-04-03 16:39:29 -07:00
Leonardo de Moura
6873400193 chore: remove silent | matchFailed support
Before this commit
```lean
pattern <- action
```
was being translated by the old frontend into
```lean
pattern <- action | matchFailed
```
This produced counterintuitive behavior, and performance problems when
tryin to synthesize `MonadFail` instances.
BTW, the new frontend does not implement this feature. I didn't even
remember the old frontend did this.
I will also remove the class `MonadFail` from stdlib.

cc @Kha @dselsam
2020-02-10 13:15:21 -08:00
Leonardo de Moura
38e6961003 feat: MutQuot by implementedBy 2020-02-04 16:51:08 -08:00
Leonardo de Moura
f0f522a6d6 chore: prepare to rename old coe primitives 2020-01-28 08:18:56 -08:00
Leonardo de Moura
654b464747 chore: improve old pretty printer on numeric literals 2020-01-09 13:48:15 -08:00
Leonardo de Moura
8628b52b21 feat: missing support for Empty.rec 2020-01-03 18:23:52 -08:00
Leonardo de Moura
1784b0ee67 chore: Heq ==> HEq 2019-12-04 11:20:38 -08:00
Leonardo de Moura
b09fb4348d chore: rename Name constructors 2019-11-18 19:54:05 -08:00
Leonardo de Moura
85a1994bbb chore: use mkNameStr and mkNameNum for building quoted names 2019-11-18 12:45:53 -08:00
Leonardo de Moura
beac2a1af5 fix: treat panic as unreachable at ll_infer_type_fn
Motivation: ensure the correct type `IRType` is inferred for definitions
such as
```
def f (n : UInt32) : UInt32 :=
if n == 0 then panic! "foo"
else n+1
```
2019-11-14 21:56:09 -08:00
Leonardo de Moura
f88561ae68 feat: add trace! macro 2019-10-22 16:08:37 -07:00
Leonardo de Moura
4793cbfa9a feat: add #[elem1, elem2, ..] notation for creating arrays
@kha @dselsam: I added this notation because I am tired of writing
`[elem1, elem2, ...].toArray`. BTW, the new notation is based on the
one available in SML.
2019-10-07 15:36:44 -07:00
Leonardo de Moura
261c0b9c24 feat(frontends/lean): add panic! macro
cc @dselsam
2019-09-30 17:16:19 -07:00
Leonardo de Moura
0bd268fc96 fix(library/compiler/erase_irrelevant): add elim_array_cases 2019-09-19 10:47:05 -07:00
Leonardo de Moura
306ff7d7e5 fix(library/compiler): fixes #34
`csimp` assumes constructors and `casesOn` applications match.  That
is, given `I.casesOn x ...`, then if `x` is an constructor, then it is
a constructor of the inductive datatype `I`.
The transformation `erase_irrelevant` was violating this property when
it mixes `Decidable` and `Bool`. We fix this issue by mapping
`Decidable.casesOn`, `Decidable.isTrue` and `Decidable.isFalse` to
`Bool.casesOn`, `Bool.true` and `Bool.false` respectively.
2019-09-13 10:20:50 -07:00
Leonardo de Moura
da09ef4f66 feat(frontends/lean/builtin_exprs): minor improvement 2019-06-24 15:48:11 -07:00
Leonardo de Moura
24e3bff429 feat(frontends/lean): add simple parser! macro 2019-06-24 15:48:11 -07:00
Leonardo de Moura
ffbccf1ee9 fix(library/compiler): ByteArray bug 2019-06-03 15:01:16 -07:00
Leonardo de Moura
0d1a0c8b6e chore(library): toBool ==> decide
We want to define a type class similar to Haskell's `ToBool`.
2019-05-06 14:02:15 -07:00
Leonardo de Moura
6c44a5d997 feat(library/compiler/csimp): add Thunk.get (Thunk.mk f) ==> f () simplification 2019-04-05 14:55:48 -07:00
Leonardo de Moura
48fbaefa2a chore(library/constants.txt): remove leftover 2019-04-05 14:29:51 -07:00
Leonardo de Moura
9a071c18e7 feat(library/equations_compiler): add support for partial definitions 2019-03-27 11:09:32 -07:00
Leonardo de Moura
50207e2c5a chore(library/constants.txt): remove dead variables 2019-03-22 13:26:48 -07:00
Leonardo de Moura
2b76d79791 chore(library/init/core): remove more nonsense 2019-03-22 13:14:20 -07:00
Leonardo de Moura
930653f292 chore(library/init): Unit.star => Unit.unit
@kha Our stdlib is starting to match the names we used in our paper :)
2019-03-22 13:06:45 -07:00
Sebastian Ullrich
20451918a6 fix(library/constants): more Io -> IO 2019-03-21 15:11:05 -07:00
Sebastian Ullrich
b9edaf888f chore(library/init/core): ne -> Ne, not -> Not 2019-03-21 15:06:45 -07:00
Sebastian Ullrich
97e5aa2411 chore(library): s/Punit/PUnit/g etc 2019-03-21 15:06:45 -07:00
Leonardo de Moura
1fe3f14ad0 chore(*): Uint => UInt, Usize => USize 2019-03-21 15:06:44 -07:00
Leonardo de Moura
0b5862b6ce chore(*): and => And 2019-03-21 15:06:44 -07:00
Leonardo de Moura
4c50859129 chore(*): or => Or 2019-03-21 15:06:44 -07:00
Leonardo de Moura
2be87ecd92 chore(library/init): Bool.tt => Bool.true and Bool.ff => Bool.false 2019-03-21 15:06:44 -07:00
Leonardo de Moura
f8113a01eb chore(library): unit => Unit 2019-03-21 15:06:44 -07:00
Leonardo de Moura
039e7fab48 refactor(library): add suffixes.h with commonly used suffixes such as brec_on 2019-03-21 15:06:43 -07:00
Leonardo de Moura
b320452f70 chore(runtime/object): remove iterator primitives from runtime
They are now implemented in Lean.
2019-03-12 07:09:48 -07:00
Leonardo de Moura
3c73c43ab2 feat(runtime,library/init/data/array/basic): add builtin support for arrays 2019-02-16 15:27:23 -08:00
Leonardo de Moura
7c355d3ba6 feat(library/compiler): thunk support 2019-02-04 15:22:18 -08:00
Leonardo de Moura
2fa938220b chore(library/init/data/string): cleanup 2018-11-14 14:09:45 -08:00
Leonardo de Moura
835b3a10cc chore(library/init): consistent names 2018-11-14 13:08:57 -08:00
Leonardo de Moura
687e9d076d feat(library/compiler): add _apply and _closure instructions to LLNF 2018-11-07 13:30:28 -08:00
Leonardo de Moura
733bbc521f feat(library/init/core): mark thunk and task primitives with [noinline]
In the future, we should use the `[builtin]` attribute which cannot be
overwritten by the user.
2018-11-02 13:54:40 -07:00
Leonardo de Moura
7dcc12ba6f feat(library/compiler/util): add is_runtime_builtin_cnstr 2018-10-27 17:09:12 -07:00
Leonardo de Moura
3ee863da68 feat(library/compiler/erase_irrelevant): eliminate cases_on for builtin types 2018-10-23 14:58:38 -07:00
Leonardo de Moura
a40c526e48 feat(library/compiler/csimp): add basic constant folding for nat operations 2018-10-17 08:38:30 -07:00
Leonardo de Moura
338038a05e feat(library/init/core): add inline identity function 2018-10-10 18:17:29 -07:00
Leonardo de Moura
dc937281b3 chore(library/init/string): remove string.iterator_imp 2018-10-02 13:46:01 -07:00