[Haskell-cafe] mapFst and mapSnd

Carlo Hamalainen carlo.hamalainen at gmail.com
Wed May 29 11:24:29 CEST 2013


On Tue, May 28, 2013 at 7:46 PM, Dominique Devriese <
dominique.devriese at cs.kuleuven.be> wrote:

> 2013/5/28 Tikhon Jelvis <tikhon at jelv.is>:
> > These are present in Control.Arrow as (***), first and second
> respectively.
>
> Right, thanks. Strange that neither Hayoo nor Hoogle turned these up..
>

HLint suggested Control.Arrow.&&& and Control.Arrow.first to me the other
day:

$ hlint Checker.hs
Checker.hs:65:5: Warning: Reduce duplication
Found:
  topdir <- ask
  md5file <- computeChecksumFilename f
  hasChecksum <- liftM not $ isChecksumMissing f
Why not:
  Combine with Checker.hs:81:5

Checker.hs:127:96: Warning: Use &&&
Found:
  \ x -> (s3Path x, s3Md5sum x)
Why not:
  s3Path Control.Arrow.&&& s3Md5sum

Checker.hs:153:42: Warning: Use first
Found:
  \ (x, y) -> (trimPathPrefix path x, y)
Why not:
  Control.Arrow.first (trimPathPrefix path)

3 suggestions


Some people that I know have HLint incorporated into their vim sessions, I
think using Syntastic.

Cheers,

-- 
Carlo Hamalainen
http://carlo-hamalainen.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130529/5f8b5f8f/attachment.htm>


More information about the Haskell-Cafe mailing list