diff --git a/sourcemap.cabal b/sourcemap.cabal
--- a/sourcemap.cabal
+++ b/sourcemap.cabal
@@ -1,5 +1,5 @@
 name:                sourcemap
-version:             0.1.1.0
+version:             0.1.2.0
 synopsis:            Implementation of source maps as proposed by Google and Mozilla.
 description:         Implementation of source maps, revision 3, proposed by Google and Mozilla here
                      <https://wiki.mozilla.org/DevTools/Features/SourceMap> and here
@@ -25,4 +25,5 @@
                        unordered-containers,
                        attoparsec,
                        process,
-                       utf8-string
+                       utf8-string,
+                       text
diff --git a/src/SourceMap.hs b/src/SourceMap.hs
--- a/src/SourceMap.hs
+++ b/src/SourceMap.hs
@@ -21,6 +21,7 @@
 import           Data.Maybe
 import           Data.Ord
 import           Data.STRef
+import           Data.Text (Text)
 
 -- | Generate the JSON from a source mapping.
 generate :: SourceMapping -> Value
@@ -36,7 +37,7 @@
   symbols f = sort (nub (mapMaybe f smMappings))
 
 -- | Encode the mappings to the source map format.
-encodeMappings :: [FilePath] -> [String] -> [Mapping] -> ByteString
+encodeMappings :: [FilePath] -> [Text] -> [Mapping] -> ByteString
 encodeMappings sources names = go . sortBy (comparing mapGenerated) where
   go mappings = runST $ do
     -- State.
diff --git a/src/SourceMap/Types.hs b/src/SourceMap/Types.hs
--- a/src/SourceMap/Types.hs
+++ b/src/SourceMap/Types.hs
@@ -6,6 +6,7 @@
 
 import Data.Int
 import Data.Monoid
+import Data.Text
 import Data.Function
 
 -- | The source mapping.
@@ -20,7 +21,7 @@
   { mapGenerated  :: Pos
   , mapOriginal   :: Maybe Pos
   , mapSourceFile :: Maybe FilePath
-  , mapName       :: Maybe String
+  , mapName       :: Maybe Text
   } deriving Show
 
 -- | A source position.
