flix icon indicating copy to clipboard operation
flix copied to clipboard

experiment: separate unkinded and kinded types

Open mlutze opened this issue 2 years ago • 2 comments

mlutze avatar Jul 30 '22 19:07 mlutze

What's the plan here?

magnus-madsen avatar Aug 08 '22 16:08 magnus-madsen

Depends on what you think of it.

I think it's going in the right direction. There are a few things that can be cleaned up afterward, as I was trying to make the translation as straight as possible. For example, moving mkNot etc. from resolver to UnkindedType, removing unused validations from Kinder, and providing a way to format unkinded types.

mlutze avatar Aug 08 '22 16:08 mlutze

I think this is reviewable at least.

The one big consideration is what to do about unkinded types in error messages. My current idea is that we just use the string from the source instead of trying to format it somehow.

mlutze avatar Aug 22 '22 13:08 mlutze

Which ASTs would use UnkindedType?

magnus-madsen avatar Aug 29 '22 19:08 magnus-madsen

Which ASTs would use UnkindedType?

Introduced in the Resolver and eliminated in the Kinder (the following phase)

mlutze avatar Aug 29 '22 20:08 mlutze

@mlutze Conflict, sorry.

magnus-madsen avatar Sep 05 '22 11:09 magnus-madsen

You want this merged, right?

magnus-madsen avatar Sep 05 '22 11:09 magnus-madsen

You want this merged, right?

Yes, assuming we're in agreement on it in principle.

mlutze avatar Sep 05 '22 11:09 mlutze

I think its a good refactoring.

magnus-madsen avatar Sep 05 '22 12:09 magnus-madsen

(Lets just hope that we won't need to revert in the future.)

magnus-madsen avatar Sep 05 '22 12:09 magnus-madsen

Overall I like the refactoring 👍

magnus-madsen avatar Sep 06 '22 13:09 magnus-madsen

Merged. Thanks! Nice cleanup 👍

magnus-madsen avatar Sep 06 '22 17:09 magnus-madsen