dataframe-core 2.1.1.0 → 2.1.1.1
raw patch · 2 files changed
+12/−1 lines, 2 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ DataFrame.Internal.Expression: fromUExpr :: Columnable a => UExpr -> Maybe (Expr a)
+ DataFrame.Internal.Expression: toNamedExpr :: Columnable a => Text -> Expr a -> NamedExpr
+ DataFrame.Internal.Expression: toUExpr :: Columnable a => Expr a -> UExpr
Files
dataframe-core.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.4 name: dataframe-core-version: 2.1.1.0+version: 2.1.1.1 synopsis: Core data structures for the dataframe library. description: Minimal interchange-format types for the @dataframe@ ecosystem:
src-internal/DataFrame/Internal/Expression.hs view
@@ -118,7 +118,18 @@ show :: UExpr -> String show (UExpr expr) = show expr +toUExpr :: (Columnable a) => Expr a -> UExpr+toUExpr = UExpr++fromUExpr :: forall a. (Columnable a) => UExpr -> Maybe (Expr a)+fromUExpr (UExpr (expr :: Expr b)) = do+ Refl <- testEquality (typeRep @a) (typeRep @b)+ pure expr+ type NamedExpr = (T.Text, UExpr)++toNamedExpr :: (Columnable a) => T.Text -> Expr a -> NamedExpr+toNamedExpr exprName expr = (exprName, UExpr expr) instance (Num a, Columnable a) => Num (Expr a) where (+) :: Expr a -> Expr a -> Expr a