Build dependency in library or executable section of cabal file?
问题 First off, I'm new to using cabal and external packages with Haskell. I'm trying to use the Graphics.Gloss package inside of MyLib. I can make it work if I include gloss in both the build-depends of library and executable . Here is the relevant portion of the cabal file: library exposed-modules: MyLib build-depends: base ^>=4.13.0.0, gloss ^>=1.13.1.1 default-language: Haskell2010 executable ray-tracer main-is: Main.hs other-modules: MyLib build-depends: base ^>=4.13.0.0, ray-tracer, haskell