packages feed

exon 0.2.0.1 → 0.3.0.0

raw patch · 8 files changed

+15/−148 lines, 8 filesdep +incipit-basedep −reludesetup-changedPVP ok

version bump matches the API change (PVP)

Dependencies added: incipit-base

Dependencies removed: relude

API changes (from Hackage documentation)

- Exon.Class.Exon: instance Exon.Class.Exon.Exon Exon.Class.Exon.ExonDefault Relude.String.Conversion.LByteString
- Exon.Class.Exon: instance Exon.Class.Exon.Exon Exon.Class.Exon.ExonDefault Relude.String.Conversion.LText
+ Exon.Class.Exon: instance Exon.Class.Exon.Exon Exon.Class.Exon.ExonDefault Incipit.String.Conversion.LByteString
+ Exon.Class.Exon: instance Exon.Class.Exon.Exon Exon.Class.Exon.ExonDefault Incipit.String.Conversion.LText

Files

+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
exon.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.2 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.34.6. -- -- see: https://github.com/sol/hpack  name:           exon-version:        0.2.0.1+version:        0.3.0.0 synopsis:       Monoidal Quasiquote Interpolation description:    See <https://hackage.haskell.org/package/exon/docs/Exon.html> category:       String@@ -33,15 +33,8 @@       Exon.Data.RawSegment       Exon.Data.Result       Exon.Data.Segment-      Exon.Debug       Exon.Parse-      Exon.Prelude       Exon.Quote-  other-modules:-      Prelude-      Paths_exon-  autogen-modules:-      Paths_exon   hs-source-dirs:       lib   default-extensions:@@ -102,13 +95,13 @@       UndecidableInstances       UnicodeSyntax       ViewPatterns-  ghc-options: -Wall -Wredundant-constraints -Wsimplifiable-class-constraints -Wunused-type-patterns+  ghc-options: -Wall -Wredundant-constraints -Wunused-type-patterns   build-depends:       base ==4.*     , flatparse >=0.2     , haskell-src-exts <1.24     , haskell-src-meta <0.9-    , relude >=0.7 && <1.2+    , incipit-base >=0.1.0.3     , template-haskell     , text   mixins:@@ -123,7 +116,6 @@       Exon.Test.KeepWsTest       Exon.Test.Quote       Exon.Test.ShowsPrecTest-      Paths_exon   hs-source-dirs:       test   default-extensions:@@ -184,17 +176,16 @@       UndecidableInstances       UnicodeSyntax       ViewPatterns-  ghc-options: -Wall -Wredundant-constraints -Wsimplifiable-class-constraints -Wunused-type-patterns -threaded -rtsopts -with-rtsopts=-N+  ghc-options: -Wall -Wredundant-constraints -Wunused-type-patterns -threaded -rtsopts -with-rtsopts=-N   build-depends:       base ==4.*     , exon     , hedgehog+    , incipit-base     , tasty     , tasty-hedgehog     , template-haskell     , text   mixins:       base hiding (Prelude)-    , exon hiding (Exon.Prelude)-    , exon (Exon.Prelude as Prelude)   default-language: Haskell2010
− lib/Exon/Debug.hs
@@ -1,102 +0,0 @@-{-# options_haddock hide #-}--- |Description: Debug Printing Combinators-{-# language NoImplicitPrelude #-}--module Exon.Debug where--import qualified Data.Text as Text-import GHC.Stack (SrcLoc (..))-import Relude-import System.IO.Unsafe (unsafePerformIO)--srcLoc :: CallStack -> SrcLoc-srcLoc = \case-  (getCallStack -> (_, loc) : _) -> loc-  _ -> error "Debug.srcLoc: empty CallStack"--debugPrint ::-  SrcLoc ->-  Text ->-  IO ()-debugPrint SrcLoc{srcLocModule = toText -> slm, srcLocStartLine} msg =-  putStrLn (moduleName <> ":" <> show srcLocStartLine <> " " <> toString msg)-  where-    moduleName =-      toString $ fromMaybe slm $ listToMaybe $ reverse $ Text.splitOn "." slm--debugPrintWithLoc ::-  Monad m =>-  SrcLoc ->-  Text ->-  m ()-debugPrintWithLoc loc msg = do-  () <- return (unsafePerformIO (debugPrint loc msg))-  pure ()--dbg ::-  HasCallStack =>-  Monad m =>-  Text ->-  m ()-dbg =-  debugPrintWithLoc (srcLoc callStack)-{-# inline dbg #-}--dbgsWith ::-  HasCallStack =>-  Monad m =>-  Show a =>-  Text ->-  a ->-  m ()-dbgsWith prefix a =-  debugPrintWithLoc (srcLoc callStack) (prefix <> ": " <> show a)-{-# inline dbgsWith #-}--dbgs ::-  HasCallStack =>-  Monad m =>-  Show a =>-  a ->-  m ()-dbgs a =-  debugPrintWithLoc (srcLoc callStack) (show a)-{-# inline dbgs_ #-}--dbgs_ ::-  HasCallStack =>-  Monad m =>-  Show a =>-  a ->-  m a-dbgs_ a =-  a <$ debugPrintWithLoc (srcLoc callStack) (show a)-{-# inline dbgs #-}--tr ::-  HasCallStack =>-  Text ->-  a ->-  a-tr msg a =-  unsafePerformIO (a <$ debugPrint (srcLoc callStack) msg)-{-# inline tr #-}--trs ::-  Show a =>-  HasCallStack =>-  a ->-  a-trs a =-  unsafePerformIO (a <$ debugPrint (srcLoc callStack) (show a))-{-# inline trs #-}--trs' ::-  Show b =>-  HasCallStack =>-  b ->-  a ->-  a-trs' b a =-  unsafePerformIO (a <$ debugPrint (srcLoc callStack) (show b))-{-# inline trs' #-}
lib/Exon/Parse.hs view
@@ -1,5 +1,6 @@ {-# options_haddock prune #-}--- |Description: The Quasiquote Body Parser++-- |Description: The parser for the quasiquote body, using "FlatParse". module Exon.Parse where  import Data.Char (isSpace)@@ -24,7 +25,7 @@   takeRest,   (<|>),   )-import Prelude hiding (empty, get, modify, put, span, (<|>))+import Prelude hiding (empty, span, (<|>))  import Exon.Data.RawSegment (RawSegment (ExpSegment, StringSegment, WsSegment)) @@ -56,7 +57,7 @@   Parser () ->   Parser () finishBefore cond =-  before (lookahead cond) pass+  before (lookahead cond) unit  expr :: Parser () expr =@@ -65,7 +66,7 @@   where     closing =       get >>= \case-        0 -> pass+        0 -> unit         cur -> put (cur - 1) *> $(char '}') *> expr  interpolation :: Parser RawSegment
− lib/Exon/Prelude.hs
@@ -1,16 +0,0 @@-{-# options_haddock hide #-}--- |Description: Prelude-{-# language NoImplicitPrelude #-}--module Exon.Prelude (-  module Data.Kind,-  module Exon.Debug,-  module GHC.Err,-  module Relude,-) where--import Data.Kind (Type)-import GHC.Err (undefined)--import Exon.Debug (dbg, dbgs, dbgs_, tr, trs, trs')-import Relude hiding (Type, undefined)
lib/Exon/Quote.hs view
@@ -1,8 +1,8 @@ {-# options_haddock prune #-}+ -- |Description: Internal module Exon.Quote where -import Data.Traversable (for) import Language.Haskell.Exts (   Extension,   ParseMode (extensions),
− lib/Prelude.hs
@@ -1,9 +0,0 @@-{-# options_haddock hide #-}--- |Description: Prelude-{-# language NoImplicitPrelude #-}--module Prelude (-  module Exon.Prelude,-) where--import Exon.Prelude
readme.md view
@@ -67,7 +67,7 @@ In order to get the default quoter to support custom rules for a type, one simply has to write an instance:  ```haskell-import Exon (Exon, ExonDefault, Result)+import Exon (Exon (..), ExonDefault, Result (..)) import qualified Exon as Segment (Segment(..))  instance Exon ExonDefault Name where