<div dir="auto">Using the numerator and denominator functions in Data.Ratio adds an extra layer of laziness to functions that have to work with Ratios (especially Rationals). I think it'd be convenient if there were a pattern synonym exported from the safe Data.Ratio:<div dir="auto"><br></div><div dir="auto">pattern n :% d <- (n GHC.Ratio.:% d) where</div><div dir="auto">  n :% d = n % d</div><div dir="auto"><br></div><div dir="auto">This way, destructuring is as fast as if you were to import GHC.Ratio directly, but it can't be used to create invalid Ratios.</div><div dir="auto"><br></div><div dir="auto">The only disadvantage is that using the :% to destructure it requires an Integral constraint on the value, but 99% of the time, the value will be Integer anyway, and even in the remaining 1% you still can't construct a Ratio a without an Integral a constraint in safe code anyway, so it shouldn't matter.</div></div>