Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format with fourmolu
Browse files Browse the repository at this point in the history
arybczak committed Feb 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent c21cc23 commit 89ecf40
Showing 40 changed files with 6,543 additions and 2,575 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/fourmolu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Fourmolu
on: push
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell-actions/run-fourmolu@v10
with:
version: "0.15.0.0"
53 changes: 53 additions & 0 deletions fourmolu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Number of spaces per indentation step
indentation: 2

# Max line length for automatic line breaking
column-limit: none

# Styling of arrows in type signatures (choices: trailing, leading, or leading-args)
function-arrows: leading

# How to place commas in multi-line lists, records, etc. (choices: leading or trailing)
comma-style: leading

# Styling of import/export lists (choices: leading, trailing, or diff-friendly)
import-export-style: leading

# Whether to full-indent or half-indent 'where' bindings past the preceding body
indent-wheres: true

# Whether to leave a space before an opening record brace
record-brace-space: true

# Number of spaces between top-level declarations
newlines-between-decls: 1

# How to print Haddock comments (choices: single-line, multi-line, or multi-line-compact)
haddock-style: single-line

# How to print module docstring
haddock-style-module: null

# Styling of let blocks (choices: auto, inline, newline, or mixed)
let-style: inline

# How to align the 'in' keyword with respect to the 'let' keyword (choices: left-align, right-align, or no-space)
in-style: no-space

# Whether to put parentheses around a single constraint (choices: auto, always, or never)
single-constraint-parens: never

# Whether to put parentheses around a single deriving class (choices: auto, always, or never)
single-deriving-parens: always

# Output Unicode syntax (choices: detect, always, or never)
unicode: never

# Give the programmer more choice on where to insert blank lines
respectful: true

# Fixity information for operators
fixities: []

# Module reexports Fourmolu should know about
reexports: []
6 changes: 4 additions & 2 deletions hpqtypes.cabal
Original file line number Diff line number Diff line change
@@ -116,7 +116,7 @@ library

hs-source-dirs: src

ghc-options: -Wall
ghc-options: -Wall -Wprepositive-qualified-module

include-dirs: libpqtypes/src

@@ -152,6 +152,7 @@ library
, ForeignFunctionInterface
, GADTs
, GeneralizedNewtypeDeriving
, ImportQualifiedPost
, LambdaCase
, MultiParamTypeClasses
, MultiWayIf
@@ -170,7 +171,7 @@ library

test-suite hpqtypes-tests
type: exitcode-stdio-1.0
ghc-options: -Wall -threaded
ghc-options: -Wall -Wprepositive-qualified-module -threaded

hs-source-dirs: test
main-is: Main.hs
@@ -210,6 +211,7 @@ test-suite hpqtypes-tests
, ForeignFunctionInterface
, GADTs
, GeneralizedNewtypeDeriving
, ImportQualifiedPost
, LambdaCase
, MultiParamTypeClasses
, MultiWayIf
5 changes: 3 additions & 2 deletions src/Data/Monoid/Utils.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Data.Monoid.Utils (
mintercalate
module Data.Monoid.Utils
( mintercalate
, mspace
, smappend
, smconcat
@@ -28,4 +28,5 @@ smconcat = mintercalate mspace
-- | Infix version of 'smappend'.
(<+>) :: (IsString m, Monoid m) => m -> m -> m
(<+>) = smappend

infixr 6 <+>
52 changes: 28 additions & 24 deletions src/Database/PostgreSQL/PQTypes.hs
Original file line number Diff line number Diff line change
@@ -1,42 +1,47 @@
-- | Set of definitions exposed to the end user.
module Database.PostgreSQL.PQTypes (
-- Database.PostgreSQL.PQTypes.Internal.Connection
-- * Connection
module Database.PostgreSQL.PQTypes
( -- Database.PostgreSQL.PQTypes.Internal.Connection

-- * Connection
Connection
, ConnectionStats(..)
, ConnectionSettings(..)
, ConnectionStats (..)
, ConnectionSettings (..)
, defaultConnectionSettings
, ConnectionSourceM
, ConnectionSource(..)
, ConnectionSource (..)
, simpleSource
, poolSource
-- Database.PostgreSQL.PQTypes.Internal.Error
-- * Exceptions
, ErrorCode(..)
, DetailedQueryError(..)
, QueryError(..)
, HPQTypesError(..)
, LibPQError(..)
, ConversionError(..)
, ArrayItemError(..)
, InvalidValue(..)
, RangeError(..)
, ArrayDimensionMismatch(..)
, RowLengthMismatch(..)
, AffectedRowsMismatch(..)

-- * Exceptions
, ErrorCode (..)
, DetailedQueryError (..)
, QueryError (..)
, HPQTypesError (..)
, LibPQError (..)
, ConversionError (..)
, ArrayItemError (..)
, InvalidValue (..)
, RangeError (..)
, ArrayDimensionMismatch (..)
, RowLengthMismatch (..)
, AffectedRowsMismatch (..)
-- Database.PostgreSQL.PQTypes.Internal.Exception
, DBException(..)
, DBException (..)
-- Database.PostgreSQL.PQTypes.Internal.Monad
-- * Monad transformer

-- * Monad transformer
, DBT
, runDBT
, mapDBT
-- Database.PostgreSQL.PQTypes.Internal.QueryResult
-- * Query result

-- * Query result
, QueryResult
, ntuples
, nfields
-- * Other modules

-- * Other modules
, module Data.Functor.Identity
, module Database.PostgreSQL.PQTypes.Array
, module Database.PostgreSQL.PQTypes.Class
@@ -88,4 +93,3 @@ import Database.PostgreSQL.PQTypes.Transaction
import Database.PostgreSQL.PQTypes.Transaction.Settings
import Database.PostgreSQL.PQTypes.Utils
import Database.PostgreSQL.PQTypes.XML

Loading

0 comments on commit 89ecf40

Please sign in to comment.