From d1307ef4b6ad38ec4574e5d3631d34e97bdef86c Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sat, 2 Dec 2017 14:52:44 +0100 Subject: ghc-session: Add flib test --- tests/fliblib/FLib.hs | 5 +++++ tests/fliblib/Setup.hs | 2 ++ tests/fliblib/fliblib.cabal | 19 +++++++++++++++++++ tests/fliblib/lib/Lib.hs | 8 ++++++++ 4 files changed, 34 insertions(+) create mode 100644 tests/fliblib/FLib.hs create mode 100644 tests/fliblib/Setup.hs create mode 100644 tests/fliblib/fliblib.cabal create mode 100644 tests/fliblib/lib/Lib.hs (limited to 'tests/fliblib') diff --git a/tests/fliblib/FLib.hs b/tests/fliblib/FLib.hs new file mode 100644 index 0000000..e6a9818 --- /dev/null +++ b/tests/fliblib/FLib.hs @@ -0,0 +1,5 @@ +module FLib where + +import Lib + +flib = print foo diff --git a/tests/fliblib/Setup.hs b/tests/fliblib/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/tests/fliblib/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/tests/fliblib/fliblib.cabal b/tests/fliblib/fliblib.cabal new file mode 100644 index 0000000..4610605 --- /dev/null +++ b/tests/fliblib/fliblib.cabal @@ -0,0 +1,19 @@ +name: fliblib +version: 0 +build-type: Simple +cabal-version: >=1.10 + +library + exposed-modules: Lib + hs-source-dirs: lib + build-depends: base, filepath, directory + default-language: Haskell2010 + +foreign-library flib + other-modules: FLib + build-depends: base, fliblib + hs-source-dirs: . + type: native-shared + if os(Windows) + options: standalone + default-language: Haskell2010 \ No newline at end of file diff --git a/tests/fliblib/lib/Lib.hs b/tests/fliblib/lib/Lib.hs new file mode 100644 index 0000000..417a0ad --- /dev/null +++ b/tests/fliblib/lib/Lib.hs @@ -0,0 +1,8 @@ +module Lib where + +import System.Directory +import System.FilePath + +filepath = "a" "b" +directory = doesFileExist "Exe.hs" +foo = 1 -- cgit v1.2.3