Closed
Description
forwarding http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343248
Daniel Burrows writes:
haskell-mode indents parallel list comprehensions (the GHC extension)
just fine, but it seems to have trouble with non-parallel ones. For
instance, consider this code fragment:
allCards :: CardUniverse -> [CardValue]
allCards (CardUniverse s free) = free ++ suited
where suited = [cv | suit <- s,
(cv, _) <- elems (suitCards suit)]
haskell-mode wants me to indent the last line to either the level of
"s" or the level of "cv" in the previous line; for instance:
-- | Returns a list of all the cards in the universe; this will be a
-- set if the universe is well-formed.
allCards :: CardUniverse -> [CardValue]
allCards (CardUniverse s free) = free ++ suited
where suited = [cv | suit <- s,
(cv, _) <- elems (suitCards suit)]
I verified that this behaviour still exists with 2.8.0 and turn-on-haskell-indentation