Drop alternative rules from dlint config (#10646)

We don’t have Alternative in daml-stdlib so these don’t make any sense.

changelog_begin
changelog_end
This commit is contained in:
Moritz Kiefer 2021-08-25 12:52:51 +02:00 committed by GitHub
parent 5204d3ce7a
commit fc9d35935a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,13 +410,9 @@
- warn: {lhs: flip traverse_, rhs: for_}
- warn: {lhs: flip for_, rhs: traverse_}
- warn: {lhs: foldr (*>) (pure ()), rhs: sequenceA_}
- warn: {lhs: foldr (<|>) empty, rhs: asum}
- warn: {lhs: liftA2 (flip ($)), rhs: (<**>)}
- warn: {lhs: Some <$> a <|> pure None, rhs: optional a}
- hint: {lhs: m >>= pure . f, rhs: f <$> m}
- hint: {lhs: pure . f =<< m, rhs: f <$> m}
- warn: {lhs: empty <|> x, rhs: x, name: "Alternative law, left identity"}
- warn: {lhs: x <|> empty, rhs: x, name: "Alternative law, right identity"}
# LIST COMP
@ -454,7 +450,6 @@
- warn: {lhs: None /= x , rhs: DA.Optional.isSome x}
- warn: {lhs: concatMap (optionalToList . f), rhs: DA.Optional.mapOptional f}
- warn: {lhs: concatMap optionalToList, rhs: catOptionals}
- warn: {lhs: optional n Some x, rhs: x DA.Functor.<|> n}
- warn: {lhs: if isNone x then y else fromSome x, rhs: fromOptional y x}
- warn: {lhs: if isSome x then fromSome x else y, rhs: fromOptional y x}
- warn: {lhs: isSome x && (fromSome x == y), rhs: x == Some y}