mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-12-12 13:06:18 +03:00
ef5ff1749a
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.
33 lines
613 B
Haskell
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"
|
|
]
|