Skip to content

Commit 8ce8043

Browse files
committed
Fixes type annotations satisfying multiple constraints
1 parent 36b98ce commit 8ce8043

File tree

1 file changed

+2
-1
lines changed
  • plugins/hls-refactor-plugin/src/Development/IDE/Plugin

1 file changed

+2
-1
lines changed

plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -835,11 +835,12 @@ suggestAddTypeAnnotationToSatisfyConstraints sourceOpt Diagnostic{_range=_range,
835835
where
836836
makeAnnotatedLit ty lit = "(" <> lit <> " :: " <> ty <> ")"
837837
#if MIN_VERSION_ghc(9,8,0)
838-
pat multiple _ _ _ = T.concat [ ".*Defaulting the type variable "
838+
pat multiple at _ _ = T.concat [ ".*Defaulting the type variable "
839839
, ".*to type ‘([^ ]+)’ "
840840
, "in the following constraint"
841841
, if multiple then "s" else " "
842842
, ".*arising from the literal ‘(.+)’"
843+
, if at then ".+at ([^ ]*)" else ""
843844
]
844845
#else
845846
#if MIN_VERSION_ghc(9,4,0)

0 commit comments

Comments
 (0)