Skip to content

Commit

Permalink
feat(Stackage): use aeson-0.11 and bump resolver to 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rubik committed Feb 10, 2016
1 parent c4b0839 commit 3fa8ef8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Argon/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Argon/Visitor.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3fa8ef8

Please sign in to comment.