exon 1.6.0.1 → 1.6.0.2
raw patch · 4 files changed
+10/−3 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- exon.cabal +1/−1
- lib/Exon/Parse.hs +3/−1
- test/Exon/Test/BasicTest.hs +5/−1
- test/Exon/Test/NewtypeTest.hs +1/−0
exon.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: exon-version: 1.6.0.1+version: 1.6.0.2 synopsis: Customizable quasiquote interpolation description: See https://hackage.haskell.org/package/exon/docs/Exon.html category: String
lib/Exon/Parse.hs view
@@ -86,7 +86,9 @@ verbatimWith :: Parser Char -> Parser String verbatimWith end =- takeRestUnless end <> (stopHerald <|> option "" (try (string "#" <> verbatim)))+ go+ where+ go = takeRestUnless end <> (stopHerald <|> option "" (string "#" <> option "" go)) verbatim :: Parser String verbatim =
test/Exon/Test/BasicTest.hs view
@@ -45,12 +45,16 @@ "Philip | J. | FRY" === skipWs [exonws|Philip J. #{SkipWs (up lastName)}|] "Philip J. | FRY" === [exon|Philip J.#{up lastName}|] ("abc" :: Text) === skipWs [exonws|a ##{"b" :: Text} #{"c"}|]+ ("one #" :: Text) === [exon|one #|] where var :: IsString a => a var = "and" -newtype Thing = Thing String deriving stock (Generic) deriving newtype (IsString, Show, Eq)+newtype Thing =+ Thing String+ deriving stock (Generic)+ deriving newtype (IsString, Show, Eq) instance ExonSegment Thing inner String where exonSegment builder = \case
test/Exon/Test/NewtypeTest.hs view
@@ -63,3 +63,4 @@ ("pre|post" :: StrUse) === exonUse (skipWs [exonws|pre ##{"post" :: Text}|]) ("prepost" :: StrUse) === skipWs [exonws|pre ##{"post" :: Text}|] ("pre post" :: Str) === [exon|pre ##{StrUse "post"}|]+ ("one #two" :: Text) === [exon|one ###{Nt "two"}|]