Skip to content

Commit 16a4985

Browse files
committed
Use latest ormolu.
1 parent 0ad3688 commit 16a4985

Some content is hidden

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

120 files changed

+1375
-1246
lines changed

.github/workflows/verify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717

18-
- uses: mrkkrp/ormolu-action@v5
18+
- uses: mrkkrp/ormolu-action@v6
1919

2020
- uses: haskell/actions/setup@v1
2121
id: setup-haskell

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
- build: `cabal build -f dev`
44
- run tests: `cabal test -f dev`
5-
- format files: `find -name '*.hs' | xargs -t ormolu -m inplace`
5+
- format files: `ormolu --mode inplace $(git ls-files '*.hs')`

builder/src/AbsoluteSrcDir.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module AbsoluteSrcDir
66
)
77
where
88

9-
import qualified System.Directory as Dir
9+
import System.Directory qualified as Dir
1010
import System.FilePath ((</>))
1111

1212
newtype AbsoluteSrcDir

builder/src/BackgroundWriter.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ where
99

1010
import Control.Concurrent (forkIO)
1111
import Control.Concurrent.MVar (MVar, newEmptyMVar, newMVar, putMVar, takeMVar)
12-
import qualified Data.Binary as Binary
12+
import Data.Binary qualified as Binary
1313
import Data.Foldable (traverse_)
14-
import qualified File
14+
import File qualified
1515

1616
-- BACKGROUND WRITER
1717

builder/src/Build.hs

+38-37
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,48 @@ module Build
1717
)
1818
where
1919

20-
import qualified AST.Canonical as Can
21-
import qualified AST.Optimized as Opt
22-
import qualified AST.Source as Src
20+
import AST.Canonical qualified as Can
21+
import AST.Optimized qualified as Opt
22+
import AST.Source qualified as Src
2323
import AbsoluteSrcDir (AbsoluteSrcDir (..))
24-
import qualified AbsoluteSrcDir
25-
import qualified Compile
24+
import AbsoluteSrcDir qualified
25+
import Compile qualified
2626
import Control.Concurrent (forkIO)
2727
import Control.Concurrent.MVar
2828
import Control.Monad (filterM)
29-
import qualified Data.ByteString as B
30-
import qualified Data.Char as Char
31-
import qualified Data.Graph as Graph
32-
import qualified Data.List as List
29+
import Data.ByteString qualified as B
30+
import Data.Char qualified as Char
31+
import Data.Graph qualified as Graph
32+
import Data.List qualified as List
3333
import Data.Map.Strict ((!))
34-
import qualified Data.Map.Strict as Map
35-
import qualified Data.Map.Utils as Map
36-
import qualified Data.Maybe as Maybe
37-
import qualified Data.Name as Name
38-
import qualified Data.NonEmptyList as NE
39-
import qualified Data.OneOrMore as OneOrMore
40-
import qualified Data.Set as Set
41-
import qualified Directories as Dirs
42-
import qualified File
43-
import qualified Gren.Details as Details
44-
import qualified Gren.Docs as Docs
45-
import qualified Gren.Interface as I
46-
import qualified Gren.ModuleName as ModuleName
47-
import qualified Gren.Outline as Outline
48-
import qualified Gren.Package as Pkg
49-
import qualified Json.Encode as E
50-
import qualified Parse.Module as Parse
51-
import qualified Reporting
52-
import qualified Reporting.Annotation as A
53-
import qualified Reporting.Error as Error
54-
import qualified Reporting.Error.Docs as EDocs
55-
import qualified Reporting.Error.Import as Import
56-
import qualified Reporting.Error.Syntax as Syntax
57-
import qualified Reporting.Exit as Exit
58-
import qualified Reporting.Render.Type.Localizer as L
59-
import qualified System.Directory as Dir
34+
import Data.Map.Strict qualified as Map
35+
import Data.Map.Utils qualified as Map
36+
import Data.Maybe qualified as Maybe
37+
import Data.Name qualified as Name
38+
import Data.NonEmptyList qualified as NE
39+
import Data.OneOrMore qualified as OneOrMore
40+
import Data.Set qualified as Set
41+
import Directories qualified as Dirs
42+
import File qualified
43+
import Gren.Details qualified as Details
44+
import Gren.Docs qualified as Docs
45+
import Gren.Interface qualified as I
46+
import Gren.ModuleName qualified as ModuleName
47+
import Gren.Outline qualified as Outline
48+
import Gren.Package qualified as Pkg
49+
import Json.Encode qualified as E
50+
import Parse.Module qualified as Parse
51+
import Reporting qualified
52+
import Reporting.Annotation qualified as A
53+
import Reporting.Error qualified as Error
54+
import Reporting.Error.Docs qualified as EDocs
55+
import Reporting.Error.Import qualified as Import
56+
import Reporting.Error.Syntax qualified as Syntax
57+
import Reporting.Exit qualified as Exit
58+
import Reporting.Render.Type.Localizer qualified as L
59+
import System.Directory qualified as Dir
6060
import System.FilePath ((<.>), (</>))
61-
import qualified System.FilePath as FP
61+
import System.FilePath qualified as FP
6262

