diff --git a/yesod-bin/Scaffolding/Scaffolder.hs b/yesod-bin/Scaffolding/Scaffolder.hs index 0ccfa02c..6f6356a8 100644 --- a/yesod-bin/Scaffolding/Scaffolder.hs +++ b/yesod-bin/Scaffolding/Scaffolder.hs @@ -70,14 +70,18 @@ validPN c validPN '-' = True validPN _ = False - +-- | Cabal separates packages with a hyphen into words. A word can't consist of only digits +-- +-- Fixes +wordsHaveOneCharacter :: String -> Bool +wordsHaveOneCharacter s = not $ any (all isDigit) (splitOn "-" s) scaffold :: Bool -- ^ bare directory instead of a new subdirectory? -> IO () scaffold isBare = do puts $ renderTextUrl undefined $(textFile "input/welcome.cg") project <- prompt $ \s -> - if all validPN s && not (null s) && s /= "test" && (not $ any (all isDigit) (splitOn "-" s)) + if all validPN s && not (null s) && s /= "test" && wordsHaveOneCharacter s then Just s else Nothing let dir = project