@@ -52,6 +52,7 @@ def package(
52
52
other_modules ,
53
53
my_pkg_id ,
54
54
has_hs_library ,
55
+ has_iface = True ,
55
56
empty_libs_dir = "" ):
56
57
"""Create GHC package using ghc-pkg.
57
58
@@ -65,9 +66,9 @@ def package(
65
66
other_modules: List of hidden modules.
66
67
my_pkg_id: Package id object for this package.
67
68
has_hs_library: Whether hs-libraries should be created.
68
- empty_libs_dir: Directory name where the empty library should be.
69
- If empty, this is assumed to be a package description
70
- for a real library. See Note [Empty Libraries] in haskell_impl.bzl.
69
+ has_iface: Whether the import-dirs field should be populated .
70
+ empty_libs_dir: Directory name where the empty library should be.
71
+ If empty, this is assumed to be a package description for a real library. See Note [Empty Libraries] in haskell_impl.bzl.
71
72
72
73
Returns:
73
74
(File, File): GHC package conf file, GHC package cache file
@@ -98,7 +99,7 @@ def package(
98
99
"key" : pkg_id .to_string (my_pkg_id ),
99
100
"exposed" : "True" ,
100
101
"hidden-modules" : other_modules ,
101
- "import-dirs" : [import_dir ],
102
+ "import-dirs" : [import_dir ] if has_iface else [] ,
102
103
"library-dirs" : [pkgroot_lib_path ] + extra_lib_dirs ,
103
104
"dynamic-library-dirs" : [pkgroot_lib_path ] + extra_dynamic_lib_dirs ,
104
105
"extra-libraries" : extra_libs ,
0 commit comments