-instance NamedThing (GenClass tyvar uvar) where
- getExportFlag (Class _ n _ _ _ _ _ _ _ _) = getExportFlag n
- isLocallyDefined (Class _ n _ _ _ _ _ _ _ _) = isLocallyDefined n
- getOrigName (Class _ n _ _ _ _ _ _ _ _) = getOrigName n
- getOccurrenceName (Class _ n _ _ _ _ _ _ _ _) = getOccurrenceName n
- getInformingModules (Class _ n _ _ _ _ _ _ _ _) = getInformingModules n
- getSrcLoc (Class _ n _ _ _ _ _ _ _ _) = getSrcLoc n
- fromPreludeCore (Class _ n _ _ _ _ _ _ _ _) = fromPreludeCore n
-
- getItsUnique (Class key _ _ _ _ _ _ _ _ _) = key
-\end{code}
-
-
-%************************************************************************
-%* *
-\subsection[ClassOp-basic]{@ClassOp@: type and basic functions}
-%* *
-%************************************************************************
-
-A @ClassOp@ represents a a class operation. From it and its parent
-class we can construct the dictionary-selector @Id@ for the
-operation/superclass dictionary, and the @Id@ for its default method.
-It appears in a list inside the @Class@ object.
-
-The type of a method in a @ClassOp@ object is its local type; that is,
-without the overloading of the class itself. For example, in the
-declaration
-\begin{pseudocode}
- class Foo a where
- op :: Ord b => a -> b -> a
-\end{pseudocode}
-the type recorded for @op@ in the @ClassOp@ list of the @Class@ object is
-just
- $\forall \beta.~
- @Ord@~\beta \Rightarrow
- \alpha \rightarrow \beta \rightarrow alpha$
-
-(where $\alpha$ is the class type variable recorded in the @Class@
-object). Of course, the type of @op@ recorded in the GVE will be its
-``full'' type
-
- $\forall \alpha \forall \beta.~
- @Foo@~\alpha \Rightarrow
- ~@Ord@~\beta \Rightarrow \alpha
- \rightarrow \beta \rightarrow alpha$
-
-******************************************************************
-**** That is, the type variables of a class op selector
-*** are all at the outer level.
-******************************************************************
-
-\begin{code}
-mkClassOp :: FAST_STRING -> Int -> ty -> GenClassOp ty
-mkClassOp name tag ty = ClassOp name tag ty