packages feed

Frames 0.6.3 → 0.6.4

raw patch · 4 files changed

+17/−15 lines, 4 filesdep ~basedep ~ghc-primPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, ghc-prim

API changes (from Hackage documentation)

Files

Frames.cabal view
@@ -1,5 +1,5 @@ name:                Frames-version:             0.6.3+version:             0.6.4 synopsis:            Data frames For working with tabular data files description:         User-friendly, type safe, runtime efficient tooling for                      working with tabular data deserialized from@@ -30,7 +30,7 @@                      data/left1.csv data/right1.csv data/left_summary.csv                      data/FL2.csv cabal-version:       >=1.10-tested-with:         GHC == 8.4.4 || == 8.6.5 || == 8.8.3+tested-with:         GHC == 8.4.4 || == 8.6.5 || == 8.8.3 || == 8.10.1  source-repository head   type:     git@@ -64,8 +64,8 @@                        TypeOperators, ConstraintKinds, StandaloneDeriving,                        UndecidableInstances, ScopedTypeVariables,                        OverloadedStrings, TypeApplications-  build-depends:       base >=4.8 && <4.14,-                       ghc-prim >=0.3 && <0.6,+  build-depends:       base >=4.8 && <4.15,+                       ghc-prim >=0.3 && <0.7,                        primitive >= 0.6 && < 0.8,                        text >= 1.1.1.0,                        template-haskell,
src/Frames/CSV.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, DataKinds, FlexibleContexts, FlexibleInstances, GADTs,+{-# LANGUAGE CPP, DataKinds, DeriveLift, FlexibleContexts, FlexibleInstances, GADTs,              LambdaCase, OverloadedStrings, RankNTypes,              ScopedTypeVariables, TemplateHaskell, TypeApplications,              TypeOperators #-}@@ -52,17 +52,13 @@     -- | Quoted values with the given quoting character. Quotes are escaped by doubling them.     -- Mostly RFC4180 compliant, except doesn't support newlines in values   | RFC4180Quoting QuoteChar-  deriving (Eq, Show)+  deriving (Eq, Show, Lift)  data ParserOptions = ParserOptions { headerOverride :: Maybe [T.Text]                                    , columnSeparator :: Separator                                    , quotingMode :: QuotingMode }   deriving (Eq, Show) -instance Lift QuotingMode where-  lift NoQuoting = [|NoQuoting|]-  lift (RFC4180Quoting char) = [|RFC4180Quoting $(litE . charL $ char)|]- instance Lift ParserOptions where   lift (ParserOptions Nothing sep quoting) = [|ParserOptions Nothing $sep' $quoting'|]     where sep' = [|T.pack $(stringE $ T.unpack sep)|]@@ -71,6 +67,9 @@     where sep' = [|T.pack $(stringE $ T.unpack sep)|]           hs' = [|map T.pack $(listE $  map (stringE . T.unpack) hs)|]           quoting' = lift quoting+#if MIN_VERSION_template_haskell(2,16,0)+  liftTyped = unsafeTExpCoerce . lift+#endif  -- | Default 'ParseOptions' get column names from a header line, and -- use commas to separate columns.
test/DataCSV.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE OverloadedStrings, TemplateHaskell #-}+{-# LANGUAGE DeriveLift, OverloadedStrings, TemplateHaskell #-} module DataCSV where import Control.Monad ((>=>)) import Data.Bifunctor (first)@@ -10,10 +10,14 @@ import Text.Toml import Text.Toml.Types (Node (VTable, VString), Table) -data CsvExample = CsvExample { name :: String, csv :: String, generated :: String }+data CsvExample = CsvExample {+  name :: String+  , csv :: String+  , generated :: String }+  deriving Lift -instance Lift CsvExample where-  lift (CsvExample n c g) = [e| CsvExample n c g |]+-- instance Lift CsvExample where+--   lift (CsvExample n c g) = [e| CsvExample n c g |]  examplesFrom :: FilePath -> IO [CsvExample] examplesFrom fp = (either error id . ((first show . parseTomlDoc "examples") >=> go))
test/UncurryFoldNoHeader.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE DataKinds, FlexibleContexts, QuasiQuotes, TemplateHaskell, TypeApplications #-} module UncurryFoldNoHeader where import qualified Control.Foldl                 as L-import           Data.Vinyl                     ( rcast ) import           Data.Vinyl.Curry               ( runcurryX ) import           Frames import           Frames.TH                      ( rowGen