Frames 0.7.4 → 0.7.4.1
raw patch · 2 files changed
+26/−13 lines, 2 filesdep ~bytestringdep ~containersdep ~deepseqPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: bytestring, containers, deepseq, primitive, template-haskell, text, transformers
API changes (from Hackage documentation)
Files
- Frames.cabal +8/−8
- src/Frames/TH.hs +18/−5
Frames.cabal view
@@ -1,5 +1,5 @@ name: Frames-version: 0.7.4+version: 0.7.4.1 synopsis: Data frames for working with tabular data files description: User-friendly, type safe, runtime efficient tooling for working with tabular data deserialized from@@ -66,10 +66,10 @@ OverloadedStrings, TypeApplications build-depends: base >=4.10 && <4.20, ghc-prim >=0.3 && <0.10,- primitive >= 0.6 && < 0.9,- text >= 1.1.1.0 && < 2.1,- template-haskell >= 2.10 && < 2.20,- transformers >= 0.5.6 && < 0.6,+ primitive >= 0.6 && < 0.10,+ text >= 1.1.1.0 && < 2.2,+ template-haskell >= 2.10 && < 2.22,+ transformers >= 0.5.6 && < 0.7, vector < 0.14, readable >= 0.3.1 && < 0.4, pipes >= 4.1 && < 5,@@ -77,13 +77,13 @@ pipes-group >= 1.0.8 && < 1.1, pipes-parse >= 3.0 && < 3.1, pipes-safe >= 2.2.6 && < 2.4,- bytestring < 0.12,+ bytestring < 0.13, vinyl >= 0.13.0 && < 0.15, discrimination >= 0.4 && < 0.6, contravariant < 1.6, hashable >= 1.3 && < 1.5,- deepseq >= 1.4 && < 1.5,- containers < 0.7,+ deepseq >= 1.4 && < 1.6,+ containers < 0.8, vector-th-unbox >= 0.2.1.6 && < 0.3 hs-source-dirs: src default-language: Haskell2010
src/Frames/TH.hs view
@@ -161,11 +161,16 @@ -- tableType :: String -> FilePath -> DecsQ -- tableType n fp = tableType' (rowGen fp) { rowTypeName = n } --- | Like 'tableType', but additionally generates a type synonym for--- each column, and a proxy value of that type. If the CSV file has--- column names \"foo\", \"bar\", and \"baz\", then this will declare--- @type Foo = "foo" :-> Int@, for example, @foo = rlens \@Foo@, and--- @foo' = rlens' \@Foo@.+-- | Generate types for a row of a table. This will be something like+-- @Record ["x" :-> a, "y" :-> b, "z" :-> c]@. This splice+-- additionally generates a type synonym for each column, and a proxy+-- value of that type. If the CSV file has column names \"foo\",+-- \"bar\", and \"baz\", then this will declare @type Foo = "foo" :->+-- Int@, for example, @foo = rlens \@Foo@, and @foo' = rlens' \@Foo@.+--+-- See 'tableTypes'' if you need to customize parsing to do things+-- like override the separator character (default is a single comma),+-- or supply column names. tableTypes :: String -> FilePath -> DecsQ tableTypes n fp = tableTypes' (rowGen fp) { rowTypeName = n } @@ -230,6 +235,14 @@ -- the CSV file has column names \"foo\", \"bar\", and \"baz\", then -- this will declare @type Foo = "foo" :-> Int@, for example, @foo = -- rlens \@Foo@, and @foo' = rlens' \@Foo@.+--+-- The supplied 'RowGen' value is also used to produce a value of type+-- 'ParserOptions' that can be passed to functions like+-- 'readTableOpt'. This is useful if you need to customize parsing to+-- support something like a special separator string. This value of+-- type 'ParserOptions' will be given a name based on the row type+-- name. If the row type is @Row@, then thsi splice will generate a+-- value @rowParser :: ParserOptions@. tableTypes' :: forall a c. (c ~ CoRec ColInfo a, ColumnTypeable c, Semigroup c, RPureConstrained (ShowF ColInfo) a) => RowGen a -> DecsQ tableTypes' (RowGen {..}) =