6363
-- ENVIRONMENT
6464

@@ -846,7 +846,8 @@ checkRoots infos =
846846
loc2 : _ -> Left (Exit.BP_MainPathDuplicate (_relative loc) (_relative loc2))
847847
in fmap (\_ -> fmap _location infos) $
848848
traverse (OneOrMore.destruct fromOneOrMore) $
849-
Map.fromListWith OneOrMore.more $ map toOneOrMore (NE.toList infos)
849+
Map.fromListWith OneOrMore.more $
850+
map toOneOrMore (NE.toList infos)
850851

851852
-- ROOT INFO
852853

builder/src/Deps/Diff.hs

+22-22
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ module Deps.Diff
1212
)
1313
where
1414

15-
import qualified BackgroundWriter as BW
16-
import qualified Build
15+
import BackgroundWriter qualified as BW
16+
import Build qualified
1717
import Control.Monad (zipWithM)
1818
import Data.Function (on)
19-
import qualified Data.List as List
20-
import qualified Data.Map as Map
21-
import qualified Data.Name as Name
22-
import qualified Data.NonEmptyList as NE
23-
import qualified Data.Set as Set
24-
import qualified Deps.Package as Package
25-
import qualified Directories as Dirs
26-
import qualified File
27-
import qualified Gren.Compiler.Type as Type
28-
import qualified Gren.Details as Details
29-
import qualified Gren.Docs as Docs
30-
import qualified Gren.Magnitude as M
31-
import qualified Gren.ModuleName as ModuleName
32-
import qualified Gren.Outline as Outline
33-
import qualified Gren.Package as Pkg
34-
import qualified Gren.Version as V
35-
import qualified Json.Decode as D
36-
import qualified Reporting
37-
import qualified Reporting.Exit as Exit
38-
import qualified Reporting.Task as Task
19+
import Data.List qualified as List
20+
import Data.Map qualified as Map
21+
import Data.Name qualified as Name
22+
import Data.NonEmptyList qualified as NE
23+
import Data.Set qualified as Set
24+
import Deps.Package qualified as Package
25+
import Directories qualified as Dirs
26+
import File qualified
27+
import Gren.Compiler.Type qualified as Type
28+
import Gren.Details qualified as Details
29+
import Gren.Docs qualified as Docs
30+
import Gren.Magnitude qualified as M
31+
import Gren.ModuleName qualified as ModuleName
32+
import Gren.Outline qualified as Outline
33+
import Gren.Package qualified as Pkg
34+
import Gren.Version qualified as V
35+
import Json.Decode qualified as D
36+
import Reporting qualified
37+
import Reporting.Exit qualified as Exit
38+
import Reporting.Task qualified as Task
3939
import System.FilePath ((</>))
4040

4141
-- CHANGES

