isomorphism-class 0.3.1 → 0.3.1.1
raw patch · 2 files changed
+5/−12 lines, 2 files
Files
isomorphism-class.cabal view
@@ -1,15 +1,15 @@ cabal-version: 3.0 name: isomorphism-class-version: 0.3.1+version: 0.3.1.1 synopsis: Isomorphism typeclass as a lawful solution to the conversion problem description: = Conversion problem How often do you import @Data.Text.Lazy@ only to call @fromStrict@ or @toStrict@? How about importing @Data.ByteString.Builder@ only to call its- 'Data.ByteString.Builder.toLazyByteString' and then importing- @Data.ByteString.Lazy@ only to call its 'Data.ByteString.Lazy.toStrict'?- How often do you convert from @DiffTime@ to @NominalDiffTime@ and back?+ @toLazyByteString@ and then importing+ @Data.ByteString.Lazy@ only to call its @toStrict@?+ How often do you convert from @DiffTime@ to @NominalDiffTime@ or back? These are all instances of one pattern. They are conversions between different representations of the same information. Codebases that don't attempt to@@ -53,7 +53,7 @@ = Other work and acknowledgements - There is ["lawful-conversions"](https://hackage.haskell.org/package/lawful-conversions), which is a sibling of this library expanding upon the ideas from this one to also cover the patterns of smart construction and canonicalization. It's more involved and has different tradeoffs. Both libraries are maintained, letting their designs compete.+ - [lawful-conversions](https://hackage.haskell.org/package/lawful-conversions) - sibling of this library expanding upon the same insights to also cover the patterns of smart construction and canonicalization. It's more involved and has different tradeoffs. Both libraries are maintained, letting their designs compete. Some ideas and concepts are also shared with the following libraries:
library/IsomorphismClass.hs view
@@ -29,13 +29,6 @@ -- 'from' @'Data.ByteString.Builder.Builder' $ -- 'to' a <> 'to' b <> 'to' c -- @------ @--- renderNameAndHeight :: 'Text' -> 'Int' -> 'Text'--- renderNameAndHeight name height =--- 'from' @'Data.Text.Encoding.StrictTextBuilder' $--- "Height of " <> 'to' name <> " is " <> 'fromString' (show height)--- @ module IsomorphismClass ( -- * Typeclasses IsomorphicTo (..),