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
We have a "duplicate this definition" action available on all term definitions. We ought to have the same for type definitions.
Spec
When performed on a type T with constructors A and B, this action would create a new type TCopy with constructors ACopy and BCopy. All parameters and fields would be as in T.
Implementation details
Note that DuplicateDef's implementation (in toProgActionNoInput) relies on CopyPasteSig and CopyPasteBody. We don't yet have equivalents CopyPasteConField and CopyPasteParamKind. The bulk of the work in implementing this whole spec would be adding these low-level copy actions. Note that copying of kinds is something which we'll also need for implementing "raise kind".
The text was updated successfully, but these errors were encountered:
When performed on a type T with constructors A and B, this action would create a new type TCopy with constructors ACopy and BCopy. All parameters and fields would be as in T.
I'm using the same naming system here that we currently have for terms. I actually think T (copy) etc. would be more pleasant. Of course, if we do choose a different naming system we should modify DuplicateDef to use the same one.
Description
This is a feature request.
We have a "duplicate this definition" action available on all term definitions. We ought to have the same for type definitions.
Spec
When performed on a type
T
with constructorsA
andB
, this action would create a new typeTCopy
with constructorsACopy
andBCopy
. All parameters and fields would be as inT
.Implementation details
Note that
DuplicateDef
's implementation (intoProgActionNoInput
) relies onCopyPasteSig
andCopyPasteBody
. We don't yet have equivalentsCopyPasteConField
andCopyPasteParamKind
. The bulk of the work in implementing this whole spec would be adding these low-level copy actions. Note that copying of kinds is something which we'll also need for implementing "raise kind".The text was updated successfully, but these errors were encountered: