Skip to content
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

Only allow pair (Maybe FunctionTypeDeclaration, FunctionDeclaration) as Statement ? #66

Closed
desmond-dsouza opened this issue Jun 16, 2017 · 3 comments

Comments

@desmond-dsouza
Copy link

Since a FunctionTypeDeclaration without a corresponding FunctionDeclaration is not legal (syntax?) in Elm, would it be useful to change:

type Statement
    = ...
    | FunctionTypeDeclaration Name Type
    | FunctionDeclaration Name (List Expression) Expression
    | ...

to:

type alias FunctionTypeDeclaration = FunctionTypeDeclaration Name Type
type alias FunctionDeclaration = FunctionDeclaration Name (List Expression) Expression
type Statement
    = ...
    | FunctionDefinition 
           (Maybe FunctionTypeDeclaration, FunctionDeclaration)
    | ...

with corresponding tweak to parser rules?

@joonazan
Copy link
Contributor

joonazan commented Jun 16, 2017 via email

@desmond-dsouza
Copy link
Author

ok, thanks for the feedback

@wende
Copy link
Collaborator

wende commented Jul 1, 2017

Closing since it's very disruptive and it yields little value

@wende wende closed this as completed Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants