lean4-htt/library/init/data
Leonardo de Moura d85c30fde1 perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible]
Without these annotations, Lean will timeout when trying to synthesize
the type class instance `decidable_eq uint32`. The type class resolution
problem will produce the unification problem:
```
decidable (@eq uint32 a b) =?= decidable (@eq usize ?x ?y)
```
which Lean tries to solve by assigning `?x := a`.
During the assignment, the types of `?x` and `a` are unified with "full
force". Thus, we get the constraint
```
usize_sz =?= uint32_sz
```
which will take forever to be solved when peforming the computation in
unary arithmetic.

Remark: this commit also makes sure that `type_context` will not unfold
irreducible definitions when trying to unify/match the types.

The new test `type_class_performance1.lean` exposes the problem fixed
by this commit.
2018-05-07 18:07:04 -07:00
..
array perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible] 2018-05-07 18:07:04 -07:00
bool chore(*): remove end after each match-expression 2018-05-04 11:30:06 -07:00
char chore(library/init): move logic.lean => core.lean 2018-04-30 09:25:25 -07:00
fin feat(library/init/data/hashmap): hash function produces an uint32 instead of nat 2018-05-03 17:56:10 -07:00
hashmap perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible] 2018-05-07 18:07:04 -07:00
int chore(*): remove end after each match-expression 2018-05-04 11:30:06 -07:00
list chore(*): remove end after each match-expression 2018-05-04 11:30:06 -07:00
nat chore(library/init/data/nat/basic): cleanup 2018-05-04 11:30:06 -07:00
option chore(*): remove end after each match-expression 2018-05-04 11:30:06 -07:00
ordering chore(*): remove end after each match-expression 2018-05-04 11:30:06 -07:00
rbmap chore(*): remove end after each match-expression 2018-05-04 11:30:06 -07:00
rbtree chore(*): remove end after each match-expression 2018-05-04 11:30:06 -07:00
string chore(*): remove end after each match-expression 2018-05-04 11:30:06 -07:00
basic.lean chore(library/init): remove sum micro module 2018-04-30 09:25:26 -07:00
default.lean chore(library/init): merge sigma/lex.lean with wf.lean 2018-04-30 10:04:03 -07:00
dlist.lean chore(library/init/data/dlist): add @[inline] 2018-05-07 18:07:04 -07:00
hashable.lean feat(library/init/data/hashable): add hashable nat instance 2018-05-06 07:53:29 -07:00
repr.lean perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible] 2018-05-07 18:07:04 -07:00
set.lean refactor(init): init/category ==> init.control 2018-04-27 08:33:08 -07:00
to_string.lean perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible] 2018-05-07 18:07:04 -07:00
uint.lean perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible] 2018-05-07 18:07:04 -07:00
usize.lean perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible] 2018-05-07 18:07:04 -07:00