polysemy/polysemy-plugin/test/DoctestSpec.hs
Sandy Maguire ef5ff1749a
Don't emit ambiguous effect errors for genuine type errors (#149)
This PR changes the plugin so it will notice an insoluble constraint of the form Sem r a ~ Foo, and mark that r takes part in a genuine type error. The plugin will then provide a bogus evidence term for IfStuck (IndexOf r _) _ _, which prevents the AmbiguousSend error message from firing.
2019-07-04 09:35:33 -04:00

33 lines
613 B
Haskell

{-# LANGUAGE CPP #-}
module DoctestSpec where
import Test.Hspec
import Test.DocTest
spec :: Spec
spec = parallel $ describe "Error messages" $ it "should pass the doctest" $ doctest
[ "--fast"
, "-fobject-code"
, "-XDataKinds"
, "-XDeriveFunctor"
, "-XFlexibleContexts"
, "-XGADTs"
, "-XLambdaCase"
, "-XPolyKinds"
, "-XRankNTypes"
, "-XScopedTypeVariables"
, "-XStandaloneDeriving"
, "-XTypeApplications"
, "-XTypeFamilies"
, "-XTypeOperators"
, "-XUnicodeSyntax"
#if __GLASGOW_HASKELL__ < 806
, "-XMonadFailDesugaring"
, "-XTypeInType"
#endif
, "test/TypeErrors.hs"
]