On Thu, Jun 14, 2012 at 4:20 PM,
dag.od...@gmail.com <dag.od...@gmail.com> wrote:
On Thu, Jun 14, 2012 at 10:46 AM, Niklas Broberg
<niklas....@gmail.com> wrote:
No, it should work. What error are you seeing?
Doh. Find two faults:
Proc s pat rhs -> do
let -- First rename regular patterns
(ps, rnpss) = unzip $ renameRPats [pat]
-- ... group them up to one big tuple
(rns, rps) = unzip (concat rnpss)
alt1 = alt s (pTuple rps) rhs
texp = varTuple rns
-- ... and put it all in a case expression, which
-- can then be transformed in the normal way.
e = if null rns then rhs else caseE texp [alt1]
rhs' <- transformExpM e
return $ Lambda s ps rhs'
Quick bug fix released on hackage. Thanks for reporting!
Cheers,
/Niklas