on master help sign in
Add Eq and Ord instances for Builder
commitadaae86382772271a91754f57d8bb2736483a247 authorBryan O'Sullivan <bos@serpentine.com> dateThu 26 May 2011, 23:19 (15 years ago) parent190abc0
1 file changed+6
Data/Text/Lazy/Builder.hs+6
Data/Text/Lazy/Builder.hs+6
@@ -92,6 +92,12 @@ instance String.IsString Builder where
9292instance Show Builder where
9393 show = L.unpack . toLazyText
9494
95+instance Eq Builder where
96+ a == b = toLazyText a == toLazyText b
97+
98+instance Ord Builder where
99+ a <= b = toLazyText a <= toLazyText b
100+
95101------------------------------------------------------------------------
96102
97103-- | /O(1)./ The empty @Builder@, satisfying