diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-11-11 23:37:02 +0000 |
---|---|---|
committer | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-11-11 23:40:11 +0000 |
commit | 360f5fec2eb430ac15145193d95120a5a6ca6812 (patch) | |
tree | 2a0ee0f568a9d7bb2126d5f7802bd15db3c869d1 | |
parent | 778c6adca2c995cd8a1b84394d4d5ca26b915dac (diff) | |
download | haskell-360f5fec2eb430ac15145193d95120a5a6ca6812.tar.gz |
Indent closing "#-}" to silence HLintwip/T21623
-rw-r--r-- | compiler/GHC/Data/List/Infinite.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/Data/List/Infinite.hs b/compiler/GHC/Data/List/Infinite.hs index 0dec54438f..9d5af5433d 100644 --- a/compiler/GHC/Data/List/Infinite.hs +++ b/compiler/GHC/Data/List/Infinite.hs @@ -38,7 +38,7 @@ tail (Inf _ as) = as {-# RULES "head/build" forall (g :: forall b . (a -> b -> b) -> b) . head (build g) = g \ x _ -> x -#-} + #-} instance Applicative Infinite where pure = repeat @@ -103,7 +103,7 @@ iterate f = go where go a = Inf a (go (f a)) {-# RULES "iterate" [~1] forall f a . iterate f a = build (\ c -> iterateFB c f a) "iterateFB" [1] iterateFB Inf = iterate -#-} + #-} iterateFB :: (a -> b -> b) -> (a -> a) -> a -> b iterateFB c f a = go a @@ -132,13 +132,13 @@ build g = g Inf "foldr/id" foldr Inf = id "foldr/cons/build" forall f a (g :: forall b . (a -> b -> b) -> b) . foldr f (Inf a (build g)) = f a (g f) -#-} + #-} {-# RULES "map" [~1] forall f (as :: Infinite a) . fmap f as = build \ c -> foldr (mapFB c f) as "mapFB" forall c f g . mapFB (mapFB c f) g = mapFB c (f . g) "mapFB/id" forall c . mapFB c (\ x -> x) = c -#-} + #-} mapFB :: (b -> c -> c) -> (a -> b) -> a -> c -> c mapFB c f = \ x ys -> c (f x) ys @@ -169,7 +169,7 @@ repeatFB c x = xs where xs = c x xs {-# RULES "repeat" [~1] forall a . repeat a = build \ c -> repeatFB c a "repeatFB" [1] repeatFB Inf = repeat -#-} + #-} {- Note [Fusion for `Infinite` lists] |