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

Tuple module #5

Merged
merged 1 commit into from
Jan 6, 2018
Merged

Tuple module #5

merged 1 commit into from
Jan 6, 2018

Conversation

lpil
Copy link
Contributor

@lpil lpil commented Jan 5, 2018

Using Elm's Tuple module as inspiration.

Using Elm's Tuple module as inspiration.
@@ -0,0 +1,82 @@
{-| Some helpers for working with 2-tuples.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiousity, I'm not familiar with the {-| comment syntax. Where is it from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! It's the syntax for a documentation comment in haskell and elm, meaning that the comment will be used when generating pretty html documentation for the module. I wrote it habitually.

Shall I continue to use this out shall I remove the pipe to make it a normal comment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short answer:
Doesn't bother me to leave it in atm but let's discuss it further under Alpaca :)

Longer answer:
I'm vaguely of the opinion that any comment preceding an AST node should be automatically attached to that node as documentation for output so I'm not sure if we need a special form (this ties into formatters and alternate ways of storing source). But! I think this is a good thing to discuss, especially here: alpaca-lang/alpaca#134

@j14159
Copy link
Contributor

j14159 commented Jan 6, 2018

Looks good, thanks for this!

@j14159 j14159 merged commit d1082bc into alpaca-lang:master Jan 6, 2018
@lpil lpil deleted the lp/tuple branch January 6, 2018 18:58
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

Successfully merging this pull request may close these issues.

None yet

2 participants