Skip to content

Commit 02d7bd2

Browse files
committed
fix: Add Show constraint and IncoherentInstances to Functions
1 parent 788e414 commit 02d7bd2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/DataFrame/Functions.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{-# LANGUAGE FlexibleContexts #-}
33
{-# LANGUAGE FlexibleInstances #-}
44
{-# LANGUAGE GADTs #-}
5+
{-# LANGUAGE IncoherentInstances #-}
56
{-# LANGUAGE InstanceSigs #-}
67
{-# LANGUAGE LambdaCase #-}
78
{-# LANGUAGE MultiParamTypeClasses #-}
@@ -504,7 +505,7 @@ whenBothPresent f = lift2Decorated (\l r -> f <$> l <*> r) "whenBothPresent" Not
504505

505506
recode ::
506507
forall a b.
507-
(Columnable a, Columnable b) => [(a, b)] -> Expr a -> Expr (Maybe b)
508+
(Columnable a, Columnable b, Show (a, b)) => [(a, b)] -> Expr a -> Expr (Maybe b)
508509
recode mapping =
509510
Unary
510511
( MkUnaryOp
@@ -523,7 +524,7 @@ recodeWithCondition fallback ((cond, value) : rest) expr = ifThenElse (cond expr
523524

524525
recodeWithDefault ::
525526
forall a b.
526-
(Columnable a, Columnable b) => b -> [(a, b)] -> Expr a -> Expr b
527+
(Columnable a, Columnable b, Show (a,b)) => b -> [(a, b)] -> Expr a -> Expr b
527528
recodeWithDefault d mapping =
528529
Unary
529530
( MkUnaryOp

0 commit comments

Comments
 (0)