homplexity 0.4.8.0 → 0.4.8.1
raw patch · 4 files changed
+43/−31 lines, 4 filesdep ~basedep ~template-haskellPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, template-haskell
API changes (from Hackage documentation)
- Language.Haskell.Homplexity.Message: instance Text.Blaze.ToMarkup Language.Haskell.Homplexity.Message.Message
- Language.Haskell.Homplexity.Message: instance Text.Blaze.ToMarkup Language.Haskell.Homplexity.Message.Severity
+ Language.Haskell.Homplexity.Message: instance GHC.Generics.Generic Language.Haskell.Homplexity.Message.Severity
- Language.Haskell.Homplexity.CodeFragment: data Module l
+ Language.Haskell.Homplexity.CodeFragment: data () => Module l
Files
- README.md +1/−6
- homplexity.cabal +37/−17
- lib/Language/Haskell/Homplexity/CodeFragment.hs +1/−1
- lib/Language/Haskell/Homplexity/Message.hs +4/−7
README.md view
@@ -6,18 +6,13 @@ For parsing it uses [haskell-src-exts](http://hackage.haskell.org/package/haskell-src-exts), and [cppHs](http://hackage.haskell.org/package/cppHs). -Builds with Stack: [](https://circleci.com/gh/mgajda/homplexity)--Shippable CI:-[](https://app.shippable.com/github/mgajda/homplexity)- Cabal builds across GHC versions:  [](https://hackage.haskell.org/package/homplexity) [](http://packdeps.haskellers.com/feed?needle=homplexity) -If you just need latest static executable [it is always available here](https://gitlab.com/migamake/homplexity/-/jobs/artifacts/master/raw/bin/homplexity-cli?job=test_distribution).+If you just need latest static executable [it is always available here](https://hub.docker.com/repository/docker/migamake/homplexity). Official releases are on [Hackage](https://hackage.haskell.org/package/homplexity)
homplexity.cabal view
@@ -1,13 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.35.0. -- -- see: https://github.com/sol/hpack------ hash: f8472e1a914bbffeef9e1f8273601569d32a34529e483de131a5399de76f1198 name: homplexity-version: 0.4.8.0+version: 0.4.8.1 synopsis: Haskell code quality tool description: Homplexity aims to measure code complexity, warning about fragments that might have higher defect probability@@ -26,8 +24,9 @@ copyright: Copyright by Michal J. Gajda and contributors '2015-'2020 https://gitlab.com/migamake/homplexity/-/graphs/master license: BSD3 license-file: LICENSE-tested-with: GHC==8.4.4 GHC==8.6.5 GHC==8.8.2 build-type: Simple+tested-with:+ GHC==8.4.4 GHC==8.6.5 GHC==8.8.2 GHC==8.10.4 GHC==9.0 GHC==9.2 GHC==9.4 extra-source-files: README.md changelog.md@@ -65,9 +64,28 @@ Paths_homplexity hs-source-dirs: lib- other-extensions: BangPatterns DeriveDataTypeable FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving IncoherentInstances MultiParamTypeClasses OverlappingInstances RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TypeFamilies TypeSynonymInstances UndecidableInstances ViewPatterns+ other-extensions:+ BangPatterns+ DeriveDataTypeable+ FlexibleContexts+ FlexibleInstances+ GeneralizedNewtypeDeriving+ IncoherentInstances+ MultiParamTypeClasses+ OverlappingInstances+ RecordWildCards+ ScopedTypeVariables+ StandaloneDeriving+ TemplateHaskell+ TypeFamilies+ TypeSynonymInstances+ UndecidableInstances+ ViewPatterns+ build-tools:+ alex+ , happy build-depends:- base >=4.5 && <4.16+ base >=4.5 && <4.19 , bytestring , containers >=0.3 && <0.7 , cpphs >=1.5 && <1.21@@ -76,8 +94,9 @@ , filepath >=1.2 && <1.5 , haskell-src-exts >=1.20 && <1.24 , hflags >=0.3 && <0.5- , template-haskell >=2.6 && <2.18+ , template-haskell >=2.6 && <2.20 , uniplate >=1.4 && <1.7+ default-language: Haskell2010 if flag(static) ghc-options: -fPIC ld-options: -static@@ -91,8 +110,7 @@ cpp-options: -DHTML_OUTPUT build-depends: blaze-html >=0.9 && <1- , blaze-markup >=0.8 && <0.9- default-language: Haskell2010+ , blaze-markup ==0.8.* executable homplexity-cli main-is: Homplexity.hs@@ -101,7 +119,7 @@ hs-source-dirs: app/ build-depends:- base >=4.5 && <4.16+ base >=4.5 && <4.19 , containers >=0.3 && <0.7 , cpphs >=1.5 && <1.21 , deepseq >=1.3 && <1.7@@ -111,8 +129,9 @@ , haskell-src-exts >=1.20 && <1.24 , hflags >=0.3 && <0.5 , homplexity- , template-haskell >=2.6 && <2.18+ , template-haskell >=2.6 && <2.20 , uniplate >=1.4 && <1.7+ default-language: Haskell2010 if flag(static) ghc-options: -fPIC ld-options: -static@@ -120,8 +139,7 @@ cpp-options: -DHTML_OUTPUT build-depends: blaze-html >=0.9 && <1- , bytestring >=0.10 && <0.11- default-language: Haskell2010+ , bytestring ==0.10.* test-suite homplexity-tests type: exitcode-stdio-1.0@@ -137,18 +155,20 @@ tests ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N build-depends:- base >=4.5 && <4.16+ base >=4.5 && <4.19 , filepath >=1.2 && <1.5 , haskell-src-exts >=1.20 && <1.24 , homplexity- , template-haskell >=2.6 && <2.18+ , template-haskell >=2.6 && <2.20+ default-language: Haskell2010 if flag(static) ghc-options: -fPIC ld-options: -static if impl(ghc >=8.8.0)+ build-tool-depends:+ hspec-discover:hspec-discover build-depends: hspec >=2.7.0 else build-depends: hspec <2.6.0- default-language: Haskell2010
lib/Language/Haskell/Homplexity/CodeFragment.hs view
@@ -36,7 +36,7 @@ import Data.Data --import Data.Functor import Data.Generics.Uniplate.Data-import Data.List+import Data.List hiding (singleton) import Data.Maybe --import Data.Monoid import Language.Haskell.Exts.SrcLoc
lib/Language/Haskell/Homplexity/Message.hs view
@@ -1,5 +1,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DeriveLift #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-}@@ -31,6 +33,7 @@ import HFlags import Language.Haskell.Exts hiding (style) import Language.Haskell.TH.Syntax (Lift (..))+import GHC.Generics #ifdef HTML_OUTPUT import Prelude hiding (div, head, id, span) import Text.Blaze.Html4.Strict hiding (map, style)@@ -101,7 +104,7 @@ | Info | Warning | Critical- deriving (Eq, Ord, Read, Show, Enum, Bounded)+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Lift) instance NFData Severity where rnf !_a = ()@@ -109,12 +112,6 @@ -- | String showing all possible values for @Severity@. severityOptions :: String severityOptions = unwords $ map show [minBound..(maxBound::Severity)]--instance Lift Severity where- lift Debug = [| Debug |]- lift Info = [| Info |]- lift Warning = [| Warning |]- lift Critical = [| Critical |] instance FlagType Severity where defineFlag n v = defineEQFlag n [| v :: Severity |] "{Debug|Info|Warning|Critical}"