-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Implementation of source maps as proposed by Google and Mozilla.
--   
--   Implementation of source maps, revision 3, proposed by Google and
--   Mozilla here
--   <a>https://wiki.mozilla.org/DevTools/Features/SourceMap</a> and here
--   <a>https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit</a>
@package sourcemap
@version 0.1.6


-- | Types for the source maps.
module SourceMap.Types

-- | The source mapping.
data SourceMapping
SourceMapping :: !FilePath -> !(Maybe FilePath) -> ![Mapping] -> SourceMapping
[smFile] :: SourceMapping -> !FilePath
[smSourceRoot] :: SourceMapping -> !(Maybe FilePath)
[smMappings] :: SourceMapping -> ![Mapping]

-- | A mapping.
data Mapping
Mapping :: !Pos -> !(Maybe Pos) -> !(Maybe FilePath) -> !(Maybe Text) -> Mapping
[mapGenerated] :: Mapping -> !Pos
[mapOriginal] :: Mapping -> !(Maybe Pos)
[mapSourceFile] :: Mapping -> !(Maybe FilePath)
[mapName] :: Mapping -> !(Maybe Text)

-- | A source position.
data Pos
Pos :: !Int32 -> !Int32 -> Pos
[posLine] :: Pos -> !Int32
[posColumn] :: Pos -> !Int32

-- | Compares the line, then the column.
instance GHC.Show.Show SourceMap.Types.SourceMapping
instance GHC.Show.Show SourceMap.Types.Mapping
instance GHC.Show.Show SourceMap.Types.Pos
instance GHC.Classes.Eq SourceMap.Types.Pos
instance GHC.Classes.Ord SourceMap.Types.Pos


-- | Generate JSON from a source mapping.
module SourceMap

-- | Generate the JSON from a source mapping.
generate :: SourceMapping -> Value
