From 3fa8ef84b2c9ccc489c8697f6cc3a9caa1cfadaf Mon Sep 17 00:00:00 2001 From: Michele Lacchia Date: Wed, 10 Feb 2016 09:46:12 +0100 Subject: [PATCH] feat(Stackage): use aeson-0.11 and bump resolver to 5.2 --- src/Argon/Types.hs | 2 +- src/Argon/Visitor.hs | 4 ++-- stack.yaml | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Argon/Types.hs b/src/Argon/Types.hs index d889c74..4c835c7 100644 --- a/src/Argon/Types.hs +++ b/src/Argon/Types.hs @@ -79,7 +79,7 @@ instance ToJSON ComplexityBlock where , "complexity" .= cc ] -instance ToJSON (FilePath, AnalysisResult) where +instance {-# OVERLAPPING #-} ToJSON (FilePath, AnalysisResult) where toJSON (p, Left err) = object [ "path" .= p , "type" .= ("error" :: String) , "message" .= err diff --git a/src/Argon/Visitor.hs b/src/Argon/Visitor.hs index bb5c0e0..38e7973 100644 --- a/src/Argon/Visitor.hs +++ b/src/Argon/Visitor.hs @@ -26,7 +26,7 @@ funCC f = CC (getLocation $ GHC.fun_id f, getFuncName f, complexity f) getBinds :: (Data from, Typeable from) => from -> [Function] getBinds = everythingStaged Parser (++) [] $ mkQ [] visit - where visit fun@(GHC.FunBind {}) = [fun] + where visit fun@GHC.FunBind {} = [fun] visit _ = [] getLocation :: GHC.Located a -> Loc @@ -51,7 +51,7 @@ sumWith :: (a -> Int) -> [a] -> Int sumWith f = sum . map f visitExp :: Exp -> Int -visitExp (GHC.HsIf {}) = 1 +visitExp GHC.HsIf {} = 1 visitExp (GHC.HsMultiIf _ alts) = length alts - 1 visitExp (GHC.HsLamCase _ alts) = length (GHC.mg_alts alts) - 1 visitExp (GHC.HsCase _ alts) = length (GHC.mg_alts alts) - 1 diff --git a/stack.yaml b/stack.yaml index c73fda5..a8c1aaa 100644 --- a/stack.yaml +++ b/stack.yaml @@ -7,4 +7,7 @@ extra-deps: - hierarchy-0.3.1 - pipes-files-0.1.1 - posix-paths-0.2.1.0 -resolver: lts-3.11 +- aeson-0.11.0.0 +- fail-4.9.0.0 +- semigroups-0.16.2.2 +resolver: lts-5.2