Skip to content

Commit 1bac834

Browse files
committed
Generalize _emitDebugPrint to the class interface, so it can go into more places.
1 parent 0d4a079 commit 1bac834

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/Imp.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,9 +1335,9 @@ emitLoop hint d n cont = do
13351335
return $ Abs b body
13361336
emitStatement $ IFor d n loopBody
13371337

1338-
_emitDebugPrint :: Emits n => String -> IExpr n -> SubstImpM i n ()
1338+
_emitDebugPrint :: (ImpBuilder m, Emits n) => String -> IExpr n -> m n ()
13391339
_emitDebugPrint fmt x = do
1340-
x' <- cast x (Scalar Word64Type)
1340+
x' <- emitInstr $ ICastOp (Scalar Int64Type) x
13411341
emitStatement $ DebugPrint fmt x'
13421342

13431343
restructureScalarOrPairType :: SType n -> [IExpr n] -> SubstImpM i n (SAtom n)

0 commit comments

Comments
 (0)