Pattern Synonym for Ratio
Data.Ratio should export a simple pattern synonym that can be used by Safe code.
infixl 7 :%:
pattern n :%: d <- n :% d where
n :%: d = n % d
It'd be much simpler to use than numerator and denominator, and pattern matching on it would turn into a regular pattern match, hopefully for free.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.6.3 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Core Libraries |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |