packages feed

dataframe-core 2.1.0.0 → 2.1.1.0

raw patch · 2 files changed

+14/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ DataFrame.Typed.Schema: schemaColumnNames :: forall (cols :: [Type]). KnownSchema cols => [Text]

Files

dataframe-core.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.4 name:               dataframe-core-version:            2.1.0.0+version:            2.1.1.0 synopsis:           Core data structures for the dataframe library. description:     Minimal interchange-format types for the @dataframe@ ecosystem:
src/DataFrame/Typed/Schema.hs view
@@ -62,6 +62,7 @@      -- * KnownSchema class     KnownSchema (..),+    schemaColumnNames,      -- * Helpers     AllKnownSymbol (..),@@ -574,6 +575,18 @@     schemaEvidence =         (T.pack (symbolVal (Proxy @name)), someTypeRep (Proxy @a))             : schemaEvidence @rest++{- | The column names a schema declares, in schema order. Pass it to a reader's+options to fetch only those columns:++@+D.readCsvWithOpts+    D.defaultReadOptions{D.readColumns = Just (schemaColumnNames \@(Schema Customer))}+    "customers.csv"+@+-}+schemaColumnNames :: forall cols. (KnownSchema cols) => [T.Text]+schemaColumnNames = map fst (schemaEvidence @cols)  -- | A class that provides a list of 'Text' values for a type-level list of Symbols. class AllKnownSymbol (names :: [Symbol]) where