[Haskell-cafe] Unifcation and matching in Abelian groups
Jules Bean
jules at jellybean.co.uk
Wed Aug 19 08:32:19 EDT 2009
John D. Ramsdell wrote:
> On Wed, Aug 19, 2009 at 6:16 AM, Neil Mitchell<ndmitchell at gmail.com> wrote:
>
>> Why not:
>> if done then return () else
>> do prob <- getLine
>> test prob
>> main
>
> I've given up on using if-then-else in do expressions. They confuse
> emacs. There is a proposal for Haskell' to fix the problem, but until
> then, I will not use them in do expressions.
Do not blame haskell, blame emacs, if emacs is so stupid.
Fortunately there is a better emacs mode which understands layout and if:
http://kuribas.hcoop.net/haskell-indentation.el
> I'm so glad new languages do not use the offset rule. I get tired
> typing tab in emacs, especially since for most other languages, emacs
> does so well at picking a good indent. Requiring coders to spend so
> much time choosing indents reminds me of the days when I wrote C code
> with vi. I've been there, done that, and moved on to emacs.
Do not blame haskell, blame emacs. The layout rule is simple to
understand and I think it makes attractive code. It's not haskell's
fault that the emacs mode chooses a bad indent so often.
There is a better emacs mode which gets the indentation right more
often, I find ;)
http://kuribas.hcoop.net/haskell-indentation.el
Jules
More information about the Haskell-Cafe
mailing list