Open
Description
Example
Project structure:
├── hls-issues.cabal
├── src
│ ├── Internal.hs
│ └── Lib.hs
└── test
└── Test.hs
Internal.hs
module Internal (example) where
example :: Int
example = 5
hls-issues.cabal
cabal-version: 2.4
name: hls-issues
version: 0.1.0.0
library
exposed-modules: Lib
other-modules:
Internal
build-depends: base ^>= 4.15, containers
hs-source-dirs: src
default-language: Haskell2010
test-suite test
hs-source-dirs: test
main-is: Test.hs
type: exitcode-stdio-1.0
build-depends: base ^>= 4.15, hls-issues
default-language: Haskell2010
Lib.hs
module Lib (example) where
import Internal
Test.hs
import Lib (example)
lol :: Int
lol = example
HLS suggests to refine the imports to import Internal
, eventhough Internal
is not exposed from the library component and thus can't be used in the test suite.