mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
Remove Optional definition in LF conversion (#3973)
All references to Optional are already mapped to the builtin Optional type in LF but we forgot to filter out the type definition. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
17a5abf25a
commit
86951ea106
@ -382,6 +382,7 @@ convertTypeDef env o@(ATyCon t) = withRange (convNameLoc t) $ if
|
||||
| NameIn DA_Internal_LF n <- t
|
||||
, n `elementOfUniqSet` internalTypes
|
||||
-> pure []
|
||||
| NameIn DA_Internal_Prelude "Optional" <- t -> pure []
|
||||
-- Consumption marker types used to transfer information from template desugaring to LF conversion.
|
||||
| NameIn DA_Internal_Desugar n <- t
|
||||
, n `elementOfUniqSet` consumingTypes
|
||||
@ -778,7 +779,7 @@ convertBind env (name, x)
|
||||
-- during conversion to DAML-LF together with their constructors since we
|
||||
-- deliberately remove 'GHC.Types.Opaque' as well.
|
||||
internalTypes :: UniqSet FastString
|
||||
internalTypes = mkUniqSet ["Scenario","Update","ContractId","Time","Date","Party","Pair", "TextMap", "Map", "Any", "TypeRep"]
|
||||
internalTypes = mkUniqSet ["Scenario","Update","ContractId","Time","Date","Party","Pair", "TextMap", "Map", "Any", "TypeRep", "Optional"]
|
||||
|
||||
consumingTypes :: UniqSet FastString
|
||||
consumingTypes = mkUniqSet ["PreConsuming", "PostConsuming", "NonConsuming"]
|
||||
|
Loading…
Reference in New Issue
Block a user