mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-14 05:46:47 +03:00
170af1e87a
* Skip forced arguments in conversion check This isn't always safe - we have to have also checked the type of the things we're converting - but in the place where it is safe it can be a pretty significant saving. * Use Closures, not NF, in Binders for normal forms This means we don't need to reduce argument types during unification if we don't need to. Also, we now try to avoid reducing closures during unification if they are unified with a metavariable. Together, this saves a huge amount of unnecessary evaluation in programs that do a lot of compile time evaluation. * Didn't mean to update idris2api.ipkg * Fix dodgy merge
24 lines
380 B
Idris
24 lines
380 B
Idris
Gnu : Type
|
|
Gnu = Int
|
|
|
|
Foo : Type
|
|
Foo = Bool
|
|
|
|
A : Foo
|
|
A = True
|
|
|
|
mkFoo : Gnu -> Foo
|
|
mkFoo gnu = A
|
|
|
|
gnat : {auto startHere : (a : Foo ** a = A)} -> Unit
|
|
gnat = ()
|
|
|
|
pathology : (gnu : Gnu) -> Unit
|
|
pathology gnu =
|
|
let %hint foo : Foo
|
|
foo = mkFoo gnu
|
|
%hint bar : Foo -> (ford : arg = A)
|
|
-> (a : Foo ** a = A)
|
|
bar _ Refl = (A ** Refl)
|
|
in gnat
|