Skip to content

Commit

Permalink
Merge pull request #5386 from ardamose123/master
Browse files Browse the repository at this point in the history
Fixes #5376
  • Loading branch information
snoyberg authored Sep 21, 2020
2 parents 9aee5c9 + 7bacbe5 commit c66dade
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Other enhancements:
Bug fixes:

* Fix `stack test --coverage` when using Cabal 3

* `stack new` now generates PascalCase'd module name correctly.
[#5376](https://github.com/commercialhaskell/stack/issues/5376)

## v2.3.3

Expand Down
2 changes: 1 addition & 1 deletion src/Stack/New.hs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ applyTemplate project template nonceParams dir templateText = do
let context = M.unions [nonceParams, nameParams, configParams, yearParam]
where
nameAsVarId = T.replace "-" "_" $ T.pack $ packageNameString project
nameAsModule = T.filter (/= '-') $ T.toTitle $ T.pack $ packageNameString project
nameAsModule = T.filter (/= ' ') $ T.toTitle $ T.replace "-" " " $ T.pack $ packageNameString project
nameParams = M.fromList [ ("name", T.pack $ packageNameString project)
, ("name-as-varid", nameAsVarId)
, ("name-as-module", nameAsModule) ]
Expand Down

0 comments on commit c66dade

Please sign in to comment.