On 14/06/2012 12:12, Ian Lynagh wrote:
On Thu, Jun 14, 2012 at 09:17:40AM +0100, Simon Marlow wrote:
On 13/06/2012 16:17, Ian Lynagh wrote:
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
commit bfe94012ade96a7fa019d596c7639208a992470c
Author: Ian Lynagh<[email protected]>
Date: Wed Jun 13 13:06:03 2012 +0100
Remove lots of commented out 'in' keywords
compiler/codeGen/CgCase.lhs | 1 -
compiler/codeGen/CgForeignCall.hs | 1 -
compiler/ghci/ByteCodeGen.lhs | 5 -----
compiler/main/CodeOutput.lhs | 1 -
compiler/nativeGen/PPC/CodeGen.hs | 5 -----
compiler/nativeGen/X86/CodeGen.hs | 30 ------------------------------
6 files changed, 0 insertions(+), 43 deletions(-)
Those were a deliberate stylistic thing... oh well, not a big deal.
Oh, sorry. You can easily git revert the patch, if you like.
I'm afraid I still don't ge the point, though. When should "-- in" be
used, and why?
Taking one of the examples from the patch:
iselExpr64 (CmmLit (CmmInt i _)) = do
(rlo,rhi) <- getNewRegPairNat II32
let
r = fromIntegral (fromIntegral i :: Word32)
q = fromIntegral (fromIntegral (i `shiftR` 32) :: Word32)
code = toOL [
MOV II32 (OpImm (ImmInteger r)) (OpReg rlo),
MOV II32 (OpImm (ImmInteger q)) (OpReg rhi)
]
-- in
return (ChildCode64 code rlo)
I think the "-- in" helps to balance the let, it doesn't look right to
me with the return right next to the let-bindings. I often just use a
'--' rather than '-- in' though. Maybe it's a personal thing, but I
think it looks nicer with something there.
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc