import Class ( Class, classTyCon )
import Type ( Type, repType, splitFunTys, dropForAlls )
import Util ( zipEqual, zipWith4Equal, naturalMergeSortLe, nOfThem,
- isSingleton, lengthIs )
+ isSingleton, lengthIs, notNull )
import DataCon ( dataConRepArity )
import Var ( isTyVar )
import VarSet ( VarSet, varSetElems )
-- ^^
-- better be no free vars in these top-level bindings
- when (not (null mallocd))
+ when (notNull mallocd)
(panic "ByteCodeGen.byteCodeGen: missing final emitBc?")
dumpIfSet_dyn dflags Opt_D_dump_BCOs
<- runBc (BcM_State [] 0 [])
(schemeR True fvs (invented_id, annexpr))
- when (not (null mallocd))
+ when (notNull mallocd)
(panic "ByteCodeGen.coreExprToBCOs: missing final emitBc?")
dumpIfSet_dyn dflags Opt_D_dump_BCOs
-- Case 2
| [arg1,arg2] <- args_r_to_l,
- let isVoidRepAtom (_, AnnVar v) = VoidRep == typePrimRep (idType v)
+ let
+ isVoidRepAtom (_, AnnVar v) = typePrimRep (idType v) == VoidRep
isVoidRepAtom (_, AnnNote n e) = isVoidRepAtom e
- in isVoidRepAtom arg2
+ isVoidRepAtom _ = False
+ in
+ isVoidRepAtom arg2
= --trace (if isSingleton args_r_to_l
-- then "schemeT: unboxed singleton"
-- else "schemeT: unboxed pair with Void first component") (
DynamicTarget
-> returnBc (False, panic "ByteCodeGen.generateCCall(dyn)")
StaticTarget target
- -> let sym_to_find = _UNPK_ target in
+ -> let sym_to_find = unpackFS target in
ioToBc (lookupSymbol sym_to_find) `thenBc` \res ->
case res of
Just aa -> returnBc (True, aa)
-- as a consequence.
implement_tagToId :: [Name] -> BcM BCInstrList
implement_tagToId names
- = ASSERT(not (null names))
+ = ASSERT( notNull names )
getLabelsBc (length names) `thenBc` \ labels ->
getLabelBc `thenBc` \ label_fail ->
getLabelBc `thenBc` \ label_exit ->
newbcoBc :: BcM ()
newbcoBc st
- | not (null (malloced st))
+ | notNull (malloced st)
= panic "ByteCodeGen.newbcoBc: missed prior emitBc?"
| otherwise
= return (st, ())