[project @ 1998-04-07 07:51:07 by simonpj]
[ghc-hetmet.git] / ghc / compiler / hsSyn / HsDecls.lhs
index f466d59..f7889a4 100644 (file)
@@ -13,9 +13,7 @@ module HsDecls where
 
 -- friends:
 import HsBinds         ( HsBinds, MonoBinds, Sig, nullMonoBinds )
-import HsPragmas       ( DataPragmas, ClassPragmas,
-                         InstancePragmas, ClassOpPragmas
-                       )
+import HsPragmas       ( DataPragmas, ClassPragmas )
 import HsTypes
 import HsCore          ( UfExpr )
 import BasicTypes      ( Fixity, NewOrData(..) )
@@ -286,7 +284,7 @@ instance (NamedThing name, Outputable name, Outputable pat)
 
 %************************************************************************
 %*                                                                     *
-\subsection[InstDecl]{An instance declaration (also, @SpecInstSig@)}
+\subsection[InstDecl]{An instance declaration
 %*                                                                     *
 %************************************************************************
 
@@ -319,21 +317,6 @@ instance (NamedThing name, Outputable name, Outputable pat)
                 nest 4 (ppr binds) ]
 \end{code}
 
-A type for recording what instances the user wants to specialise;
-called a ``Sig'' because it's sort of like a ``type signature'' for an
-instance.
-\begin{code}
-data SpecInstSig name
-  = SpecInstSig  name              -- class
-                (HsType name)    -- type to specialise to
-                SrcLoc
-
-instance (NamedThing name, Outputable name)
-             => Outputable (SpecInstSig name) where
-
-    ppr (SpecInstSig clas ty _)
-      = hsep [text "{-# SPECIALIZE instance", ppr clas, ppr ty, text "#-}"]
-\end{code}
 
 %************************************************************************
 %*                                                                     *
@@ -382,7 +365,8 @@ data HsIdInfo name
   | HsUpdate           UpdateInfo
   | HsArgUsage         ArgUsageInfo
   | HsFBType           FBTypeInfo
-       -- ToDo: specialisations
+  | HsSpecialise       [HsTyVar name] [HsType name] (UfExpr name)
+
 
 data HsStrictnessInfo name
   = HsStrictnessInfo [Demand]