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

indent bug in haskell-indent.el #142

Closed
kosl90 opened this issue May 8, 2013 · 5 comments
Closed

indent bug in haskell-indent.el #142

kosl90 opened this issue May 8, 2013 · 5 comments

Comments

@kosl90
Copy link

kosl90 commented May 8, 2013

This bug annoyed me so much, if there is such a code fragment:

main = do
  (fileName:_) <- getArgs
  writeFile fileName "content"

I cannot indent the writeFile line, emacs told me "Wrong type argument: arryp, nil". haskell-indentation.el works right, but I cannot use the cool thing that completes my function name when I press [TAB] below my function declaration.

I will appreciate that if you guys fix it.

@ivan-m
Copy link
Contributor

ivan-m commented May 15, 2013

Why would you want to indent the writeFile line? I'm assuming your issue is when using haskell-indent? (And what cool thing are you using to complete the function name?)

@kosl90
Copy link
Author

kosl90 commented May 16, 2013

Sorry for giving you bad code fragment. I mean if writeFile line is not on the right place, I cannot indent the writeFile line to the right place look like the above fragment.

The cool thing is:

main :: IO ()

when I press [TAB] on the line blow the declaration, emacs will fill the function name for me automatically. I think indent.el provide that cool thing, because I can use this cool thing until indent.el is used instead of indentation.el.

I'm new to emacs, and my emacs configuration comes from https://github.com/redguardtoo/emacs.d. Those two things might be producted by other things.

@deftsp
Copy link
Contributor

deftsp commented Jul 28, 2013

I have that problem too. It seems `haskell-indent-empty' return a non-string value caused it.

@gracjan
Copy link
Contributor

gracjan commented Jan 18, 2015

@kosl90, @ivan-m, @deftsp: Itried to reproduce your problem with current github version of haskell-mode and could not trigger described behavior. I'vre tried the code:

main :: IO ()
main = do
  (fileName:_) <- getArgs
  writeFile fileName "content"

I've used both haskell-indent and haskell-indentation. I could not trigger the error on any of the lines.

Can you check out if the problem described still exists?

@gracjan
Copy link
Contributor

gracjan commented Feb 26, 2015

@chrisdone, @purcell, this seems to be fixed.

@purcell purcell closed this as completed Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants