Commit graph

9 commits

Author SHA1 Message Date
ayazhafiz
dfc384aa1f Make mono test output prettier 2022-02-21 14:10:45 -05:00
ayazhafiz
5943873654 Inline polymorphic calls at usage sites
This is a bit.. ugly, or at least seems suboptimal, but I can't think of
a better way to do it currently aside from demanding a uniform
representation, which we probably don't want to do.

Another option is something like the defunctionalization we perform
today, except also capturing potential uses of nested functions in the
closure tag of an encompassing lambda. So for example,

```
f = \x -> \y -> 1
```

would now record a lambdaset with the data `[Test.f
[TypeOfInnerClos1]]`, where `TypeOfInnerClos1` is e.g.
`[Test.f.innerClos1 I8, Test.f.innerClos1 I16]`, symbolizing that the
inner closure may be specialized to take an I8 or I16. Then at the time
that we create the capture set for `f`, we create a tag noting what
specialization should be used for the inner closure, and apply the
current defunctionalization algorithm. So effectively, the type of the
inner closure becomes a capture.

I'm not sure if this is any better, or if it has more problems.
@folkertdev any thoughts?

Closes #2322
2022-01-28 23:49:19 -05:00
Folkert
8698ea3c72 update mono tests 2022-01-23 15:46:53 +01:00
ayazhafiz
e655ab7d3b Module comments for reset-reuse
Figuring out what this module was doing, and why, took me a bit less
than half an hour. We should document what's happening for others in the
future so they don't need to follow up on Zulip necessarily.
2022-01-13 16:33:23 -05:00
Folkert
de2f1c808b update mono tests 2021-08-16 21:03:58 +02:00
Folkert
84855dae5e rename in mono tests 2021-06-21 23:16:09 +02:00
Folkert
7a36c25848 simpify pattern match on non-indexable values 2021-06-21 21:24:46 +02:00
Folkert
fb6ba3de57 update mono tests 2021-06-01 21:45:51 +02:00
rvcas
6001312393 chore: add mono txt files to git 2021-06-01 15:40:12 -04:00