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

Enable Redundant ^. hint for HLint. #485

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
- ignore: {name: "Eta reduce"} # 1 hint
- ignore: {name: "Fuse foldr/map"} # 1 hint
- ignore: {name: "Move brackets to avoid $"} # 8 hints
- ignore: {name: "Redundant ^."} # 2 hints
- ignore: {name: "Use :"} # 2 hints
- ignore: {name: "Use <$"} # 1 hint
- ignore: {name: "Use <$>"} # 1 hint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ unknownFieldCase ::
loop (over unknownFields (\!t -> y:t) x) ...
-}
unknownFieldCase info loop x = match [wire] $ do' $
[ strictP y <-- if messageDescriptor info ^. #options ^. #messageSetWireFormat
[ strictP y <-- if messageDescriptor info ^. #options . #messageSetWireFormat
then var "Data.ProtoLens.Encoding.Wire.parseMessageSetTaggedValueFromWire" @@ wire
else var "Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire" @@ wire
]
Expand Down Expand Up @@ -458,7 +458,7 @@ generatedBuilder :: MessageInfo OccNameStr -> HsExpr'
generatedBuilder m =
lambda [x] $ foldMapExp $ map (buildPlainField x) (messageFields m)
++ map (buildOneofField x) (messageOneofFields m)
++ [if messageDescriptor m ^. #options ^. #messageSetWireFormat
++ [if messageDescriptor m ^. #options . #messageSetWireFormat
then buildUnknownMessageSet x else buildUnknown x]
++ buildGroupEnd
where
Expand Down
Loading