Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GHC 9.0 #423

Closed
chshersh opened this issue Mar 26, 2021 · 32 comments
Closed

Support GHC 9.0 #423

chshersh opened this issue Mar 26, 2021 · 32 comments
Labels
CI CI integgrations, deployments etc. ghc

Comments

@chshersh
Copy link
Contributor

No description provided.

@chshersh chshersh added CI CI integgrations, deployments etc. ghc labels Mar 26, 2021
@chshersh chshersh added this to the 0.1.0.0: Customization milestone Mar 26, 2021
@jeapostrophe
Copy link

Please <3

@uhbif19
Copy link

uhbif19 commented Jul 21, 2022

Issues this one dependent on:

kowainik/extensions#73
kowainik/trial#67

mpilgrem added a commit to commercialhaskell/stack that referenced this issue Aug 13, 2022
Stack is now built with GHC 9.2.4 and Stan does not currently support GHC >= 9.0. See kowainik/stan#423
@worm2fed
Copy link

uf, can be tricky, not only modules was rearranged, but also api was changed in ghc package...

@hololeap
Copy link

I recommend switching to ghc-lib and ghc-lib-parser instead of relying on the ghc library.

@tomjaguarpaw
Copy link
Collaborator

I've brought stan up to date all the way to 9.41, including updating dependencies across the entire Kowainik ecosystem. It's not clear to me whether stan is actively being maintained. If not I may make a fork.

https://github.com/kowainik/stan/compare/main...tomjaguarpaw:stan:9.4-compat?expand=1

Footnotes

  1. It may need a tweak for 8.8. I haven't tried it. ↩

@danwdart
Copy link

danwdart commented Oct 1, 2022

Have I done anything wrong here? Using 9.2.4 and 9.4-compat branch.

[10 of 43] Compiling Stan.Hie.Compat

src/Stan/Hie/Compat.hs:93:18: error:
    β€’ Couldn't match expected type β€˜IO GHC.Iface.Env.NameCacheUpdater’
                  with actual type β€˜GHC.Types.Name.Cache.NameCache’
    β€’ In a stmt of a 'do' block: nameCache <- initNameCache 'z' []
      In the expression:
        do nameCache <- initNameCache 'z' []
           pure (readHieFile nameCache)
      In an equation for β€˜readHieFileWithNameCache’:
          readHieFileWithNameCache
            = do nameCache <- initNameCache 'z' []
                 pure (readHieFile nameCache)
   |
93 |     nameCache <- initNameCache 'z' []
   |                  ^^^^^^^^^^^^^^^^^^^^

src/Stan/Hie/Compat.hs:93:32: error:
    β€’ Couldn't match expected type β€˜GHC.Types.Unique.Supply.UniqSupply’
                  with actual type β€˜Char’
    β€’ In the first argument of β€˜initNameCache’, namely β€˜'z'’
      In a stmt of a 'do' block: nameCache <- initNameCache 'z' []
      In the expression:
        do nameCache <- initNameCache 'z' []
           pure (readHieFile nameCache)
   |
93 |     nameCache <- initNameCache 'z' []
   |                                ^^^
[12 of 43] Compiling Stan.Info
[15 of 43] Compiling Stan.Pattern.Edsl
[21 of 43] Compiling Stan.Report.Css
[22 of 43] Compiling Stan.Report.Settings
[23 of 43] Compiling Stan.Severity

@tomjaguarpaw
Copy link
Collaborator

Oops, I pushed the wrong branch. Please fetch the branch 9.4-compat and try again.

@danwdart
Copy link

danwdart commented Oct 1, 2022

Errors gone, just warnings and test failures now:

ghc924: src/Stan/Pattern/Type.hs:110:1: warning: [-Wmissing-signatures]
ghc924:     Top-level binding with no type signature:
ghc924:       integerPattern :: PatternType
ghc924:     |
ghc924: 110 | integerPattern =
ghc924:     | ^^^^^^^^^^^^^^
ghc924: 
ghc924: src/Stan/Pattern/Type.hs:118:1: warning: [-Wmissing-signatures]
ghc924:     Top-level binding with no type signature:
ghc924:       naturalPattern :: PatternType
ghc924:     |
ghc924: 118 | naturalPattern =
ghc924:     | ^^^^^^^^^^^^^^
ghc924: 
ghc924: src/Stan/Pattern/Type.hs:126:1: warning: [-Wunused-top-binds]
ghc924:     Defined but not used: β€˜integerPattern810’
ghc924:     |
ghc924: 126 | integerPattern810 = NameMeta
ghc924:     | ^^^^^^^^^^^^^^^^^
ghc924: 
ghc924: src/Stan/Pattern/Type.hs:140:1: warning: [-Wunused-top-binds]
ghc924:     Defined but not used: β€˜naturalPattern810’
ghc924:     |
ghc924: 140 | naturalPattern810 = "Natural" `baseNameFrom` "GHC.Natural" |:: []
ghc924:     | ^^^^^^^^^^^^^^^^^
ghc924: [27 of 53] Compiling Stan.Pattern.Ast
ghc924: 
ghc924: src/Stan/Pattern/Ast.hs:193:1: warning: [-Wmissing-signatures]
ghc924:     Top-level binding with no type signature:
ghc924:       absBinds :: NodeAnnotation
ghc924:     |
ghc924: 193 | absBinds =
ghc924:     | ^^^^^^^^
ghc924: [28 of 53] Compiling Stan.Hie
ghc924: 
ghc924: src/Stan/Hie.hs:69:7: warning: [-Wname-shadowing]
ghc924:     This binding for β€˜span’ shadows the existing binding
ghc924:       imported from β€˜Prelude’ at src/Stan/Hie.hs:11:8-15
ghc924:       (and originally defined in β€˜GHC.List’)
ghc924:    |
ghc924: 69 | slice span =
ghc924:    |       ^^^^
ghc924: [29 of 53] Compiling Stan.Hie.MatchType
ghc924: [30 of 53] Compiling Stan.Hie.MatchAst
ghc924: 
ghc924: src/Stan/Hie/MatchAst.hs:59:18: warning: [-Wname-shadowing]
ghc924:     This binding for β€˜span’ shadows the existing binding
ghc924:       imported from β€˜Prelude’ at src/Stan/Hie/MatchAst.hs:15:8-24
ghc924:       (and originally defined in β€˜GHC.List’)
ghc924:    |
ghc924: 59 |         && ( let span = slice nodeSpan hie_hs_src in case lit of
ghc924:    |                  ^^^^
ghc924: 
ghc924: src/Stan/Hie/MatchAst.hs:88:5: warning: [-Wname-shadowing]
ghc924:     This binding for β€˜nodeInfo’ shadows the existing binding
ghc924:       imported from β€˜Stan.Hie.Compat’ at src/Stan/Hie/MatchAst.hs:26:75-82
ghc924:       (and originally defined in β€˜Stan.Hie.Compat902’
ghc924:          at src/Stan/Hie/Compat902.hs:55:1-8)
ghc924:    |
ghc924: 88 |     nodeInfo = Stan.Hie.Compat.nodeInfo node
ghc924:    |     ^^^^^^^^
ghc924: [31 of 53] Compiling Stan.Report.Css
ghc924: [32 of 53] Compiling Stan.Report.Settings
ghc924: [33 of 53] Compiling Stan.Severity
ghc924: [34 of 53] Compiling Stan.Inspection
ghc924: [35 of 53] Compiling Stan.Inspection.Style
ghc924: [36 of 53] Compiling Stan.Inspection.Partial
ghc924: [37 of 53] Compiling Stan.Inspection.Infinite
ghc924: [38 of 53] Compiling Stan.Inspection.AntiPattern
ghc924: [39 of 53] Compiling Stan.Inspection.All
ghc924: [40 of 53] Compiling Stan.Observation
ghc924: [41 of 53] Compiling Stan.FileInfo
ghc924: [42 of 53] Compiling Stan.Analysis.Visitor
ghc924: [43 of 53] Compiling Stan.Analysis.Analyser
ghc924: [44 of 53] Compiling Stan.Analysis
ghc924: [45 of 53] Compiling Stan.Analysis.Pretty
ghc924: [46 of 53] Compiling Stan.Config
ghc924: [47 of 53] Compiling Stan.Config.Pretty
ghc924: [48 of 53] Compiling Stan.Cli
ghc924: [49 of 53] Compiling Stan.Analysis.Summary
ghc924: [50 of 53] Compiling Stan.Report.Html
ghc924: [51 of 53] Compiling Stan.Report
ghc924: [52 of 53] Compiling Stan.Toml
ghc924: [53 of 53] Compiling Stan
ghc924: 
ghc924: <no location info>: warning: [-Wunused-packages]
ghc924:     The following packages were specified via -package or -package-id flags,
ghc924:     but were not needed for compilation:
ghc924:       - base-4.16.3.0
ghc924: [ 1 of 53] Compiling Paths_stan
ghc924: [ 2 of 53] Compiling Stan.Browse
ghc924: [ 3 of 53] Compiling Stan.Category
ghc924: [ 4 of 53] Compiling Stan.Core.Id
ghc924: [ 5 of 53] Compiling Stan.Core.List
ghc924: [ 6 of 53] Compiling Stan.EnvVars
ghc924: [ 7 of 53] Compiling Stan.Example
ghc924: [ 8 of 53] Compiling Stan.Ghc.Compat810
ghc924: 
ghc924: src/Stan/Ghc/Compat810.hs:1:1: warning: [-Wmissing-export-lists]
ghc924:     The export item β€˜module Stan.Ghc.Compat810’ is missing an export list
ghc924:   |
ghc924: 1 | {-# LANGUAGE CPP #-}
ghc924:   | ^
ghc924: [ 9 of 53] Compiling Stan.Ghc.Compat900
ghc924: [10 of 53] Compiling Stan.Ghc.Compat902
ghc924: [11 of 53] Compiling Stan.Ghc.Compat
ghc924: [12 of 53] Compiling Stan.Core.ModuleName
ghc924: [13 of 53] Compiling Stan.Hie.Compat810
ghc924: [14 of 53] Compiling Stan.Hie.Compat900
ghc924: [15 of 53] Compiling Stan.Hie.Compat902
ghc924: [16 of 53] Compiling Stan.Hie.Compat
ghc924: [17 of 53] Compiling Stan.Cabal
ghc924: [18 of 53] Compiling Stan.Hie.Compat904
ghc924: [19 of 53] Compiling Stan.Hie.Debug810
ghc924: [20 of 53] Compiling Stan.Hie.Debug900
ghc924: [21 of 53] Compiling Stan.Info
ghc924: [22 of 53] Compiling Stan.NameMeta
ghc924: [23 of 53] Compiling Stan.Hie.Debug902
ghc924: [24 of 53] Compiling Stan.Hie.Debug
ghc924: [25 of 53] Compiling Stan.Pattern.Edsl
ghc924: [26 of 53] Compiling Stan.Pattern.Type
ghc924: 
ghc924: src/Stan/Pattern/Type.hs:110:1: warning: [-Wmissing-signatures]
ghc924:     Top-level binding with no type signature:
ghc924:       integerPattern :: PatternType
ghc924:     |
ghc924: 110 | integerPattern =
ghc924:     | ^^^^^^^^^^^^^^
ghc924: 
ghc924: src/Stan/Pattern/Type.hs:118:1: warning: [-Wmissing-signatures]
ghc924:     Top-level binding with no type signature:
ghc924:       naturalPattern :: PatternType
ghc924:     |
ghc924: 118 | naturalPattern =
ghc924:     | ^^^^^^^^^^^^^^
ghc924: 
ghc924: src/Stan/Pattern/Type.hs:126:1: warning: [-Wunused-top-binds]
ghc924:     Defined but not used: β€˜integerPattern810’
ghc924:     |
ghc924: 126 | integerPattern810 = NameMeta
ghc924:     | ^^^^^^^^^^^^^^^^^
ghc924: 
ghc924: src/Stan/Pattern/Type.hs:140:1: warning: [-Wunused-top-binds]
ghc924:     Defined but not used: β€˜naturalPattern810’
ghc924:     |
ghc924: 140 | naturalPattern810 = "Natural" `baseNameFrom` "GHC.Natural" |:: []
ghc924:     | ^^^^^^^^^^^^^^^^^
ghc924: [27 of 53] Compiling Stan.Pattern.Ast
ghc924: 
ghc924: src/Stan/Pattern/Ast.hs:193:1: warning: [-Wmissing-signatures]
ghc924:     Top-level binding with no type signature:
ghc924:       absBinds :: NodeAnnotation
ghc924:     |
ghc924: 193 | absBinds =
ghc924:     | ^^^^^^^^
ghc924: [28 of 53] Compiling Stan.Hie
ghc924: 
ghc924: src/Stan/Hie.hs:69:7: warning: [-Wname-shadowing]
ghc924:     This binding for β€˜span’ shadows the existing binding
ghc924:       imported from β€˜Prelude’ at src/Stan/Hie.hs:11:8-15
ghc924:       (and originally defined in β€˜GHC.List’)
ghc924:    |
ghc924: 69 | slice span =
ghc924:    |       ^^^^
ghc924: [29 of 53] Compiling Stan.Hie.MatchType
ghc924: [30 of 53] Compiling Stan.Hie.MatchAst
ghc924: 
ghc924: src/Stan/Hie/MatchAst.hs:59:18: warning: [-Wname-shadowing]
ghc924:     This binding for β€˜span’ shadows the existing binding
ghc924:       imported from β€˜Prelude’ at src/Stan/Hie/MatchAst.hs:15:8-24
ghc924:       (and originally defined in β€˜GHC.List’)
ghc924:    |
ghc924: 59 |         && ( let span = slice nodeSpan hie_hs_src in case lit of
ghc924:    |                  ^^^^
ghc924: 
ghc924: src/Stan/Hie/MatchAst.hs:88:5: warning: [-Wname-shadowing]
ghc924:     This binding for β€˜nodeInfo’ shadows the existing binding
ghc924:       imported from β€˜Stan.Hie.Compat’ at src/Stan/Hie/MatchAst.hs:26:75-82
ghc924:       (and originally defined in β€˜Stan.Hie.Compat902’
ghc924:          at src/Stan/Hie/Compat902.hs:55:1-8)
ghc924:    |
ghc924: 88 |     nodeInfo = Stan.Hie.Compat.nodeInfo node
ghc924:    |     ^^^^^^^^
ghc924: [31 of 53] Compiling Stan.Report.Css
ghc924: [32 of 53] Compiling Stan.Report.Settings
ghc924: [33 of 53] Compiling Stan.Severity
ghc924: [34 of 53] Compiling Stan.Inspection
ghc924: [35 of 53] Compiling Stan.Inspection.Style
ghc924: [36 of 53] Compiling Stan.Inspection.Partial
ghc924: [37 of 53] Compiling Stan.Inspection.Infinite
ghc924: [38 of 53] Compiling Stan.Inspection.AntiPattern
ghc924: [39 of 53] Compiling Stan.Inspection.All
ghc924: [40 of 53] Compiling Stan.Observation
ghc924: [41 of 53] Compiling Stan.FileInfo
ghc924: [42 of 53] Compiling Stan.Analysis.Visitor
ghc924: [43 of 53] Compiling Stan.Analysis.Analyser
ghc924: [44 of 53] Compiling Stan.Analysis
ghc924: [45 of 53] Compiling Stan.Analysis.Pretty
ghc924: [46 of 53] Compiling Stan.Config
ghc924: [47 of 53] Compiling Stan.Config.Pretty
ghc924: [48 of 53] Compiling Stan.Cli
ghc924: [49 of 53] Compiling Stan.Analysis.Summary
ghc924: [50 of 53] Compiling Stan.Report.Html
ghc924: [51 of 53] Compiling Stan.Report
ghc924: [52 of 53] Compiling Stan.Toml
ghc924: [53 of 53] Compiling Stan
ghc924: Preprocessing executable 'stan' for stan-0.0.1.0..
ghc924: Building executable 'stan' for stan-0.0.1.0..
ghc924: [1 of 1] Compiling Main
ghc924: Linking dist/build/stan/stan ...
ghc924: Preprocessing test suite 'stan-test' for stan-0.0.1.0..
ghc924: Building test suite 'stan-test' for stan-0.0.1.0..
ghc924: 
ghc924: <no location info>: warning: [-Wunused-packages]
ghc924:     The following packages were specified via -package or -package-id flags,
ghc924:     but were not needed for compilation:
ghc924:       - ghc-9.2.4
ghc924:       - relude-1.1.0.0-5JycKJkJeebDcuDsd66BY7
ghc924:       - relude-1.1.0.0-5JycKJkJeebDcuDsd66BY7
ghc924:       - base-4.16.3.0
ghc924: [ 1 of 13] Compiling Test.Stan.Analysis.Common
ghc924: [ 2 of 13] Compiling Test.Stan.Analysis.AntiPattern
ghc924: [ 3 of 13] Compiling Test.Stan.Analysis.Infinite
ghc924: [ 4 of 13] Compiling Test.Stan.Analysis.Partial
ghc924: [ 5 of 13] Compiling Test.Stan.Analysis.Style
ghc924: [ 6 of 13] Compiling Test.Stan.Analysis
ghc924: [ 7 of 13] Compiling Test.Stan.Gen
ghc924: [ 8 of 13] Compiling Test.Stan.Config
ghc924: [ 9 of 13] Compiling Test.Stan.Cli
ghc924: [10 of 13] Compiling Test.Stan.Number
ghc924: [11 of 13] Compiling Test.Stan.Observation
ghc924: [12 of 13] Compiling Test.Stan.Toml
ghc924: [13 of 13] Compiling Main
ghc924: 
ghc924: <no location info>: warning: [-Wunused-packages]
ghc924:     The following packages were specified via -package or -package-id flags,
ghc924:     but were not needed for compilation:
ghc924:       - ghc-9.2.4
ghc924:       - relude-1.1.0.0-5JycKJkJeebDcuDsd66BY7
ghc924:       - relude-1.1.0.0-5JycKJkJeebDcuDsd66BY7
ghc924:       - base-4.16.3.0
ghc924: Linking dist/build/stan-test/stan-test ...
ghc924: buildPhase completed in 1 minutes 14 seconds
ghc924: running tests
ghc924: Running 1 test suites...
ghc924: Test suite stan-test: RUNNING...
ghc924:   β“˜ Using the following .cabal file: stan.cabal
ghc924: 
ghc924: 
ghc924: LoC tests
ghc924:   should count lines of code in the example file
ghc924: Modules number tests
ghc924:   should count correct number of modules
ghc924: CLI configuration tests
ghc924:   execParserPure . configToCliCommand ≑ pure
ghc924:   Converts Config to CLI command and parses it back
ghc924: TOML configuration tests
ghc924:   decode . encode ≑ pure
ghc924:   Parses test/.stan.example.toml
ghc924: Stan Configuration Tests
ghc924:   Configuration checks aggregation
ghc924:     applyCheck: Unit Tests
ghc924:       All inspections when empty Check list
ghc924:       Including all inspections
ghc924:       All inspections are excluded
ghc924:       Excluding single Inspection ID works
ghc924:       Excluding single file works
ghc924:       Excluding a directory works
ghc924:       Excluding inspection in a single file
ghc924:     applyCheck: Property Tests
ghc924:       Idempotence: applyChecks . applyChecks ≑ applyChecks
ghc924:       CheckType Inversion: include c . exclude c ≑ id
ghc924:     applyConfig tests
ghc924:       'applyConfig' with no removed files is the same as 'applyChecks'
ghc924:       Removes all files
ghc924:       Removes a single file
ghc924:       Removes all files from a directory
ghc924:       Removes 2 files
ghc924:       Removes all files when they are specified explicitly
ghc924: Observation
ghc924:   calculates Observation Id properly
ghc924: Static Analysis
ghc924:   Partial functions
ghc924:     STAN-0001: finds usage of 'base/GHC.List/head'
ghc924:     STAN-0002: finds usage of 'base/GHC.List/tail'
ghc924:     STAN-0003: finds usage of 'base/GHC.List/init'
ghc924:     STAN-0004: finds usage of 'base/GHC.List/last'
ghc924:     STAN-0005: finds usage of 'base/GHC.List/!!'
ghc924:     STAN-0006: finds usage of 'base/GHC.List/cycle'
ghc924:     STAN-0007: finds usage of 'base/Data.OldList/genericIndex'
ghc924:     STAN-0008: finds usage of 'base/Data.Maybe/fromJust'
ghc924:     STAN-0009: finds usage of 'base/Text.Read/read'
ghc924:     STAN-0010: finds usage of 'base/GHC.Enum/succ'
ghc924:     STAN-0011: finds usage of 'base/GHC.Enum/pred'
ghc924:     STAN-0012: finds usage of 'base/GHC.Enum/toEnum'
ghc924:     STAN-0013: finds usage of 'base/Data.Foldable/maximum' FAILED [1]
ghc924:     STAN-0014: finds usage of 'base/Data.Foldable/minimum' FAILED [2]
ghc924:     STAN-0015: finds usage of 'base/Data.Foldable/maximumBy' FAILED [3]
ghc924:     STAN-0016: finds usage of 'base/Data.Foldable/minimumBy' FAILED [4]
ghc924:     STAN-0017: finds usage of 'base/Data.Foldable/foldl1' FAILED [5]
ghc924:     STAN-0018: finds usage of 'base/GHC.List/foldl1''
ghc924:     STAN-0019: finds usage of 'base/Data.Foldable/foldr1' FAILED [6]
ghc924:     STAN-0020: finds usage of 'base/GHC.Exts/fromList' FAILED [7]
ghc924:     STAN-0021: finds usage of 'base/GHC.Num/fromInteger' FAILED [8]
ghc924:     STAN-0010: doesn't trigger on 'succ :: Natural -> Natural' FAILED [9]
ghc924:     STAN-0011: doesn't trigger on 'pred :: Integer -> Integer' FAILED [10]
ghc924:     STAN-0011: triggers on polymorphic 'pred :: Enum a => a -> a'
ghc924:     STAN-0020: triggers on 'Data.List.NonEmpty.fromList'
ghc924:   Infinite functions
ghc924:     STAN-0101: finds usage of 'base/GHC.List/reverse'
ghc924:     STAN-0102: finds usage of 'base/Data.OldList/isSuffixOf'
ghc924:     STAN-0103: finds usage of 'base/Data.Foldable/length' FAILED [11]
ghc924:     STAN-0104: finds usage of 'base/Data.OldList/genericLength'
ghc924:     STAN-0105: finds usage of 'base/Data.Foldable/sum' FAILED [12]
ghc924:     STAN-0106: finds usage of 'base/Data.Foldable/product' FAILED [13]
ghc924:     STAN-0103: finds usage of 'base/Data.Foldable/length'
ghc924:   Anti-patterns
ghc924:     STAN-0201: finds usage of '[0 .. length xs]'
ghc924:     STAN-0201: doesn't trigger on '[0 .. length xs - 1]'
ghc924:     STAN-0202: finds usage of 'foldl'
ghc924:     STAN-0203: finds usage of 'Data.ByteString.Char8.pack'
ghc924:     STAN-0204: finds usage of 'Data.HashMap.size'
ghc924:     STAN-0204: finds usage of 'length' for 'HashMap' FAILED [14]
ghc924:     STAN-0205: finds usage of 'Data.HashSet.size'
ghc924:     STAN-0205: finds usage of 'length' for 'HashSet' FAILED [15]
ghc924:     STAN-0206: Strict data type fields
ghc924:       Without extensions
ghc924:         Doesn't trigger on strict field
ghc924:         Finds simple lazy field
ghc924:         Finds polymorphic lazy field
ghc924:         Doesn't trigger on plain newtype
ghc924:         Doesn't trigger on a record newtype
ghc924:         Doesn't trigger on strict sum type field among many fields
ghc924:         Finds lazy field in a sum type constructor with multiple fields
ghc924:         Doesn't trigger on a single strict sum type field
ghc924:         Finds single lazy field in a sum type with multiple constructors
ghc924:         Doesn't trigger on forall wo constraint with 1 var
ghc924:         Finds single lazy field after forall wo constraint with 1 var
ghc924:         Doesn't trigger on forall wo constraint with 2 var
ghc924:         Finds single lazy field after forall wo constraint with 2 var
ghc924:         Doesn't trigger on strict field after forall wo constraint with 2 var
ghc924:         Doesn't trigger on forall constraint with 1 var
ghc924:         Finds single lazy field after forall constraint with 1 var
ghc924:         Doesn't trigger on forall constraint with 2 var
ghc924:         Finds single lazy field after forall constraint with 2 var
ghc924:         Doesn't trigger on strict field after forall constraint with 2 var
ghc924:         Doesn't trigger on forall constraint on record type
ghc924:         Findsa lazy Int field after forall constraint on record type
ghc924:         Finds a lazy constrainted field after forall on record type
ghc924:       With the 'StrictData' extension
ghc924:         Doesn't trigger on a simple record field
ghc924:         Doesn't trigger on explicitly lazy field
ghc924:         Doesn't trigger on plain data type
ghc924:     STAN-0207: 'length' for (,) FAILED [16]
ghc924:     STAN-0207: 'null' for Maybe FAILED [17]
ghc924:     STAN-0207: 'foldr' for Either FAILED [18]
ghc924:     STAN-0208: finds usage of 'length' for 'Text'
ghc924:     STAN-0209: finds usage of 'nub' for lists
ghc924:     STAN-0210: finds usage of 'for_' for ranges FAILED [19]
ghc924:     STAN-0210: finds usage of 'forM_' for ranges FAILED [20]
ghc924:     STAN-0211: finds usage of 'http://' '</>'
ghc924:     STAN-0211: finds usage of 'fooUrl' '</>'
ghc924:     STAN-0211: finds usage of '</>' 'fooUrl'
ghc924:     STAN-0211: doesn't trigger on 'fooUral' '</>'
ghc924:     STAN-0212: Unsafe functions
ghc924:       Find: undefined
ghc924:       Find: unsafeCoerce
ghc924:       Find: unsafePerformIO
ghc924:       Find: unsafeInterleaveIO
ghc924:       Find: unsafeDupablePerformIO
ghc924:       Find: unsafeFixIO
ghc924:     STAN-0212: Pattern Matching on _
ghc924:       for lambda case
ghc924:       not triggered for lambda case on integers
ghc924:       for case
ghc924:       not triggered for case on strings
ghc924:       not triggered for case on all constructors
ghc924:       not triggered for lambda case on all constructors
ghc924:       for case on maybe
ghc924:       for lambda case on maybe
ghc924:       not triggered for lambda case on maybe with full pm
ghc924:       not triggered for lambda case on one branch _
ghc924:       not triggered for lambda case on Chars
ghc924:     STAN-0214: Replace multiple comparison operators
ghc924:       Finds: < and >
ghc924:       Finds: == and <
ghc924:       No warning on: == on different expressions
ghc924:       No warning on: Single >=
ghc924:       No warning on: >= with different constants
ghc924:       Handles functions with pattern-matching
ghc924:         # PENDING: No reason given
ghc924:     STAN-0215: finds usage of '/' in '</>' path left
ghc924:     STAN-0215: finds usage of '/' in '</>' path right
ghc924:     STAN-0215: finds usage of '\' in '</>' path left
ghc924:     STAN-0215: finds usage of '\' in '</>' path right
ghc924:     STAN-0215: don't triggered when no slashes
ghc924:   Style
ghc924:     STAN-0301: finds operator with the missing infix
ghc924:     STAN-0301: no warning when fixity is declared
ghc924:     STAN-0302: triggers on tuple with 4 elements in the type signature
ghc924:     STAN-0302: triggers on tuple with 4 elements in the literal
ghc924:     STAN-0302: no observation on triple in type
ghc924:     STAN-0302: no observation on triple literal
ghc924:     STAN-0302: triggers on tuple with 4 elements as a record field
ghc924:   Used extensions
ghc924:     should correctly count total amount of used extensions
ghc924:     should correctly count total amount of used safe extensions
ghc924:   Ignores observations
ghc924:     ObservationId is present when not ignored 
ghc924:     ObservationId is properly ignored 
ghc924: 
ghc924: Failures:
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   1) Static Analysis, Partial functions, STAN-0013: finds usage of 'base/Data.Foldable/maximum'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0013-pnvTKA-52:15"}, observationInspectionId = Id {unId = "STAN-0013"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 52 15 22, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0013: finds usage of 'base/Data.Foldable/maximum'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   2) Static Analysis, Partial functions, STAN-0014: finds usage of 'base/Data.Foldable/minimum'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0014-pnvTKA-55:15"}, observationInspectionId = Id {unId = "STAN-0014"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 55 15 22, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0014: finds usage of 'base/Data.Foldable/minimum'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   3) Static Analysis, Partial functions, STAN-0015: finds usage of 'base/Data.Foldable/maximumBy'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0015-pnvTKA-58:17"}, observationInspectionId = Id {unId = "STAN-0015"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 58 17 26, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0015: finds usage of 'base/Data.Foldable/maximumBy'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   4) Static Analysis, Partial functions, STAN-0016: finds usage of 'base/Data.Foldable/minimumBy'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0016-pnvTKA-61:17"}, observationInspectionId = Id {unId = "STAN-0016"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 61 17 26, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0016: finds usage of 'base/Data.Foldable/minimumBy'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   5) Static Analysis, Partial functions, STAN-0017: finds usage of 'base/Data.Foldable/foldl1'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0017-pnvTKA-64:14"}, observationInspectionId = Id {unId = "STAN-0017"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 64 14 20, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0017: finds usage of 'base/Data.Foldable/foldl1'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   6) Static Analysis, Partial functions, STAN-0019: finds usage of 'base/Data.Foldable/foldr1'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0019-pnvTKA-70:14"}, observationInspectionId = Id {unId = "STAN-0019"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 70 14 20, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0019: finds usage of 'base/Data.Foldable/foldr1'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   7) Static Analysis, Partial functions, STAN-0020: finds usage of 'base/GHC.Exts/fromList'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0020-pnvTKA-73:16"}, observationInspectionId = Id {unId = "STAN-0020"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 73 16 24, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0020: finds usage of 'base/GHC.Exts/fromList'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   8) Static Analysis, Partial functions, STAN-0021: finds usage of 'base/GHC.Num/fromInteger'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0021-pnvTKA-76:19"}, observationInspectionId = Id {unId = "STAN-0021"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 76 19 30, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0021: finds usage of 'base/GHC.Num/fromInteger'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:109:29: 
ghc924:   9) Static Analysis, Partial functions, STAN-0010: doesn't trigger on 'succ :: Natural -> Natural'
ghc924:        expected: Nothing
ghc924:         but got: Just (Observation {observationId = Id {unId = "OBS-STAN-0010-pnvTKA-81:19"}, observationInspectionId = Id {unId = "STAN-0010"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 81 19 23, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = "{-# OPTIONS_GHC -fno-warn-missing-export-lists #-}\n\nmodule Target.Partial where\n\nimport Data.Foldable (maximumBy, minimumBy)\nimport Data.List (foldl1', genericIndex)\nimport Data.List.NonEmpty (NonEmpty)\nimport Data.Maybe (fromJust)\nimport GHC.Exts (fromList)\nimport Numeric.Natural (Natural)\n\nimport qualified Data.List.NonEmpty as NE\n\n\nstanHead :: [a] -> a\nstanHead = head\n\nstanTail :: [a] -> [a]\nstanTail = tail\n\nstanInit :: [a] -> [a]\nstanInit = init\n\nstanLast :: [a] -> a\nstanLast = last\n\nstanAt :: [a] -> a\nstanAt xs = xs !! 42\n\nstanCycle :: [a] -> [a]\nstanCycle = cycle\n\nstanGenericIndex :: [a] -> Int -> a\nstanGenericIndex = genericIndex\n\nstanFromJust :: Maybe Int -> Int\nstanFromJust = fromJust\n\nstanRead :: String -> Int\nstanRead = read\n\nstanSucc :: Int -> Int\nstanSucc = succ\n\nstanPred :: Natural -> Natural\nstanPred = pred\n\nstanToEnum :: Int -> Bool\nstanToEnum = toEnum\n\nstanMaximum :: [Int] -> Int\nstanMaximum = maximum\n\nstanMinimum :: Ord a => [a] -> a\nstanMinimum = minimum\n\nstanMaximumBy :: [Int] -> Int\nstanMaximumBy = maximumBy compare\n\nstanMinimumBy :: (a -> a -> Ordering) -> [a] -> a\nstanMinimumBy = minimumBy\n\nstanFoldl1 :: (a -> a -> a) -> [a] -> a\nstanFoldl1 = foldl1\n\nstanFoldl1' :: (a -> a -> a) -> [a] -> a\nstanFoldl1' = foldl1'\n\nstanFoldr1 :: (a -> a -> a) -> [a] -> a\nstanFoldr1 = foldr1\n\nstanFromList :: [x] -> NonEmpty x\nstanFromList = fromList\n\nstanFromInteger :: Integer -> Natural\nstanFromInteger = fromInteger\n\n-- Other tests\n\nstanSuccNatural :: Natural -> Natural\nstanSuccNatural = succ  -- no warning here\n\nstanPredInteger :: Integer -> Integer\nstanPredInteger = pred  -- no warning here\n\nstanPredPoly :: Enum a => a -> a\nstanPredPoly = pred\n\nstanFromListNE :: [x] -> NonEmpty x\nstanFromListNE = NE.fromList\n"})
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0010: doesn't trigger on 'succ :: Natural -> Natural'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:109:29: 
ghc924:   10) Static Analysis, Partial functions, STAN-0011: doesn't trigger on 'pred :: Integer -> Integer'
ghc924:        expected: Nothing
ghc924:         but got: Just (Observation {observationId = Id {unId = "OBS-STAN-0011-pnvTKA-84:19"}, observationInspectionId = Id {unId = "STAN-0011"}, observationSrcSpan = SrcSpanOneLine "target/Target/Partial.hs" 84 19 23, observationFile = "target/Target/Partial.hs", observationModuleName = ModuleName {unModuleName = "Target.Partial"}, observationFileContent = "{-# OPTIONS_GHC -fno-warn-missing-export-lists #-}\n\nmodule Target.Partial where\n\nimport Data.Foldable (maximumBy, minimumBy)\nimport Data.List (foldl1', genericIndex)\nimport Data.List.NonEmpty (NonEmpty)\nimport Data.Maybe (fromJust)\nimport GHC.Exts (fromList)\nimport Numeric.Natural (Natural)\n\nimport qualified Data.List.NonEmpty as NE\n\n\nstanHead :: [a] -> a\nstanHead = head\n\nstanTail :: [a] -> [a]\nstanTail = tail\n\nstanInit :: [a] -> [a]\nstanInit = init\n\nstanLast :: [a] -> a\nstanLast = last\n\nstanAt :: [a] -> a\nstanAt xs = xs !! 42\n\nstanCycle :: [a] -> [a]\nstanCycle = cycle\n\nstanGenericIndex :: [a] -> Int -> a\nstanGenericIndex = genericIndex\n\nstanFromJust :: Maybe Int -> Int\nstanFromJust = fromJust\n\nstanRead :: String -> Int\nstanRead = read\n\nstanSucc :: Int -> Int\nstanSucc = succ\n\nstanPred :: Natural -> Natural\nstanPred = pred\n\nstanToEnum :: Int -> Bool\nstanToEnum = toEnum\n\nstanMaximum :: [Int] -> Int\nstanMaximum = maximum\n\nstanMinimum :: Ord a => [a] -> a\nstanMinimum = minimum\n\nstanMaximumBy :: [Int] -> Int\nstanMaximumBy = maximumBy compare\n\nstanMinimumBy :: (a -> a -> Ordering) -> [a] -> a\nstanMinimumBy = minimumBy\n\nstanFoldl1 :: (a -> a -> a) -> [a] -> a\nstanFoldl1 = foldl1\n\nstanFoldl1' :: (a -> a -> a) -> [a] -> a\nstanFoldl1' = foldl1'\n\nstanFoldr1 :: (a -> a -> a) -> [a] -> a\nstanFoldr1 = foldr1\n\nstanFromList :: [x] -> NonEmpty x\nstanFromList = fromList\n\nstanFromInteger :: Integer -> Natural\nstanFromInteger = fromInteger\n\n-- Other tests\n\nstanSuccNatural :: Natural -> Natural\nstanSuccNatural = succ  -- no warning here\n\nstanPredInteger :: Integer -> Integer\nstanPredInteger = pred  -- no warning here\n\nstanPredPoly :: Enum a => a -> a\nstanPredPoly = pred\n\nstanFromListNE :: [x] -> NonEmpty x\nstanFromListNE = NE.fromList\n"})
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Partial functions/STAN-0011: doesn't trigger on 'pred :: Integer -> Integer'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   11) Static Analysis, Infinite functions, STAN-0103: finds usage of 'base/Data.Foldable/length'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0103-cpLcRq-17:14"}, observationInspectionId = Id {unId = "STAN-0103"}, observationSrcSpan = SrcSpanOneLine "target/Target/Infinite.hs" 17 14 20, observationFile = "target/Target/Infinite.hs", observationModuleName = ModuleName {unModuleName = "Target.Infinite"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Infinite functions/STAN-0103: finds usage of 'base/Data.Foldable/length'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   12) Static Analysis, Infinite functions, STAN-0105: finds usage of 'base/Data.Foldable/sum'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0105-cpLcRq-23:11"}, observationInspectionId = Id {unId = "STAN-0105"}, observationSrcSpan = SrcSpanOneLine "target/Target/Infinite.hs" 23 11 14, observationFile = "target/Target/Infinite.hs", observationModuleName = ModuleName {unModuleName = "Target.Infinite"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Infinite functions/STAN-0105: finds usage of 'base/Data.Foldable/sum'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   13) Static Analysis, Infinite functions, STAN-0106: finds usage of 'base/Data.Foldable/product'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0106-cpLcRq-26:15"}, observationInspectionId = Id {unId = "STAN-0106"}, observationSrcSpan = SrcSpanOneLine "target/Target/Infinite.hs" 26 15 22, observationFile = "target/Target/Infinite.hs", observationModuleName = ModuleName {unModuleName = "Target.Infinite"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Infinite functions/STAN-0106: finds usage of 'base/Data.Foldable/product'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   14) Static Analysis, Anti-patterns, STAN-0204: finds usage of 'length' for 'HashMap'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0204-wu5bTi-31:21"}, observationInspectionId = Id {unId = "STAN-0204"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 31 21 27, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0204: finds usage of 'length' for 'HashMap'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   15) Static Analysis, Anti-patterns, STAN-0205: finds usage of 'length' for 'HashSet'
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0205-wu5bTi-37:21"}, observationInspectionId = Id {unId = "STAN-0205"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 37 21 27, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0205: finds usage of 'length' for 'HashSet'/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   16) Static Analysis, Anti-patterns, STAN-0207: 'length' for (,)
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0207-wu5bTi-40:19"}, observationInspectionId = Id {unId = "STAN-0207"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 40 19 25, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0207: 'length' for (,)/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   17) Static Analysis, Anti-patterns, STAN-0207: 'null' for Maybe
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0207-wu5bTi-43:17"}, observationInspectionId = Id {unId = "STAN-0207"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 43 17 21, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0207: 'null' for Maybe/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   18) Static Analysis, Anti-patterns, STAN-0207: 'foldr' for Either
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0207-wu5bTi-46:19"}, observationInspectionId = Id {unId = "STAN-0207"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 46 19 24, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0207: 'foldr' for Either/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   19) Static Analysis, Anti-patterns, STAN-0210: finds usage of 'for_' for ranges
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0210-wu5bTi-55:12"}, observationInspectionId = Id {unId = "STAN-0210"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 55 12 35, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0210: finds usage of 'for_' for ranges/"
ghc924: 
ghc924:   test/Test/Stan/Analysis/Common.hs:63:29: 
ghc924:   20) Static Analysis, Anti-patterns, STAN-0210: finds usage of 'forM_' for ranges
ghc924:        expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0210-wu5bTi-58:15"}, observationInspectionId = Id {unId = "STAN-0210"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 58 15 29, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
ghc924:         but got: Nothing
ghc924: 
ghc924:   To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0210: finds usage of 'forM_' for ranges/"
ghc924: 
ghc924: Randomized with seed 196996997
ghc924: 
ghc924: Finished in 0.3127 seconds
ghc924: 137 examples, 20 failures, 1 pending

