mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 00:35:25 +03:00
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:
parent
5204d3ce7a
commit
fc9d35935a
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user