Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions postgresql-simple-named.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,14 @@ test-suite postgresql-simple-named-test
build-depends: postgresql-simple-named

ghc-options: -threaded -rtsopts -with-rtsopts=-N

test-suite postgresql-simple-named-doctest
import: common-options
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Doctest.hs

build-depends: doctest
, Glob

ghc-options: -threaded
2 changes: 1 addition & 1 deletion src/PgNamed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namesToRow names params = traverse magicLookup names
{- | Operator to create 'NamedParam's.

>>> "foo" =? (1 :: Int)
NamedParam {namedParamName = "foo", namedParamParam = 1}
NamedParam {namedParamName = "foo", namedParamParam = Plain "1"}

So it can be used in creating the list of the named arguments:

Expand Down
16 changes: 16 additions & 0 deletions test/Doctest.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module Main (main) where

import System.FilePath.Glob (glob)
import Test.DocTest (doctest)

main :: IO ()
main = do
sourceFiles <- glob "src/**/*.hs"
doctest
$ "-XConstraintKinds"
: "-XGeneralizedNewtypeDeriving"
: "-XLambdaCase"
: "-XOverloadedStrings"
: "-XRecordWildCards"
: "-XScopedTypeVariables"
: sourceFiles