diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-03-03 10:03:18 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-03 10:03:31 -0500 |
commit | c02896abdb4cdbbec93a0a670f4d7f5dcc95cc25 (patch) | |
tree | eacd8c791a50e590d224fb0a977464f7d9fdc334 | |
parent | ca538b84e78b2b58161ca4c0910a65937c374b9c (diff) | |
download | haskell-c02896abdb4cdbbec93a0a670f4d7f5dcc95cc25.tar.gz |
Revert "Read COMPLETE sets from external packages"
This reverts commit 0d2f733050ff656b827351108d988e09abc363fc.
-rw-r--r-- | compiler/deSugar/Check.hs | 11 | ||||
-rw-r--r-- | compiler/deSugar/DsMonad.hs | 14 | ||||
-rw-r--r-- | compiler/iface/LoadIface.hs | 29 | ||||
-rw-r--r-- | compiler/iface/MkIface.hs | 3 | ||||
-rw-r--r-- | compiler/iface/TcIface.hs | 14 | ||||
-rw-r--r-- | compiler/iface/TcIface.hs-boot | 18 | ||||
-rw-r--r-- | compiler/main/HscTypes.hs | 101 | ||||
-rw-r--r-- | compiler/typecheck/TcBinds.hs | 10 | ||||
-rw-r--r-- | compiler/typecheck/TcRnTypes.hs | 14 | ||||
-rw-r--r-- | compiler/utils/Binary.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T13350/Makefile | 13 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T13350/T13350.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T13350/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T13350/boolean/Boolean.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T13350/boolean/Setup.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T13350/boolean/boolean.cabal | 7 |
16 files changed, 66 insertions, 192 deletions
diff --git a/compiler/deSugar/Check.hs b/compiler/deSugar/Check.hs index 792932df5a..4a8a18d77c 100644 --- a/compiler/deSugar/Check.hs +++ b/compiler/deSugar/Check.hs @@ -1097,12 +1097,11 @@ allCompleteMatches cl tys = do [(FromBuiltin, map RealDataCon (tyConDataCons (dataConTyCon dc)))] PatSynCon _ -> [] - pragmas <- case splitTyConApp_maybe (conLikeResTy cl tys) of - Just (tc, _) -> dsGetCompleteMatches tc - Nothing -> return [] - let fams cm = fmap (FromComplete,) $ - mapM dsLookupConLike (completeMatchConLikes cm) - from_pragma <- mapM fams pragmas + + from_pragma <- map ((FromComplete,) . completeMatch) <$> + case splitTyConApp_maybe (conLikeResTy cl tys) of + Just (tc, _) -> dsGetCompleteMatches tc + Nothing -> return [] let final_groups = fam ++ from_pragma tracePmD "allCompleteMatches" (ppr final_groups) diff --git a/compiler/deSugar/DsMonad.hs b/compiler/deSugar/DsMonad.hs index fcdf5821f1..4f68100111 100644 --- a/compiler/deSugar/DsMonad.hs +++ b/compiler/deSugar/DsMonad.hs @@ -23,8 +23,7 @@ module DsMonad ( newUnique, UniqSupply, newUniqueSupply, getGhcModeDs, dsGetFamInstEnvs, - dsLookupGlobal, dsLookupGlobalId, dsDPHBuiltin, dsLookupTyCon, - dsLookupDataCon, dsLookupConLike, + dsLookupGlobal, dsLookupGlobalId, dsDPHBuiltin, dsLookupTyCon, dsLookupDataCon, PArrBuiltin(..), dsLookupDPHRdrEnv, dsLookupDPHRdrEnv_maybe, @@ -68,7 +67,6 @@ import RdrName import HscTypes import Bag import DataCon -import ConLike import TyCon import PmExpr import Id @@ -545,10 +543,6 @@ dsLookupDataCon :: Name -> DsM DataCon dsLookupDataCon name = tyThingDataCon <$> dsLookupGlobal name -dsLookupConLike :: Name -> DsM ConLike -dsLookupConLike name - = tyThingConLike <$> dsLookupGlobal name - -- |Lookup a name exported by 'Data.Array.Parallel.Prim' or 'Data.Array.Parallel.Prim'. -- Panic if there isn't one, or if it is defined multiple times. dsLookupDPHRdrEnv :: OccName -> DsM Name @@ -625,12 +619,8 @@ dsGetMetaEnv = do { env <- getLclEnv; return (dsl_meta env) } -- | The @COMPLETE@ pragams provided by the user for a given `TyCon`. dsGetCompleteMatches :: TyCon -> DsM [CompleteMatch] dsGetCompleteMatches tc = do - eps <- getEps env <- getGblEnv - let lookup_completes ufm = lookupWithDefaultUFM ufm [] tc - eps_matches_list = lookup_completes $ eps_complete_matches eps - env_matches_list = lookup_completes $ ds_complete_matches env - return $ eps_matches_list ++ env_matches_list + return $ (lookupWithDefaultUFM (ds_complete_matches env) [] tc) dsLookupMetaEnv :: Name -> DsM (Maybe DsMetaVal) dsLookupMetaEnv name = do { env <- getLclEnv; return (lookupNameEnv (dsl_meta env) name) } diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs index a3f77614f9..0edf5d9794 100644 --- a/compiler/iface/LoadIface.hs +++ b/compiler/iface/LoadIface.hs @@ -33,8 +33,7 @@ module LoadIface ( #include "HsVersions.h" import {-# SOURCE #-} TcIface( tcIfaceDecl, tcIfaceRules, tcIfaceInst, - tcIfaceFamInst, tcIfaceVectInfo, - tcIfaceAnnotations, tcIfaceCompleteSigs ) + tcIfaceFamInst, tcIfaceVectInfo, tcIfaceAnnotations ) import DynFlags import IfaceSyn @@ -463,7 +462,6 @@ loadInterface doc_str mod from ; new_eps_rules <- tcIfaceRules ignore_prags (mi_rules iface) ; new_eps_anns <- tcIfaceAnnotations (mi_anns iface) ; new_eps_vect_info <- tcIfaceVectInfo mod (mkNameEnv new_eps_decls) (mi_vect_info iface) - ; new_eps_complete_sigs <- tcIfaceCompleteSigs (mi_complete_sigs iface) ; let { final_iface = iface { mi_decls = panic "No mi_decls in PIT", @@ -482,10 +480,6 @@ loadInterface doc_str mod from eps_PTE = addDeclsToPTE (eps_PTE eps) new_eps_decls, eps_rule_base = extendRuleBaseList (eps_rule_base eps) new_eps_rules, - eps_complete_matches - = extendCompleteMatchMap - (eps_complete_matches eps) - new_eps_complete_sigs, eps_inst_env = extendInstEnvList (eps_inst_env eps) new_eps_insts, eps_fam_inst_env = extendFamInstEnvList (eps_fam_inst_env eps) @@ -916,19 +910,18 @@ readIface wanted_mod file_path initExternalPackageState :: ExternalPackageState initExternalPackageState = EPS { - eps_is_boot = emptyUFM, - eps_PIT = emptyPackageIfaceTable, - eps_free_holes = emptyInstalledModuleEnv, - eps_PTE = emptyTypeEnv, - eps_inst_env = emptyInstEnv, - eps_fam_inst_env = emptyFamInstEnv, - eps_rule_base = mkRuleBase builtinRules, + eps_is_boot = emptyUFM, + eps_PIT = emptyPackageIfaceTable, + eps_free_holes = emptyInstalledModuleEnv, + eps_PTE = emptyTypeEnv, + eps_inst_env = emptyInstEnv, + eps_fam_inst_env = emptyFamInstEnv, + eps_rule_base = mkRuleBase builtinRules, -- Initialise the EPS rule pool with the built-in rules eps_mod_fam_inst_env - = emptyModuleEnv, - eps_vect_info = noVectInfo, - eps_complete_matches = emptyUFM, - eps_ann_env = emptyAnnEnv, + = emptyModuleEnv, + eps_vect_info = noVectInfo, + eps_ann_env = emptyAnnEnv, eps_stats = EpsStats { n_ifaces_in = 0, n_decls_in = 0, n_decls_out = 0 , n_insts_in = 0, n_insts_out = 0 , n_rules_in = length builtinRules, n_rules_out = 0 } diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs index a3418860b5..7974c983d1 100644 --- a/compiler/iface/MkIface.hs +++ b/compiler/iface/MkIface.hs @@ -1001,7 +1001,8 @@ mkOrphMap get_key decls -} mkIfaceCompleteSig :: CompleteMatch -> IfaceCompleteMatch -mkIfaceCompleteSig (CompleteMatch cls tc) = IfaceCompleteMatch cls tc +mkIfaceCompleteSig (CompleteMatch cls tc) = + IfaceCompleteMatch (map conLikeName cls) (tyConName tc) {- diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs index 2d30f52b8a..2a56392910 100644 --- a/compiler/iface/TcIface.hs +++ b/compiler/iface/TcIface.hs @@ -15,7 +15,7 @@ module TcIface ( typecheckIfacesForMerging, typecheckIfaceForInstantiate, tcIfaceDecl, tcIfaceInst, tcIfaceFamInst, tcIfaceRules, - tcIfaceVectInfo, tcIfaceAnnotations, tcIfaceCompleteSigs, + tcIfaceVectInfo, tcIfaceAnnotations, tcIfaceExpr, -- Desired by HERMIT (Trac #7683) tcIfaceGlobal ) where @@ -1096,7 +1096,9 @@ tcIfaceCompleteSigs :: [IfaceCompleteMatch] -> IfL [CompleteMatch] tcIfaceCompleteSigs = mapM tcIfaceCompleteSig tcIfaceCompleteSig :: IfaceCompleteMatch -> IfL CompleteMatch -tcIfaceCompleteSig (IfaceCompleteMatch ms t) = return (CompleteMatch ms t) +tcIfaceCompleteSig cm@(IfaceCompleteMatch ms t) = + forkM (text "COMPLETE" <+> ppr cm) $ + CompleteMatch <$> mapM tcIfaceConLike ms <*> tcIfaceTyConByName t {- ************************************************************************ @@ -1758,6 +1760,14 @@ tcIfaceDataCon name = do { thing <- tcIfaceGlobal name AConLike (RealDataCon dc) -> return dc _ -> pprPanic "tcIfaceExtDC" (ppr name$$ ppr thing) } +tcIfaceConLike :: Name -> IfL ConLike +tcIfaceConLike name = + do { thing <- tcIfaceGlobal name + ; case thing of + AConLike cl -> return cl + _ -> pprPanic "tcIfaceExtCL" (ppr name$$ ppr thing) } + + tcIfaceExtId :: Name -> IfL Id tcIfaceExtId name = do { thing <- tcIfaceGlobal name ; case thing of diff --git a/compiler/iface/TcIface.hs-boot b/compiler/iface/TcIface.hs-boot index 4a99114fc0..9c1b16b520 100644 --- a/compiler/iface/TcIface.hs-boot +++ b/compiler/iface/TcIface.hs-boot @@ -1,20 +1,18 @@ module TcIface where -import IfaceSyn ( IfaceDecl, IfaceClsInst, IfaceFamInst, IfaceRule, - IfaceAnnotation, IfaceCompleteMatch ) +import IfaceSyn ( IfaceDecl, IfaceClsInst, IfaceFamInst, IfaceRule, IfaceAnnotation ) import TyCoRep ( TyThing ) import TcRnTypes ( IfL ) import InstEnv ( ClsInst ) import FamInstEnv ( FamInst ) import CoreSyn ( CoreRule ) -import HscTypes ( TypeEnv, VectInfo, IfaceVectInfo, CompleteMatch ) +import HscTypes ( TypeEnv, VectInfo, IfaceVectInfo ) import Module ( Module ) import Annotations ( Annotation ) -tcIfaceDecl :: Bool -> IfaceDecl -> IfL TyThing -tcIfaceRules :: Bool -> [IfaceRule] -> IfL [CoreRule] -tcIfaceVectInfo :: Module -> TypeEnv -> IfaceVectInfo -> IfL VectInfo -tcIfaceInst :: IfaceClsInst -> IfL ClsInst -tcIfaceFamInst :: IfaceFamInst -> IfL FamInst -tcIfaceAnnotations :: [IfaceAnnotation] -> IfL [Annotation] -tcIfaceCompleteSigs :: [IfaceCompleteMatch] -> IfL [CompleteMatch] +tcIfaceDecl :: Bool -> IfaceDecl -> IfL TyThing +tcIfaceRules :: Bool -> [IfaceRule] -> IfL [CoreRule] +tcIfaceVectInfo :: Module -> TypeEnv -> IfaceVectInfo -> IfL VectInfo +tcIfaceInst :: IfaceClsInst -> IfL ClsInst +tcIfaceFamInst :: IfaceFamInst -> IfL FamInst +tcIfaceAnnotations :: [IfaceAnnotation] -> IfL [Annotation] diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs index 793839a510..6473512411 100644 --- a/compiler/main/HscTypes.hs +++ b/compiler/main/HscTypes.hs @@ -47,7 +47,6 @@ module HscTypes ( lookupIfaceByModule, emptyModIface, lookupHptByModule, PackageInstEnv, PackageFamInstEnv, PackageRuleBase, - PackageCompleteMatchMap, mkSOName, mkHsSOName, soExt, @@ -82,7 +81,7 @@ module HscTypes ( -- * TyThings and type environments TyThing(..), tyThingAvailInfo, - tyThingTyCon, tyThingDataCon, tyThingConLike, + tyThingTyCon, tyThingDataCon, tyThingId, tyThingCoAxiom, tyThingParent_maybe, tyThingsTyCoVars, implicitTyThings, implicitTyConThings, implicitClassThings, isImplicitTyThing, @@ -135,8 +134,7 @@ module HscTypes ( handleFlagWarnings, printOrThrowWarnings, -- * COMPLETE signature - CompleteMatch(..), CompleteMatchMap, - mkCompleteMatchMap, extendCompleteMatchMap + CompleteMatch(..) ) where #include "HsVersions.h" @@ -2091,12 +2089,6 @@ tyThingDataCon :: TyThing -> DataCon tyThingDataCon (AConLike (RealDataCon dc)) = dc tyThingDataCon other = pprPanic "tyThingDataCon" (ppr other) --- | Get the 'ConLike' from a 'TyThing' if it is a data constructor thing. --- Panics otherwise -tyThingConLike :: TyThing -> ConLike -tyThingConLike (AConLike dc) = dc -tyThingConLike other = pprPanic "tyThingConLike" (ppr other) - -- | Get the 'Id' from a 'TyThing' if it is a id *or* data constructor thing. Panics otherwise tyThingId :: TyThing -> Id tyThingId (AnId id) = id @@ -2435,13 +2427,12 @@ instance Binary Usage where ************************************************************************ -} -type PackageTypeEnv = TypeEnv -type PackageRuleBase = RuleBase -type PackageInstEnv = InstEnv -type PackageFamInstEnv = FamInstEnv -type PackageVectInfo = VectInfo -type PackageAnnEnv = AnnEnv -type PackageCompleteMatchMap = CompleteMatchMap +type PackageTypeEnv = TypeEnv +type PackageRuleBase = RuleBase +type PackageInstEnv = InstEnv +type PackageFamInstEnv = FamInstEnv +type PackageVectInfo = VectInfo +type PackageAnnEnv = AnnEnv -- | Information about other packages that we have slurped in by reading -- their interface files @@ -2505,9 +2496,6 @@ data ExternalPackageState -- from all the external-package modules eps_ann_env :: !PackageAnnEnv, -- ^ The total 'AnnEnv' accumulated -- from all the external-package modules - eps_complete_matches :: !PackageCompleteMatchMap, - -- ^ The total 'CompleteMatchMap' accumulated - -- from all the external-package modules eps_mod_fam_inst_env :: !(ModuleEnv FamInstEnv), -- ^ The family instances accumulated from external -- packages, keyed off the module that declared them @@ -3020,78 +3008,11 @@ byteCodeOfObject other = pprPanic "byteCodeOfObject" (ppr other) -- | A list of conlikes which represents a complete pattern match. -- These arise from @COMPLETE@ signatures. - --- See Note [Implementation of COMPLETE signatures] data CompleteMatch = CompleteMatch { - completeMatchConLikes :: [Name] - -- ^ The ConLikes that form a covering family - -- (e.g. Nothing, Just) - , completeMatchTyCon :: Name - -- ^ The TyCon that they cover (e.g. Maybe) + completeMatch :: [ConLike] + , completeMatchType :: TyCon } instance Outputable CompleteMatch where ppr (CompleteMatch cl ty) = text "CompleteMatch:" <+> ppr cl - <+> dcolon <+> ppr ty - --- | A map keyed by the 'completeMatchTyCon'. - --- See Note [Implementation of COMPLETE signatures] -type CompleteMatchMap = UniqFM [CompleteMatch] - -mkCompleteMatchMap :: [CompleteMatch] -> CompleteMatchMap -mkCompleteMatchMap = extendCompleteMatchMap emptyUFM - -extendCompleteMatchMap :: CompleteMatchMap -> [CompleteMatch] - -> CompleteMatchMap -extendCompleteMatchMap = foldl' insertMatch - where - insertMatch :: CompleteMatchMap -> CompleteMatch -> CompleteMatchMap - insertMatch ufm c@(CompleteMatch _ t) = addToUFM_C (++) ufm t [c] - -{- -Note [Implementation of COMPLETE signatures] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -A COMPLETE signature represents a set of conlikes (i.e., constructors or -pattern synonyms) such that if they are all pattern-matched against in a -function, it gives rise to a total function. An example is: - - newtype Boolean = Boolean Int - pattern F, T :: Boolean - pattern F = Boolean 0 - pattern T = Boolean 1 - {-# COMPLETE F, T #-} - - -- This is a total function - booleanToInt :: Boolean -> Int - booleanToInt F = 0 - booleanToInt T = 1 - -COMPLETE sets are represented internally in GHC with the CompleteMatch data -type. For example, {-# COMPLETE F, T #-} would be represented as: - - CompleteMatch { complateMatchConLikes = [F, T] - , completeMatchTyCon = Boolean } - -Note that GHC was able to infer the completeMatchTyCon (Boolean), but for the -cases in which it's ambiguous, you can also explicitly specify it in the source -language by writing this: - - {-# COMPLETE F, T :: Boolean #-} - -For efficiency purposes, GHC collects all of the CompleteMatches that it knows -about into a CompleteMatchMap, which is a map that is keyed by the -completeMatchTyCon. In other words, you could have a multiple COMPLETE sets -for the same TyCon: - - {-# COMPLETE F, T1 :: Boolean #-} - {-# COMPLETE F, T2 :: Boolean #-} - -And looking up the values in the CompleteMatchMap associated with Boolean -would give you [CompleteMatch [F, T1] Boolean, CompleteMatch [F, T2] Boolean]. -dsGetCompleteMatches in DsMeta accomplishes this lookup. - -Also see Note [Typechecking Complete Matches] in TcBinds for a more detailed -explanation for how GHC ensures that all the conlikes in a COMPLETE set are -consistent. --} + <+> dcolon <+> ppr ty diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs index 201da00504..bb20b43892 100644 --- a/compiler/typecheck/TcBinds.hs +++ b/compiler/typecheck/TcBinds.hs @@ -245,18 +245,12 @@ tcCompleteSigs sigs = (res, cls) <- checkCLTypes AcceptAny case res of AcceptAny -> failWithTc ambiguousError - Fixed _ tc -> return $ mkMatch cls tc + Fixed _ tc -> return $ CompleteMatch cls tc check_complete_match tc_name = do ty_con <- tcLookupLocatedTyCon tc_name (_, cls) <- checkCLTypes (Fixed Nothing ty_con) - return $ mkMatch cls ty_con - - mkMatch :: [ConLike] -> TyCon -> CompleteMatch - mkMatch cls ty_con = CompleteMatch { - completeMatchConLikes = map conLikeName cls, - completeMatchTyCon = tyConName ty_con - } + return $ CompleteMatch cls ty_con doOne _ = return Nothing ambiguousError :: SDoc diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs index 1adf16058a..8e526bc5b3 100644 --- a/compiler/typecheck/TcRnTypes.hs +++ b/compiler/typecheck/TcRnTypes.hs @@ -47,8 +47,7 @@ module TcRnTypes( -- Desugaring types DsM, DsLclEnv(..), DsGblEnv(..), PArrBuiltin(..), - DsMetaEnv, DsMetaVal(..), CompleteMatchMap, - mkCompleteMatchMap, extendCompleteMatchMap, + DsMetaEnv, DsMetaVal(..), CompleteMatchMap, mkCompleteMatchMap, -- Template Haskell ThStage(..), SpliceType(..), PendingStuff(..), @@ -175,6 +174,7 @@ import FastString import qualified GHC.LanguageExtensions as LangExt import Fingerprint import Util +import UniqFM ( emptyUFM, addToUFM_C, UniqFM ) import Control.Monad (ap, liftM, msum) #if __GLASGOW_HASKELL__ > 710 @@ -189,6 +189,8 @@ import Data.Typeable ( TypeRep ) import GHCi.Message import GHCi.RemoteTypes +import Data.List (foldl') + import qualified Language.Haskell.TH as TH -- | A 'NameShape' is a substitution on 'Name's that can be used @@ -382,6 +384,14 @@ data DsGblEnv -- Additional complete pattern matches } +type CompleteMatchMap = UniqFM [CompleteMatch] + +mkCompleteMatchMap :: [CompleteMatch] -> CompleteMatchMap +mkCompleteMatchMap cms = foldl' insertMatch emptyUFM cms + where + insertMatch :: CompleteMatchMap -> CompleteMatch -> CompleteMatchMap + insertMatch ufm c@(CompleteMatch _ t) = addToUFM_C (++) ufm t [c] + instance ContainsModule DsGblEnv where extractModule = ds_mod diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs index 9d385d23ea..a1ccee3ae7 100644 --- a/compiler/utils/Binary.hs +++ b/compiler/utils/Binary.hs @@ -674,6 +674,7 @@ instance Binary KindRep where put_ bh (KindRepFun a b) = putByte bh 3 >> put_ bh a >> put_ bh b put_ bh (KindRepTYPE r) = putByte bh 4 >> put_ bh r put_ bh (KindRepTypeLit sort r) = putByte bh 5 >> put_ bh sort >> put_ bh r + put_ _ _ = fail "Binary.putKindRep: impossible" get bh = do tag <- getByte bh diff --git a/testsuite/tests/patsyn/should_compile/T13350/Makefile b/testsuite/tests/patsyn/should_compile/T13350/Makefile deleted file mode 100644 index ffd584a2a3..0000000000 --- a/testsuite/tests/patsyn/should_compile/T13350/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk - -LOCAL_PKGCONF=local.package.conf - -T13350: - "$(GHC_PKG)" init $(LOCAL_PKGCONF) - cd boolean && "$(TEST_HC)" -v0 --make Setup.hs - cd boolean && ./Setup configure -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF) - cd boolean && ./Setup build -v0 - cd boolean && ./Setup register -v0 --inplace - "$(TEST_HC)" $(TEST_HC_OPTS) -c T13350.hs -package-db $(LOCAL_PKGCONF) diff --git a/testsuite/tests/patsyn/should_compile/T13350/T13350.hs b/testsuite/tests/patsyn/should_compile/T13350/T13350.hs deleted file mode 100644 index 986c4f2462..0000000000 --- a/testsuite/tests/patsyn/should_compile/T13350/T13350.hs +++ /dev/null @@ -1,8 +0,0 @@ -{-# OPTIONS_GHC -Wincomplete-patterns #-} -module T13350 where - -import Boolean - -booleanToInt :: Boolean -> Int -booleanToInt F = 0 -booleanToInt T = 1 diff --git a/testsuite/tests/patsyn/should_compile/T13350/all.T b/testsuite/tests/patsyn/should_compile/T13350/all.T deleted file mode 100644 index fa63e37c6f..0000000000 --- a/testsuite/tests/patsyn/should_compile/T13350/all.T +++ /dev/null @@ -1,4 +0,0 @@ -# Test that importing COMPLETE sets from external packages works - -test('T13350', extra_files(['T13350.hs', 'boolean']), run_command, - ['$MAKE -s --no-print-directory T13350']) diff --git a/testsuite/tests/patsyn/should_compile/T13350/boolean/Boolean.hs b/testsuite/tests/patsyn/should_compile/T13350/boolean/Boolean.hs deleted file mode 100644 index 181641dbad..0000000000 --- a/testsuite/tests/patsyn/should_compile/T13350/boolean/Boolean.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -module Boolean (Boolean, pattern F, pattern T) where - -newtype Boolean = Boolean Int - -pattern F, T :: Boolean -pattern F = Boolean 0 -pattern T = Boolean 1 -{-# COMPLETE F, T #-} diff --git a/testsuite/tests/patsyn/should_compile/T13350/boolean/Setup.hs b/testsuite/tests/patsyn/should_compile/T13350/boolean/Setup.hs deleted file mode 100644 index 9a994af677..0000000000 --- a/testsuite/tests/patsyn/should_compile/T13350/boolean/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/testsuite/tests/patsyn/should_compile/T13350/boolean/boolean.cabal b/testsuite/tests/patsyn/should_compile/T13350/boolean/boolean.cabal deleted file mode 100644 index 0e1f308ce6..0000000000 --- a/testsuite/tests/patsyn/should_compile/T13350/boolean/boolean.cabal +++ /dev/null @@ -1,7 +0,0 @@ -name: boolean -version: 1.0 -build-type: Simple - -library - build-depends: base - exposed-modules: Boolean |