Not sure why -Werror didn't catch these. Signed-off-by: Niklas Hambuechen <nikl...@google.com> --- src/Ganeti/Objects/BitArray.hs | 1 - src/Ganeti/Storage/Lvm/LVParser.hs | 2 +- src/Ganeti/THH.hs | 22 +--------------------- src/Ganeti/WConfd/Server.hs | 2 +- 4 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/src/Ganeti/Objects/BitArray.hs b/src/Ganeti/Objects/BitArray.hs index 98ea919..0ae784b 100644 --- a/src/Ganeti/Objects/BitArray.hs +++ b/src/Ganeti/Objects/BitArray.hs @@ -56,7 +56,6 @@ module Ganeti.Objects.BitArray ) where import Prelude hiding (foldr) -import qualified Prelude as P import Control.Monad import Control.Monad.Error diff --git a/src/Ganeti/Storage/Lvm/LVParser.hs b/src/Ganeti/Storage/Lvm/LVParser.hs index 7ea08cb..470c41a 100644 --- a/src/Ganeti/Storage/Lvm/LVParser.hs +++ b/src/Ganeti/Storage/Lvm/LVParser.hs @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -} module Ganeti.Storage.Lvm.LVParser (lvParser, lvCommand, lvParams) where -import Control.Applicative ((<*>), (*>), (<*), (<$>), Applicative, ) +import Control.Applicative ((<*>), (*>), (<*), (<$>)) import qualified Data.Attoparsec.Text as A import qualified Data.Attoparsec.Combinator as AC import Data.Attoparsec.Text (Parser) diff --git a/src/Ganeti/THH.hs b/src/Ganeti/THH.hs index 5a9926c..2aa0d95 100644 --- a/src/Ganeti/THH.hs +++ b/src/Ganeti/THH.hs @@ -355,14 +355,6 @@ ensureUpper (x:xs) = toUpper x:xs varNameE :: String -> Q Exp varNameE = varE . mkName --- | showJSON as an expression, for reuse. -showJSONE :: Q Exp -showJSONE = varE 'JSON.showJSON - --- | makeObj as an expression, for reuse. -makeObjE :: Q Exp -makeObjE = varE 'JSON.makeObj - -- | fromObj (Ganeti specific) as an expression, for reuse. fromObjE :: Q Exp fromObjE = varE 'fromObj @@ -379,14 +371,6 @@ fromRawName = mkName . (++ "FromRaw") . ensureLower reprE :: Either String Name -> Q Exp reprE = either stringE varE --- | Smarter function application. --- --- This does simply f x, except that if is 'id', it will skip it, in --- order to generate more readable code when using -ddump-splices. -appFn :: Exp -> Exp -> Exp -appFn f x | f == VarE 'id = x - | otherwise = AppE f x - -- | Apply a constructor to a list of expressions appCons :: Name -> [Exp] -> Exp appCons cname = foldl AppE (ConE cname) @@ -660,9 +644,6 @@ genAllConstr trans_fun name vstr = do genAllOpIDs :: Name -> String -> Q [Dec] genAllOpIDs = genAllConstr deCamelCase --- | OpCode parameter (field) type. -type OpParam = (String, Q Type, Q Exp) - -- * Python code generation data OpCodeField = OpCodeField { ocfName :: String @@ -719,8 +700,7 @@ pyField f = genPyType f >>= \t -> -- necessary information on how to build the Python class string. pyClass :: OpCodeConstructor -> Q Exp pyClass (consName, consType, consDoc, consFields, consDscField) = - do let pyClassVar = varNameE "showPyClass" - consName' = stringE consName + do let consName' = stringE consName consType' <- genPyType' NotOptional consType let consDoc' = stringE consDoc [| OpCodeDescriptor $consName' diff --git a/src/Ganeti/WConfd/Server.hs b/src/Ganeti/WConfd/Server.hs index e8a4ed2..a0f7dab 100644 --- a/src/Ganeti/WConfd/Server.hs +++ b/src/Ganeti/WConfd/Server.hs @@ -64,7 +64,7 @@ import Ganeti.WConfd.Monad import Ganeti.WConfd.Persistent handler :: DaemonHandle -> RpcServer WConfdMonadInt -handler ch = $( mkRpcM exportedFunctions ) +handler _ = $( mkRpcM exportedFunctions ) -- | Type alias for prepMain results -- 2.1.0.rc2.206.gedb03e5