[Haskell-beginners] hlint and DoIfThenElse

Lee Short blackcat at pro-ns.net
Tue Nov 22 23:46:37 CET 2011


 hlint gives me a parse error on a clause using DoIfThenElse, even if I 
 have the language pragma.  I don't see any hlint options to get around 
 that, are there any?

 Is it considered good style to write code like this?

 if "" == results
 then return True
 else return False

 The obvious way rewrite below just seems clunky to me (though I can see 
 how others might prefer it to the code above).

 return $ if "" == results
          then True
          else False

 thanks
 Lee




More information about the Beginners mailing list