SourceMap.Types

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

Safe Haskell | Safe-Inferred
Language | Haskell2010

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

Instances details

Show SourceMapping # |
Instance details Defined in SourceMap.Types 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

Instances details

Show Mapping # |
Instance details Defined in SourceMap.Types Methods showsPrec :: Int -> Mapping -> ShowS # show :: Mapping -> String # showList :: [Mapping] -> ShowS #

data Pos #

A source position.

Constructors

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

#### Instances

Instances details

Show Pos # |
Instance details Defined in SourceMap.Types Methods showsPrec :: Int -> Pos -> ShowS # show :: Pos -> String # showList :: [Pos] -> ShowS #
Eq Pos # |
Instance details Defined in SourceMap.Types Methods (==) :: Pos -> Pos -> Bool # (/=) :: Pos -> Pos -> Bool #
Ord Pos # | Compares the line, then the column.
Instance details Defined in SourceMap.Types 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 #