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

Literate Haskell support? #103

Closed
pharpend opened this issue Mar 12, 2015 · 6 comments
Closed

Literate Haskell support? #103

pharpend opened this issue Mar 12, 2015 · 6 comments

Comments

@pharpend
Copy link
Contributor

> runTn :: IO ()
> runTn = do
>  args <- getArgs
>  let fstarg = headMay args
>      rstof = tailMay args
>  case fstarg of
>    Nothing -> editToday
>    Just cmd ->
>      case cmd of
>        "edit" ->
>          case rstof of
>            Just (s:_) ->
>              case readMay s of
>                Nothing -> help
>                Just d  -> editEntry d
>            _ -> help
>        _ -> help
>

Getting hindent: Parse error: > when I run M-x hindent/reformat-decl on that function. Does Hindent not have Literate Haskell support?

I'll see if I can reproduce using TeX style

@mgsloan
Copy link

mgsloan commented Mar 12, 2015

It doesn't, but it should be easy enough to add something to strip the > when editing a .lhs

TeX style should work fine, because hindent attempts to guess the boundaries of the declaration being edited, and only sends that to haskell-src-exts.

@chrisdone
Copy link
Collaborator

Indeed, TeX style should require no special support.

@gibiansky
Copy link
Collaborator

It sounds like this should probably be a feature added to the editor scripts, not hindent Haskell code itself, yeah?

@chrisdone
Copy link
Collaborator

I suppose either works. But if TeX style works just fine then we don't have to bother with bird-style. A bunch of tooling doesn't work with bird-style anyhoo.

@pharpend
Copy link
Contributor Author

@gibiansky Well, no, because editors other than vim & emacs might want this functionality. In that case, they'll undoubtedly encounter this bug at some point. It seems like it should be fixed in HIndent so that everyone doesn't have to add their own patch.

@gibiansky
Copy link
Collaborator

This is supported now that #111 is merged.

toku-sa-n added a commit to toku-sa-n/hindent that referenced this issue Apr 29, 2023
@toku-sa-n toku-sa-n mentioned this issue Apr 29, 2023
2 tasks
mihaimaruseac pushed a commit that referenced this issue Apr 30, 2023
* Add a test for #103

* Fix typo
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

4 participants