Skip to content

Commit 2b0721e

Browse files
committed
Fix auto-merge problems
1 parent 6d892aa commit 2b0721e

File tree

1 file changed

+6
-10
lines changed
  • lambda-buffers-codegen/src/LambdaBuffers/Codegen/Rust/Print

1 file changed

+6
-10
lines changed

lambda-buffers-codegen/src/LambdaBuffers/Codegen/Rust/Print/LamVal.hs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,10 @@ printRefE pkgs ref = do
334334
qvn <- LV.resolveRef ref
335335
case ref of
336336
(argTy : _, builtin)
337-
| builtin
338-
== "toPlutusData"
339-
|| builtin
340-
== "fromPlutusData"
341-
|| builtin
342-
== "toJson"
343-
|| builtin
344-
== "fromJson" -> do
337+
| builtin == "toPlutusData"
338+
|| builtin == "fromPlutusData"
339+
|| builtin == "toJson"
340+
|| builtin == "fromJson" -> do
345341
lamTyDoc <- printLamTy pkgs argTy
346342
methodDoc <- R.printRsValName . R.qualifiedEntity <$> LV.importValue qvn
347343
return $ angles lamTyDoc <> R.doubleColon <> methodDoc
@@ -380,13 +376,13 @@ printValueE pkgs iTyDefs (LV.CaseTextE txtVal cases otherCase) = printCaseTextE
380376
printValueE pkgs iTyDefs (LV.TupleE l r) = printTupleE pkgs iTyDefs l r
381377
printValueE _ _ (LV.ErrorE err) = throwInternalError $ "LamVal error builtin was called " <> err
382378

383-
-- | This is a hack, to help Rust figure out types of closures (lambda expressions)
379+
-- | HACK(szg251): This is a hack, to help Rust figure out types of closures (lambda expressions)
384380
printInstance :: MonadPrint m => R.PkgMap -> [R.QTyName] -> PC.TyDefs -> LV.ValueE -> m (Doc ann)
385381
printInstance pkgs [] iTyDefs lamVal = printValueE pkgs iTyDefs lamVal
386382
printInstance pkgs argTys iTyDefs (LV.LamE lamVal) = printInstanceLamE pkgs argTys iTyDefs lamVal
387383
printInstance _ _ _ _ = throwInternalError "LamE expression expected with predefined argument types"
388384

389-
-- | This is a hack, to help Rust figure out types of closures (lambda expressions)
385+
-- | HACK(szg251): This is a hack, to help Rust figure out types of closures (lambda expressions)
390386
printInstanceLamE :: MonadPrint m => R.PkgMap -> [R.QTyName] -> PC.TyDefs -> (LV.ValueE -> LV.ValueE) -> m (Doc ann)
391387
printInstanceLamE _ [] _ _ = throwInternalError "LamE expression expected with predefined argument types"
392388
printInstanceLamE pkgs (argTy : argTys) iTyDefs lamVal = do

0 commit comments

Comments
 (0)