aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/GhcSession.hs1
-rw-r--r--tests/fliblib/FLib.hs5
-rw-r--r--tests/fliblib/Setup.hs2
-rw-r--r--tests/fliblib/fliblib.cabal19
-rw-r--r--tests/fliblib/lib/Lib.hs8
5 files changed, 35 insertions, 0 deletions
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs
index 8ed76be..bbd6bfb 100644
--- a/tests/GhcSession.hs
+++ b/tests/GhcSession.hs
@@ -32,6 +32,7 @@ main = do
res <- mapM (setup topdir test) $ case args of
[] -> [ ("tests/exelib" , parseVer "1.10")
, ("tests/exeintlib", parseVer "2.0")
+ , ("tests/flib" , parseVer "2.0")
]
xs -> map (,parseVer "0") xs
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