mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-11 04:45:57 +03:00
Don't expose TextMap type via the Prelude anymore (#1144)
This is not the perfect fix since the definition `data TextMap` is still living in the wrong module, see issue #1142. However, this PR forces people to import `DA.TextMap` when they want to use the `TextMap` type, which is the desired behaviour for the future.
This commit is contained in:
parent
60b608288d
commit
0851a00f20
@ -28,6 +28,7 @@ import Prelude hiding (lookup, null, empty)
|
||||
import DA.Foldable qualified as Foldable
|
||||
import DA.Optional
|
||||
import DA.Text
|
||||
import DA.TextMap (TextMap)
|
||||
import DA.TextMap qualified as TextMap
|
||||
import DA.Traversable qualified as Traversable
|
||||
import DA.Tuple
|
||||
|
@ -27,6 +27,7 @@ where
|
||||
|
||||
import Prelude hiding (filter, null, empty)
|
||||
import DA.Next.Map (MapKey (..))
|
||||
import DA.TextMap (TextMap)
|
||||
import DA.TextMap qualified as TextMap
|
||||
|
||||
-- | The type of a set.
|
||||
|
@ -25,6 +25,7 @@ module DA.TextMap
|
||||
|
||||
import Prelude hiding (lookup, null, filter, empty)
|
||||
import DA.Foldable qualified as Foldable
|
||||
import DA.Internal.Prelude (TextMap)
|
||||
import DA.List qualified as List
|
||||
import DA.Optional
|
||||
import DA.Traversable qualified as Traversable
|
||||
|
@ -6,7 +6,7 @@ daml 1.2
|
||||
-- | The pieces that make up the DAML language.
|
||||
module Prelude (module X) where
|
||||
|
||||
import DA.Internal.Prelude as X
|
||||
import DA.Internal.Prelude as X hiding (TextMap)
|
||||
import DA.Internal.LF as X
|
||||
import DA.Internal.Template as X
|
||||
import DA.Internal.Compatible as X
|
||||
|
@ -28,6 +28,10 @@ DAML
|
||||
- People using the Java/Scala codegen need to replace ``import ghc.tuple.*`` or ``import da.internal.prelude.*`` with ``import da.types.*``.
|
||||
- People using the Ledger API directly need to replace ``GHC.Tuple`` and ``DA.Internal.Prelude`` with ``DA.Types``.
|
||||
|
||||
- **BREAKING CHANGE - DAML Standard Library**: Don't expose the ``TextMap`` type via the ``Prelude`` anymore.
|
||||
|
||||
How to migrate: Always import ``DA.TextMap`` when you want to use the ``TextMap`` type.
|
||||
|
||||
- **DAML Standard Library**: Add ``String`` as a compatibility alias for ``Text``.
|
||||
|
||||
Ledger API
|
||||
|
Loading…
Reference in New Issue
Block a user