Skip to content

Commit 8c158c7

Browse files
committed
Extend the formatting to other folders
Exclude cabal-testsuite until we can exclude the faulty cabal files that fourmolu interpret (and on which it fails).
1 parent 7fe2a69 commit 8c158c7

File tree

776 files changed

+12293
-9965
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

776 files changed

+12293
-9965
lines changed

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
cabal-benchmarks/**/*.hs
2424
cabal-dev-scripts/**/*.hs
2525
cabal-install-solver/**/*.hs
26-
cabal-testsuite/**/*.hs
2726
solver-benchmarks/**/*.hs
2827
!Cabal-syntax/src/Distribution/Fields/Lexer.hs
2928
!Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
3029
!Cabal-syntax/src/Distribution/SPDX/LicenseId.hs
3130
!Cabal/src/Distribution/Simple/Build/Macros/Z.hs
3231
!Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs
32+
!cabal-testsuite
Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
{-# LANGUAGE CPP #-}
1+
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE FlexibleContexts #-}
3-
{-# LANGUAGE GADTs #-}
3+
{-# LANGUAGE GADTs #-}
44
{-# LANGUAGE TypeOperators #-}
5-
module Test.QuickCheck.GenericArbitrary (
6-
genericArbitrary,
7-
GArbitrary,
8-
) where
5+
6+
module Test.QuickCheck.GenericArbitrary
7+
( genericArbitrary
8+
, GArbitrary
9+
) where
910

1011
import GHC.Generics
1112
import Test.QuickCheck
@@ -19,31 +20,31 @@ genericArbitrary :: (Generic a, GArbitrary (Rep a)) => Gen a
1920
genericArbitrary = fmap to garbitrary
2021

2122
class GArbitrary f where
22-
garbitrary :: Gen (f ())
23+
garbitrary :: Gen (f ())
2324

2425
class GArbitrarySum f where
25-
garbitrarySum :: [Gen (f ())]
26+
garbitrarySum :: [Gen (f ())]
2627

2728
class GArbitraryProd f where
28-
garbitraryProd :: Gen (f ())
29+
garbitraryProd :: Gen (f ())
2930

3031
instance (GArbitrarySum f, i ~ D) => GArbitrary (M1 i c f) where
31-
garbitrary = fmap M1 (oneof garbitrarySum)
32+
garbitrary = fmap M1 (oneof garbitrarySum)
3233

3334
instance (GArbitraryProd f, i ~ C) => GArbitrarySum (M1 i c f) where
34-
garbitrarySum = [fmap M1 garbitraryProd]
35+
garbitrarySum = [fmap M1 garbitraryProd]
3536

3637
instance (GArbitrarySum f, GArbitrarySum g) => GArbitrarySum (f :+: g) where
37-
garbitrarySum = map (fmap L1) garbitrarySum ++ map (fmap R1) garbitrarySum
38+
garbitrarySum = map (fmap L1) garbitrarySum ++ map (fmap R1) garbitrarySum
3839

3940
instance (GArbitraryProd f, i ~ S) => GArbitraryProd (M1 i c f) where
40-
garbitraryProd = fmap M1 garbitraryProd
41+
garbitraryProd = fmap M1 garbitraryProd
4142

4243
instance GArbitraryProd U1 where
43-
garbitraryProd = pure U1
44+
garbitraryProd = pure U1
4445

4546
instance (GArbitraryProd f, GArbitraryProd g) => GArbitraryProd (f :*: g) where
46-
garbitraryProd = (:*:) <$> garbitraryProd <*> garbitraryProd
47+
garbitraryProd = (:*:) <$> garbitraryProd <*> garbitraryProd
4748

48-
instance (Arbitrary a) => GArbitraryProd (K1 i a) where
49-
garbitraryProd = fmap K1 arbitrary
49+
instance Arbitrary a => GArbitraryProd (K1 i a) where
50+
garbitraryProd = fmap K1 arbitrary

0 commit comments

Comments
 (0)