-
Notifications
You must be signed in to change notification settings - Fork 103
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
Accept arbitrary entry points for executables #16
Conversation
x : xs -> isIdentifier x && isModule xs | ||
_ -> False | ||
|
||
isIdentifier :: String -> Bool |
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.
Isn't this more properly a isVariableIdentifier
? Constructor identifiers can have uppercase
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.
Good point. I'll also reject reserved keywords.
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.
Hmm, but the it would become isQualifiedVariableIdentifier
. I think I will ignore the ambiguity in naming for now until we actual have a name clash.
de830d7
to
20f1e97
Compare
isQualifiedIdentifier ["Foo", "Bar", "baz"] `shouldBe` True | ||
|
||
it "rejects invalid input" $ do | ||
isQualifiedIdentifier ["Foo", "Bar", "Baz"] `shouldBe` False |
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.
Maybe add a test for ["Foo", "bar", "Baz"]
?
This seems neat, but I wonder: what's the primary motivation for supporting something like I also wonder which ghc versions support this. |
Some relevant discussion here.
I kind of like the idea of being allowed to have two or more different executables from only one source file. |
This would also remove the necessity for having dummy |
LGTM. |
Yeah, I want this. :) |
Yes, me too. But there is still a concern, according to the GHC manual Sent from my iPhone
|
You mean it will just break? As in cabal will through link errors? |
@soenkehahn |
I still think it's possible to get this working by generating a But I'm not sure if I want to do this right now. This would be a super useful feature, but we would diverge from "simple generating cabal files" at that point. |
20f1e97
to
5ea133a
Compare
No description provided.