summaryrefslogtreecommitdiff
path: root/compiler/types/Type.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/types/Type.lhs')
-rw-r--r--compiler/types/Type.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/types/Type.lhs b/compiler/types/Type.lhs
index 8cad95e568..01ec26cae5 100644
--- a/compiler/types/Type.lhs
+++ b/compiler/types/Type.lhs
@@ -662,9 +662,9 @@ repType ty
-- | All type constructors occurring in the type; looking through type
-- synonyms, but not newtypes.
-- When it finds a Class, it returns the class TyCon.
-tyConsOfType :: Type -> [TyCon]
+tyConsOfType :: Type -> NameEnv TyCon
tyConsOfType ty
- = nameEnvElts (go ty)
+ = go ty
where
go :: Type -> NameEnv TyCon -- The NameEnv does duplicate elim
go ty | Just ty' <- tcView ty = go ty'