a-recknagel / stenotype

Support for shorthand type annotations.
MIT License
3 stars 2 forks source link

[ENHANCEMENT]: Stenotype Normalization #33

Open maxfischer2781 opened 4 years ago

maxfischer2781 commented 4 years ago

Is your feature request related to a problem? Please describe. Allow converting from typing to stenotype. E.g. the IR for Callable[[A, B, C], R] becomes the IR for (A, B, C, /) -> R.

Describe the solution you'd like Similar to how .backend.typing.normalize erases stenotype specifics, add .backend.steno.normalize to erase typing specifics. This should recognise standard typing names, such as the Identifier for typing.Iterable and translate them to the appropriate IR.

The CLI should support this to invert typing annotations to stenotype annotations.

Describe alternatives you've considered Various extensions, such as aliasing typing to another name or even its constituents. This may be better handled by allowing for alias handling with Identifier.