builder/src/Deps/Package.hs

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ module Deps.Package
55
)
66
where
77

8-
import qualified Data.List as List
9-
import qualified Directories as Dirs
10-
import qualified Git
11-
import qualified Gren.Magnitude as M
12-
import qualified Gren.Package as Pkg
13-
import qualified Gren.Version as V
14-
import qualified System.Directory as Dir
8+
import Data.List qualified as List
9+
import Directories qualified as Dirs
10+
import Git qualified
11+
import Gren.Magnitude qualified as M
12+
import Gren.Package qualified as Pkg
13+
import Gren.Version qualified as V
14+
import System.Directory qualified as Dir
1515

1616
-- GET VERSIONS
1717

@@ -36,8 +36,8 @@ bumpPossibilities (latest, previous) =
3636
let allVersions = reverse (latest : previous)
3737
minorPoints = map last (List.groupBy sameMajor allVersions)
3838
patchPoints = map last (List.groupBy sameMinor allVersions)
39-
in (latest, V.bumpMajor latest, M.MAJOR) :
40-
map (\v -> (v, V.bumpMinor v, M.MINOR)) minorPoints
39+
in (latest, V.bumpMajor latest, M.MAJOR)
40+
: map (\v -> (v, V.bumpMinor v, M.MINOR)) minorPoints
4141
++ map (\v -> (v, V.bumpPatch v, M.PATCH)) patchPoints
4242

4343
sameMajor :: V.Version -> V.Version -> Bool

builder/src/Deps/Solver.hs

+10-10
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ where
1818

1919
import Control.Monad (foldM)
2020
import Data.Map ((!))
21-
import qualified Data.Map as Map
22-
import qualified Deps.Package as Package
23-
import qualified Directories as Dirs
24-
import qualified File
25-
import qualified Gren.Constraint as C
26-
import qualified Gren.Outline as Outline
27-
import qualified Gren.Package as Pkg
28-
import qualified Gren.Version as V
29-
import qualified Json.Decode as D
30-
import qualified Reporting.Exit as Exit
21+
import Data.Map qualified as Map
22+
import Deps.Package qualified as Package
23+
import Directories qualified as Dirs
24+
import File qualified
25+
import Gren.Constraint qualified as C
26+
import Gren.Outline qualified as Outline
27+
import Gren.Package qualified as Pkg
28+
import Gren.Version qualified as V
29+
import Json.Decode qualified as D
30+
import Reporting.Exit qualified as Exit
3131
import System.FilePath ((</>))
3232

3333
-- SOLVER

builder/src/Directories.hs

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ module Directories
2020
)
2121
where
2222

23-
import qualified Gren.ModuleName as ModuleName
24-
import qualified Gren.Package as Pkg
25-
import qualified Gren.Version as V
26-
import qualified System.Directory as Dir
27-
import qualified System.Environment as Env
28-
import qualified System.FileLock as Lock
23+
import Gren.ModuleName qualified as ModuleName
24+
import Gren.Package qualified as Pkg
25+
import Gren.Version qualified as V
26+
import System.Directory qualified as Dir
27+
import System.Environment qualified as Env
28+
import System.FileLock qualified as Lock
2929
import System.FilePath ((<.>), (</>))
30-
import qualified System.FilePath as FP
30+
import System.FilePath qualified as FP
3131

3232
-- PATHS
3333

builder/src/File.hs

+11-11
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ module File
1414
where
1515

