-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate valid Main.lhs files with cabal init
.
#5810
Conversation
| isLiterate = "> " ++ line | ||
| otherwise = line | ||
isLiterate = case mainIs flags of | ||
Flag mainPath -> takeExtension mainPath == ".lhs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"lhs" isExtensionOf mainPath
edit: nvm, we need a newer filepath
for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
mainHs = unlines | ||
-- | Default Main.(l)hs file. Used when no Main.(l)hs exists. | ||
mainHs :: InitFlags -> String | ||
mainHs flags = (unlines . fmap prependPrefix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use map
instead of fmap
here.
Merged, thanks! |
Thank you! I'll be back... |
Fixes #5577.
Please include the following checklist in your PR:
[ci skip]
is used to avoid triggering the build bots.I have not. Pointers on how to do so are very appreciated!