Skip to content

Add c2hs mode #1199

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

Merged
merged 5 commits into from
Mar 14, 2016
Merged

Add c2hs mode #1199

merged 5 commits into from
Mar 14, 2016

Conversation

sergv
Copy link
Contributor

@sergv sergv commented Mar 7, 2016

This is a wrapper around haskell-mode, that mostly adds fontification for {#...#} blocks.

;; along with this program. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:
;; This mode is mostly indended for highlighting {#...#} hooks.
Copy link
Contributor

Choose a reason for hiding this comment

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

indended — typo? (:

@sergv
Copy link
Contributor Author

sergv commented Mar 8, 2016

Fixed typo in the description.

@geraldus
Copy link
Contributor

geraldus commented Mar 8, 2016

Would you like to add some tests?

@sergv
Copy link
Contributor Author

sergv commented Mar 8, 2016

I think I'll add some font-lock tests

@gracjan
Copy link
Contributor

gracjan commented Mar 9, 2016

Yes, please add some tests. These are required, otherwise we will not be able to take responsibility of this module.

And thanks for great contribution!

sergv added 5 commits March 11, 2016 10:22
This is a wrapper around haskell-mode, that mostly adds fontification
for {#...#} blocks.
Explicitly specify mode by function to set up in the buffer. Move
check-properties to haskell-test-utils module so it can be reused
for c2hs fontification tests.
@sergv
Copy link
Contributor Author

sergv commented Mar 11, 2016

I added tests for all hooks currently colorized and rebased against latest master

@gracjan
Copy link
Contributor

gracjan commented Mar 11, 2016

Nice. Lets wait 2 days before merging so that people have time to look and test the code.

gracjan added a commit that referenced this pull request Mar 14, 2016
@gracjan gracjan merged commit 0e99de3 into haskell:master Mar 14, 2016
@gracjan
Copy link
Contributor

gracjan commented Mar 14, 2016

Okay, so this merge wasn't the cleanest one and we had issue reports that melpa compiled version did not load.

  1. All symbols, including defface should start with haskell-.
  2. autoloads.el should actually load, it did not in this case.
  3. Overuse of macros is not a good sign.

@sergv: Can you inline the haskell--let-rx macro? It overcomplicates things. Please also add haskell- prefix to deffaces. Thanks.

@gracjan
Copy link
Contributor

gracjan commented Mar 14, 2016

The autoloads issue will never happen again thanks to #1211.

@sergv
Copy link
Contributor Author

sergv commented Mar 14, 2016

@gracjan I'll inline the macro and add prefixes, stay tuned!

@sergv sergv deleted the c2hs-mode branch March 14, 2016 19:37
@sergv
Copy link
Contributor Author

sergv commented Mar 15, 2016

@gracjan why are macros not a good thing? The haskell--let-rx was introduced to make writing regexps via standard rx macro easier and make them both expand at compile time. It's easy to inline, but the advantage of compile time execution will be lost.

@gracjan
Copy link
Contributor

gracjan commented Mar 15, 2016

Macros are another layer of abstraction that a potential contributor needs to understand. As such it poses a possible mental roadblock which we would rather like to avoid.

@sergv sergv mentioned this pull request Mar 15, 2016
@sergv
Copy link
Contributor Author

sergv commented Mar 15, 2016

Fair enough

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.

3 participants