projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added error checks & fixed bugs
[ghc-hetmet.git]
/
compiler
/
hsSyn
/
HsDecls.lhs
diff --git
a/compiler/hsSyn/HsDecls.lhs
b/compiler/hsSyn/HsDecls.lhs
index
54075d4
..
99d58ea
100644
(file)
--- a/
compiler/hsSyn/HsDecls.lhs
+++ b/
compiler/hsSyn/HsDecls.lhs
@@
-451,7
+451,9
@@
isKindSigDecl (TyData {tcdKindSig = Just _,
isKindSigDecl other = False
-- definition of an instance of an indexed type
isKindSigDecl other = False
-- definition of an instance of an indexed type
-isIdxTyDecl = isJust . tcdTyPats
+isIdxTyDecl tydecl
+ | isSynDecl tydecl || isDataDecl tydecl = isJust (tcdTyPats tydecl)
+ | otherwise = False
\end{code}
Dealing with names
\end{code}
Dealing with names
@@
-467,9
+469,7
@@
tyClDeclNames :: Eq name => TyClDecl name -> [Located name]
-- We use the equality to filter out duplicate field names
tyClDeclNames (TyFunction {tcdLName = name}) = [name]
-- We use the equality to filter out duplicate field names
tyClDeclNames (TyFunction {tcdLName = name}) = [name]
-tyClDeclNames (TySynonym {tcdLName = name,
- tcdTyPats= Nothing}) = [name]
-tyClDeclNames (TySynonym {} ) = [] -- type equation
+tyClDeclNames (TySynonym {tcdLName = name}) = [name]
tyClDeclNames (ForeignType {tcdLName = name}) = [name]
tyClDeclNames (ClassDecl {tcdLName = cls_name, tcdSigs = sigs, tcdATs = ats})
tyClDeclNames (ForeignType {tcdLName = name}) = [name]
tyClDeclNames (ClassDecl {tcdLName = cls_name, tcdSigs = sigs, tcdATs = ats})