LSig, Match(..), IPBind(..), Prag(..),
HsType(..), LHsType, HsExplicitForAll(..), hsLTyVarNames,
isVanillaLSig, sigName, placeHolderNames, isPragLSig,
- LPat, GRHSs, MatchGroup(..), isEmptyLHsBinds, pprLHsBinds,
+ LPat, GRHSs, MatchGroup(..), pprLHsBinds,
collectHsBindBinders, collectPatBinders, pprPatBind
)
import TcHsSyn ( zonkId, (<$>) )
tcHsBootSigs :: HsValBinds Name -> TcM [Id]
-- A hs-boot file has only one BindGroup, and it only has type
-- signatures in it. The renamer checked all this
-tcHsBootSigs (ValBindsIn binds sigs)
- = do { checkTc (isEmptyLHsBinds binds) badBootDeclErr
+tcHsBootSigs (ValBindsOut binds sigs)
+ = do { checkTc (null binds) badBootDeclErr
; mapM (addLocM tc_boot_sig) (filter isVanillaLSig sigs) }
where
tc_boot_sig (Sig (L _ name) ty)
HsValBinds Name) -- Extra generated top-level bindings
tcDeriving tycl_decls
- = recoverM (returnM ([], emptyValBindsIn)) $
+ = recoverM (returnM ([], emptyValBindsOut)) $
do { -- Fish the "deriving"-related information out of the TcEnv
-- and make the necessary "equations".
overlap_flag <- getOverlapFlag
-- don't generate any derived bindings
; is_boot <- tcIsHsBoot
; if is_boot then
- return (inst_info, emptyValBindsIn)
+ return (inst_info, emptyValBindsOut)
else do
{
import HscTypes ( InteractiveContext(..),
ModIface(..), icPrintUnqual,
Dependencies(..) )
-import BasicTypes ( Fixity )
+import BasicTypes ( Fixity, RecFlag(..) )
import SrcLoc ( unLoc )
#endif
; let fresh_it = itName uniq
the_bind = L loc $ FunBind (L loc fresh_it) False matches emptyNameSet
matches = mkMatchGroup [mkMatch [] expr emptyLocalBinds]
- let_stmt = L loc $ LetStmt (HsValBinds (ValBindsIn (unitBag the_bind) []))
+ let_stmt = L loc $ LetStmt (HsValBinds (ValBindsOut [(NonRecursive,unitBag the_bind)] []))
bind_stmt = L loc $ BindStmt (nlVarPat fresh_it) expr
(HsVar bindIOName) noSyntaxExpr
print_it = L loc $ ExprStmt (nlHsApp (nlHsVar printName) (nlHsVar fresh_it))