Commit cfea7450 authored by Ben Gamari's avatar Ben Gamari 🐢

template-haskell: Rip out FamFlavour

This was scheduled to happen for 8.2, it looks like it will actually
happen in 8.4.
parent 1acb922b
......@@ -137,8 +137,6 @@ templateHaskellNames = [
ruleVarName, typedRuleVarName,
-- FunDep
funDepName,
-- FamFlavour
typeFamName, dataFamName,
-- TySynEqn
tySynEqnName,
-- AnnTarget
......@@ -517,11 +515,6 @@ typedRuleVarName = libFun (fsLit ("typedRuleVar")) typedRuleVarIdKey
funDepName :: Name
funDepName = libFun (fsLit "funDep") funDepIdKey
-- data FamFlavour = ...
typeFamName, dataFamName :: Name
typeFamName = libFun (fsLit "typeFam") typeFamIdKey
dataFamName = libFun (fsLit "dataFam") dataFamIdKey
-- data TySynEqn = ...
tySynEqnName :: Name
tySynEqnName = libFun (fsLit "tySynEqn") tySynEqnIdKey
......@@ -1031,11 +1024,6 @@ interruptibleIdKey = mkPreludeMiscIdUnique 432
funDepIdKey :: Unique
funDepIdKey = mkPreludeMiscIdUnique 440
-- data FamFlavour = ...
typeFamIdKey, dataFamIdKey :: Unique
typeFamIdKey = mkPreludeMiscIdUnique 450
dataFamIdKey = mkPreludeMiscIdUnique 451
-- data TySynEqn = ...
tySynEqnIdKey :: Unique
tySynEqnIdKey = mkPreludeMiscIdUnique 460
......
......@@ -312,6 +312,10 @@ Template Haskell
``ForallC [PlainTV a, PlainTV b]``. Now, reifying ``MkT`` will give a type
headed by ``ForallC [PlainTV b, PlainTV a]``, as one would expect.
- ``Language.Haskell.TH.FamFlavour``, which was deprecated in GHC 8.2,
has been removed.
``ghc`` library
~~~~~~~~~~~~~~~
......
......@@ -44,7 +44,6 @@ instance Binary TH.Body
instance Binary TH.Match
instance Binary TH.Fixity
instance Binary TH.TySynEqn
instance Binary TH.FamFlavour
instance Binary TH.FunDep
instance Binary TH.AnnTarget
instance Binary TH.RuleBndr
......
......@@ -73,7 +73,7 @@ module Language.Haskell.TH(
SourceUnpackedness(..), SourceStrictness(..), DecidedStrictness(..),
Bang(..), Strict, Foreign(..), Callconv(..), Safety(..), Pragma(..),
Inline(..), RuleMatch(..), Phases(..), RuleBndr(..), AnnTarget(..),
FunDep(..), FamFlavour(..), TySynEqn(..), TypeFamilyHead(..),
FunDep(..), TySynEqn(..), TypeFamilyHead(..),
Fixity(..), FixityDirection(..), defaultFixity, maxPrecedence,
PatSynDir(..), PatSynArgs(..),
-- ** Expressions
......
......@@ -88,9 +88,8 @@ module Language.Haskell.TH.Lib (
roleAnnotD,
-- **** Type Family / Data Family
dataFamilyD, openTypeFamilyD, closedTypeFamilyD, dataInstD,
familyNoKindD, familyKindD, closedTypeFamilyNoKindD, closedTypeFamilyKindD,
newtypeInstD, tySynInstD,
typeFam, dataFam, tySynEqn, injectivityAnn, noSig, kindSig, tyVarSig,
tySynEqn, injectivityAnn, noSig, kindSig, tyVarSig,
-- **** Fixity
infixLD, infixRD, infixND,
......
......@@ -12,8 +12,6 @@
-- relegate as many changes as we can to just the Internal module, where it
-- is safe to break things.
{-# LANGUAGE CPP #-}
module Language.Haskell.TH.Lib.Internal where
import Language.Haskell.TH.Syntax hiding (Role, InjectivityAnn)
......@@ -529,45 +527,6 @@ closedTypeFamilyD tc tvs result injectivity eqns =
eqns1 <- sequenceA eqns
return (ClosedTypeFamilyD (TypeFamilyHead tc tvs1 result1 injectivity) eqns1)
-- These were deprecated in GHC 8.0 with a plan to remove them in 8.2. If you
-- remove this check please also:
-- 1. remove deprecated functions
-- 2. remove CPP language extension from top of this module
-- 3. remove the FamFlavour data type from Syntax module
-- 4. make sure that all references to FamFlavour are gone from DsMeta,
-- Convert, TcSplice (follows from 3)
#if __GLASGOW_HASKELL__ >= 804
#error Remove deprecated familyNoKindD, familyKindD, closedTypeFamilyNoKindD and closedTypeFamilyKindD
#endif
{-# DEPRECATED familyNoKindD, familyKindD
"This function will be removed in the next stable release. Use openTypeFamilyD/dataFamilyD instead." #-}
familyNoKindD :: FamFlavour -> Name -> [TyVarBndr] -> DecQ
familyNoKindD flav tc tvs =
case flav of
TypeFam -> return $ OpenTypeFamilyD (TypeFamilyHead tc tvs NoSig Nothing)
DataFam -> return $ DataFamilyD tc tvs Nothing
familyKindD :: FamFlavour -> Name -> [TyVarBndr] -> Kind -> DecQ
familyKindD flav tc tvs k =
case flav of
TypeFam ->
return $ OpenTypeFamilyD (TypeFamilyHead tc tvs (KindSig k) Nothing)
DataFam -> return $ DataFamilyD tc tvs (Just k)
{-# DEPRECATED closedTypeFamilyNoKindD, closedTypeFamilyKindD
"This function will be removed in the next stable release. Use closedTypeFamilyD instead." #-}
closedTypeFamilyNoKindD :: Name -> [TyVarBndr] -> [TySynEqnQ] -> DecQ
closedTypeFamilyNoKindD tc tvs eqns =
do eqns1 <- sequence eqns
return (ClosedTypeFamilyD (TypeFamilyHead tc tvs NoSig Nothing) eqns1)
closedTypeFamilyKindD :: Name -> [TyVarBndr] -> Kind -> [TySynEqnQ] -> DecQ
closedTypeFamilyKindD tc tvs kind eqns =
do eqns1 <- sequence eqns
return (ClosedTypeFamilyD (TypeFamilyHead tc tvs (KindSig kind) Nothing)
eqns1)
roleAnnotD :: Name -> [Role] -> DecQ
roleAnnotD name roles = return $ RoleAnnotD name roles
......@@ -873,13 +832,6 @@ interruptible = Interruptible
funDep :: [Name] -> [Name] -> FunDep
funDep = FunDep
-------------------------------------------------------------------------------
-- * FamFlavour
typeFam, dataFam :: FamFlavour
typeFam = TypeFam
dataFam = DataFam
-------------------------------------------------------------------------------
-- * RuleBndr
ruleVar :: Name -> RuleBndrQ
......
......@@ -465,11 +465,6 @@ instance Ppr FunDep where
ppr_list [] = empty
ppr_list xs = bar <+> commaSep xs
------------------------------
instance Ppr FamFlavour where
ppr DataFam = text "data"
ppr TypeFam = text "type"
------------------------------
instance Ppr FamilyResultSig where
ppr NoSig = empty
......
......@@ -1776,9 +1776,6 @@ data TySynEqn = TySynEqn [Type] Type
data FunDep = FunDep [Name] [Name]
deriving( Show, Eq, Ord, Data, Generic )
data FamFlavour = TypeFam | DataFam
deriving( Show, Eq, Ord, Data, Generic )
data Foreign = ImportF Callconv Safety String Name Type
| ExportF Callconv String Name Type
deriving( Show, Eq, Ord, Data, Generic )
......
......@@ -4,6 +4,9 @@
* Bundled with GHC *TBA*
* `Language.Haskell.TH.FamFlavour`, which was deprecated in 2.11,
has been removed.
* Add support for overloaded labels. Introduces `labelE :: String -> ExpQ`.
* Add `KindQ`, `TyVarBndrQ`, and `FamilyResultSigQ` aliases to
......@@ -19,9 +22,9 @@
* Add `MonadIO Q` instance
## 2.12.0.0 *TBA*
## 2.12.0.0 *July 2017*
* Bundled with GHC *TBA*
* Bundled with GHC 8.2.1
* Add support for pattern synonyms. This introduces one new constructor to
`Info` (`PatSynI`), two new constructors to `Dec` (`PatSynD` and
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment