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.1 #85

Merged
merged 5 commits into from
Mar 12, 2021
Merged

Support GHC 9.0.1 #85

merged 5 commits into from
Mar 12, 2021

Conversation

maoe
Copy link
Owner

@maoe maoe commented Feb 20, 2021

No description provided.

@maoe
Copy link
Owner Author

maoe commented Feb 28, 2021

A new version of doctest has been uploaded. Two doctests are failing due to a GHC panic:

/Users/maoe/src/github.com/maoe/influxdb-haskell/src/Database/InfluxDB.hs:200: failure in expression `:{
data CPUUsage = CPUUsage
  { time :: UTCTime
  , cpuIdle, cpuSystem, cpuUser :: Double
  } deriving Show
instance QueryResults CPUUsage where
  parseMeasurement prec _name _tags columns fields = do
    time <- getField "time" columns fields >>= parseUTCTime prec
    cpuIdle <- getField "idle" columns fields >>= parseJSON
    cpuSystem <- getField "system" columns fields >>= parseJSON
    cpuUser <- getField "user" columns fields >>= parseJSON
    return CPUUsage {..}
:}'
expected:
 but got: ghc: panic! (the 'impossible' happened)
          ^
            (GHC version 9.0.1:
          \tlinkSomeBCOs: no break array

          Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug


/Users/maoe/src/github.com/maoe/influxdb-haskell/src/Database/InfluxDB/Query.hs:93: failure in expression `:{
 data H2OFeet = H2OFeet
   { time :: UTCTime
   , levelDesc :: T.Text
   , location :: T.Text
   , waterLevel :: Double
   }
 instance QueryResults H2OFeet where
   parseMeasurement prec _name _tags columns fields = do
     time <- getField "time" columns fields >>= parseUTCTime prec
     levelDesc <- getField "level_description" columns fields >>= parseJSON
     location <- getField "location" columns fields >>= parseJSON
     waterLevel <- getField "water_level" columns fields >>= parseJSON
     return H2OFeet {..}
:}'
expected:
 but got: ghc: panic! (the 'impossible' happened)
          ^
            (GHC version 9.0.1:
          \tlinkSomeBCOs: no break array

          Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

@maoe
Copy link
Owner Author

maoe commented Feb 28, 2021

Minimized the repro code and filed an issue upstream: https://gitlab.haskell.org/ghc/ghc/-/issues/19460

@maoe maoe mentioned this pull request Feb 28, 2021
GHC 9.0.1 has an issue with the interpreter:

  https://gitlab.haskell.org/ghc/ghc/-/issues/19460

This patch works around the issue by using the -fobject-code option.
@maoe maoe force-pushed the feature/ghc-9.0.1 branch 5 times, most recently from 7e3c246 to 4fb7e6e Compare March 4, 2021 14:09
@maoe maoe force-pushed the feature/ghc-9.0.1 branch 2 times, most recently from c81f724 to 4a7cad3 Compare March 12, 2021 13:29
@maoe maoe marked this pull request as ready for review March 12, 2021 13:47
@maoe maoe merged commit e38fd37 into develop Mar 12, 2021
@maoe maoe deleted the feature/ghc-9.0.1 branch March 12, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant