Skip to content

Commit 54c84fc

Browse files
authored
Fix GHC 9.10 literate haskell support for musl64 (#2259)
* Add test for literate-haskell * Fix literate haskell for musl64 and ghc 9.10
1 parent 56814a1 commit 54c84fc

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed

builder/ghc-for-component-wrapper.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ let
126126
127127
''
128128
+ lib.optionalString (stdenv.targetPlatform.isMusl && !haskellLib.isNativeMusl && builtins.compareVersions ghc.version "9.9" >0) ''
129+
ln -s $wrappedGhc/bin/${targetPrefix}unlit $wrappedGhc/bin/unlit
129130
ln -s $wrappedGhc/bin/${ghcCommand}-iserv $wrappedGhc/bin/ghc-iserv
130131
ln -s $wrappedGhc/bin/${ghcCommand}-iserv-prof $wrappedGhc/bin/ghc-iserv-prof
131132
''

test/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ let
234234
supported-languages = callTest ./supported-langauges {};
235235
js-template-haskell = callTest ./js-template-haskell {};
236236
gi-gtk = callTest ./gi-gtk { inherit util; };
237+
literate-haskell = callTest ./literate-haskell {};
237238
unit = unitTests;
238239
};
239240

test/literate-haskell/default.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{ stdenv, lib, project', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name, evalPackages }:
2+
3+
with lib;
4+
5+
let
6+
project = project' {
7+
inherit compiler-nix-name evalPackages;
8+
src = testSrc "literate-haskell";
9+
};
10+
11+
packages = project.hsPkgs;
12+
13+
in recurseIntoAttrs {
14+
ifdInputs = {
15+
inherit (project) plan-nix;
16+
};
17+
18+
build = packages.literate-haskell.components.library;
19+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
cabal-version: 3.0
2+
name: literate-haskell
3+
version: 0.1.0.0
4+
category: Repro
5+
build-type: Simple
6+
7+
common warnings
8+
ghc-options: -Wall
9+
10+
library
11+
import: warnings
12+
exposed-modules: MyLib
13+
build-depends: base
14+
hs-source-dirs: src
15+
default-language: Haskell2010
16+

test/literate-haskell/src/MyLib.lhs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
\begin{code}
2+
3+
module MyLib (x) where
4+
5+
x=1
6+
7+
\end{code}

0 commit comments

Comments
 (0)