On Sat, Sep 18, 2010 at 22:13:59 +0100, Neil Mitchell wrote:
> {-# ANN module "HLint: ignore" #-}
>
> There are also more fine grained options available, described in the manual.
Thanks for getting back to us :-)
In
{-# ANN map "HLint: ignore" #-} - don't give any hints in the function map.
map is an example of a function we would write?
As an example of ratification at work, we have
getLog :: forall x y . [DarcsFlag] -> Maybe (String, [String]) -> IO String ->
FL Prim x y ->
IO (String, [String], Maybe String)
getLog opts m_old make_log chs = gl opts
where -- some lines of code removed ...
gl (Pipe:_) = do p <- case patchname_specified of
FlagPatchName p -> return p
PriorPatchName p -> return p
NoPatchName -> prompt_patchname False
putStrLn "What is the log?"
thelog <- lines `fmap` Ratified.hGetContents stdin
return (p, thelog, Nothing)
-- more lines of code removed
And here instead we'd be using something like
{-# ANN getLog "HLint: ignore Avoid hGetContents" #-}
If that's the case, we may just stick with the qualified Ratified module import
for now, so that we can have very fine grained control [eg. we may have some
uses of hGetContents in getLog that we would not want to ratify]
The module is more than the attached, and if you're curious, attached is the
current errors file we're using in Haskell policy-checking mode.
Cheers,
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:[email protected] (Jabber or Google Talk only)
pgprexZZFcVF0.pgp
Description: PGP signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
