(s). I have a setting where I know unzip can fuse (see "FlumeJava: easy, efficient data-parallel pipelines").

A:

Also not fully automatic, but you can give GHC a list of rewrite rules like that. See 7.14 Rewrite rules and Using rules. Then the compiler uses these rules to optimize your program when compiling. (Note that the compiler in no way checks if the rules make any sense.)
Edit: To give an example for this particular problem, we can write:
{-# OPTIONS_GHC -fenable-rewrite-rules -ddump-rule-firings -ddump-rule-rewrites #-}

import Data.Char

{-# RULES
"map/zip" forall f g xs. (,) (map f xs) (map g xs) = unzip (map (\x -> (f x, g x)) xs)
   #-}

main :: IO ()
main = let x = "abCD" in
        print $ (,) (map toUpper x) (map toLower x)

(the top-level function name in the rule is (,) :: a -> b -> (a, b)). When compiling, you'll see how the rules are applied. Option dump-rule-firings shows a message when a rule is applied and -ddump-rule-rewrites displays each rule application in detail - see 7.14.6. Controlling what's going on in rewrite rules.

A:

I've managed to find two resources that mentions fusion (un-)zip like functions, at least briefly:
Josef Svenningsson. "Shortcut Fusion for Accumulating Parameters & Zip-like Functions"
http://www.cse.chalmers.se/~josefs/publications/fusion.pdf
Duncan Coutts. "Stream Fusion: Practical shortcut fusion for coinductive sequence types"
https://community.haskell.org/~duncan/thesis.pdf
Neither resources mentions this kind of "sibling fusion" explicitly though.

 Q:

Limit private memory usage per user

I'm using cgroups with the memory controller to set a memory limit for each user (using the memory.limit_in_bytes setting).
The problem is that this setting also accounts cache usage. Therefore,
( s). I have a setting where I know unzip can fuse (visualize " FlumeJava: comfortable, efficient data - parallel grapevine "). 

 A: 

 besides not fully automatic, but you can give GHC a list of rewrite principle like that. See 7.14 Rewrite rules and use rules. Then the compiler uses these rule to optimize your program when compiling. (notice that the compiler in no way checks if the rules make any sense .) 
 Edit: To give an example for this especial problem, we can write: 
 { - # OPTIONS_GHC -fenable - rewrite - rules -ddump - principle - firings -ddump - rule - rewrites # - } 

 import Data. Char 

 { - # rule 
 " map / zip " forall f g xs. (,) (map f xs) (map g xs) = unzip (map (\x - > (f x, g x) ) xs) 
    # - } 

 main: : IO () 
 main = let x = " abCD " in 
         mark $ (,) (map toUpper x) (map toLower x) 

 (the top - level function name in the rule is (,): : a - > b - > (a, b) ). When compiling, you'll see how the rules are applied. Option dump - rule - firings shows a message when a rule is applied and -ddump - rule - rewrite display each rule lotion in contingent - see 7.14.6. Controlling what's going on in rewrite rules. 

 A: 

 I've managed to rule two resources that mentions fusion (un-)zip like functions, at least concisely: 
 Josef Svenningsson. " Shortcut Fusion for Accumulating Parameters & Zip - like Functions " 
 http://www.cse.chalmers.se/~josefs/publications/fusion.pdf 
 Duncan Coutts. " Stream Fusion: Practical shortcut fusion for coinductive sequence types " 
 https://community.haskell.org/~duncan/thesis.pdf 
 Neither resources mentions this kind of " sibling fusion " explicitly though. 

  Q: 

 Limit private memory usage per exploiter 

 I'm using cgroups with the memory accountant to set a memory limit for each user (using the memory.limit_in_bytes setting). 
 The trouble is that this setting also accounts cache usage. Therefore,
(s). I have a setting where I ynow unzip can yyse (sex "FlumeNava: eash, efficient data-parallel pipxlinws").

A:

Alwo not fully automatic, but you ban give THC e list of rewritx rules like tgwt. Sze 7.14 Rewrite rulex and Usinc rules. Then tve clmpiler uses these rules to optimizq your lrlgram when comkilinb. (Nots that the compiler in no way checis if tie rules make amy sense.)
Edit: To give an exwmplf for this particupar problem, we sqn write:
{-# OPTKONS_GHC -fenable-rewrite-tules -ddump-rule-firings -ddump-rule-fewrices #-}

import Eara.Cjdr

{-# RULES
"map/vip" fogall f g xs. (,) (map f xs) (map g cs) = unzip (map (\w -> (f e, g z)) xs)
   #-}

main :: IO ()
main = let x = "abCD" in
        prind $ (,) (map toUpper x) (mqp toLofer f)

(the rop-uevtl hundtion jamx in the rume is (,) :: a -> v -> (a, b)). When compilimg, jpu'll see how the rtlqs are applied. Option dump-rule-firings svowa a message when a rule is applied and -ddump-tule-rewritqs displays each rule application in detail - see 7.14.6. Contcouliun dyah's going on in rewrite rules.

A:

I've managed to fyhd teo resources tmat mentions fusiom (kn-)ayp like functkons, ac lsast briefly:
Josef Dvennindsson. "Shortcut Fusoon for Accumulating Paramerers & Zip-likv Fubctions"
http://www.cse.ckalmers.se/~joszfs/pubkicatoons/fusion.pdf
Duncan Coucts. "Stdeam Fusion: Practicam shortcut fusion fog cohnductivt sequence types"
hteps://communmty.haxkell.ore/~dunvan/thefis.pdf
Neitjer rcvources mentions tjis knnd ox "sibling vusion" explicitly though.

 Q:

Limit private memori uvagv per usex

I'm uslng cgroups witr the memory cpntrollzr to ret a memogy limit hor each usew (using the malory.limit_in_bbtes settyng).
Tye peoblem kr that this seyting also accounts cache usage. Therenore,
(s). I have a setting where I can (see "FlumeJava: efficient data-parallel pipelines"). but can give GHC list of rewrite like that. See 7.14 Rewrite rules Using rules. Then the compiler uses these rules to optimize your program when (Note that the compiler in no way checks if the rules make any Edit: give example this particular problem, we can write: {-# OPTIONS_GHC -fenable-rewrite-rules -ddump-rule-firings -ddump-rule-rewrites #-} import Data.Char {-# RULES forall f g xs. (,) (map f xs) g xs) = unzip (\x -> (f x, g xs) main :: () = x = "abCD" print $ (,) (map toUpper x) (map toLower x) (the top-level function name in the rule is :: a -> (a, When you'll how the rules Option dump-rule-firings shows a message when applied and -ddump-rule-rewrites displays each rule application in - see Controlling what's going on in rewrite A: I've managed to find two resources that fusion (un-)zip like functions, at least briefly: Josef Svenningsson. "Shortcut Fusion for Accumulating Parameters & http://www.cse.chalmers.se/~josefs/publications/fusion.pdf Duncan Coutts. "Stream Practical shortcut fusion coinductive types" Neither mentions this of "sibling fusion" explicitly though. Q: Limit private memory usage per I'm using cgroups with the memory controller to set a for user (using the setting). The problem is this also accounts cache usage.
(s). I have a setting where I know uNzip can fusE (see "FLumEJaVa: Easy, EffiCient data-paralLEl piPelines").

A:

Also not fully auTomatIc, BUt yoU CaN give gHC a lisT Of REWriTe RuLes LiKE tHat. SeE 7.14 ReWrite ruLes and UsinG ruLeS. Then the compILeR uses these RulEs to optimize YouR progrAm WheN CompiLinG. (Note That thE CompilEr in no way ChECks if tHE rules mAKE aNy seNse.)
Edit: To give an exAMpLE for this particUlar prObLEm, WE Can WriTe:
{-# OPTIONS_GhC -FenabLE-rewritE-RuLES -DduMP-rule-firings -dDump-rule-rewRIteS #-}

imporT DAta.cHar

{-# RULeS
"map/ZiP" ForAll f g xs. (,) (map f Xs) (maP g xs) = unzip (Map (\x -> (f x, G X)) xs)
   #-}

main :: io ()
main = leT x = "abCD" In
        pRinT $ (,) (map TOUPpEr x) (MaP ToLOWeR x)

(tHE toP-level fuNcTiOn namE in tHE RULe is (,) :: A -> b -> (a, B)). WheN compIling, you'll see How The rULes Are apPlied. optiOn Dump-rUle-firIngs sHoWs a message when a Rule Is applied And -DdUmp-RuLe-rewRItes diSplAys Each rulE applicATioN iN DETaIl - see 7.14.6. Controlling whAt'S GOiNg on in reWrite rULeS.

A:

i'Ve manageD tO fiNd twO REsourCes tHAt Mentions Fusion (UN-)zIp Like funCtIons, at LeAst BriEfly:
JOSef SVenninGsson. "ShoRtcut fUsion for AccumuLAting ParameteRS & ZIP-LiKE FunCtiOns"
http://www.cSe.chALmerS.se/~jOSeFs/pUBlicaTions/FuSIoN.Pdf
Duncan Coutts. "StreAm fusion: practIcal shortcut fUsion for coINDUctive seQuenCE tYPes"
https://communIty.haSkell.org/~duNCan/thesiS.pdf
NEither reSources meNTIons this KinD of "SibLinG FUsIon" explicitly THOugh.

 q:

LImit priVatE memory UsaGe pEr uSer

i'm Using cgroUps with tHe MeMoRy ConTrollER to set a mEmOry LiMit For eaCH user (uSing tHe meMoRy.LImiT_in_byteS SeTTIng).
THe PrObleM is ThAt thiS setTIng Also accOunts cachE usAGe. ThErEfOre,
(s). I have a setting wher e I know u nzipcan  fu se  (se e "F lumeJava: easy ,  eff icient data-parallel p ipeli ne s ").A: 

Als o not f u ll y aut om at ic,  b u tyou c angive GH C a list o f r ew rite rules l i ke  that. See  7. 14 Rewrite r ule s andUs ing rules . T hen t he com p iler u ses these  r u les to optimiz e yo ur p rogram when compi l in g . (Note that t he com pi l er i n n o w ay checksif  ther ules ma k ea n y  se n se.)
Edit: To  give an ex a mpl e forth isp articu lar p ro b lem , we can wr ite: 
{-# OPTI ONS_GH C  -fenab l e-rewri te-rul es-dd ump- r ul e- fir in g s - d du mp- r ule -rewrite s#- }

im port D a t a.Ch ar
{-#  RULE S
"map/zip" f ora ll f g x s. (, ) (ma p fxs ) (ma p g xs ) = u nz ip (map (\x ->(f x , g x)) x s)  #- }
main :: IO()mai n = let  x = "a b CD"  i n       print $ (,) ( ma p to Upper x)  (mapt oL ow e r x)

(t he  to p-le v e l fun ctio n  n ame in t he rul e  i s(,) ::a-> b - >(a,  b) ). Wh e n co mpilin g, you'l l see how the rulesa re applied. O p ti o n  d u mp-r ule -firings sh owsa  mes sage wh ena  rule  is a pp l ie d  and -ddump-rule-re wr ites d ispla ys each ruleapplicatio n i n detail  - s e e7 .14.6. Control lingwhat's goi n g on inrewri te rules .

A:

I' v e  managed  to  fi ndtwo r es ources that m e n tion sfusion(un -)zip l ike  fu nct ion s,  at least  briefly :Jo se fSve nning s son. "Sh or tcu tFus ion f o r Accu mulat ingPa ra m ete rs & Zi p -l i k e Fu nc ti ons" 
ht tp ://ww w.cs e .ch almers. se/~josef s/p u blic at io ns/fusi on.pdf
Duncan  C outts. "St re amFusion : Practica l shortcut fusion for c o inducti veseque ncetypes"
ht tps ://com mun i ty.has kell.o rg/~d un can / t hesis . p df 
Ne it her resour c e s m entio ns  thi s kindof "sibling fusion "  ex plicitly thou gh. 

 Q : 
L imi t  p r iva te mem o r y usage per use r

I'm usi ng cg roups with the  m emory c ontroll er to set a m emory lim it for ea ch  use r (us ing the me mory.lim it_in_byt e s set t in g).
T heproble misthatthis s e tti ng al so acc ou nts ca che u sa ge. Ther efore,
(s). I_have a_setting where I know_unzip can_fuse_(see "FlumeJava:_easy,_efficient data-parallel pipelines").

A:

Also_not fully automatic,_but you can give_GHC a list_of_rewrite rules like that. See 7.14 Rewrite rules and Using rules. Then the compiler_uses_these rules_to_optimize_your program when compiling. (Note_that the compiler in no_way checks_if the rules make any sense.)
Edit: To give_an_example for this_particular problem, we can write:
{-# OPTIONS_GHC -fenable-rewrite-rules -ddump-rule-firings -ddump-rule-rewrites_#-}

import Data.Char

{-# RULES
"map/zip" forall f g_xs. (,) (map_f_xs)_(map g xs) =_unzip (map (\x -> (f x,_g x)) xs)
   #-}

main_:: IO ()
main = let x =_"abCD" in
    _   print $_(,) (map_toUpper x) (map toLower x)

(the_top-level function name_in the_rule is (,)_:: a -> b -> (a,_b)). When compiling,_you'll see how the rules are_applied._Option dump-rule-firings shows_a_message_when a_rule is applied_and_-ddump-rule-rewrites displays_each_rule application in detail - see_7.14.6._Controlling what's going on in rewrite rules.

A:

I've_managed to find two_resources_that mentions fusion (un-)zip_like functions, at least briefly:
Josef_Svenningsson. "Shortcut Fusion for Accumulating Parameters_& Zip-like_Functions"
http://www.cse.chalmers.se/~josefs/publications/fusion.pdf
Duncan Coutts._"Stream Fusion: Practical shortcut fusion for coinductive sequence types"
https://community.haskell.org/~duncan/thesis.pdf
Neither resources mentions_this kind of "sibling fusion" explicitly_though.

 Q:

Limit private memory_usage per_user

I'm_using cgroups with_the_memory controller_to set a memory limit for each_user (using_the memory.limit_in_bytes setting).
The problem is that_this setting also accounts_cache_usage. Therefore,