I can probably at least use this by skipping tests now.
Thanks!

@tomjaguarpaw
Copy link
Collaborator

The warnings are expected, the test failures are not. I will have a look. Possibly it's a difference between 9.2.1 (which I used) and 9.2.4 (which you used). If so, that's terrible, but I will try to fix it.

@danwdart
Copy link

danwdart commented Oct 1, 2022

It's possible that it's all related to -Weverything (almost) or -Werror based stuff? Thanks!

@tomjaguarpaw
Copy link
Collaborator

I can confirm my branch works on

  • 8.10.7, 9.0.1, 9.0.2, 9.2.1, 9.4.1, 9.4.2

I can confirm it is broken on

  • 9.2.4

I suspect we might just have to forbid stan on 9.2.4. 9.2.4's .hie output seems broken.

@danwdart
Copy link

danwdart commented Oct 1, 2022

How very strange. For now I'll skip, and upgrade to 9.4.2 when cabal's and others' deps support it.

Thanks for your effort!

@danwdart
Copy link

danwdart commented Nov 8, 2022

I see that this also updates to use clay 0.14, nice one! I'd be happy if the devs of this package merged your branch. I don't know if there're any more issues?

@tomjaguarpaw
Copy link
Collaborator

I don't recall any blocking issues. I think my branch is all that's required to get Stan up to 9.4. (The CPP is a bit hokey and could do with improvement though.)

