doctest-0.22.10: Test interactive Haskell examples
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.DocTest.Internal.Location

Synopsis

Documentation

data Located a Source #

A thing with a location attached.

Constructors

Located Location a 

Instances

Instances details
Functor Located Source # 
Instance details

Defined in Location

Methods

fmap :: (a -> b) -> Located a -> Located b #

(<$) :: a -> Located b -> Located a #

Show a => Show (Located a) Source # 
Instance details

Defined in Location

Methods

showsPrec :: Int -> Located a -> ShowS #

show :: Located a -> String #

showList :: [Located a] -> ShowS #

NFData a => NFData (Located a) Source # 
Instance details

Defined in Location

Methods

rnf :: Located a -> () #

Eq a => Eq (Located a) Source # 
Instance details

Defined in Location

Methods

(==) :: Located a -> Located a -> Bool #

(/=) :: Located a -> Located a -> Bool #

toLocated :: Located a -> Located a Source #

Convert a GHC located thing to a located thing.

unLoc :: Located a -> a Source #

Discard location information.

noLocation :: a -> Located a Source #

Add dummy location information.

type Line = Int Source #

A line number.

data Location Source #

A combination of file name and line number.

Instances

Instances details
Show Location Source # 
Instance details

Defined in Location

NFData Location Source # 
Instance details

Defined in Location

Methods

rnf :: Location -> () #

Eq Location Source # 
Instance details

Defined in Location

enumerate :: Location -> [Location] Source #

Create a list from a location, by repeatedly increasing the line number by one.

toLocation :: SrcSpan -> Location Source #

Convert a GHC source span to a location.