morphismtech / squeal

Squeal, a deep embedding of SQL in Haskell
352 stars 32 forks source link

GHC9 Doctest Problem Minimal Demonstration #311

Closed echatav closed 1 year ago

echatav commented 2 years ago

This is a minimized example of this doctest issue.

-- | `PGType` is the promoted datakind of PostgreSQL types.
--
-- >>> :set -XDataKinds
-- >>> :kind 'PGbool
-- 'PGbool :: PGType
data PGType
  = PGbool -- ^ logical Boolean (true/false)
  | PGint2 -- ^ signed two-byte integer
  | PGint4 -- ^ signed four-byte integer
  | PGint8 -- ^ signed eight-byte integer
  | PGnumeric -- ^ arbitrary precision numeric type
squeal-postgresql> test (suite: doctest)

src/Squeal/PostgreSQL/Type/Schema.hs:44: failure in expression `:kind 'PGbool'
expected: 'PGbool :: PGType
 but got: 
          ^
          <interactive>:1:1: error: Not in scope: data constructor ‘PGbool’

Examples: 2  Tried: 2  Errors: 0  Failures: 1

squeal-postgresql> Test suite doctest failed
Test suite failure for package squeal-postgresql-0.8.1.1
    doctest:  exited with: ExitFailure 1
Logs printed to console