aboutsummaryrefslogtreecommitdiff
path: root/tests/fliblib
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2017-12-02 14:52:44 +0100
committerDaniel Gröber <dxld@darkboxed.org>2018-01-18 14:10:26 +0100
commitd1307ef4b6ad38ec4574e5d3631d34e97bdef86c (patch)
tree32afd2a18da2b5ca74b692a7aa9cc5e4ab6f94d3 /tests/fliblib
parentc886e22d3d526bc76a3f2854ed99ab004c965d8d (diff)
ghc-session: Add flib test
Diffstat (limited to 'tests/fliblib')
-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
4 files changed, 34 insertions, 0 deletions
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