Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
ocharles committed Jul 7, 2023
1 parent cbb5e95 commit beacf44
Show file tree
Hide file tree
Showing 19 changed files with 578 additions and 538 deletions.
12 changes: 0 additions & 12 deletions nix/sources.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
{
"ch-hs-imports": {
"branch": "master",
"description": null,
"homepage": null,
"owner": "circuithub",
"repo": "ch-hs-imports",
"rev": "e3dc32bb2e945334261b6d72dc5c3df490cebc2b",
"sha256": "08z7hishpp1j7nxwhap4c0ggwhpm15i5swy91r96jh70ql20j3yi",
"type": "tarball",
"url": "https://github.com/circuithub/ch-hs-imports/archive/e3dc32bb2e945334261b6d72dc5c3df490cebc2b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"haskell.nix": {
"branch": "master",
"description": "Alternative Haskell Infrastructure for Nixpkgs",
Expand Down
6 changes: 2 additions & 4 deletions rel8.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ library
build-depends:
aeson
, base >=4.14 && <4.17 || ^>=4.17
, base-compat
, bifunctors
, bytestring
, case-insensitive
Expand All @@ -42,8 +41,8 @@ library
, transformers
, uuid
, vector
default-language:
Haskell2010

default-language: Haskell2010
ghc-options:
-Werror=missing-methods -Werror=incomplete-patterns
-Werror=missing-fields -Weverything -Wno-unsafe -Wno-safe
Expand Down Expand Up @@ -144,7 +143,6 @@ library
Rel8.Schema.Result
Rel8.Schema.Spec
Rel8.Schema.Table

Rel8.Statement
Rel8.Statement.Delete
Rel8.Statement.Insert
Expand Down
20 changes: 1 addition & 19 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
let
sources = import ./nix/sources.nix;

hsPkgs = import ./default.nix;

haskellNix = import sources."haskell.nix" { };
nixpkgsSrc = haskellNix.sources.nixpkgs-unstable;
nixpkgsArgs = haskellNix.nixpkgsArgs;
compiler-nix-name = "ghc943";

haskell-nix = (import nixpkgsSrc nixpkgsArgs).haskell-nix;

ch-hs-imports =
let
project = haskell-nix.project {
src = sources.ch-hs-imports;
inherit compiler-nix-name;
};
in
project.hsPkgs.ch-hs-imports.components.exes.ch-hs-imports;

pkgs = import sources.nixpkgs { overlays = [ ]; };
hsPkgs = import ./default.nix;
in
hsPkgs.shellFor {
withHoogle = false;
Expand Down
57 changes: 29 additions & 28 deletions src/Rel8.hs
Original file line number Diff line number Diff line change
Expand Up @@ -414,17 +414,19 @@ module Rel8 (
-- ** Bindings
rebind,

-- * Running statements
-- $running
, run
, run_
, runN
, run1
, runMaybe
, runVector
-- * IO
Serializable,
ToExprs,
Result,

-- * Running statements
-- $running
run,
run_,
runN,
run1,
runMaybe,
runVector,

-- ** @SELECT@
select,
Expand All @@ -447,13 +449,12 @@ module Rel8 (
update,
showUpdate,

-- ** @WITH@
, Statement
, showStatement
-- ** @.. RETURNING@
Returning (..),

-- ** @CREATE VIEW@
, createView
, createOrReplaceView
-- ** @WITH@
Statement,
showStatement,

-- ** @CREATE VIEW@
createView,
Expand Down Expand Up @@ -531,7 +532,6 @@ import Rel8.Statement.Insert
import Rel8.Statement.OnConflict
import Rel8.Statement.Returning
import Rel8.Statement.Run
import Rel8.Statement.Select
import Rel8.Statement.SQL
import Rel8.Statement.Select
import Rel8.Statement.Update
Expand Down Expand Up @@ -575,19 +575,20 @@ import Rel8.Type.Sum
import Rel8.Window


-- $running
-- To run queries and otherwise interact with a PostgreSQL database, Rel8
-- provides the @run@ functions. These produce a 'Hasql.Statement.Statement's
-- which can be passed to 'Hasql.Session.statement' to execute the statement
-- against a PostgreSQL 'Hasql.Connection.Connection'.
--
-- 'run' takes a 'Statement', which can be constructed using either 'select',
-- 'insert', 'update' or 'delete'. It decodes the rows returned by the
-- statement as a list of Haskell of values. See 'run_', 'runN', 'run1',
-- 'runMaybe' and 'runVector' for other variations.
--
-- Note that constructing an 'Insert', 'Update' or 'Delete' will require the
-- @DisambiguateRecordFields@ language extension to be enabled.
{- $running
To run queries and otherwise interact with a PostgreSQL database, Rel8
provides the @run@ functions. These produce a 'Hasql.Statement.Statement's
which can be passed to 'Hasql.Session.statement' to execute the statement
against a PostgreSQL 'Hasql.Connection.Connection'.
'run' takes a 'Statement', which can be constructed using either 'select',
'insert', 'update' or 'delete'. It decodes the rows returned by the
statement as a list of Haskell of values. See 'run_', 'runN', 'run1',
'runMaybe' and 'runVector' for other variations.
Note that constructing an 'Insert', 'Update' or 'Delete' will require the
@DisambiguateRecordFields@ language extension to be enabled.
-}


{- $adts
Expand Down
Loading

0 comments on commit beacf44

Please sign in to comment.