Skip to content

Commit 463b9e8

Browse files
committed
[wip] comment-out redundant patterns
1 parent 616e62a commit 463b9e8

File tree

1 file changed

+32
-29
lines changed
  • cardano-api/src/Cardano/Api/Tx/Internal

1 file changed

+32
-29
lines changed

cardano-api/src/Cardano/Api/Tx/Internal/Output.hs

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -814,12 +814,13 @@ toShelleyTxOut sbe = shelleyBasedEraConstraints sbe $ \case
814814
.~ toBabbageTxOutDatumUTxO txoutdata
815815
& L.referenceScriptTxOutL
816816
.~ refScriptToShelleyScript sbe refScript
817-
AlonzoEraOnwardsDijkstra ->
818-
L.mkBasicTxOut (toShelleyAddr addr) value
819-
& L.datumTxOutL
820-
.~ toBabbageTxOutDatumUTxO txoutdata
821-
& L.referenceScriptTxOutL
822-
.~ refScriptToShelleyScript sbe refScript
817+
-- TODO: this pattern shows up as redundant
818+
-- AlonzoEraOnwardsDijkstra ->
819+
-- L.mkBasicTxOut (toShelleyAddr addr) value
820+
-- & L.datumTxOutL
821+
-- .~ toBabbageTxOutDatumUTxO txoutdata
822+
-- & L.referenceScriptTxOutL
823+
-- .~ refScriptToShelleyScript sbe refScript
823824
)
824825
sbe
825826

@@ -854,12 +855,13 @@ toShelleyTxOutAny sbe = shelleyBasedEraConstraints sbe $ \case
854855
.~ toBabbageTxOutDatum txoutdata
855856
& L.referenceScriptTxOutL
856857
.~ refScriptToShelleyScript sbe refScript
857-
AlonzoEraOnwardsDijkstra ->
858-
L.mkBasicTxOut (toShelleyAddr addr) value
859-
& L.datumTxOutL
860-
.~ toBabbageTxOutDatum txoutdata
861-
& L.referenceScriptTxOutL
862-
.~ refScriptToShelleyScript sbe refScript
858+
-- TODO: this pattern shows up as redundant
859+
-- AlonzoEraOnwardsDijkstra ->
860+
-- L.mkBasicTxOut (toShelleyAddr addr) value
861+
-- & L.datumTxOutL
862+
-- .~ toBabbageTxOutDatum txoutdata
863+
-- & L.referenceScriptTxOutL
864+
-- .~ refScriptToShelleyScript sbe refScript
863865
)
864866
sbe
865867

@@ -922,23 +924,24 @@ fromShelleyTxOut sbe ledgerTxOut = shelleyBasedEraConstraints sbe $ do
922924
where
923925
datum = ledgerTxOut ^. L.datumTxOutL
924926
mRefScript = ledgerTxOut ^. L.referenceScriptTxOutL
925-
ShelleyBasedEraDijkstra ->
926-
TxOut
927-
addressInEra
928-
txOutValue
929-
( fromBabbageTxOutDatum
930-
AlonzoEraOnwardsDijkstra
931-
BabbageEraOnwardsDijkstra
932-
datum
933-
)
934-
( case mRefScript of
935-
SNothing -> ReferenceScriptNone
936-
SJust refScript ->
937-
fromShelleyScriptToReferenceScript ShelleyBasedEraDijkstra refScript
938-
)
939-
where
940-
datum = ledgerTxOut ^. L.datumTxOutL
941-
mRefScript = ledgerTxOut ^. L.referenceScriptTxOutL
927+
-- TODO: this pattern shows up as redundant
928+
-- ShelleyBasedEraDijkstra ->
929+
-- TxOut
930+
-- addressInEra
931+
-- txOutValue
932+
-- ( fromBabbageTxOutDatum
933+
-- AlonzoEraOnwardsDijkstra
934+
-- BabbageEraOnwardsDijkstra
935+
-- datum
936+
-- )
937+
-- ( case mRefScript of
938+
-- SNothing -> ReferenceScriptNone
939+
-- SJust refScript ->
940+
-- fromShelleyScriptToReferenceScript ShelleyBasedEraDijkstra refScript
941+
-- )
942+
-- where
943+
-- datum = ledgerTxOut ^. L.datumTxOutL
944+
-- mRefScript = ledgerTxOut ^. L.referenceScriptTxOutL
942945

943946
-- ----------------------------------------------------------------------------
944947
-- Transaction output values (era-dependent)

0 commit comments

Comments
 (0)