Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add src-loc test for 32 bit pseudo relocation issue #2230

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ let
plugin = callTest ./plugin {};
supported-languages = callTest ./supported-langauges {};
js-template-haskell = callTest ./js-template-haskell {};
src-loc = callTest ./src-loc { inherit util; };
unit = unitTests;
};

Expand Down
25 changes: 25 additions & 0 deletions test/src-loc/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://github.com/input-output-hk/haskell.nix/issues/2228
{ stdenv, lib, util, project', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name, evalPackages, buildPackages }:

with lib;

let
project = project' {
inherit compiler-nix-name evalPackages;
src = testSrc "src-loc";
};

packages = project.hsPkgs;

in recurseIntoAttrs rec {
meta.disabled = stdenv.hostPlatform.isGhcjs;

ifdInputs = {
inherit (project) plan-nix;
};

build = packages.src-loc.components.exes.src-loc;
check = haskellLib.check build;
build-profiled = packages.src-loc.components.exes.src-loc.profiled;
check-profiled = haskellLib.check build-profiled;
}
13 changes: 13 additions & 0 deletions test/src-loc/src-loc.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cabal-version: >=1.10
name: src-loc
version: 0.1.0.0
license: PublicDomain
author: Hamish Mackenzie
maintainer: [email protected]
build-type: Simple

executable src-loc
build-depends: base, ghc
main-is: Main.hs
hs-source-dirs: src
default-language: Haskell2010
9 changes: 9 additions & 0 deletions test/src-loc/src/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Main where

import GHC.Types.SrcLoc

main :: IO ()
main = putStrLn "yeah"

data Foo = Foo PsLoc

Loading