-
-
Notifications
You must be signed in to change notification settings - Fork 414
Closed
Labels
Description
As reported in #1602, typed holes make typechecking significantly slower.
It might be good if we can invoke the powerful Wingman without using holes if possible.
I think one such example is case split tactic. Consider the following:
foo :: Maybe a -> Int
foo may = ...I think we can provide Case split on may on may in Line 2.
One thing that we must think is the treatment of the function body.
If the function body is mere typed hole _, we can copy them as-is.
If the ... part contains some other contents, we have a few options:
- Copy the body as-is, regardless of the occurrence of
may. - Replaces all the occurrence of
maywith destructed value.
- This won't work if the destructed constructor contains implicit existential variables which cannot be determined from the type of its arguemtns.
- Copy the body as-is and prefixing each destructed pattern with as-patterns; e.g.
may@(Just mayj).- We might omit as-patterns if there is no occurrence of
may.
- We might omit as-patterns if there is no occurrence of