Skip to content

Commit

Permalink
Change references to replicateM to replicateA in dlint rules; remove …
Browse files Browse the repository at this point in the history
…some Haskell-based rules that do not yet apply in DAML. (digital-asset#5933)

changelog_begin
dlint: Change references to replicateM to replicateA; remove some Haskell-based rules that do not currently apply in DAML.
changelog_end
  • Loading branch information
da-tanabe authored May 11, 2020
1 parent 1bd117b commit 60b2649
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions compiler/damlc/daml-ide-core/dlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,10 @@

# MONAD LIST

- warn: {lhs: fmap unzip (mapA f x), rhs: DA.Action.mapAndUnzipM f x}
- warn: {lhs: sequence (zipWith f x y), rhs: DA.Action.zipWithM f x y}
- warn: {lhs: sequence_ (zipWith f x y), rhs: DA.Action.zipWithM_ f x y}
- warn: {lhs: sequence (replicate n x), rhs: DA.Action.replicateM n x}
- warn: {lhs: sequence_ (replicate n x), rhs: DA.Action.replicateM_ n x}
- warn: {lhs: mapA f (replicate n x), rhs: DA.Action.replicateM n (f x)}
- warn: {lhs: mapA_ f (replicate n x), rhs: DA.Action.replicateM_ n (f x)}
- warn: {lhs: sequence (replicate n x), rhs: DA.Action.replicateA n x}
- warn: {lhs: sequence_ (replicate n x), rhs: DA.Action.replicateA_ n x}
- warn: {lhs: mapA f (replicate n x), rhs: DA.Action.replicateA n (f x)}
- warn: {lhs: mapA_ f (replicate n x), rhs: DA.Action.replicateA_ n (f x)}
- warn: {lhs: mapA f (map g x), rhs: mapA (f . g) x, name: Fuse mapA/map}
- warn: {lhs: mapA_ f (map g x), rhs: mapA_ (f . g) x, name: Fuse mapA_/map}
- warn: {lhs: traverse f (map g x), rhs: traverse (f . g) x, name: Fuse traverse/map}
Expand Down

0 comments on commit 60b2649

Please sign in to comment.