should generate the same code!

| -----Original Message-----
| From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-users-
| boun...@haskell.org] On Behalf Of Serge D. Mechveliani
| Sent: 15 May 2009 09:00
| To: glasgow-haskell-users@haskell.org
| Subject: comprehension vs `map'
|
| Dear GHC team,
|
| I would like to write
|              [rl {ruleMode = AlwaysApply} | rl <- rules calc]        (I)
|
| instead of   map (\ rl -> rl {ruleMode = AlwaysApply}) $ rules calc  (II)
| and instead of
|   let rs = rules calc in  [rl {ruleMode = AlwaysApply} | rl <- rs]  (III).
|
| But is this reliable in GHC that the compiler converts (I) into something
| which is not not worse than III ?
| What about other implementations?
|
| Regards,
|
| -----------
| Mechveliani
| mech...@botik.ru
|
|
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users@haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to