Skip to content

Commit 9a839f4

Browse files
committed
Consistently format all LANGUAGE pragmas
A variety of formats of `LANGUAGE` pragmas are present in the code base. This seeks to apply a consistent approach to the format. `NoImplicitPrelude` is listed first, if present. Others are then listed alphabetically. Closing braces are aligned.
1 parent aa21f08 commit 9a839f4

File tree

116 files changed

+368
-304
lines changed

Some content is hidden

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

116 files changed

+368
-304
lines changed

Setup.hs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
2+
23
module Main (main) where
34

45
import Data.List ( nub, sortBy )

src/Control/Concurrent/Execute.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
22
{-# LANGUAGE DeriveDataTypeable #-}
33
{-# LANGUAGE RecordWildCards #-}
4+
45
-- Concurrent execution with dependencies. Types currently hard-coded for needs
56
-- of stack, but could be generalized easily.
67
module Control.Concurrent.Execute

src/Data/Attoparsec/Args.hs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
22
{-# LANGUAGE OverloadedStrings #-}
3+
34
-- | Parsing of stack command line arguments
45

56
module Data.Attoparsec.Args

src/Data/Attoparsec/Combinators.hs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2+
23
-- | More readable combinators for writing parsers.
34

45
module Data.Attoparsec.Combinators where

src/Data/Attoparsec/Interpreter.hs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
22
{-# LANGUAGE OverloadedStrings #-}
3+
34
{- | This module implements parsing of additional arguments embedded in a
45
comment when stack is invoked as a script interpreter
56

src/Data/Monoid/Map.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
{-# LANGUAGE DeriveGeneric #-}
1+
{-# LANGUAGE DeriveGeneric #-}
22
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
3+
34
module Data.Monoid.Map where
45

56
import qualified Data.Map as M

src/Network/HTTP/StackClient.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE OverloadedStrings #-}
32
{-# LANGUAGE LambdaCase #-}
3+
{-# LANGUAGE OverloadedStrings #-}
4+
45
-- |
56
-- Wrapper functions of 'Network.HTTP.Simple' and 'Network.HTTP.Client' to
67
-- add the 'User-Agent' HTTP request header to each request.

src/Options/Applicative/Builder/Extra.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{-# LANGUAGE CPP #-}
2-
{-# LANGUAGE NoImplicitPrelude #-}
3-
{-# LANGUAGE RecordWildCards #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE CPP #-}
3+
{-# LANGUAGE RecordWildCards #-}
44
{-# LANGUAGE ScopedTypeVariables #-}
55

66
-- | Extra functions for optparse-applicative.

src/Options/Applicative/Complicated.hs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2+
23
-- | Simple interface to complicated program arguments.
34
--
45
-- This is a "fork" of the @optparse-simple@ package that has some workarounds for

src/Path/CheckInstall.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE FlexibleContexts #-}
2+
{-# LANGUAGE FlexibleContexts #-}
33
{-# LANGUAGE OverloadedStrings #-}
44

55
module Path.CheckInstall where

src/Path/Extra.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE ViewPatterns #-}
2+
{-# LANGUAGE ViewPatterns #-}
33

44
-- | Extra Path utilities.
55

src/Path/Find.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE DataKinds #-}
2+
{-# LANGUAGE DataKinds #-}
33

44
-- | Finding files.
55

src/Stack/Build.hs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE ConstraintKinds #-}
3-
{-# LANGUAGE CPP #-}
4-
{-# LANGUAGE DeriveDataTypeable #-}
5-
{-# LANGUAGE FlexibleContexts #-}
6-
{-# LANGUAGE OverloadedStrings #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE ConstraintKinds #-}
3+
{-# LANGUAGE CPP #-}
4+
{-# LANGUAGE DeriveDataTypeable #-}
5+
{-# LANGUAGE FlexibleContexts #-}
6+
{-# LANGUAGE OverloadedStrings #-}
77
{-# LANGUAGE ScopedTypeVariables #-}
88

99
-- | Build the project.

src/Stack/Build/Cache.hs

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE MultiParamTypeClasses #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
32
{-# LANGUAGE ConstraintKinds #-}
4-
{-# LANGUAGE OverloadedStrings #-}
53
{-# LANGUAGE DataKinds #-}
6-
{-# LANGUAGE ScopedTypeVariables #-}
74
{-# LANGUAGE FlexibleContexts #-}
5+
{-# LANGUAGE MultiParamTypeClasses #-}
6+
{-# LANGUAGE OverloadedStrings #-}
7+
{-# LANGUAGE ScopedTypeVariables #-}
88

99
-- | Cache information about previous builds
1010
module Stack.Build.Cache
@@ -404,4 +404,3 @@ readPrecompiledCache loc copts buildHaddocks depIDs = do
404404
, pcSubLibs = mkAbs' <$> pcSubLibs pc0
405405
, pcExes = mkAbs' <$> pcExes pc0
406406
}
407-

src/Stack/Build/ConstructPlan.hs

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE ConstraintKinds #-}
3-
{-# LANGUAGE DeriveDataTypeable #-}
4-
{-# LANGUAGE DeriveGeneric #-}
5-
{-# LANGUAGE FlexibleContexts #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE ConstraintKinds #-}
3+
{-# LANGUAGE DeriveDataTypeable #-}
4+
{-# LANGUAGE DeriveGeneric #-}
5+
{-# LANGUAGE FlexibleContexts #-}
66
{-# LANGUAGE MultiParamTypeClasses #-}
7-
{-# LANGUAGE OverloadedStrings #-}
8-
{-# LANGUAGE ScopedTypeVariables #-}
9-
{-# LANGUAGE TupleSections #-}
10-
{-# LANGUAGE ViewPatterns #-}
7+
{-# LANGUAGE OverloadedStrings #-}
8+
{-# LANGUAGE ScopedTypeVariables #-}
9+
{-# LANGUAGE TupleSections #-}
10+
{-# LANGUAGE ViewPatterns #-}
11+
1112
-- | Construct a @Plan@ for how to build
1213
module Stack.Build.ConstructPlan
1314
( constructPlan

src/Stack/Build/Execute.hs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
22
{-# LANGUAGE ConstraintKinds #-}
33
{-# LANGUAGE CPP #-}
44
{-# LANGUAGE DataKinds #-}
55
{-# LANGUAGE FlexibleContexts #-}
66
{-# LANGUAGE MultiParamTypeClasses #-}
77
{-# LANGUAGE OverloadedStrings #-}
8+
{-# LANGUAGE RankNTypes #-}
89
{-# LANGUAGE RecordWildCards #-}
9-
{-# LANGUAGE TypeFamilies #-}
1010
{-# LANGUAGE ScopedTypeVariables #-}
11-
{-# LANGUAGE RankNTypes #-}
1211
{-# LANGUAGE TupleSections #-}
12+
{-# LANGUAGE TypeFamilies #-}
13+
1314
-- | Perform a build
1415
module Stack.Build.Execute
1516
( printPlan

src/Stack/Build/Haddock.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
22
{-# LANGUAGE ConstraintKinds #-}
33
{-# LANGUAGE FlexibleContexts #-}
44
{-# LANGUAGE MultiParamTypeClasses #-}

src/Stack/Build/Installed.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
22
{-# LANGUAGE ConstraintKinds #-}
33
{-# LANGUAGE FlexibleContexts #-}
44
{-# LANGUAGE MultiParamTypeClasses #-}
55
{-# LANGUAGE OverloadedStrings #-}
6+
67
-- Determine which packages are already installed
78
module Stack.Build.Installed
89
( InstalledMap

src/Stack/Build/Source.hs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE ConstraintKinds #-}
23
{-# LANGUAGE FlexibleContexts #-}
34
{-# LANGUAGE MultiParamTypeClasses #-}
45
{-# LANGUAGE OverloadedStrings #-}
56
{-# LANGUAGE RecordWildCards #-}
67
{-# LANGUAGE ScopedTypeVariables #-}
7-
{-# LANGUAGE ConstraintKinds #-}
8+
89
-- Load information on package sources
910
module Stack.Build.Source
1011
( projectLocalPackages

src/Stack/Build/Target.hs

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE DataKinds #-}
3-
{-# LANGUAGE GADTs #-}
4-
{-# LANGUAGE OverloadedStrings #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE DataKinds #-}
3+
{-# LANGUAGE GADTs #-}
4+
{-# LANGUAGE OverloadedStrings #-}
55
{-# LANGUAGE ScopedTypeVariables #-}
6-
{-# LANGUAGE TupleSections #-}
7-
{-# LANGUAGE ViewPatterns #-}
6+
{-# LANGUAGE TupleSections #-}
7+
{-# LANGUAGE ViewPatterns #-}
8+
89
-- | Parsing command line targets
910
--
1011
-- There are two relevant data sources for performing this parsing:

src/Stack/BuildPlan.hs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE ConstraintKinds #-}
3-
{-# LANGUAGE CPP #-}
4-
{-# LANGUAGE DataKinds #-}
5-
{-# LANGUAGE DeriveDataTypeable #-}
6-
{-# LANGUAGE FlexibleContexts #-}
7-
{-# LANGUAGE GADTs #-}
8-
{-# LANGUAGE OverloadedStrings #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE ConstraintKinds #-}
3+
{-# LANGUAGE CPP #-}
4+
{-# LANGUAGE DataKinds #-}
5+
{-# LANGUAGE DeriveDataTypeable #-}
6+
{-# LANGUAGE FlexibleContexts #-}
7+
{-# LANGUAGE GADTs #-}
8+
{-# LANGUAGE OverloadedStrings #-}
99
{-# LANGUAGE ScopedTypeVariables #-}
1010

1111
-- | Resolving a build plan for a set of packages in a given Stackage

src/Stack/Clean.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE ConstraintKinds #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE ConstraintKinds #-}
33
{-# LANGUAGE DeriveDataTypeable #-}
4-
{-# LANGUAGE FlexibleContexts #-}
5-
{-# LANGUAGE OverloadedStrings #-}
4+
{-# LANGUAGE FlexibleContexts #-}
5+
{-# LANGUAGE OverloadedStrings #-}
66

77
-- | Clean a project.
88
module Stack.Clean

src/Stack/Config.hs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE ConstraintKinds #-}
3-
{-# LANGUAGE DataKinds #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE ConstraintKinds #-}
3+
{-# LANGUAGE DataKinds #-}
4+
{-# LANGUAGE FlexibleContexts #-}
5+
{-# LANGUAGE LambdaCase #-}
6+
{-# LANGUAGE OverloadedStrings #-}
7+
{-# LANGUAGE RecordWildCards #-}
48
{-# LANGUAGE ScopedTypeVariables #-}
5-
{-# LANGUAGE FlexibleContexts #-}
6-
{-# LANGUAGE OverloadedStrings #-}
7-
{-# LANGUAGE RecordWildCards #-}
8-
{-# LANGUAGE TypeFamilies #-}
9-
{-# LANGUAGE LambdaCase #-}
9+
{-# LANGUAGE TypeFamilies #-}
1010

1111
-- | The general Stack configuration that starts everything off. This should
1212
-- be smart to falback if there is no stack.yaml, instead relying on

src/Stack/Config/Build.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE RecordWildCards #-}
2+
{-# LANGUAGE RecordWildCards #-}
33

44
-- | Build configuration
55
module Stack.Config.Build where

src/Stack/Config/Docker.hs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE OverloadedStrings #-}
3-
{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE DeriveDataTypeable #-}
3+
{-# LANGUAGE OverloadedStrings #-}
4+
{-# LANGUAGE RecordWildCards #-}
45

56
-- | Docker configuration
67
module Stack.Config.Docker where

src/Stack/Config/Nix.hs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE RecordWildCards, DeriveDataTypeable, OverloadedStrings #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE DeriveDataTypeable #-}
3+
{-# LANGUAGE OverloadedStrings #-}
4+
{-# LANGUAGE RecordWildCards #-}
35

46
-- | Nix configuration
57
module Stack.Config.Nix

src/Stack/ConfigCmd.hs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE ConstraintKinds #-}
3-
{-# LANGUAGE CPP #-}
4-
{-# LANGUAGE FlexibleContexts #-}
5-
{-# LANGUAGE OverloadedStrings #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE ConstraintKinds #-}
3+
{-# LANGUAGE CPP #-}
4+
{-# LANGUAGE FlexibleContexts #-}
5+
{-# LANGUAGE GADTs #-}
6+
{-# LANGUAGE OverloadedStrings #-}
67
{-# LANGUAGE ScopedTypeVariables #-}
7-
{-# LANGUAGE GADTs #-}
88

99
-- | Make changes to project or global configuration.
1010
module Stack.ConfigCmd

src/Stack/Constants.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE CPP #-}
33
{-# LANGUAGE OverloadedStrings #-}
4-
{-# LANGUAGE TemplateHaskell #-} -- keep TH usage here
4+
{-# LANGUAGE TemplateHaskell #-} -- keep TH usage here
55

66
-- | Constants used throughout the project.
77

src/Stack/Constants/Config.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE TemplateHaskell #-}
32
{-# LANGUAGE OverloadedStrings #-}
3+
{-# LANGUAGE TemplateHaskell #-}
4+
45
module Stack.Constants.Config
56
( distDirFromDir
67
, rootDistDirFromDir

src/Stack/Coverage.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
22
{-# LANGUAGE ConstraintKinds #-}
33
{-# LANGUAGE FlexibleContexts #-}
4+
{-# LANGUAGE FlexibleInstances #-}
45
{-# LANGUAGE MultiParamTypeClasses #-}
56
{-# LANGUAGE OverloadedStrings #-}
67
{-# LANGUAGE ScopedTypeVariables #-}
7-
{-# LANGUAGE FlexibleInstances #-}
88
{-# LANGUAGE TupleSections #-}
99

1010
-- | Generate HPC (Haskell Program Coverage) reports
@@ -50,7 +50,7 @@ newtype CoverageException = NonTestSuiteTarget PackageName deriving Typeable
5050

5151
instance Exception CoverageException
5252
instance Show CoverageException where
53-
show (NonTestSuiteTarget name) =
53+
show (NonTestSuiteTarget name) =
5454
"Can't specify anything except test-suites as hpc report targets (" ++
5555
packageNameString name ++
5656
" is used with a non test-suite target)"
@@ -245,7 +245,7 @@ generateHpcReportForTargets opts tixFiles targetNames = do
245245
CTest testName ->
246246
liftM (pkgPath </>) $ parseRelFile (T.unpack testName ++ "/" ++ T.unpack testName ++ ".tix")
247247
_ -> throwIO $ NonTestSuiteTarget name
248-
248+
249249
TargetAll PTProject -> do
250250
pkgPath <- hpcPkgPath name
251251
exists <- doesDirExist pkgPath

src/Stack/Docker.hs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE CPP #-}
3-
{-# LANGUAGE ConstraintKinds #-}
4-
{-# LANGUAGE FlexibleContexts #-}
5-
{-# LANGUAGE NamedFieldPuns #-}
6-
{-# LANGUAGE OverloadedStrings #-}
7-
{-# LANGUAGE RankNTypes #-}
8-
{-# LANGUAGE RecordWildCards #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE ConstraintKinds #-}
3+
{-# LANGUAGE CPP #-}
4+
{-# LANGUAGE FlexibleContexts #-}
5+
{-# LANGUAGE NamedFieldPuns #-}
6+
{-# LANGUAGE OverloadedStrings #-}
7+
{-# LANGUAGE RankNTypes #-}
8+
{-# LANGUAGE RecordWildCards #-}
99
{-# LANGUAGE ScopedTypeVariables #-}
1010

1111
-- | Run commands in Docker containers

src/Stack/Dot.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE ConstraintKinds #-}
3-
{-# LANGUAGE TupleSections #-}
4-
{-# LANGUAGE FlexibleContexts #-}
2+
{-# LANGUAGE ConstraintKinds #-}
3+
{-# LANGUAGE FlexibleContexts #-}
54
{-# LANGUAGE OverloadedStrings #-}
5+
{-# LANGUAGE TupleSections #-}
66

77
module Stack.Dot (dot
88
,listDependencies

0 commit comments

Comments
 (0)