+-- cmKindOfType: returns a string representing the kind of a type
+
+cmKindOfType :: CmState -> String -> IO (Maybe String)
+cmKindOfType cmstate str
+ = do maybe_stuff <- hscKcType (cm_hsc cmstate) (cm_ic cmstate) str
+ case maybe_stuff of
+ Nothing -> return Nothing
+ Just kind -> return (Just res_str)
+ where
+ res_str = showSDocForUser unqual (text str <+> dcolon <+> ppr kind)
+ unqual = icPrintUnqual (cm_ic cmstate)
+
+-----------------------------------------------------------------------------