Skip to content

Commit 49c234e

Browse files
committed
Fix the build with GHC 9.14.1
1 parent caaec78 commit 49c234e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Ormolu/Diff/ParseResult.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ diffHsModule = genericQuery
153153
epAnnEq :: EpAnn a -> b -> ParseResultDiff
154154
epAnnEq _ _ = Same
155155

156+
importDeclQualifiedStyleEq :: forall a. (Data a) => ImportDeclQualifiedStyle -> a -> ParseResultDiff
156157
importDeclQualifiedStyleEq = considerEqualVia' f
157158
where
158159
f QualifiedPre QualifiedPost = True

src/Ormolu/Printer/Meat/Declaration/Value.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,13 @@ adjustMatchGroupStyle ::
128128
MatchGroupStyle ->
129129
MatchGroupStyle
130130
adjustMatchGroupStyle m = \case
131-
Function _ -> (Function . mc_fun . m_ctxt) m
131+
Function _ | FunRhs {mc_fun = f} <- m_ctxt m -> Function f
132132
style -> style
133133

134134
matchStrictness :: Match id body -> SrcStrictness
135-
matchStrictness match =
136-
case m_ctxt match of
137-
FunRhs {mc_strictness = s} -> s
138-
_ -> NoSrcStrict
135+
matchStrictness = \case
136+
Match {m_ctxt = FunRhs {mc_strictness = s}} -> s
137+
_ -> NoSrcStrict
139138

140139
p_match ::
141140
-- | Style of the group

0 commit comments

Comments
 (0)