tweag / ormolu

A formatter for Haskell source code
https://ormolu-live.tweag.io
Other
956 stars 83 forks source link

Fix Hackage extraction by reusing existing operator fixity parsers #958

Closed amesgen closed 1 year ago

amesgen commented 1 year ago

Before this PR, running ./extract-hackage-info.sh resulted in

extract-hackage-info: Data.Text.Array.new: size overflow
CallStack (from HasCallStack):
  error, called at src/Data/Text/Array.hs:82:20 in text-1.2.5.0-B336hruu8LkEc19BqHCzAw:Data.Text.Array

Presumably, this is due to hs-pcre2 (also see https://github.com/sjshuck/hs-pcre2/issues/34), and indeed, replacing it by megaparsec and the existing operator fixity parsers makes the error go away.

Also regenerated the database, statistics are here: https://gist.github.com/amesgen/7b9a98a9de06b47f8279a9932d667c52