{-# LANGUAGE DeriveDataTypeable #-}
module Common.GlobalAnnotations where
import Data.Data
import qualified Data.Map as Map
import qualified Common.Lib.Rel as Rel
import Common.AS_Annotation
import Common.Id
import Common.IRI (IRI)
data GlobalAnnos = GA
{ GlobalAnnos -> PrecedenceGraph
prec_annos :: PrecedenceGraph
, GlobalAnnos -> AssocMap
assoc_annos :: AssocMap
, GlobalAnnos -> DisplayMap
display_annos :: DisplayMap
, GlobalAnnos -> LiteralAnnos
literal_annos :: LiteralAnnos
, GlobalAnnos -> LiteralMap
literal_map :: LiteralMap
, GlobalAnnos -> PrefixMap
prefix_map :: PrefixMap
} deriving (Int -> GlobalAnnos -> ShowS
[GlobalAnnos] -> ShowS
GlobalAnnos -> String
(Int -> GlobalAnnos -> ShowS)
-> (GlobalAnnos -> String)
-> ([GlobalAnnos] -> ShowS)
-> Show GlobalAnnos
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlobalAnnos] -> ShowS
$cshowList :: [GlobalAnnos] -> ShowS
show :: GlobalAnnos -> String
$cshow :: GlobalAnnos -> String
showsPrec :: Int -> GlobalAnnos -> ShowS
$cshowsPrec :: Int -> GlobalAnnos -> ShowS
Show, GlobalAnnos -> GlobalAnnos -> Bool
(GlobalAnnos -> GlobalAnnos -> Bool)
-> (GlobalAnnos -> GlobalAnnos -> Bool) -> Eq GlobalAnnos
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlobalAnnos -> GlobalAnnos -> Bool
$c/= :: GlobalAnnos -> GlobalAnnos -> Bool
== :: GlobalAnnos -> GlobalAnnos -> Bool
$c== :: GlobalAnnos -> GlobalAnnos -> Bool
Eq, Typeable, Typeable GlobalAnnos
Constr
DataType
Typeable GlobalAnnos =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GlobalAnnos -> c GlobalAnnos)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GlobalAnnos)
-> (GlobalAnnos -> Constr)
-> (GlobalAnnos -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c GlobalAnnos))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GlobalAnnos))
-> ((forall b. Data b => b -> b) -> GlobalAnnos -> GlobalAnnos)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GlobalAnnos -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GlobalAnnos -> r)
-> (forall u. (forall d. Data d => d -> u) -> GlobalAnnos -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> GlobalAnnos -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos)
-> Data GlobalAnnos
GlobalAnnos -> Constr
GlobalAnnos -> DataType
(forall b. Data b => b -> b) -> GlobalAnnos -> GlobalAnnos
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GlobalAnnos -> c GlobalAnnos
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GlobalAnnos
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> GlobalAnnos -> u
forall u. (forall d. Data d => d -> u) -> GlobalAnnos -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GlobalAnnos -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GlobalAnnos -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GlobalAnnos
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GlobalAnnos -> c GlobalAnnos
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c GlobalAnnos)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GlobalAnnos)
$cGA :: Constr
$tGlobalAnnos :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos
gmapMp :: (forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos
gmapM :: (forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> GlobalAnnos -> m GlobalAnnos
gmapQi :: Int -> (forall d. Data d => d -> u) -> GlobalAnnos -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> GlobalAnnos -> u
gmapQ :: (forall d. Data d => d -> u) -> GlobalAnnos -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> GlobalAnnos -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GlobalAnnos -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GlobalAnnos -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GlobalAnnos -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GlobalAnnos -> r
gmapT :: (forall b. Data b => b -> b) -> GlobalAnnos -> GlobalAnnos
$cgmapT :: (forall b. Data b => b -> b) -> GlobalAnnos -> GlobalAnnos
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GlobalAnnos)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c GlobalAnnos)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c GlobalAnnos)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c GlobalAnnos)
dataTypeOf :: GlobalAnnos -> DataType
$cdataTypeOf :: GlobalAnnos -> DataType
toConstr :: GlobalAnnos -> Constr
$ctoConstr :: GlobalAnnos -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GlobalAnnos
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GlobalAnnos
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GlobalAnnos -> c GlobalAnnos
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GlobalAnnos -> c GlobalAnnos
$cp1Data :: Typeable GlobalAnnos
Data)
emptyGlobalAnnos :: GlobalAnnos
emptyGlobalAnnos :: GlobalAnnos
emptyGlobalAnnos = GA :: PrecedenceGraph
-> AssocMap
-> DisplayMap
-> LiteralAnnos
-> LiteralMap
-> PrefixMap
-> GlobalAnnos
GA
{ prec_annos :: PrecedenceGraph
prec_annos = PrecedenceGraph
forall a. Rel a
Rel.empty
, assoc_annos :: AssocMap
assoc_annos = AssocMap
forall k a. Map k a
Map.empty
, display_annos :: DisplayMap
display_annos = DisplayMap
forall k a. Map k a
Map.empty
, literal_annos :: LiteralAnnos
literal_annos = LiteralAnnos
emptyLiteralAnnos
, literal_map :: LiteralMap
literal_map = LiteralMap
forall k a. Map k a
Map.empty
, prefix_map :: PrefixMap
prefix_map = PrefixMap
forall k a. Map k a
Map.empty }
data LiteralAnnos = LA
{ LiteralAnnos -> Maybe (Id, Id)
string_lit :: Maybe (Id, Id)
, LiteralAnnos -> Map Id (Id, Id)
list_lit :: Map.Map Id (Id, Id)
, LiteralAnnos -> Maybe Id
number_lit :: Maybe Id
, LiteralAnnos -> Maybe (Id, Id)
float_lit :: Maybe (Id, Id)
} deriving (Int -> LiteralAnnos -> ShowS
[LiteralAnnos] -> ShowS
LiteralAnnos -> String
(Int -> LiteralAnnos -> ShowS)
-> (LiteralAnnos -> String)
-> ([LiteralAnnos] -> ShowS)
-> Show LiteralAnnos
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LiteralAnnos] -> ShowS
$cshowList :: [LiteralAnnos] -> ShowS
show :: LiteralAnnos -> String
$cshow :: LiteralAnnos -> String
showsPrec :: Int -> LiteralAnnos -> ShowS
$cshowsPrec :: Int -> LiteralAnnos -> ShowS
Show, LiteralAnnos -> LiteralAnnos -> Bool
(LiteralAnnos -> LiteralAnnos -> Bool)
-> (LiteralAnnos -> LiteralAnnos -> Bool) -> Eq LiteralAnnos
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LiteralAnnos -> LiteralAnnos -> Bool
$c/= :: LiteralAnnos -> LiteralAnnos -> Bool
== :: LiteralAnnos -> LiteralAnnos -> Bool
$c== :: LiteralAnnos -> LiteralAnnos -> Bool
Eq, Typeable, Typeable LiteralAnnos
Constr
DataType
Typeable LiteralAnnos =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralAnnos -> c LiteralAnnos)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralAnnos)
-> (LiteralAnnos -> Constr)
-> (LiteralAnnos -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralAnnos))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralAnnos))
-> ((forall b. Data b => b -> b) -> LiteralAnnos -> LiteralAnnos)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralAnnos -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralAnnos -> r)
-> (forall u. (forall d. Data d => d -> u) -> LiteralAnnos -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> LiteralAnnos -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos)
-> Data LiteralAnnos
LiteralAnnos -> Constr
LiteralAnnos -> DataType
(forall b. Data b => b -> b) -> LiteralAnnos -> LiteralAnnos
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralAnnos -> c LiteralAnnos
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralAnnos
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> LiteralAnnos -> u
forall u. (forall d. Data d => d -> u) -> LiteralAnnos -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralAnnos -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralAnnos -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralAnnos
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralAnnos -> c LiteralAnnos
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralAnnos)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralAnnos)
$cLA :: Constr
$tLiteralAnnos :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos
gmapMp :: (forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos
gmapM :: (forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LiteralAnnos -> m LiteralAnnos
gmapQi :: Int -> (forall d. Data d => d -> u) -> LiteralAnnos -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> LiteralAnnos -> u
gmapQ :: (forall d. Data d => d -> u) -> LiteralAnnos -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> LiteralAnnos -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralAnnos -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralAnnos -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralAnnos -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralAnnos -> r
gmapT :: (forall b. Data b => b -> b) -> LiteralAnnos -> LiteralAnnos
$cgmapT :: (forall b. Data b => b -> b) -> LiteralAnnos -> LiteralAnnos
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralAnnos)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralAnnos)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c LiteralAnnos)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralAnnos)
dataTypeOf :: LiteralAnnos -> DataType
$cdataTypeOf :: LiteralAnnos -> DataType
toConstr :: LiteralAnnos -> Constr
$ctoConstr :: LiteralAnnos -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralAnnos
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralAnnos
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralAnnos -> c LiteralAnnos
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralAnnos -> c LiteralAnnos
$cp1Data :: Typeable LiteralAnnos
Data)
emptyLiteralAnnos :: LiteralAnnos
emptyLiteralAnnos :: LiteralAnnos
emptyLiteralAnnos = LA :: Maybe (Id, Id)
-> Map Id (Id, Id) -> Maybe Id -> Maybe (Id, Id) -> LiteralAnnos
LA
{ string_lit :: Maybe (Id, Id)
string_lit = Maybe (Id, Id)
forall a. Maybe a
Nothing
, list_lit :: Map Id (Id, Id)
list_lit = Map Id (Id, Id)
forall k a. Map k a
Map.empty
, number_lit :: Maybe Id
number_lit = Maybe Id
forall a. Maybe a
Nothing
, float_lit :: Maybe (Id, Id)
float_lit = Maybe (Id, Id)
forall a. Maybe a
Nothing }
type DisplayMap = Map.Map Id (Map.Map Display_format [Token])
type LiteralMap = Map.Map Id LiteralType
type PrefixMap = Map.Map String IRI
data LiteralType =
StringCons Id
| StringNull
| ListCons Id Id
| ListNull Id
| Number
| Fraction
| Floating
| NoLiteral
deriving (Int -> LiteralType -> ShowS
[LiteralType] -> ShowS
LiteralType -> String
(Int -> LiteralType -> ShowS)
-> (LiteralType -> String)
-> ([LiteralType] -> ShowS)
-> Show LiteralType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LiteralType] -> ShowS
$cshowList :: [LiteralType] -> ShowS
show :: LiteralType -> String
$cshow :: LiteralType -> String
showsPrec :: Int -> LiteralType -> ShowS
$cshowsPrec :: Int -> LiteralType -> ShowS
Show, LiteralType -> LiteralType -> Bool
(LiteralType -> LiteralType -> Bool)
-> (LiteralType -> LiteralType -> Bool) -> Eq LiteralType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LiteralType -> LiteralType -> Bool
$c/= :: LiteralType -> LiteralType -> Bool
== :: LiteralType -> LiteralType -> Bool
$c== :: LiteralType -> LiteralType -> Bool
Eq, Typeable, Typeable LiteralType
Constr
DataType
Typeable LiteralType =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralType -> c LiteralType)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralType)
-> (LiteralType -> Constr)
-> (LiteralType -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralType))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralType))
-> ((forall b. Data b => b -> b) -> LiteralType -> LiteralType)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralType -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralType -> r)
-> (forall u. (forall d. Data d => d -> u) -> LiteralType -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> LiteralType -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LiteralType -> m LiteralType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralType -> m LiteralType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralType -> m LiteralType)
-> Data LiteralType
LiteralType -> Constr
LiteralType -> DataType
(forall b. Data b => b -> b) -> LiteralType -> LiteralType
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralType -> c LiteralType
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralType
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> LiteralType -> u
forall u. (forall d. Data d => d -> u) -> LiteralType -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralType -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralType -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LiteralType -> m LiteralType
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralType -> m LiteralType
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralType
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralType -> c LiteralType
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralType)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralType)
$cNoLiteral :: Constr
$cFloating :: Constr
$cFraction :: Constr
$cNumber :: Constr
$cListNull :: Constr
$cListCons :: Constr
$cStringNull :: Constr
$cStringCons :: Constr
$tLiteralType :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> LiteralType -> m LiteralType
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralType -> m LiteralType
gmapMp :: (forall d. Data d => d -> m d) -> LiteralType -> m LiteralType
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LiteralType -> m LiteralType
gmapM :: (forall d. Data d => d -> m d) -> LiteralType -> m LiteralType
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LiteralType -> m LiteralType
gmapQi :: Int -> (forall d. Data d => d -> u) -> LiteralType -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> LiteralType -> u
gmapQ :: (forall d. Data d => d -> u) -> LiteralType -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> LiteralType -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralType -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralType -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralType -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LiteralType -> r
gmapT :: (forall b. Data b => b -> b) -> LiteralType -> LiteralType
$cgmapT :: (forall b. Data b => b -> b) -> LiteralType -> LiteralType
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LiteralType)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c LiteralType)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LiteralType)
dataTypeOf :: LiteralType -> DataType
$cdataTypeOf :: LiteralType -> DataType
toConstr :: LiteralType -> Constr
$ctoConstr :: LiteralType -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LiteralType
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralType -> c LiteralType
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LiteralType -> c LiteralType
$cp1Data :: Typeable LiteralType
Data)
getLiteralType :: GlobalAnnos -> Id -> LiteralType
getLiteralType :: GlobalAnnos -> Id -> LiteralType
getLiteralType ga :: GlobalAnnos
ga i :: Id
i =
LiteralType -> Id -> LiteralMap -> LiteralType
forall k a. Ord k => a -> k -> Map k a -> a
Map.findWithDefault LiteralType
NoLiteral Id
i (LiteralMap -> LiteralType) -> LiteralMap -> LiteralType
forall a b. (a -> b) -> a -> b
$ GlobalAnnos -> LiteralMap
literal_map GlobalAnnos
ga
type AssocMap = Map.Map Id AssocEither
isAssoc :: AssocEither -> AssocMap -> Id -> Bool
isAssoc :: AssocEither -> AssocMap -> Id -> Bool
isAssoc ae :: AssocEither
ae amap :: AssocMap
amap i :: Id
i =
case Id -> AssocMap -> Maybe AssocEither
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup Id
i AssocMap
amap of
Nothing -> Bool
False
Just ae' :: AssocEither
ae' -> AssocEither
ae' AssocEither -> AssocEither -> Bool
forall a. Eq a => a -> a -> Bool
== AssocEither
ae
type PrecedenceGraph = Rel.Rel Id
precRel :: PrecedenceGraph
-> Id
-> Id
-> PrecRel
precRel :: PrecedenceGraph -> Id -> Id -> PrecRel
precRel pg :: PrecedenceGraph
pg out_id :: Id
out_id in_id :: Id
in_id =
case (Id -> Id -> PrecedenceGraph -> Bool
forall a. Ord a => a -> a -> Rel a -> Bool
Rel.member Id
in_id Id
out_id PrecedenceGraph
pg, Id -> Id -> PrecedenceGraph -> Bool
forall a. Ord a => a -> a -> Rel a -> Bool
Rel.member Id
out_id Id
in_id PrecedenceGraph
pg) of
(False, True) -> PrecRel
Lower
(True, False) -> PrecRel
Higher
(True, True) -> PrecRel
BothDirections
(False, False) -> PrecRel
NoDirection
lookupDisplay :: GlobalAnnos -> Display_format -> Id -> Maybe [Token]
lookupDisplay :: GlobalAnnos -> Display_format -> Id -> Maybe [Token]
lookupDisplay ga :: GlobalAnnos
ga df :: Display_format
df i :: Id
i = case Id -> DisplayMap -> Maybe (Map Display_format [Token])
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup Id
i (GlobalAnnos -> DisplayMap
display_annos GlobalAnnos
ga) of
Nothing -> Maybe [Token]
forall a. Maybe a
Nothing
Just df_map :: Map Display_format [Token]
df_map -> case Display_format -> Map Display_format [Token] -> Maybe [Token]
forall k a. Ord k => k -> Map k a -> Maybe a
Map.lookup Display_format
df Map Display_format [Token]
df_map of
Nothing -> Maybe [Token]
forall a. Maybe a
Nothing
r :: Maybe [Token]
r@(Just disp_toks :: [Token]
disp_toks) -> if [Token] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null [Token]
disp_toks then Maybe [Token]
forall a. Maybe a
Nothing else Maybe [Token]
r