{-# ANN module ("HLint: ignore Use infix"::String) #-}
{-# ANN module ("HLint: ignore Use mappend"::String) #-}
{-# ANN module ("HLint: ignore Use fmap"::String) #-}
{-# ANN module ("HLint: error Redundant $"::String) #-}
{-# ANN module ("HLint: ignore Use ."::String) #-}但是当我试图把我的包裹标记为安全时
{-# LANGUAGE Safe #-}我得到了
• Annotations are not compatible with Safe Haskell.
See https://ghc.haskell.org/trac/ghc/ticket/10826
• In the annotation:
{-# ANN module ("HLint: ignore Use ." :: String) #-}
|
80 | {-# ANN module ("HLint: ignore Use ."::String) #-}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^在删除注释之后,我可以在没有错误的情况下构建和测试安全性。
是否有另一种方法可以自定义Hlint,允许我的包被标记为安全?
发布于 2019-01-04 03:20:32
您可以使用以下两种方法之一,而不是使用ANN实用程序:
{-# HLINT ignore "Use mappend" #-}或者:
{- HLINT ignore "Use mappend" -}前者将引发GHC关于未知实用主义的警告。
另请参阅:
https://stackoverflow.com/questions/52955380
复制相似问题