coda-0.0.1: The coda compiler

Copyright(c) Edward Kmett 2017
LicenseBSD2
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Coda.Syntax.Alex

Description

A simple input adapter that allows alex to work with Text

Synopsis

Documentation

data AlexInput Source #

Invariants:

delta >= 0

Instances

Eq AlexInput Source # 
Data AlexInput Source # 

Methods

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

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

toConstr :: AlexInput -> Constr #

dataTypeOf :: AlexInput -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord AlexInput Source # 
Read AlexInput Source # 
Show AlexInput Source # 
IsString AlexInput Source # 
Generic AlexInput Source # 

Associated Types

type Rep AlexInput :: * -> * #

Hashable AlexInput Source # 
HasDelta AlexInput Source # 
FromText AlexInput Source # 
type Rep AlexInput Source # 
type Rep AlexInput = D1 * (MetaData "AlexInput" "Coda.Syntax.Alex" "coda-0.0.1-Lrfl9CggVgIC7W2mVql1dH" False) (C1 * (MetaCons "AlexInput" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "alexInputState") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * AlexInputState)) (S1 * (MetaSel (Just Symbol "alexInputPrevChar") SourceUnpack SourceStrict DecidedStrict) (Rec0 * Char))) ((:*:) * (S1 * (MetaSel (Just Symbol "alexInputDelta") SourceUnpack SourceStrict DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "alexInputText") SourceUnpack SourceStrict DecidedStrict) (Rec0 * Text)))))

data AlexInputState Source #

Constructors

S0 
S1 
S2 
S3 

Instances

Eq AlexInputState Source # 
Data AlexInputState Source # 

Methods

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

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

toConstr :: AlexInputState -> Constr #

dataTypeOf :: AlexInputState -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord AlexInputState Source # 
Read AlexInputState Source # 
Show AlexInputState Source # 
Generic AlexInputState Source # 

Associated Types

type Rep AlexInputState :: * -> * #

Hashable AlexInputState Source # 
type Rep AlexInputState Source # 
type Rep AlexInputState = D1 * (MetaData "AlexInputState" "Coda.Syntax.Alex" "coda-0.0.1-Lrfl9CggVgIC7W2mVql1dH" False) ((:+:) * ((:+:) * (C1 * (MetaCons "S0" PrefixI False) (U1 *)) (C1 * (MetaCons "S1" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "S2" PrefixI False) (U1 *)) (C1 * (MetaCons "S3" PrefixI False) (U1 *))))

alexGetByte :: AlexInput -> Maybe (Word8, AlexInput) Source #

>>> Prelude.take 20 $ List.unfoldr alexGetByte "hello world"
[104,101,108,108,111,32,119,111,114,108,100]