From aa09ba5d1be03b92c1b19d486dad26ed624689a1 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Wed, 21 Aug 2019 03:38:51 +0200 Subject: Update some code docs --- src/CabalHelper/Compiletime/Program/Stack.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/CabalHelper/Compiletime/Program/Stack.hs') diff --git a/src/CabalHelper/Compiletime/Program/Stack.hs b/src/CabalHelper/Compiletime/Program/Stack.hs index 45f90ab..0f9e46d 100644 --- a/src/CabalHelper/Compiletime/Program/Stack.hs +++ b/src/CabalHelper/Compiletime/Program/Stack.hs @@ -48,6 +48,14 @@ import CabalHelper.Shared.Common getPackage :: QueryEnvI c 'Stack -> CabalFile -> IO (Package 'Stack) getPackage qe cabal_file@(CabalFile cabal_file_path) = do let pkgdir = takeDirectory cabal_file_path + -- this is kind of a hack but works even for unicode package names and + -- besides stack even enforces this naming convention unlike cabal. This + -- is the error you get if the names don't match: + -- + -- cabal file path foo-bla.cabal does not match the package name it defines. + -- Please rename the file to: foo.cabal + -- For more information, see: + -- https://github.com/commercialhaskell/stack/issues/317 let pkg_name = dropExtension $ takeFileName cabal_file_path look <- paths qe pkgdir let distdirv1_rel = look "dist-dir:" -- cgit v1.2.3