1616
import Control.Exception (catch)
17-
import qualified Data.Binary as Binary
18-
import qualified Data.ByteString as BS
19-
import qualified Data.ByteString.Builder as B
20-
import qualified Data.ByteString.Internal as BS
21-
import qualified Data.Fixed as Fixed
22-
import qualified Data.Time.Clock as Time
23-
import qualified Data.Time.Clock.POSIX as Time
24-
import qualified Foreign.ForeignPtr as FPtr
17+
import Data.Binary qualified as Binary
18+
import Data.ByteString qualified as BS
19+
import Data.ByteString.Builder qualified as B
20+
import Data.ByteString.Internal qualified as BS
21+
import Data.Fixed qualified as Fixed
22+
import Data.Time.Clock qualified as Time
23+
import Data.Time.Clock.POSIX qualified as Time
24+
import Foreign.ForeignPtr qualified as FPtr
2525
import GHC.IO.Exception (IOErrorType (InvalidArgument), IOException)
26-
import qualified System.Directory as Dir
26+
import System.Directory qualified as Dir
2727
import System.FilePath ()
28-
import qualified System.FilePath as FP
29-
import qualified System.IO as IO
28+
import System.FilePath qualified as FP
29+
import System.IO qualified as IO
3030
import System.IO.Error (annotateIOError, ioeGetErrorType, modifyIOError)
3131

3232
-- TIME

builder/src/Generate.hs

+19-19
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ module Generate
88
)
99
where
1010

11-
import qualified AST.Optimized as Opt
12-
import qualified Build
11+
import AST.Optimized qualified as Opt
12+
import Build qualified
1313
import Control.Concurrent (MVar, forkIO, newEmptyMVar, newMVar, putMVar, readMVar)
1414
import Control.Monad (liftM2)
15-
import qualified Data.ByteString.Builder as B
15+
import Data.ByteString.Builder qualified as B
1616
import Data.Map ((!))
17-
import qualified Data.Map as Map
18-
import qualified Data.Maybe as Maybe
19-
import qualified Data.Name as N
20-
import qualified Data.NonEmptyList as NE
21-
import qualified Directories as Dirs
22-
import qualified File
23-
import qualified Generate.JavaScript as JS
24-
import qualified Generate.Mode as Mode
25-
import qualified Gren.Compiler.Type.Extract as Extract
26-
import qualified Gren.Details as Details
27-
import qualified Gren.Interface as I
28-
import qualified Gren.ModuleName as ModuleName
29-
import qualified Gren.Package as Pkg
30-
import qualified Nitpick.Debug as Nitpick
31-
import qualified Reporting.Exit as Exit
32-
import qualified Reporting.Task as Task
17+
import Data.Map qualified as Map
18+
import Data.Maybe qualified as Maybe
19+
import Data.Name qualified as N
20+
import Data.NonEmptyList qualified as NE
21+
import Directories qualified as Dirs
22+
import File qualified
23+
import Generate.JavaScript qualified as JS
24+
import Generate.Mode qualified as Mode
25+
import Gren.Compiler.Type.Extract qualified as Extract
26+
import Gren.Details qualified as Details
27+
import Gren.Interface qualified as I
28+
import Gren.ModuleName qualified as ModuleName
29+
import Gren.Package qualified as Pkg
30+
import Nitpick.Debug qualified as Nitpick
31+
import Reporting.Exit qualified as Exit
32+
import Reporting.Task qualified as Task
3333
import Prelude hiding (cycle, print)
3434

3535
-- NOTE: This is used by Make, Repl, and Reactor right now. But it may be

builder/src/Git.hs

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ module Git
1313
)
1414
where
1515

16-
import qualified Data.ByteString.Char8 as BS
17-
import qualified Data.Either as Either
18-
import qualified Data.List as List
19-
import qualified Gren.Package as Pkg
20-
import qualified Gren.Version as V
21-
import qualified Parse.Primitives as Parser
16+
import Data.ByteString.Char8 qualified as BS
17+
import Data.Either qualified as Either
18+
import Data.List qualified as List
19+
import Gren.Package qualified as Pkg
20+
import Gren.Version qualified as V
21+
import Parse.Primitives qualified as Parser
2222
import System.Directory (findExecutable)
23-
import qualified System.Exit as Exit
24-
import qualified System.IO as IO
25-
import qualified System.Process as Process
23+
import System.Exit qualified as Exit
24+
import System.IO qualified as IO
25+
import System.Process qualified as Process
2626

2727
data Error
2828
= MissingGit

0 commit comments

Comments
 (0)