Skip to content

Commit 5790ef4

Browse files
authored
Fix Functions module compilation in ghc 9.10 (#194)
1 parent 3aa44b6 commit 5790ef4

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

flake.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,25 @@
1919

2020
hsPkgs = pkgs.haskellPackages.extend (self: super: rec {
2121
granite = self.callCabal2nix "granite" granitePkg { };
22+
dataframe-fastcsv = self.callCabal2nix "dataframe-fastcsv" ./dataframe-fastcsv {
23+
inherit parallel;
24+
};
2225
dataframe = self.callCabal2nix "dataframe" ./. {
2326
inherit granite;
2427
};
28+
parallel = super.parallel_3_3_0_0;
2529
});
2630
in
2731
{
2832
packages = {
2933
default = hsPkgs.dataframe;
34+
dataframe = hsPkgs.dataframe;
35+
dataframe-fastcsv = hsPkgs.dataframe-fastcsv;
3036
};
3137

3238
devShells.default = hsPkgs.shellFor {
33-
packages = ps: [ (ps.callCabal2nix "dataframe" ./. { }) ];
34-
nativeBuildInputs = with pkgs; [
39+
packages = ps: [ ps.dataframe ps.dataframe-fastcsv ];
40+
nativeBuildInputs = with hsPkgs; [
3541
ghc
3642
cabal-install
3743
haskell-language-server

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)