yasi 0.2.0.0 → 0.2.0.1
raw patch · 4 files changed
+8/−17 lines, 4 filesdep ~hedgehogdep ~tastydep ~tasty-hedgehogPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: hedgehog, tasty, tasty-hedgehog, template-haskell, text, text-display
API changes (from Hackage documentation)
- Yasi.Internal: class Displayish a
- Yasi.Internal: displayish :: Displayish a => a -> Builder
- Yasi.Internal: instance Data.Text.Display.Display a => Yasi.Internal.Displayish a
- Yasi.Internal: instance Yasi.Internal.Displayish GHC.Base.String
Files
- CHANGELOG.md +4/−0
- src/Yasi.hs +1/−1
- src/Yasi/Internal.hs +1/−14
- yasi.cabal +2/−2
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for yasi +## 0.2.0.1 -- 2022-03-13++ * Update `text-display`, which makes an internal hack unnecessary+ ## 0.2.0.0 -- 2022-03-13 * Support interpolating arbitrary expressions.
src/Yasi.hs view
@@ -5,7 +5,7 @@ -- * Depends on [ghc-hs-meta](https://hackage.haskell.org/package/ghc-hs-meta) -- instead of [haskell-src-meta](https://hackage.haskell.org/package/haskell-src-meta) -- for interpolating arbitrary expressions.--- This result in faster compile times and fewer bugs.+-- This results in faster compile times and fewer bugs. module Yasi ( i,
src/Yasi/Internal.hs view
@@ -1,12 +1,9 @@-{-# LANGUAGE UndecidableInstances #-}- -- | Internal module, no stability guarantees module Yasi.Internal ( Segment (..), parseSegments, ipExpr, interpolator,- Displayish (..), Stringish (..), ) where@@ -87,7 +84,7 @@ prep asg af = do (as, g) <- asg (a, f) <- af- pure (TH.AppE (TH.VarE 'displayish) a : as, f . g)+ pure (TH.AppE (TH.VarE 'TD.displayBuilder) a : as, f . g) interpolator :: Char ->@@ -100,16 +97,6 @@ quotePat = const $ fail "pattern context not supported" quoteType = const $ fail "type context not supported" quoteDec = const $ fail "declaration context not supported"--class Displayish a where- displayish :: a -> TLB.Builder--instance {-# OVERLAPPABLE #-} TD.Display a => Displayish a where- displayish = TD.displayBuilder---- String is still used too pervasively...-instance Displayish String where- displayish = TLB.fromString class Stringish a where stringish :: TLB.Builder -> a
yasi.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: yasi-version: 0.2.0.0+version: 0.2.0.1 synopsis: Yet another string interpolator description:@@ -38,7 +38,7 @@ base >= 4.14 && < 5 , template-haskell >= 2.16 && < 2.19 , text >= 1.2 && < 2.1- , text-display ^>= 0.0+ , text-display ^>= 0.0.2 , ghc-hs-meta ^>= 0.1 test-suite tasty