sourcemap-0.1.6: Implementation of source maps as proposed by Google and Mozilla.

Safe Haskell | Safe
Language | Haskell98

SourceMap.Types

Description

Types for the source maps.

Synopsis

- data SourceMapping = SourceMapping {
  - smFile :: !FilePath
  - smSourceRoot :: !(Maybe FilePath)
  - smMappings :: ![Mapping]
  }
- data Mapping = Mapping {
  - mapGenerated :: !Pos
  - mapOriginal :: !(Maybe Pos)
  - mapSourceFile :: !(Maybe FilePath)
  - mapName :: !(Maybe Text)
  }
- data Pos = Pos {
  - posLine :: !Int32
  - posColumn :: !Int32
  }

# Documentation

data SourceMapping #

The source mapping.

Constructors

SourceMapping |
Fields smFile :: !FilePath smSourceRoot :: !(Maybe FilePath) smMappings :: ![Mapping]

Instances

Show SourceMapping # |
Methods showsPrec :: Int -> SourceMapping -> ShowS # show :: SourceMapping -> String # showList :: [SourceMapping] -> ShowS #

data Mapping #

A mapping.

Constructors

Mapping |
Fields mapGenerated :: !Pos mapOriginal :: !(Maybe Pos) mapSourceFile :: !(Maybe FilePath) mapName :: !(Maybe Text)

Instances

Show Mapping # |
Methods showsPrec :: Int -> Mapping -> ShowS # show :: Mapping -> String # showList :: [Mapping] -> ShowS #

data Pos #

A source position.

Constructors

Pos |
Fields posLine :: !Int32 posColumn :: !Int32

Instances

Eq Pos # |
Methods (==) :: Pos -> Pos -> Bool # (/=) :: Pos -> Pos -> Bool #
Ord Pos # | Compares the line, then the column.
Methods compare :: Pos -> Pos -> Ordering # (<) :: Pos -> Pos -> Bool # (<=) :: Pos -> Pos -> Bool # (>) :: Pos -> Pos -> Bool # (>=) :: Pos -> Pos -> Bool # max :: Pos -> Pos -> Pos # min :: Pos -> Pos -> Pos #
Show Pos # |
Methods showsPrec :: Int -> Pos -> ShowS # show :: Pos -> String # showList :: [Pos] -> ShowS #