@keithfancher
Copy link

I had to make some changes to the stack.yaml file to get it to build with stack + GHC 9.0.2 on your branch. A bit of a heavy-handed approach, probably not a "real" solution, but if anyone else is reading this and just trying to make it work:

$ git diff
diff --git a/stack.yaml b/stack.yaml
index f77cfed..e95aef2 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,10 +1,12 @@
-resolver: lts-18.18
+resolver: lts-19.33 # ghc 9.0.2
+
+allow-newer: true
 
 extra-deps:
 - colourista-0.1.0.1
 - dir-traverse-0.2.2.3
 - dlist-0.8.0.8
-- extensions-0.0.0.1
+- extensions-0.1.0.0
 - microaeson-0.1.0.0
 - optparse-applicative-0.15.1.0
 # When changing relude version, also change it in .github/workflows/ci.yml
@@ -13,3 +15,5 @@ extra-deps:
 - trial-0.0.0.0
 - trial-optparse-applicative-0.0.0.0
 - trial-tomland-0.0.0.0
+- tomland-1.3.3.2
+- validation-selective-0.1.0.2

Anyway: thank you for this update! Definitely subscribing to this issue. Would love to see this or something like it merged soon :D

@tomjaguarpaw
Copy link
Collaborator

Ah thanks. I don't use Stack so I didn't know about that. I can add it to my branch at some point, or feel free to submit a PR.

