[C2hs] lowercase/C evaluation [was:Don't lowercase...]
barsoap at web.de
Sat Jan 24 23:03:57 EST 2009
Benedikt Huber <benjovi at gmx.net> wrote:
> I think we would not want to apply the first part of the patch. The
> problem is elsewhere, but I think I've already fixed this before.
> Could you try whether the second part of the patch alone works fine
> with the latest c2hs ?
> If not, could you give a detailed description of the problem you're
> experiencing when not applying the first part ?
Indeed, it works fine with darcs.
Summing up, darcs diff gives me, right now,
diff -rN old-c2hs/src/C2HS/CHS.hs new-c2hs/src/C2HS/CHS.hs
< adjustCase (c:cs) = toUpper c : map toLower cs
> adjustCase (c:cs) = toUpper c : cs
diff -rN old-c2hs/src/C2HS/Gen/Bind.hs new-c2hs/src/C2HS/Gen/Bind.hs
> import Data.Bits ((.|.), (.&.))
> applyBin _ COrOp (IntResult x)
> (IntResult y) = return $ IntResult (x .|. y)
> applyBin _ CAndOp (IntResult x)
> (IntResult y) = return $ IntResult (x .&. y)
Strictly speaking, I don't even need CAndOp, but I felt like adding it
alongside. or'ing up things like MAXIMIZE_V and MAXIMIZE_H to MAXIMIZE
is a quite usual technique, so I guess I'm not going to be the only one
using it once enum define comes into usage.
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.
More information about the C2hs