packages feed

nyan-interpolation-core 0.9 → 0.9.0.1

raw patch · 5 files changed

+4/−87 lines, 5 filesdep −doctest-paralleldep −processdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: doctest-parallel, process

Dependency ranges changed: base

API changes (from Hackage documentation)

- Text.Interpolation.Nyan.Core: nyan :: IO Text

Files

− app/Main.hs
@@ -1,24 +0,0 @@-import Control.Concurrent-import qualified Data.Text as T-import GHC.IO.Handle-import System.Process--getFileContent :: IO T.Text-getFileContent = withCreateProcess (proc "cat" ["very-big-file.txt"]){ std_out = CreatePipe }-  \_mStdin mStdout _mStderr phandler ->-    case mStdout of-      Nothing     -> error "No handler"-      Just stdout -> do-        putStrLn "Connected, getting"-        !output <- T.pack <$> hGetContents stdout-        res <- waitForProcess phandler-        putStrLn $ "Awaited: " <> show res-        putStrLn $ "Result: " <> show (T.length output)-        threadDelay 100000-        putStrLn "Waiting"-        return output--main :: IO ()-main = do-  _ <- getFileContent-  return ()
nyan-interpolation-core.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 4b363e6c807e291a385c97c298693896001c458a6299ea54163dc5a58a12bb27+-- hash: 4810cd4539501b3d69ccbc22d8a6c24b1545a973c329ab1e27f62cdcb2296dde  name:           nyan-interpolation-core-version:        0.9+version:        0.9.0.1 synopsis:       Customize your nyan interpolator! description:    This package to tune up your own variation of interpolator. Declare new rendering modes, set desired switches defaults and more. category:       Interpolation, Text@@ -50,32 +50,11 @@     , fmt     , megaparsec     , mtl-    , process     , template-haskell     , text     , vector   default-language: Haskell2010 -executable nyan-interpolation-try-  main-is: Main.hs-  other-modules:-      Paths_nyan_interpolation_core-  hs-source-dirs:-      app-  default-extensions: AllowAmbiguousTypes BangPatterns BlockArguments ConstraintKinds DataKinds DefaultSignatures DeriveDataTypeable DeriveGeneric DerivingStrategies FlexibleContexts FlexibleInstances FunctionalDependencies GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses MultiWayIf NamedFieldPuns OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeFamilies UndecidableInstances ViewPatterns TypeApplications TypeOperators QuasiQuotes-  ghc-options: -Weverything -Wno-missing-export-lists -Wno-missing-exported-signatures -Wno-missing-import-lists -Wno-missed-specialisations -Wno-all-missed-specialisations -Wno-unsafe -Wno-safe -Wno-missing-local-signatures -Wno-monomorphism-restriction -Wno-implicit-prelude -Wno-prepositive-qualified-module -Wno-missing-safe-haskell-mode -Wno-unused-packages-  build-depends:-      base <4.15-    , fmt-    , megaparsec-    , mtl-    , nyan-interpolation-core-    , process-    , template-haskell-    , text-    , vector-  default-language: Haskell2010- test-suite nyan-interpolation-core-tests   type: exitcode-stdio-1.0   main-is: Main.hs@@ -101,18 +80,9 @@     , megaparsec     , mtl     , nyan-interpolation-core-    , process     , tasty     , tasty-hunit-compat     , template-haskell     , text     , vector-  default-language: Haskell2010--test-suite doctests-  type:             exitcode-stdio-1.0-  hs-source-dirs:   tests-  main-is:          doctests.hs-  ghc-options:      -threaded-  build-depends:    base, nyan-interpolation-core, doctest-parallel >= 0.1   default-language: Haskell2010
src/Text/Interpolation/Nyan/Core.hs view
@@ -54,8 +54,6 @@      -- * Re-exports   , TH.QuasiQuoter--  , nyan   ) where  import qualified Data.Text as T@@ -67,11 +65,6 @@ import Text.Interpolation.Nyan.Core.Internal.RMode import Text.Interpolation.Nyan.Core.Internal.Splice -import Control.Concurrent-import qualified Data.Text as T-import GHC.IO.Handle-import System.Process- -- | Construct an interpolator. -- -- Usually you pass some options here that you consider canonical and use@@ -102,18 +95,3 @@   , valueInterpolator = simpleValueInterpolator   , invisibleCharsPreview = simpleInvisibleCharsPreview   }--nyan :: IO T.Text-nyan = withCreateProcess (proc "cat" ["kek.txt"]){ std_out = CreatePipe }-  \_mStdin mStdout _mStderr phandler ->-    case mStdout of-      Nothing     -> error "No handler"-      Just stdout -> do-        putStrLn "Connected, getting"-        !output <- T.pack <$> hGetContents stdout-        res <- waitForProcess phandler-        putStrLn $ "Awaited: " <> show res-        putStrLn $ "Result: " <> show (T.length output)-        threadDelay 100000-        putStrLn "Waiting"-        return output
src/Text/Interpolation/Nyan/Core/Internal/RMode.hs view
@@ -17,8 +17,8 @@ @renderWithMode rmode'xxx (expr)@ Haskell code (some switches may slightly change this behaviour though). ->>> import Fmt (build)->>> let rmode's :: Show a => RMode a; rmode's = RMode (build . show)+>>> rmode's :: Show a => RMode a+>>> rmode's = RMode (build . show) >>> >>> [int||Value is #s{5}|] "Value is 5"
− tests/doctests.hs
@@ -1,7 +0,0 @@-module Main where--import System.Environment (getArgs)-import Test.DocTest (mainFromCabal)--main :: IO ()-main = mainFromCabal "nyan-interpolation-core" =<< getArgs