@keithfancher
Copy link

keithfancher commented Nov 29, 2022

Ah thanks. I don't use Stack so I didn't know about that. I can add it to my branch at some point, or feel free to submit a PR.

No worries! I honestly don't know if this is a good approach -- more of a temporary hack, really. Just thought I'd share in case it helps someone else.

The allow-newer flag that I enabled essentially ignores all the version constraints in the .cabal file, which was the only way I could get it to play nice with the versions in the given stackage LTS. And even with these changes, I couldn't get it building for GHC 8.10.7 or 9.2.5, only for 9.0.2 😬 (Luckily that was the version I needed.)

It's especially tricky since stan needs to be built with the same GHC version as a given project. I honestly don't know what the "right" solution is here. Maybe to just use cabal :)

(I'm pretty new to both haskell and stack, so... grain of salt and all that. I'm sure the stan maintainers can whip up a better solution.)

If I do get it working in a "real" way, though, I'll be happy to open a PR!

@uhbif19
Copy link

uhbif19 commented Jul 11, 2023

@tomjaguarpaw Great stuff with this branch. So, can you create PR or there are some other problems with it?

@tomjaguarpaw
Copy link
Collaborator

No problem as far as I know, although the version-dependent stuff should probably be done a different way. My attempt was an experiment which ended up quite ugly. I don't have the bandwidth to shepherd a PR for it myself right now but if someone else wants to they are welcome to.

