You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code typechecks on my machine in about 50 seconds and generates a huge .ttc.
dataX:()->TypewhereA: X i
B: X i
C: X i
dataY: ((i ** X i), (i ** X i)) ->TypewhereMkY: Y x
f: (a, b : ()) -> (x : X a) -> (y : X b) -> Y ((a ** x), (b ** y)) ->()
f a ()AAMkY=()
f () b ABMkY=()
f a ()BAMkY=()
f a b BBMkY=()
f a ()CAMkY=()
f a b CBMkY=()
f a b ___=()
I have prepared various modifications to find the influencing factors. Compilation time correlates with the size of .ttc, so I will give the file sizes for comparison:
Gist with code
Steps to Reproduce
This code typechecks on my machine in about 50 seconds and generates a huge
.ttc
.I have prepared various modifications to find the influencing factors. Compilation time correlates with the size of
.ttc
, so I will give the file sizes for comparison:The full code for all modifications is available in gist. Here I will give a brief description of them:
Example
— the code presented aboveExampleFull
— all implicit arguments are explicitly specifiedExampleNoMatchLastY
— removed last matching onMkY
ExampleSwap
— swap the first two casesExampleNoPair
—Y
has two indices instead of one pairExampleSwapNoPair
— combination ofExampleSwap
andExampleNoPair
ExampleNoMatchY
— no matching onMkY
ExampleNoMatchAB
— no matching ona
andb
.ExampleErased
—a
andb
have quantity 0ExampleMatchAll
— matching ona
andb
everywhereFrom my observations, every matching on the
MkY
slows down the typecheck a lot.I also tested this example on Yaffle, the result is similar:
Expected Behavior
Fast typechecking
Observed Behavior
The text was updated successfully, but these errors were encountered: