diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2020-02-17 09:56:33 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-20 21:20:45 -0500 |
commit | 65b7256a88ae2bd878da5d026e4183cba6f6eedf (patch) | |
tree | feae01641c4fcbaa438dda9298d7d9ca2430eb85 /compiler/utils | |
parent | c8439fc789ff00cfdd453d2425d2146df69e0729 (diff) | |
download | haskell-65b7256a88ae2bd878da5d026e4183cba6f6eedf.tar.gz |
Use concatMap(M) instead of `concat . map` and the monadic variant
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/Digraph.hs | 2 | ||||
-rw-r--r-- | compiler/utils/GraphColor.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/utils/Digraph.hs b/compiler/utils/Digraph.hs index 49ded1b23f..e7c838508c 100644 --- a/compiler/utils/Digraph.hs +++ b/compiler/utils/Digraph.hs @@ -422,7 +422,7 @@ type IntGraph = G.Graph -- Data.Tree has flatten for Tree, but nothing for Forest preorderF :: Forest a -> [a] -preorderF ts = concat (map flatten ts) +preorderF ts = concatMap flatten ts {- ------------------------------------------------------------ diff --git a/compiler/utils/GraphColor.hs b/compiler/utils/GraphColor.hs index 9ab2ad22af..70c3f7a7b3 100644 --- a/compiler/utils/GraphColor.hs +++ b/compiler/utils/GraphColor.hs @@ -324,7 +324,7 @@ selectColor colors graph u -- the prefs of our neighbors colors_neighbor_prefs = mkUniqSet - $ concat $ map nodePreference nsConflicts + $ concatMap nodePreference nsConflicts -- colors that are still valid for us colors_ok_ex = minusUniqSet colors_avail (nodeExclusions node) |