@uhbif19
Copy link

uhbif19 commented Jul 11, 2023

@tomjaguarpaw You mean bunch of source-repository-package? Or there is something else?

@tomjaguarpaw
Copy link
Collaborator

No, I mean the way of choosing modules for different GHC versions.

@uhbif19
Copy link

uhbif19 commented Jul 12, 2023

What is wrong with it? Seems like typical GHC API changes hack to me :D

@chshersh @vrom911 If I fix source-repository-package with forks into using upstream, would you consider merging such PR?

@tomjaguarpaw
Copy link
Collaborator

What is wrong with it? Seems like typical GHC API changes hack to me :D

It might be fine. I think it's usually done a slightly different way, I'm not sure because I didn't check :)

@tomjaguarpaw
Copy link
Collaborator

By the way, some of the dependencies still don't build. (I updated the branch to take into account the ones that do.)

@tomjaguarpaw
Copy link
Collaborator

(--allow-newer seems to work fine though)

@uhbif19
Copy link

uhbif19 commented Jul 13, 2023

@tomjaguarpaw Yeah, trial seem to not update base.

@tomjaguarpaw
Copy link
Collaborator

Thanks to Hackage revisions made by @andreasabel the vendored dependencies are no longer required! My branch builds against Hackage.

@tomjaguarpaw
Copy link
Collaborator

Well, I think it's time to make my branch an actual PR: #506

@uhbif19
Copy link

uhbif19 commented Sep 3, 2023

Stan plugin was removed from HLS, so issue is not relevant to me anymore.

@tomjaguarpaw
Copy link
Collaborator

Supported up to 9.4: https://hackage.haskell.org/package/stan-0.1.0.0

@andreasabel
Copy link

I see you became co-maintainer here @tomjaguarpaw , that's very good news!
Are you co-maintainer for the whole kowainik-universe?

@tomjaguarpaw
Copy link
Collaborator

No, just stan, although I'm willing to co-maintain the universe if that's OK with Veronika.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI integgrations, deployments etc. ghc
Projects
None yet
Development

No branches or pull requests

9 participants