Commit 62a4f9a2 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Use 'ShortText' as internal impl of ComponentId

parent 30eecc60
......@@ -175,7 +175,7 @@ instance NFData Module where
-- @since 2.0
data ComponentId
= ComponentId String
= ComponentId ShortText
deriving (Generic, Read, Show, Eq, Ord, Typeable, Data)
-- | Construct a 'ComponentId' from a 'String'
......@@ -187,11 +187,11 @@ data ComponentId
--
-- @since 2.0
mkComponentId :: String -> ComponentId
mkComponentId = ComponentId
mkComponentId = ComponentId . toShortText
-- | Convert 'ComponentId' to 'String'
unComponentId :: ComponentId -> String
unComponentId (ComponentId s) = s
unComponentId (ComponentId s) = fromShortText s
{-# DEPRECATED InstalledPackageId "Use UnitId instead" #-}
type InstalledPackageId = UnitId
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment