symantic-grammar-0.3.3.20190614: Library for symantic grammars.

Safe HaskellNone
LanguageHaskell2010

Language.Symantic.Grammar.Source

Contents

Synopsis

Class Source

class Source src where Source #

Methods

noSource :: src Source #

Instances
Source () Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

Methods

noSource :: () Source #

Class SourceInj

class Source src => SourceInj a src where Source #

Methods

sourceInj :: a -> src Source #

Instances
SourceInj a () Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

Methods

sourceInj :: a -> () Source #

Type family SourceOf

type family SourceOf a Source #

Type Sourceable

class Source (SourceOf a) => Sourceable a where Source #

Methods

sourceOf :: a -> SourceOf a Source #

setSource :: a -> SourceOf a -> a infixl 5 Source #

withSource :: SourceInj src (SourceOf a) => Sourceable a => a -> src -> a Source #

Type Source_Input

type family Source_Input (src :: *) :: * Source #

Instances
type Source_Input () Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

type Source_Input () = ()

Type Span

data Span src Source #

Constructors

Span 

Fields

Instances
Eq src => Eq (Span src) Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

Methods

(==) :: Span src -> Span src -> Bool #

(/=) :: Span src -> Span src -> Bool #

Ord src => Ord (Span src) Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

Methods

compare :: Span src -> Span src -> Ordering #

(<) :: Span src -> Span src -> Bool #

(<=) :: Span src -> Span src -> Bool #

(>) :: Span src -> Span src -> Bool #

(>=) :: Span src -> Span src -> Bool #

max :: Span src -> Span src -> Span src #

min :: Span src -> Span src -> Span src #

Show src => Show (Span src) Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

Methods

showsPrec :: Int -> Span src -> ShowS #

show :: Span src -> String #

showList :: [Span src] -> ShowS #

Type Sourced

data Sourced src a Source #

Attach a Source to something.

Constructors

Sourced 

Fields

Instances
Functor (Sourced src) Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

Methods

fmap :: (a -> b) -> Sourced src a -> Sourced src b #

(<$) :: a -> Sourced src b -> Sourced src a #

(Eq src, Eq a) => Eq (Sourced src a) Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

Methods

(==) :: Sourced src a -> Sourced src a -> Bool #

(/=) :: Sourced src a -> Sourced src a -> Bool #

(Ord src, Ord a) => Ord (Sourced src a) Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

Methods

compare :: Sourced src a -> Sourced src a -> Ordering #

(<) :: Sourced src a -> Sourced src a -> Bool #

(<=) :: Sourced src a -> Sourced src a -> Bool #

(>) :: Sourced src a -> Sourced src a -> Bool #

(>=) :: Sourced src a -> Sourced src a -> Bool #

max :: Sourced src a -> Sourced src a -> Sourced src a #

min :: Sourced src a -> Sourced src a -> Sourced src a #

(Show src, Show a) => Show (Sourced src a) Source # 
Instance details

Defined in Language.Symantic.Grammar.Source

Methods

showsPrec :: Int -> Sourced src a -> ShowS #

show :: Sourced src a -> String #

showList :: [Sourced src a] -> ShowS #