motoko
motoko copied to clipboard
Allow pattern matching on type fields of modules
My goal here is to allow importing types in an unqualified manner without having to add an extra binding.
import { type Result } "mo:base/Result";
// instead of
import Result "mo:base/Result";
type Result<Ok, Err> = Result.Result<Ok, Err>
Following up on https://github.com/dfinity/motoko/pull/3362
+1 (would've benefited from this dozens of times in various situations). Maybe P3 priority or P2 if we find some compelling use cases?
Released in version 0.15.1