Skip to content

Commit 1f1bfe0

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/DataFrame/Functions.hs

Lines changed: 4 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,8 @@ 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)) =>
509+
[(a, b)] -> Expr a -> Expr (Maybe b)
508510
recode mapping =
509511
Unary
510512
( MkUnaryOp
@@ -523,7 +525,7 @@ recodeWithCondition fallback ((cond, value) : rest) expr = ifThenElse (cond expr
523525

524526
recodeWithDefault ::
525527
forall a b.
526-
(Columnable a, Columnable b) => b -> [(a, b)] -> Expr a -> Expr b
528+
(Columnable a, Columnable b, Show (a, b)) => b -> [(a, b)] -> Expr a -> Expr b
527529
recodeWithDefault d mapping =
528530
Unary
529531
( MkUnaryOp

0 commit comments

Comments
 (0)