We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ef5cd2d + e6730b3 commit 75b0fe0Copy full SHA for 75b0fe0
Data/Text/Buildable.hs
@@ -22,6 +22,7 @@ import Data.Void (Void, absurd)
22
23
import Data.Monoid (mempty)
24
import Data.Int (Int8, Int16, Int32, Int64)
25
+import Data.Fixed (Fixed, HasResolution, showFixed)
26
import Data.Ratio (Ratio, denominator, numerator)
27
import Data.Text.Format.Functions ((<>))
28
import Data.Text.Format.Int (decimal, hexadecimal)
@@ -93,6 +94,10 @@ instance Buildable Integer where
93
94
build = decimal
95
{-# INLINE build #-}
96
97
+instance (HasResolution a) => Buildable (Fixed a) where
98
+ build = build . showFixed False
99
+ {-# INLINE build #-}
100
+
101
instance Buildable Word8 where
102
103
0 commit comments