- go :: Session -> Id -> IO (Maybe TvSubst)
- go cms id = do
- term_ <- withSession cms $ \hsc_env -> obtainTerm hsc_env force id
- term <- tidyTermTyVars cms term_
- term' <- if not bindThings then return term
- else bindSuspensions cms term
- showterm <- printTerm cms term'
- unqual <- GHC.getPrintUnqual cms
- let showSDocForUserOneLine unqual doc =
- showDocWith LeftMode (doc (mkErrStyle unqual))
- (putStrLn . showSDocForUserOneLine unqual)
- (ppr id <+> char '=' <+> showterm)
+ go :: GhcMonad m => Id -> m (Term, TvSubst)
+ go id = do
+ term_ <- GHC.obtainTerm force id
+ term <- tidyTermTyVars term_
+ term' <- if bindThings &&
+ False == isUnliftedTypeKind (termType term)
+ then bindSuspensions term
+ else return term