id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
3446,Library enhancement request: Data.Maybe.justIf,nomeata,,"Hi,

I found myself often writing the idiom ""if a then Just v else Nothing"". It can be nicely abbreviated by the function:

{{{
justIf :: a -> Bool -> Just a
justIf x True = Just x
justIf x False = Nothing
}}}

Which would allow me to write the nicely write- and readable {{{v `justIf` a}}}.

Asking on #haskell, I got positive feedback about this addition:
{{{
<endojelly> nomeata, I'm all for it. my last project was *full* of that idiom
}}}",proposal,closed,normal,Not GHC,libraries/base,6.10.4,wontfix,,merehap,Unknown/Multiple,Unknown/Multiple,None/Unknown,Unknown,,,,
