2019-06-20 00:25:37 +03:00
|
|
|
{-# LANGUAGE CPP #-}
|
|
|
|
|
2019-06-16 03:04:11 +03:00
|
|
|
module DoctestSpec where
|
|
|
|
|
|
|
|
import Test.Hspec
|
2019-06-20 00:25:37 +03:00
|
|
|
import Test.DocTest
|
2019-06-16 03:04:11 +03:00
|
|
|
|
|
|
|
spec :: Spec
|
|
|
|
spec = parallel $ describe "Error messages" $ it "should pass the doctest" $ doctest
|
|
|
|
[ "-isrc/"
|
|
|
|
, "--fast"
|
|
|
|
, "-XDataKinds"
|
|
|
|
, "-XDeriveFunctor"
|
|
|
|
, "-XFlexibleContexts"
|
|
|
|
, "-XGADTs"
|
|
|
|
, "-XLambdaCase"
|
|
|
|
, "-XPolyKinds"
|
|
|
|
, "-XRankNTypes"
|
|
|
|
, "-XScopedTypeVariables"
|
|
|
|
, "-XStandaloneDeriving"
|
|
|
|
, "-XTypeApplications"
|
|
|
|
, "-XTypeFamilies"
|
2019-06-20 00:25:37 +03:00
|
|
|
, "-XTypeOperators"
|
2019-06-16 03:04:11 +03:00
|
|
|
, "-XUnicodeSyntax"
|
|
|
|
|
2019-06-20 00:25:37 +03:00
|
|
|
#if __GLASGOW_HASKELL__ < 806
|
|
|
|
, "-XMonadFailDesugaring"
|
|
|
|
, "-XTypeInType"
|
|
|
|
#endif
|
|
|
|
|
2019-06-18 19:36:38 +03:00
|
|
|
, "test/TypeErrors.hs"
|
2019-06-16 03:04:11 +03:00
|
|
|
|
|
|
|
-- Modules that are explicitly imported for this test must be listed here
|
|
|
|
, "src/Polysemy.hs"
|
|
|
|
, "src/Polysemy/Output.hs"
|
|
|
|
, "src/Polysemy/Reader.hs"
|
|
|
|
, "src/Polysemy/Resource.hs"
|
|
|
|
, "src/Polysemy/State.hs"
|
|
|
|
, "src/Polysemy/Trace.hs"
|
|
|
|
]
|