giml-syntax-0.1.0.0: Syntax for Giml - A purely functional programming language with emphasis on structural typing
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Giml.Syntax.Lexer

Synopsis

Error

newtype LexerError Source #

Constructors

LexerError (ParseErrorBundle Text ()) 

Instances

Instances details
Data LexerError Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LexerError -> c LexerError #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LexerError #

toConstr :: LexerError -> Constr #

dataTypeOf :: LexerError -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LexerError) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LexerError) #

gmapT :: (forall b. Data b => b -> b) -> LexerError -> LexerError #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LexerError -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LexerError -> r #

gmapQ :: (forall d. Data d => d -> u) -> LexerError -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LexerError -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LexerError -> m LexerError #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LexerError -> m LexerError #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LexerError -> m LexerError #

Generic LexerError Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Associated Types

type Rep LexerError :: Type -> Type #

Show LexerError Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

NFData LexerError Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

rnf :: LexerError -> () #

Eq LexerError Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

type Rep LexerError Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

type Rep LexerError = D1 ('MetaData "LexerError" "Language.Giml.Syntax.Lexer" "giml-syntax-0.1.0.0-9UQLZqxqQ2EKgcQLvWN9qJ" 'True) (C1 ('MetaCons "LexerError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParseErrorBundle Text ()))))

data Loc Source #

Constructors

Loc 

Instances

Instances details
Data Loc Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Loc -> c Loc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Loc #

toConstr :: Loc -> Constr #

dataTypeOf :: Loc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Loc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Loc) #

gmapT :: (forall b. Data b => b -> b) -> Loc -> Loc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Loc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Loc -> r #

gmapQ :: (forall d. Data d => d -> u) -> Loc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Loc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Loc -> m Loc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Loc -> m Loc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Loc -> m Loc #

Generic Loc Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Associated Types

type Rep Loc :: Type -> Type #

Methods

from :: Loc -> Rep Loc x #

to :: Rep Loc x -> Loc #

Show Loc Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

showsPrec :: Int -> Loc -> ShowS #

show :: Loc -> String #

showList :: [Loc] -> ShowS #

NFData Loc Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

rnf :: Loc -> () #

Eq Loc Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

(==) :: Loc -> Loc -> Bool #

(/=) :: Loc -> Loc -> Bool #

Ord Loc Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

compare :: Loc -> Loc -> Ordering #

(<) :: Loc -> Loc -> Bool #

(<=) :: Loc -> Loc -> Bool #

(>) :: Loc -> Loc -> Bool #

(>=) :: Loc -> Loc -> Bool #

max :: Loc -> Loc -> Loc #

min :: Loc -> Loc -> Loc #

type Rep Loc Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

type Rep Loc = D1 ('MetaData "Loc" "Language.Giml.Syntax.Lexer" "giml-syntax-0.1.0.0-9UQLZqxqQ2EKgcQLvWN9qJ" 'False) (C1 ('MetaCons "Loc" 'PrefixI 'True) (S1 ('MetaSel ('Just "locStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos) :*: (S1 ('MetaSel ('Just "locEnd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourcePos) :*: S1 ('MetaSel ('Just "locLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))

Token

data Token Source #

Constructors

Token 

Fields

Instances

Instances details
Data Token Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Token -> c Token #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Token #

toConstr :: Token -> Constr #

dataTypeOf :: Token -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Token) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Token) #

gmapT :: (forall b. Data b => b -> b) -> Token -> Token #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Token -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Token -> r #

gmapQ :: (forall d. Data d => d -> u) -> Token -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Token -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Token -> m Token #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Token -> m Token #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Token -> m Token #

Generic Token Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Associated Types

type Rep Token :: Type -> Type #

Methods

from :: Token -> Rep Token x #

to :: Rep Token x -> Token #

Show Token Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

NFData Token Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

rnf :: Token -> () #

Eq Token Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Ord Token Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

compare :: Token -> Token -> Ordering #

(<) :: Token -> Token -> Bool #

(<=) :: Token -> Token -> Bool #

(>) :: Token -> Token -> Bool #

(>=) :: Token -> Token -> Bool #

max :: Token -> Token -> Token #

min :: Token -> Token -> Token #

type Rep Token Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

type Rep Token = D1 ('MetaData "Token" "Language.Giml.Syntax.Lexer" "giml-syntax-0.1.0.0-9UQLZqxqQ2EKgcQLvWN9qJ" 'False) (C1 ('MetaCons "Token" 'PrefixI 'True) (S1 ('MetaSel ('Just "tokToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RawToken) :*: S1 ('MetaSel ('Just "tokLoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Loc)))

data RawToken Source #

Instances

Instances details
Data RawToken Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RawToken -> c RawToken #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RawToken #

toConstr :: RawToken -> Constr #

dataTypeOf :: RawToken -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RawToken) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RawToken) #

gmapT :: (forall b. Data b => b -> b) -> RawToken -> RawToken #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RawToken -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RawToken -> r #

gmapQ :: (forall d. Data d => d -> u) -> RawToken -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RawToken -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RawToken -> m RawToken #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RawToken -> m RawToken #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RawToken -> m RawToken #

Generic RawToken Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Associated Types

type Rep RawToken :: Type -> Type #

Methods

from :: RawToken -> Rep RawToken x #

to :: Rep RawToken x -> RawToken #

Show RawToken Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

NFData RawToken Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Methods

rnf :: RawToken -> () #

Eq RawToken Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

Ord RawToken Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

type Rep RawToken Source # 
Instance details

Defined in Language.Giml.Syntax.Lexer

type Rep RawToken = D1 ('MetaData "RawToken" "Language.Giml.Syntax.Lexer" "giml-syntax-0.1.0.0-9UQLZqxqQ2EKgcQLvWN9qJ" 'False) (((((C1 ('MetaCons "Identifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "UpperIdentifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: (C1 ('MetaCons "HashIdentifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "Op" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) :+: ((C1 ('MetaCons "Integer" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int32)) :+: C1 ('MetaCons "String" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: (C1 ('MetaCons "Character" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)) :+: C1 ('MetaCons "Boolean" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))))) :+: (((C1 ('MetaCons "LineComment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "Let" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "In" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Case" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Of" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Do" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Ffi" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Equals" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "Colon" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Dot" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Comma" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Lambda" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Bar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Underscore" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Arrow" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LeftArrow" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "EOF" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Indentation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :+: (C1 ('MetaCons "LParen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RParen" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "LBracket" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RBracket" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LBrace" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RBrace" 'PrefixI 'False) (U1 :: Type -> Type))))))

Lexer