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

Use -fno-show-error-context from GHC 9.8 #4295

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Fixes type annotations satisfying multiple constraints
  • Loading branch information
dsaenztagarro committed Jun 30, 2024
commit 8ce8043410a2a9caeb882f68cc2646940ecb66a8
Original file line number Diff line number Diff line change
Expand Up @@ -835,11 +835,12 @@ suggestAddTypeAnnotationToSatisfyConstraints sourceOpt Diagnostic{_range=_range,
where
makeAnnotatedLit ty lit = "(" <> lit <> " :: " <> ty <> ")"
#if MIN_VERSION_ghc(9,8,0)
pat multiple _ _ _ = T.concat [ ".*Defaulting the type variable "
pat multiple at _ _ = T.concat [ ".*Defaulting the type variable "
, ".*to type ‘([^ ]+)’ "
, "in the following constraint"
, if multiple then "s" else " "
, ".*arising from the literal ‘(.+)’"
, if at then ".+at ([^ ]*)" else ""
]
#else
#if MIN_VERSION_ghc(9,4,0)
Expand Down