{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}

module Order where
{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}

-- AbstractSyntax.ag imports
import Data.Set(Set)
import Data.Map(Map)
import Patterns    (Pattern(..),Patterns)
import Expression  (Expression(..))
import Macro --marcos
import CommonTypes
import ErrorMessages
{-# LINE 16 "src-generated/Order.hs" #-}

{-# LINE 2 "src-ag/Expression.ag" #-}

import UU.Scanner.Position(Pos)
import HsToken
{-# LINE 22 "src-generated/Order.hs" #-}

{-# LINE 2 "src-ag/Patterns.ag" #-}

-- Patterns.ag imports
import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 29 "src-generated/Order.hs" #-}

{-# LINE 10 "src-ag/Order.ag" #-}

-- From uuagc
import CommonTypes
import Patterns
import ErrorMessages
import AbstractSyntax
import Code hiding (Type)
import qualified Code
import Expression
import Options
import SequentialComputation
import SequentialTypes
import CodeSyntax
import GrammarInfo
import HsToken(HsTokensRoot(HsTokensRoot))
import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..))
-- From uulib
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Data.Sequence as Seq
import Data.Map(Map)
import Data.Set(Set)
import Data.Sequence(Seq, (><))
import UU.Util.Utils
import UU.Scanner.Position(Pos(..),initPos)
import Data.Foldable(toList)

-- From haskell libraries
import Control.Monad(liftM)
import qualified Data.Array as Array
import Data.Array((!),bounds,inRange)
import Data.List(elemIndex,partition,sort,mapAccumL,find,nubBy,intersperse,groupBy,transpose)
import qualified Data.Tree as Tree
import Data.Maybe
{-# LINE 66 "src-generated/Order.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 46 "src-ag/Order.ag" #-}

-- Terminates with an error if the key is not in the map
findWithErr1 :: (Ord k, Show k) => String -> k -> Map k a -> a
findWithErr1 s k
  = Map.findWithDefault (error ("findWithErr1 " ++ s ++ ": key " ++ show k ++ " not in map.")) k

findWithErr2 :: (Ord k, Show k, Show a) => k -> Map k a -> a
findWithErr2 k m
  = Map.findWithDefault (error ("findWithErr2: key " ++ show k ++ " not in map: " ++ show m)) k m
{-# LINE 79 "src-generated/Order.hs" #-}

{-# LINE 71 "src-ag/Order.ag" #-}

startsWith :: String -> String -> Bool
startsWith k h = k == take (length k) h
{-# LINE 85 "src-generated/Order.hs" #-}

{-# LINE 138 "src-ag/Order.ag" #-}

getNtName :: Type -> NontermIdent
getNtName (NT nt _ _) = nt
getNtName _           = nullIdent
{-# LINE 92 "src-generated/Order.hs" #-}

{-# LINE 166 "src-ag/Order.ag" #-}

data AltAttr = AltAttr Identifier Identifier Bool
               deriving (Eq, Ord, Show)
{-# LINE 98 "src-generated/Order.hs" #-}

{-# LINE 239 "src-ag/Order.ag" #-}

substSelf nt tp
  = case tp of
      NT n tps defor | n == _SELF -> NT nt tps defor
      _                           -> tp

haskellTupel :: [Type] -> Maybe Type
haskellTupel ts =  Just ( Haskell ( '(' : (concat (intersperse "," (map show ts))) ++ ")" ))
{-# LINE 109 "src-generated/Order.hs" #-}

{-# LINE 692 "src-ag/Order.ag" #-}

swap (a,b) = (b,a)

showPath :: Table CRule -> [Vertex] -> [String]
showPath ruleTable path
  =  let  look a | inRange (bounds ruleTable) a = [showOrigin (ruleTable ! a)]
                 | otherwise = ["Vertex " ++ show a]
          showOrigin cr  | getHasCode cr && getName (getAttr cr) /= "self" = prettyCRule cr ++ " (" ++ show (getPos (getAttr cr)) ++ ")"
                         | otherwise = prettyCRule cr
     in concatMap look path


showPathLocal :: Table CRule -> [Vertex] -> [String]
showPathLocal _ [] = []
showPathLocal ruleTable xs = showP (xs++[-1])
 where showP []         = []
       showP (v1:v2:vs) = let line  = step v1 v2
                              lines = showP vs
                          in  line:lines
       step v1 v2  = " - " ++ a1
        where r1 = ruleTable ! v1
              a1 = show (getAttr  r1)


limitTo :: Int -> [String] -> [String]
limitTo _ [] = []
limitTo 0 _ = ["....etcetera, etcetera...."]
limitTo n (x:xs) = x : limitTo (n-1) xs

showPathNice :: Table CRule -> [Vertex] -> [String]
showPathNice _ [] = []
showPathNice ruleTable xs = limitTo 100 (showP ((-1):xs++[-1]))
 where [maxf, maxa, maxn, maxc] = maxWidths ruleTable (take 100 xs)
       showP []         = []
       showP (v1:v2:vs) = let line  = step v1 v2
                              lines = showP vs
                          in  if null line  then lines  else line:lines
       step v1 v2  |  last &&      first    = induced
                   |  last &&     isSyn r1  = "pass up        "  ++ alignR maxf ""    ++ " " ++ alignL maxa a1 ++ " in " ++ alignR maxn n1 ++ "|" ++ c1 ++ induced
                   |  first&& not(isSyn r2) = "get from above "  ++ alignR maxf ""    ++ " " ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2
                   |  last                  = "pass down      "  ++ alignR maxf f1    ++ "." ++ a1                                                      ++ induced
                   |              isSyn r2  = "get from below "  ++ alignR maxf f2    ++ "." ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2
                   |  isLocal r1  = if head a1 == '_'
                                         then ""
                                         else "calculate      "  ++ alignR maxf "loc" ++ "." ++ a1
                   |  otherwise             = "pass down      "  ++ alignR maxf f1    ++ "." ++ alignL maxa a1 ++ " to " ++ alignR maxn n2 ++ "|" ++ c2
          where
              first = v1<0
              last  = v2<0
              r1 = ruleTable ! v1
              r2 = ruleTable ! v2
              a1 = show (getAttr  r1)
              a2 = show (getAttr  r2)
              f1 = show (getField r1)
              f2 = show (getField r2)
              n1 = show (getLhsNt r1)
              n2 = show (getLhsNt r2)
              c1 = show (getCon   r1)
              c2 = show (getCon   r2)
              induced | v2== -2   =  " INDUCED dependency to "
                      | otherwise = ""


maxWidths ruleTable vs
  = map maximum (transpose (map getWidth vs))
  where getWidth v | v<0       = [0,0,0,0]
                   | otherwise = map (length . show . ($ (ruleTable!v))) [getField, getAttr, getLhsNt, getCon]

alignL n xs | k<n       = xs ++ replicate (n-k) ' '
            | otherwise = xs
              where k = length xs

alignR n xs | k<n       = replicate (n-k) ' ' ++ xs
            | otherwise = xs
              where k = length xs

localCycleErr :: Table CRule -> Bool -> Route -> Error
localCycleErr ruleTable o_visit (s:path)
  =  let cr = ruleTable ! s
         attr = getAttr cr
         nt = getLhsNt cr
         con = getCon cr
     in LocalCirc nt con attr o_visit (showPathLocal ruleTable path)

instCycleErr :: Table CRule -> Bool -> Route -> Error
instCycleErr ruleTable o_visit (s:path)
  =  let cr = ruleTable ! s
         attr = getAttr cr
         nt = getLhsNt cr
         con = getCon cr
     in InstCirc nt con attr o_visit (showPathLocal ruleTable path)

directCycleErrs :: Table NTAttr -> Table CRule -> Bool -> [EdgeRoutes] -> [Error]
directCycleErrs attrTable ruleTable o_visit xs
  = let getNont v = case attrTable ! v of
                      NTASyn nt _ _ -> nt
                      NTAInh nt _ _ -> nt
        getAttr v = case attrTable ! v of
                      NTASyn _ a _  -> a
                      NTAInh _ a _  -> a
        sameNont ((v1,_),_,_) ((v2,_),_,_) =  getNont v1 == getNont v2
        procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)
        wrapGroup gr@(((v1,_),_,_):_) = DirectCirc (getNont v1) o_visit (map procCycle gr)
    in  map wrapGroup (groupBy sameNont xs)

inducedCycleErrs :: Table NTAttr -> Table CRule -> CInterfaceMap -> [EdgeRoutes] -> [Error]
inducedCycleErrs attrTable ruleTable cim xs
  = let getNont v = case attrTable ! v of
                      NTASyn nt _ _ -> nt
                      NTAInh nt _ _ -> nt
        getAttr v = case attrTable ! v of
                      NTASyn _ a _  -> a
                      NTAInh _ a _  -> a
        sameNont ((v1,_),_,_) ((v2,_),_,_) =  getNont v1 == getNont v2
        procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)
        wrapGroup gr@(((v1,_),_,_):_) = InducedCirc (getNont v1) (findWithErr1 "inducedCycleErr.cinter" (getNont v1) cim) (map procCycle gr)
    in  map wrapGroup (groupBy sameNont xs)
{-# LINE 229 "src-generated/Order.hs" #-}
-- Child -------------------------------------------------------
-- wrapper
data Inh_Child  = Inh_Child { Inh_Child -> [(Identifier, Type, ChildKind)]
allfields_Inh_Child :: ([(Identifier,Type,ChildKind)]), Inh_Child -> [Identifier]
allnts_Inh_Child :: ([Identifier]), Inh_Child -> [(Identifier, Identifier)]
attrs_Inh_Child :: ([(Identifier,Identifier)]), Inh_Child -> Identifier
con_Inh_Child :: (Identifier), Inh_Child -> Attributes
inh_Inh_Child :: (Attributes), Inh_Child -> Map Identifier Attributes
inhMap_Inh_Child :: (Map Identifier Attributes), Inh_Child -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Child :: (Map Identifier (Identifier,[Identifier])), Inh_Child -> Identifier
nt_Inh_Child :: (Identifier), Inh_Child -> Bool
o_unbox_Inh_Child :: (Bool), Inh_Child -> Attributes
syn_Inh_Child :: (Attributes), Inh_Child -> Map Identifier Attributes
synMap_Inh_Child :: (Map Identifier Attributes) }
data Syn_Child  = Syn_Child { Syn_Child -> [(Identifier, Attributes, Attributes)]
attributes_Syn_Child :: ([(Identifier,Attributes,Attributes)]), Syn_Child -> Map Identifier Attributes
collectChildrenInhs_Syn_Child :: (Map Identifier Attributes ), Syn_Child -> Map Identifier Attributes
collectChildrenSyns_Syn_Child :: (Map Identifier Attributes ), Syn_Child -> Seq Error
errors_Syn_Child :: (Seq Error), Syn_Child -> (Identifier, Type, ChildKind)
field_Syn_Child :: ((Identifier,Type,ChildKind)), Syn_Child -> [AltAttr]
gathAltAttrs_Syn_Child :: ([AltAttr]), Syn_Child -> Seq CRule
gathRules_Syn_Child :: (Seq CRule), Syn_Child -> Seq (Identifier, Attributes)
inhs_Syn_Child :: (Seq (Identifier,Attributes)), Syn_Child -> Seq (Identifier, Identifier)
nts_Syn_Child :: (Seq (Identifier,NontermIdent)), Syn_Child -> [CRule]
singlevisits_Syn_Child :: ([CRule]), Syn_Child -> [Identifier]
terminals_Syn_Child :: ([Identifier]) }
{-# INLINABLE wrap_Child #-}
wrap_Child :: T_Child  -> Inh_Child  -> (Syn_Child )
wrap_Child :: T_Child -> Inh_Child -> Syn_Child
wrap_Child (T_Child Identity T_Child_s2
act) (Inh_Child [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_unbox Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Child_s2
sem <- Identity T_Child_s2
act
        let arg1 :: T_Child_vIn1
arg1 = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Attributes
-> Map Identifier Attributes
-> T_Child_vIn1
T_Child_vIn1 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_unbox Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap
        (T_Child_vOut1 [(Identifier, Attributes, Attributes)]
_lhsOattributes Map Identifier Attributes
_lhsOcollectChildrenInhs Map Identifier Attributes
_lhsOcollectChildrenSyns Seq Error
_lhsOerrors (Identifier, Type, ChildKind)
_lhsOfield [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Identifier, Attributes)
_lhsOinhs Seq (Identifier, Identifier)
_lhsOnts [CRule]
_lhsOsinglevisits [Identifier]
_lhsOterminals) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Child_s2 -> T_Child_v1
inv_Child_s2 T_Child_s2
sem T_Child_vIn1
arg1)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([(Identifier, Attributes, Attributes)]
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Seq Error
-> (Identifier, Type, ChildKind)
-> [AltAttr]
-> Seq CRule
-> Seq (Identifier, Attributes)
-> Seq (Identifier, Identifier)
-> [CRule]
-> [Identifier]
-> Syn_Child
Syn_Child [(Identifier, Attributes, Attributes)]
_lhsOattributes Map Identifier Attributes
_lhsOcollectChildrenInhs Map Identifier Attributes
_lhsOcollectChildrenSyns Seq Error
_lhsOerrors (Identifier, Type, ChildKind)
_lhsOfield [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Identifier, Attributes)
_lhsOinhs Seq (Identifier, Identifier)
_lhsOnts [CRule]
_lhsOsinglevisits [Identifier]
_lhsOterminals)
   )

-- cata
{-# INLINE sem_Child #-}
sem_Child :: Child  -> T_Child 
sem_Child :: Child -> T_Child
sem_Child ( Child Identifier
name_ Type
tp_ ChildKind
kind_ ) = Identifier -> Type -> ChildKind -> T_Child
sem_Child_Child Identifier
name_ Type
tp_ ChildKind
kind_

-- semantic domain
newtype T_Child  = T_Child {
                           T_Child -> Identity T_Child_s2
attach_T_Child :: Identity (T_Child_s2 )
                           }
newtype T_Child_s2  = C_Child_s2 {
                                 T_Child_s2 -> T_Child_v1
inv_Child_s2 :: (T_Child_v1 )
                                 }
data T_Child_s3  = C_Child_s3
type T_Child_v1  = (T_Child_vIn1 ) -> (T_Child_vOut1 )
data T_Child_vIn1  = T_Child_vIn1 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Attributes) (Map Identifier Attributes)
data T_Child_vOut1  = T_Child_vOut1 ([(Identifier,Attributes,Attributes)]) (Map Identifier Attributes ) (Map Identifier Attributes ) (Seq Error) ((Identifier,Type,ChildKind)) ([AltAttr]) (Seq CRule) (Seq (Identifier,Attributes)) (Seq (Identifier,NontermIdent)) ([CRule]) ([Identifier])
{-# NOINLINE sem_Child_Child #-}
sem_Child_Child :: (Identifier) -> (Type) -> (ChildKind) -> T_Child 
sem_Child_Child :: Identifier -> Type -> ChildKind -> T_Child
sem_Child_Child Identifier
arg_name_ Type
arg_tp_ ChildKind
arg_kind_ = Identity T_Child_s2 -> T_Child
T_Child (forall (m :: * -> *) a. Monad m => a -> m a
return T_Child_s2
st2) where
   {-# NOINLINE st2 #-}
   st2 :: T_Child_s2
st2 = let
      v1 :: T_Child_v1 
      v1 :: T_Child_v1
v1 = \ (T_Child_vIn1 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_unbox Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) -> ( let
         _chnt :: Identifier
_chnt = Identifier -> Type -> Identifier
rule0 Identifier
arg_name_ Type
arg_tp_
         _inh :: Attributes
_inh = Identifier -> Map Identifier Attributes -> Attributes
rule1 Identifier
_chnt Map Identifier Attributes
_lhsIinhMap
         _syn :: Attributes
_syn = Identifier -> Map Identifier Attributes -> Attributes
rule2 Identifier
_chnt Map Identifier Attributes
_lhsIsynMap
         _maptolocal :: Bool
_maptolocal = forall {k} {a}. Map k a -> Type -> Bool
rule3 Attributes
_syn Type
arg_tp_
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = forall {a}. Bool -> Map Identifier a -> Identifier -> [AltAttr]
rule4 Bool
_maptolocal Attributes
_syn Identifier
arg_name_
         _lhsOnts :: Seq (Identifier,NontermIdent)
         _lhsOnts :: Seq (Identifier, Identifier)
_lhsOnts = forall {a}. a -> Type -> Seq (a, Identifier)
rule5 Identifier
arg_name_ Type
arg_tp_
         _lhsOinhs :: Seq (Identifier,Attributes)
         _lhsOinhs :: Seq (Identifier, Attributes)
_lhsOinhs = forall {b} {a}. b -> a -> Seq (a, b)
rule6 Attributes
_inh Identifier
arg_name_
         _gathRules :: Seq CRule
_gathRules = Identifier
-> Identifier
-> Bool
-> Attributes
-> Identifier
-> Type
-> Seq CRule
rule7 Identifier
_lhsIcon Identifier
_lhsInt Bool
_maptolocal Attributes
_syn Identifier
arg_name_ Type
arg_tp_
         _lhsOcollectChildrenSyns :: Map Identifier Attributes 
         _lhsOcollectChildrenSyns :: Map Identifier Attributes
_lhsOcollectChildrenSyns = forall {a} {k}. a -> k -> Map k a
rule8 Attributes
_syn Identifier
arg_name_
         _lhsOcollectChildrenInhs :: Map Identifier Attributes 
         _lhsOcollectChildrenInhs :: Map Identifier Attributes
_lhsOcollectChildrenInhs = forall {a} {k}. a -> k -> Map k a
rule9 Attributes
_inh Identifier
arg_name_
         _lhsOsinglevisits :: [CRule]
         _lhsOsinglevisits :: [CRule]
_lhsOsinglevisits = Attributes -> Bool -> Attributes -> Identifier -> Type -> [CRule]
rule10 Attributes
_inh Bool
_maptolocal Attributes
_syn Identifier
arg_name_ Type
arg_tp_
         _lhsOterminals :: [Identifier]
         _lhsOterminals :: [Identifier]
_lhsOterminals = forall {a}. Bool -> a -> [a]
rule11 Bool
_maptolocal Identifier
arg_name_
         _lhsOattributes :: [(Identifier,Attributes,Attributes)]
         _lhsOattributes :: [(Identifier, Attributes, Attributes)]
_lhsOattributes = forall {b} {c} {a}. b -> c -> a -> [(a, b, c)]
rule12 Attributes
_inh Attributes
_syn Identifier
arg_name_
         _lhsOfield :: (Identifier,Type,ChildKind)
         _lhsOfield :: (Identifier, Type, ChildKind)
_lhsOfield = forall {c} {a} {b}. c -> a -> b -> (a, b, c)
rule13 ChildKind
arg_kind_ Identifier
arg_name_ Type
arg_tp_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule14  ()
         _lhsOgathRules :: Seq CRule
         _lhsOgathRules :: Seq CRule
_lhsOgathRules = forall {p}. p -> p
rule15 Seq CRule
_gathRules
         __result_ :: T_Child_vOut1
__result_ = [(Identifier, Attributes, Attributes)]
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Seq Error
-> (Identifier, Type, ChildKind)
-> [AltAttr]
-> Seq CRule
-> Seq (Identifier, Attributes)
-> Seq (Identifier, Identifier)
-> [CRule]
-> [Identifier]
-> T_Child_vOut1
T_Child_vOut1 [(Identifier, Attributes, Attributes)]
_lhsOattributes Map Identifier Attributes
_lhsOcollectChildrenInhs Map Identifier Attributes
_lhsOcollectChildrenSyns Seq Error
_lhsOerrors (Identifier, Type, ChildKind)
_lhsOfield [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Identifier, Attributes)
_lhsOinhs Seq (Identifier, Identifier)
_lhsOnts [CRule]
_lhsOsinglevisits [Identifier]
_lhsOterminals
         in T_Child_vOut1
__result_ )
     in T_Child_v1 -> T_Child_s2
C_Child_s2 T_Child_v1
v1
   {-# INLINE rule0 #-}
   {-# LINE 19 "src-ag/DistChildAttr.ag" #-}
   rule0 = \ name_ tp_ ->
                       {-# LINE 19 "src-ag/DistChildAttr.ag" #-}
                       case tp_ of
                         NT nt _ _ -> nt
                         Self      -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")
                         Haskell t -> identifier ""
                       {-# LINE 305 "src-generated/Order.hs" #-}
   {-# INLINE rule1 #-}
   {-# LINE 23 "src-ag/DistChildAttr.ag" #-}
   rule1 = \ _chnt ((_lhsIinhMap) :: Map Identifier Attributes) ->
                      {-# LINE 23 "src-ag/DistChildAttr.ag" #-}
                      Map.findWithDefault Map.empty _chnt     _lhsIinhMap
                      {-# LINE 311 "src-generated/Order.hs" #-}
   {-# INLINE rule2 #-}
   {-# LINE 24 "src-ag/DistChildAttr.ag" #-}
   rule2 = \ _chnt ((_lhsIsynMap) :: Map Identifier Attributes) ->
                      {-# LINE 24 "src-ag/DistChildAttr.ag" #-}
                      Map.findWithDefault Map.empty _chnt     _lhsIsynMap
                      {-# LINE 317 "src-generated/Order.hs" #-}
   {-# INLINE rule3 #-}
   {-# LINE 180 "src-ag/Order.ag" #-}
   rule3 = \ _syn tp_ ->
                                {-# LINE 180 "src-ag/Order.ag" #-}
                                case tp_ of
                                  NT nt _ _ -> Map.null _syn
                                  _         -> True
                                {-# LINE 325 "src-generated/Order.hs" #-}
   {-# INLINE rule4 #-}
   {-# LINE 183 "src-ag/Order.ag" #-}
   rule4 = \ _maptolocal _syn name_ ->
                                 {-# LINE 183 "src-ag/Order.ag" #-}
                                 if  _maptolocal
                                     then [ AltAttr _LOC name_ True ]
                                     else [ AltAttr name_ syn True | syn <- Map.keys _syn     ]
                                 {-# LINE 333 "src-generated/Order.hs" #-}
   {-# INLINE rule5 #-}
   {-# LINE 198 "src-ag/Order.ag" #-}
   rule5 = \ name_ tp_ ->
                        {-# LINE 198 "src-ag/Order.ag" #-}
                        Seq.singleton (name_,getNtName tp_)
                        {-# LINE 339 "src-generated/Order.hs" #-}
   {-# INLINE rule6 #-}
   {-# LINE 199 "src-ag/Order.ag" #-}
   rule6 = \ _inh name_ ->
                         {-# LINE 199 "src-ag/Order.ag" #-}
                         Seq.singleton (name_,_inh    )
                         {-# LINE 345 "src-generated/Order.hs" #-}
   {-# INLINE rule7 #-}
   {-# LINE 215 "src-ag/Order.ag" #-}
   rule7 = \ ((_lhsIcon) :: Identifier) ((_lhsInt) :: Identifier) _maptolocal _syn name_ tp_ ->
                              {-# LINE 215 "src-ag/Order.ag" #-}
                              if  _maptolocal
                                  then Seq.singleton (cRuleTerminal name_ _lhsInt _lhsIcon tp_)
                                  else Seq.fromList [ cRuleRhsSyn syn _lhsInt _lhsIcon tp name_ (getNtName tp_) | (syn,tp) <- Map.assocs _syn    ]
                              {-# LINE 353 "src-generated/Order.hs" #-}
   {-# INLINE rule8 #-}
   {-# LINE 347 "src-ag/Order.ag" #-}
   rule8 = \ _syn name_ ->
                                       {-# LINE 347 "src-ag/Order.ag" #-}
                                       Map.singleton name_ _syn
                                       {-# LINE 359 "src-generated/Order.hs" #-}
   {-# INLINE rule9 #-}
   {-# LINE 348 "src-ag/Order.ag" #-}
   rule9 = \ _inh name_ ->
                                       {-# LINE 348 "src-ag/Order.ag" #-}
                                       Map.singleton name_ _inh
                                       {-# LINE 365 "src-generated/Order.hs" #-}
   {-# INLINE rule10 #-}
   {-# LINE 618 "src-ag/Order.ag" #-}
   rule10 = \ _inh _maptolocal _syn name_ tp_ ->
                                 {-# LINE 618 "src-ag/Order.ag" #-}
                                 if  _maptolocal
                                     then []
                                     else [CChildVisit name_ (getNtName tp_) 0 _inh     _syn     True]
                                 {-# LINE 373 "src-generated/Order.hs" #-}
   {-# INLINE rule11 #-}
   {-# LINE 643 "src-ag/Order.ag" #-}
   rule11 = \ _maptolocal name_ ->
                            {-# LINE 643 "src-ag/Order.ag" #-}
                            if _maptolocal
                            then [name_]
                            else []
                            {-# LINE 381 "src-generated/Order.hs" #-}
   {-# INLINE rule12 #-}
   {-# LINE 672 "src-ag/Order.ag" #-}
   rule12 = \ _inh _syn name_ ->
                             {-# LINE 672 "src-ag/Order.ag" #-}
                             [(name_, _inh    , _syn    )]
                             {-# LINE 387 "src-generated/Order.hs" #-}
   {-# INLINE rule13 #-}
   {-# LINE 676 "src-ag/Order.ag" #-}
   rule13 = \ kind_ name_ tp_ ->
                        {-# LINE 676 "src-ag/Order.ag" #-}
                        (name_, tp_, kind_)
                        {-# LINE 393 "src-generated/Order.hs" #-}
   {-# INLINE rule14 #-}
   rule14 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule15 #-}
   rule15 = \ _gathRules ->
     _gathRules

-- Children ----------------------------------------------------
-- wrapper
data Inh_Children  = Inh_Children { Inh_Children -> [(Identifier, Type, ChildKind)]
allfields_Inh_Children :: ([(Identifier,Type,ChildKind)]), Inh_Children -> [Identifier]
allnts_Inh_Children :: ([Identifier]), Inh_Children -> [(Identifier, Identifier)]
attrs_Inh_Children :: ([(Identifier,Identifier)]), Inh_Children -> Identifier
con_Inh_Children :: (Identifier), Inh_Children -> Attributes
inh_Inh_Children :: (Attributes), Inh_Children -> Map Identifier Attributes
inhMap_Inh_Children :: (Map Identifier Attributes), Inh_Children -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Children :: (Map Identifier (Identifier,[Identifier])), Inh_Children -> Identifier
nt_Inh_Children :: (Identifier), Inh_Children -> Bool
o_unbox_Inh_Children :: (Bool), Inh_Children -> Attributes
syn_Inh_Children :: (Attributes), Inh_Children -> Map Identifier Attributes
synMap_Inh_Children :: (Map Identifier Attributes) }
data Syn_Children  = Syn_Children { Syn_Children -> [(Identifier, Attributes, Attributes)]
attributes_Syn_Children :: ([(Identifier,Attributes,Attributes)]), Syn_Children -> Map Identifier Attributes
collectChildrenInhs_Syn_Children :: (Map Identifier Attributes ), Syn_Children -> Map Identifier Attributes
collectChildrenSyns_Syn_Children :: (Map Identifier Attributes ), Syn_Children -> Seq Error
errors_Syn_Children :: (Seq Error), Syn_Children -> [(Identifier, Type, ChildKind)]
fields_Syn_Children :: ([(Identifier,Type,ChildKind)]), Syn_Children -> [AltAttr]
gathAltAttrs_Syn_Children :: ([AltAttr]), Syn_Children -> Seq CRule
gathRules_Syn_Children :: (Seq CRule), Syn_Children -> Seq (Identifier, Attributes)
inhs_Syn_Children :: (Seq (Identifier,Attributes)), Syn_Children -> Seq (Identifier, Identifier)
nts_Syn_Children :: (Seq (Identifier,NontermIdent)), Syn_Children -> [CRule]
singlevisits_Syn_Children :: ([CRule]), Syn_Children -> [Identifier]
terminals_Syn_Children :: ([Identifier]) }
{-# INLINABLE wrap_Children #-}
wrap_Children :: T_Children  -> Inh_Children  -> (Syn_Children )
wrap_Children :: T_Children -> Inh_Children -> Syn_Children
wrap_Children (T_Children Identity T_Children_s5
act) (Inh_Children [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_unbox Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Children_s5
sem <- Identity T_Children_s5
act
        let arg4 :: T_Children_vIn4
arg4 = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Attributes
-> Map Identifier Attributes
-> T_Children_vIn4
T_Children_vIn4 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_unbox Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap
        (T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_lhsOattributes Map Identifier Attributes
_lhsOcollectChildrenInhs Map Identifier Attributes
_lhsOcollectChildrenSyns Seq Error
_lhsOerrors [(Identifier, Type, ChildKind)]
_lhsOfields [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Identifier, Attributes)
_lhsOinhs Seq (Identifier, Identifier)
_lhsOnts [CRule]
_lhsOsinglevisits [Identifier]
_lhsOterminals) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
sem T_Children_vIn4
arg4)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([(Identifier, Attributes, Attributes)]
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Seq Error
-> [(Identifier, Type, ChildKind)]
-> [AltAttr]
-> Seq CRule
-> Seq (Identifier, Attributes)
-> Seq (Identifier, Identifier)
-> [CRule]
-> [Identifier]
-> Syn_Children
Syn_Children [(Identifier, Attributes, Attributes)]
_lhsOattributes Map Identifier Attributes
_lhsOcollectChildrenInhs Map Identifier Attributes
_lhsOcollectChildrenSyns Seq Error
_lhsOerrors [(Identifier, Type, ChildKind)]
_lhsOfields [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Identifier, Attributes)
_lhsOinhs Seq (Identifier, Identifier)
_lhsOnts [CRule]
_lhsOsinglevisits [Identifier]
_lhsOterminals)
   )

-- cata
{-# NOINLINE sem_Children #-}
sem_Children :: Children  -> T_Children 
sem_Children :: Children -> T_Children
sem_Children Children
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Child -> T_Children -> T_Children
sem_Children_Cons T_Children
sem_Children_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Child -> T_Child
sem_Child Children
list)

-- semantic domain
newtype T_Children  = T_Children {
                                 T_Children -> Identity T_Children_s5
attach_T_Children :: Identity (T_Children_s5 )
                                 }
newtype T_Children_s5  = C_Children_s5 {
                                       T_Children_s5 -> T_Children_v4
inv_Children_s5 :: (T_Children_v4 )
                                       }
data T_Children_s6  = C_Children_s6
type T_Children_v4  = (T_Children_vIn4 ) -> (T_Children_vOut4 )
data T_Children_vIn4  = T_Children_vIn4 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Attributes) (Map Identifier Attributes)
data T_Children_vOut4  = T_Children_vOut4 ([(Identifier,Attributes,Attributes)]) (Map Identifier Attributes ) (Map Identifier Attributes ) (Seq Error) ([(Identifier,Type,ChildKind)]) ([AltAttr]) (Seq CRule) (Seq (Identifier,Attributes)) (Seq (Identifier,NontermIdent)) ([CRule]) ([Identifier])
{-# NOINLINE sem_Children_Cons #-}
sem_Children_Cons :: T_Child  -> T_Children  -> T_Children 
sem_Children_Cons :: T_Child -> T_Children -> T_Children
sem_Children_Cons T_Child
arg_hd_ T_Children
arg_tl_ = Identity T_Children_s5 -> T_Children
T_Children (forall (m :: * -> *) a. Monad m => a -> m a
return T_Children_s5
st5) where
   {-# NOINLINE st5 #-}
   st5 :: T_Children_s5
st5 = let
      v4 :: T_Children_v4 
      v4 :: T_Children_v4
v4 = \ (T_Children_vIn4 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_unbox Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) -> ( let
         _hdX2 :: T_Child_s2
_hdX2 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Child -> Identity T_Child_s2
attach_T_Child (T_Child
arg_hd_))
         _tlX5 :: T_Children_s5
_tlX5 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Children -> Identity T_Children_s5
attach_T_Children (T_Children
arg_tl_))
         (T_Child_vOut1 [(Identifier, Attributes, Attributes)]
_hdIattributes Map Identifier Attributes
_hdIcollectChildrenInhs Map Identifier Attributes
_hdIcollectChildrenSyns Seq Error
_hdIerrors (Identifier, Type, ChildKind)
_hdIfield [AltAttr]
_hdIgathAltAttrs Seq CRule
_hdIgathRules Seq (Identifier, Attributes)
_hdIinhs Seq (Identifier, Identifier)
_hdInts [CRule]
_hdIsinglevisits [Identifier]
_hdIterminals) = T_Child_s2 -> T_Child_v1
inv_Child_s2 T_Child_s2
_hdX2 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Attributes
-> Map Identifier Attributes
-> T_Child_vIn1
T_Child_vIn1 [(Identifier, Type, ChildKind)]
_hdOallfields [Identifier]
_hdOallnts [(Identifier, Identifier)]
_hdOattrs Identifier
_hdOcon Attributes
_hdOinh Map Identifier Attributes
_hdOinhMap Map Identifier (Identifier, [Identifier])
_hdOmergeMap Identifier
_hdOnt Bool
_hdOo_unbox Attributes
_hdOsyn Map Identifier Attributes
_hdOsynMap)
         (T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_tlIattributes Map Identifier Attributes
_tlIcollectChildrenInhs Map Identifier Attributes
_tlIcollectChildrenSyns Seq Error
_tlIerrors [(Identifier, Type, ChildKind)]
_tlIfields [AltAttr]
_tlIgathAltAttrs Seq CRule
_tlIgathRules Seq (Identifier, Attributes)
_tlIinhs Seq (Identifier, Identifier)
_tlInts [CRule]
_tlIsinglevisits [Identifier]
_tlIterminals) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_tlX5 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Attributes
-> Map Identifier Attributes
-> T_Children_vIn4
T_Children_vIn4 [(Identifier, Type, ChildKind)]
_tlOallfields [Identifier]
_tlOallnts [(Identifier, Identifier)]
_tlOattrs Identifier
_tlOcon Attributes
_tlOinh Map Identifier Attributes
_tlOinhMap Map Identifier (Identifier, [Identifier])
_tlOmergeMap Identifier
_tlOnt Bool
_tlOo_unbox Attributes
_tlOsyn Map Identifier Attributes
_tlOsynMap)
         _lhsOfields :: [(Identifier,Type,ChildKind)]
         _lhsOfields :: [(Identifier, Type, ChildKind)]
_lhsOfields = (Identifier, Type, ChildKind)
-> [(Identifier, Type, ChildKind)]
-> [(Identifier, Type, ChildKind)]
rule16 (Identifier, Type, ChildKind)
_hdIfield [(Identifier, Type, ChildKind)]
_tlIfields
         _lhsOattributes :: [(Identifier,Attributes,Attributes)]
         _lhsOattributes :: [(Identifier, Attributes, Attributes)]
_lhsOattributes = [(Identifier, Attributes, Attributes)]
-> [(Identifier, Attributes, Attributes)]
-> [(Identifier, Attributes, Attributes)]
rule17 [(Identifier, Attributes, Attributes)]
_hdIattributes [(Identifier, Attributes, Attributes)]
_tlIattributes
         _lhsOcollectChildrenInhs :: Map Identifier Attributes 
         _lhsOcollectChildrenInhs :: Map Identifier Attributes
_lhsOcollectChildrenInhs = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule18 Map Identifier Attributes
_hdIcollectChildrenInhs Map Identifier Attributes
_tlIcollectChildrenInhs
         _lhsOcollectChildrenSyns :: Map Identifier Attributes 
         _lhsOcollectChildrenSyns :: Map Identifier Attributes
_lhsOcollectChildrenSyns = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule19 Map Identifier Attributes
_hdIcollectChildrenSyns Map Identifier Attributes
_tlIcollectChildrenSyns
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule20 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = [AltAttr] -> [AltAttr] -> [AltAttr]
rule21 [AltAttr]
_hdIgathAltAttrs [AltAttr]
_tlIgathAltAttrs
         _lhsOgathRules :: Seq CRule
         _lhsOgathRules :: Seq CRule
_lhsOgathRules = Seq CRule -> Seq CRule -> Seq CRule
rule22 Seq CRule
_hdIgathRules Seq CRule
_tlIgathRules
         _lhsOinhs :: Seq (Identifier,Attributes)
         _lhsOinhs :: Seq (Identifier, Attributes)
_lhsOinhs = Seq (Identifier, Attributes)
-> Seq (Identifier, Attributes) -> Seq (Identifier, Attributes)
rule23 Seq (Identifier, Attributes)
_hdIinhs Seq (Identifier, Attributes)
_tlIinhs
         _lhsOnts :: Seq (Identifier,NontermIdent)
         _lhsOnts :: Seq (Identifier, Identifier)
_lhsOnts = Seq (Identifier, Identifier)
-> Seq (Identifier, Identifier) -> Seq (Identifier, Identifier)
rule24 Seq (Identifier, Identifier)
_hdInts Seq (Identifier, Identifier)
_tlInts
         _lhsOsinglevisits :: [CRule]
         _lhsOsinglevisits :: [CRule]
_lhsOsinglevisits = [CRule] -> [CRule] -> [CRule]
rule25 [CRule]
_hdIsinglevisits [CRule]
_tlIsinglevisits
         _lhsOterminals :: [Identifier]
         _lhsOterminals :: [Identifier]
_lhsOterminals = [Identifier] -> [Identifier] -> [Identifier]
rule26 [Identifier]
_hdIterminals [Identifier]
_tlIterminals
         _hdOallfields :: [(Identifier, Type, ChildKind)]
_hdOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule27 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _hdOallnts :: [Identifier]
_hdOallnts = [Identifier] -> [Identifier]
rule28 [Identifier]
_lhsIallnts
         _hdOattrs :: [(Identifier, Identifier)]
_hdOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule29 [(Identifier, Identifier)]
_lhsIattrs
         _hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule30 Identifier
_lhsIcon
         _hdOinh :: Attributes
_hdOinh = Attributes -> Attributes
rule31 Attributes
_lhsIinh
         _hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule32 Map Identifier Attributes
_lhsIinhMap
         _hdOmergeMap :: Map Identifier (Identifier, [Identifier])
_hdOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule33 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule34 Identifier
_lhsInt
         _hdOo_unbox :: Bool
_hdOo_unbox = Bool -> Bool
rule35 Bool
_lhsIo_unbox
         _hdOsyn :: Attributes
_hdOsyn = Attributes -> Attributes
rule36 Attributes
_lhsIsyn
         _hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule37 Map Identifier Attributes
_lhsIsynMap
         _tlOallfields :: [(Identifier, Type, ChildKind)]
_tlOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule38 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _tlOallnts :: [Identifier]
_tlOallnts = [Identifier] -> [Identifier]
rule39 [Identifier]
_lhsIallnts
         _tlOattrs :: [(Identifier, Identifier)]
_tlOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule40 [(Identifier, Identifier)]
_lhsIattrs
         _tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule41 Identifier
_lhsIcon
         _tlOinh :: Attributes
_tlOinh = Attributes -> Attributes
rule42 Attributes
_lhsIinh
         _tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule43 Map Identifier Attributes
_lhsIinhMap
         _tlOmergeMap :: Map Identifier (Identifier, [Identifier])
_tlOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule44 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule45 Identifier
_lhsInt
         _tlOo_unbox :: Bool
_tlOo_unbox = Bool -> Bool
rule46 Bool
_lhsIo_unbox
         _tlOsyn :: Attributes
_tlOsyn = Attributes -> Attributes
rule47 Attributes
_lhsIsyn
         _tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule48 Map Identifier Attributes
_lhsIsynMap
         __result_ :: T_Children_vOut4
__result_ = [(Identifier, Attributes, Attributes)]
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Seq Error
-> [(Identifier, Type, ChildKind)]
-> [AltAttr]
-> Seq CRule
-> Seq (Identifier, Attributes)
-> Seq (Identifier, Identifier)
-> [CRule]
-> [Identifier]
-> T_Children_vOut4
T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_lhsOattributes Map Identifier Attributes
_lhsOcollectChildrenInhs Map Identifier Attributes
_lhsOcollectChildrenSyns Seq Error
_lhsOerrors [(Identifier, Type, ChildKind)]
_lhsOfields [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Identifier, Attributes)
_lhsOinhs Seq (Identifier, Identifier)
_lhsOnts [CRule]
_lhsOsinglevisits [Identifier]
_lhsOterminals
         in T_Children_vOut4
__result_ )
     in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
   {-# INLINE rule16 #-}
   {-# LINE 679 "src-ag/Order.ag" #-}
   rule16 = \ ((_hdIfield) :: (Identifier,Type,ChildKind)) ((_tlIfields) :: [(Identifier,Type,ChildKind)]) ->
                         {-# LINE 679 "src-ag/Order.ag" #-}
                         _hdIfield : _tlIfields
                         {-# LINE 494 "src-generated/Order.hs" #-}
   {-# INLINE rule17 #-}
   rule17 = \ ((_hdIattributes) :: [(Identifier,Attributes,Attributes)]) ((_tlIattributes) :: [(Identifier,Attributes,Attributes)]) ->
     _hdIattributes ++ _tlIattributes
   {-# INLINE rule18 #-}
   rule18 = \ ((_hdIcollectChildrenInhs) :: Map Identifier Attributes ) ((_tlIcollectChildrenInhs) :: Map Identifier Attributes ) ->
     _hdIcollectChildrenInhs `Map.union` _tlIcollectChildrenInhs
   {-# INLINE rule19 #-}
   rule19 = \ ((_hdIcollectChildrenSyns) :: Map Identifier Attributes ) ((_tlIcollectChildrenSyns) :: Map Identifier Attributes ) ->
     _hdIcollectChildrenSyns `Map.union` _tlIcollectChildrenSyns
   {-# INLINE rule20 #-}
   rule20 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->
     _hdIerrors Seq.>< _tlIerrors
   {-# INLINE rule21 #-}
   rule21 = \ ((_hdIgathAltAttrs) :: [AltAttr]) ((_tlIgathAltAttrs) :: [AltAttr]) ->
     _hdIgathAltAttrs ++ _tlIgathAltAttrs
   {-# INLINE rule22 #-}
   rule22 = \ ((_hdIgathRules) :: Seq CRule) ((_tlIgathRules) :: Seq CRule) ->
     _hdIgathRules Seq.>< _tlIgathRules
   {-# INLINE rule23 #-}
   rule23 = \ ((_hdIinhs) :: Seq (Identifier,Attributes)) ((_tlIinhs) :: Seq (Identifier,Attributes)) ->
     _hdIinhs Seq.>< _tlIinhs
   {-# INLINE rule24 #-}
   rule24 = \ ((_hdInts) :: Seq (Identifier,NontermIdent)) ((_tlInts) :: Seq (Identifier,NontermIdent)) ->
     _hdInts Seq.>< _tlInts
   {-# INLINE rule25 #-}
   rule25 = \ ((_hdIsinglevisits) :: [CRule]) ((_tlIsinglevisits) :: [CRule]) ->
     _hdIsinglevisits ++ _tlIsinglevisits
   {-# INLINE rule26 #-}
   rule26 = \ ((_hdIterminals) :: [Identifier]) ((_tlIterminals) :: [Identifier]) ->
     _hdIterminals ++ _tlIterminals
   {-# INLINE rule27 #-}
   rule27 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     _lhsIallfields
   {-# INLINE rule28 #-}
   rule28 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule29 #-}
   rule29 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->
     _lhsIattrs
   {-# INLINE rule30 #-}
   rule30 = \ ((_lhsIcon) :: Identifier) ->
     _lhsIcon
   {-# INLINE rule31 #-}
   rule31 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule32 #-}
   rule32 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule33 #-}
   rule33 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule34 #-}
   rule34 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule35 #-}
   rule35 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule36 #-}
   rule36 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule37 #-}
   rule37 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
   {-# INLINE rule38 #-}
   rule38 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     _lhsIallfields
   {-# INLINE rule39 #-}
   rule39 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule40 #-}
   rule40 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->
     _lhsIattrs
   {-# INLINE rule41 #-}
   rule41 = \ ((_lhsIcon) :: Identifier) ->
     _lhsIcon
   {-# INLINE rule42 #-}
   rule42 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule43 #-}
   rule43 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule44 #-}
   rule44 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule45 #-}
   rule45 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule46 #-}
   rule46 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule47 #-}
   rule47 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule48 #-}
   rule48 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
{-# NOINLINE sem_Children_Nil #-}
sem_Children_Nil ::  T_Children 
sem_Children_Nil :: T_Children
sem_Children_Nil  = Identity T_Children_s5 -> T_Children
T_Children (forall (m :: * -> *) a. Monad m => a -> m a
return T_Children_s5
st5) where
   {-# NOINLINE st5 #-}
   st5 :: T_Children_s5
st5 = let
      v4 :: T_Children_v4 
      v4 :: T_Children_v4
v4 = \ (T_Children_vIn4 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_unbox Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) -> ( let
         _lhsOfields :: [(Identifier,Type,ChildKind)]
         _lhsOfields :: [(Identifier, Type, ChildKind)]
_lhsOfields = forall {a}. () -> [a]
rule49  ()
         _lhsOattributes :: [(Identifier,Attributes,Attributes)]
         _lhsOattributes :: [(Identifier, Attributes, Attributes)]
_lhsOattributes = forall {a}. () -> [a]
rule50  ()
         _lhsOcollectChildrenInhs :: Map Identifier Attributes 
         _lhsOcollectChildrenInhs :: Map Identifier Attributes
_lhsOcollectChildrenInhs = forall {k} {a}. () -> Map k a
rule51  ()
         _lhsOcollectChildrenSyns :: Map Identifier Attributes 
         _lhsOcollectChildrenSyns :: Map Identifier Attributes
_lhsOcollectChildrenSyns = forall {k} {a}. () -> Map k a
rule52  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule53  ()
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = forall {a}. () -> [a]
rule54  ()
         _lhsOgathRules :: Seq CRule
         _lhsOgathRules :: Seq CRule
_lhsOgathRules = forall {a}. () -> Seq a
rule55  ()
         _lhsOinhs :: Seq (Identifier,Attributes)
         _lhsOinhs :: Seq (Identifier, Attributes)
_lhsOinhs = forall {a}. () -> Seq a
rule56  ()
         _lhsOnts :: Seq (Identifier,NontermIdent)
         _lhsOnts :: Seq (Identifier, Identifier)
_lhsOnts = forall {a}. () -> Seq a
rule57  ()
         _lhsOsinglevisits :: [CRule]
         _lhsOsinglevisits :: [CRule]
_lhsOsinglevisits = forall {a}. () -> [a]
rule58  ()
         _lhsOterminals :: [Identifier]
         _lhsOterminals :: [Identifier]
_lhsOterminals = forall {a}. () -> [a]
rule59  ()
         __result_ :: T_Children_vOut4
__result_ = [(Identifier, Attributes, Attributes)]
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Seq Error
-> [(Identifier, Type, ChildKind)]
-> [AltAttr]
-> Seq CRule
-> Seq (Identifier, Attributes)
-> Seq (Identifier, Identifier)
-> [CRule]
-> [Identifier]
-> T_Children_vOut4
T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_lhsOattributes Map Identifier Attributes
_lhsOcollectChildrenInhs Map Identifier Attributes
_lhsOcollectChildrenSyns Seq Error
_lhsOerrors [(Identifier, Type, ChildKind)]
_lhsOfields [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Identifier, Attributes)
_lhsOinhs Seq (Identifier, Identifier)
_lhsOnts [CRule]
_lhsOsinglevisits [Identifier]
_lhsOterminals
         in T_Children_vOut4
__result_ )
     in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
   {-# INLINE rule49 #-}
   {-# LINE 680 "src-ag/Order.ag" #-}
   rule49 = \  (_ :: ()) ->
                         {-# LINE 680 "src-ag/Order.ag" #-}
                         []
                         {-# LINE 628 "src-generated/Order.hs" #-}
   {-# INLINE rule50 #-}
   rule50 = \  (_ :: ()) ->
     []
   {-# INLINE rule51 #-}
   rule51 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule52 #-}
   rule52 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule53 #-}
   rule53 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule54 #-}
   rule54 = \  (_ :: ()) ->
     []
   {-# INLINE rule55 #-}
   rule55 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule56 #-}
   rule56 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule57 #-}
   rule57 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule58 #-}
   rule58 = \  (_ :: ()) ->
     []
   {-# INLINE rule59 #-}
   rule59 = \  (_ :: ()) ->
     []

-- Expression --------------------------------------------------
-- wrapper
data Inh_Expression  = Inh_Expression { Inh_Expression -> [(Identifier, Type, ChildKind)]
allfields_Inh_Expression :: ([(Identifier,Type,ChildKind)]), Inh_Expression -> [Identifier]
allnts_Inh_Expression :: ([Identifier]), Inh_Expression -> [(Identifier, Identifier)]
attrs_Inh_Expression :: ([(Identifier,Identifier)]), Inh_Expression -> Identifier
con_Inh_Expression :: (Identifier), Inh_Expression -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Expression :: (Map Identifier (Identifier,[Identifier])), Inh_Expression -> Identifier
nt_Inh_Expression :: (Identifier), Inh_Expression -> Options
options_Inh_Expression :: (Options) }
data Syn_Expression  = Syn_Expression { Syn_Expression -> Set (Identifier, Identifier)
allRhsVars_Syn_Expression :: (Set (Identifier,Identifier)), Syn_Expression -> Expression
copy_Syn_Expression :: (Expression), Syn_Expression -> Seq Error
errors_Syn_Expression :: (Seq Error), Syn_Expression -> [String]
textLines_Syn_Expression :: ([String]), Syn_Expression -> [(Identifier, Identifier)]
usedAttrs_Syn_Expression :: ([(Identifier,Identifier)]), Syn_Expression -> [Identifier]
usedFields_Syn_Expression :: ([Identifier]), Syn_Expression -> [Identifier]
usedLocals_Syn_Expression :: ([Identifier]) }
{-# INLINABLE wrap_Expression #-}
wrap_Expression :: T_Expression  -> Inh_Expression  -> (Syn_Expression )
wrap_Expression :: T_Expression -> Inh_Expression -> Syn_Expression
wrap_Expression (T_Expression Identity T_Expression_s8
act) (Inh_Expression [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Expression_s8
sem <- Identity T_Expression_s8
act
        let arg7 :: T_Expression_vIn7
arg7 = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> T_Expression_vIn7
T_Expression_vIn7 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions
        (T_Expression_vOut7 Set (Identifier, Identifier)
_lhsOallRhsVars Expression
_lhsOcopy Seq Error
_lhsOerrors [String]
_lhsOtextLines [(Identifier, Identifier)]
_lhsOusedAttrs [Identifier]
_lhsOusedFields [Identifier]
_lhsOusedLocals) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Expression_s8 -> T_Expression_v7
inv_Expression_s8 T_Expression_s8
sem T_Expression_vIn7
arg7)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Set (Identifier, Identifier)
-> Expression
-> Seq Error
-> [String]
-> [(Identifier, Identifier)]
-> [Identifier]
-> [Identifier]
-> Syn_Expression
Syn_Expression Set (Identifier, Identifier)
_lhsOallRhsVars Expression
_lhsOcopy Seq Error
_lhsOerrors [String]
_lhsOtextLines [(Identifier, Identifier)]
_lhsOusedAttrs [Identifier]
_lhsOusedFields [Identifier]
_lhsOusedLocals)
   )

-- cata
{-# INLINE sem_Expression #-}
sem_Expression :: Expression  -> T_Expression 
sem_Expression :: Expression -> T_Expression
sem_Expression ( Expression Pos
pos_ HsTokens
tks_ ) = Pos -> HsTokens -> T_Expression
sem_Expression_Expression Pos
pos_ HsTokens
tks_

-- semantic domain
newtype T_Expression  = T_Expression {
                                     T_Expression -> Identity T_Expression_s8
attach_T_Expression :: Identity (T_Expression_s8 )
                                     }
newtype T_Expression_s8  = C_Expression_s8 {
                                           T_Expression_s8 -> T_Expression_v7
inv_Expression_s8 :: (T_Expression_v7 )
                                           }
data T_Expression_s9  = C_Expression_s9
type T_Expression_v7  = (T_Expression_vIn7 ) -> (T_Expression_vOut7 )
data T_Expression_vIn7  = T_Expression_vIn7 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Map Identifier (Identifier,[Identifier])) (Identifier) (Options)
data T_Expression_vOut7  = T_Expression_vOut7 (Set (Identifier,Identifier)) (Expression) (Seq Error) ([String]) ([(Identifier,Identifier)]) ([Identifier]) ([Identifier])
{-# NOINLINE sem_Expression_Expression #-}
sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression 
sem_Expression_Expression :: Pos -> HsTokens -> T_Expression
sem_Expression_Expression Pos
arg_pos_ HsTokens
arg_tks_ = Identity T_Expression_s8 -> T_Expression
T_Expression (forall (m :: * -> *) a. Monad m => a -> m a
return T_Expression_s8
st8) where
   {-# NOINLINE st8 #-}
   st8 :: T_Expression_s8
st8 = let
      v7 :: T_Expression_v7 
      v7 :: T_Expression_v7
v7 = \ (T_Expression_vIn7 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions) -> ( let
         ([String]
_textLines,[(Identifier, Identifier)]
_usedAttrs,[Identifier]
_usedLocals,[Identifier]
_usedFields) = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> HsTokens
-> ([String], [(Identifier, Identifier)], [Identifier],
    [Identifier])
rule60 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions HsTokens
arg_tks_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule61  ()
         _lhsOallRhsVars :: Set (Identifier,Identifier)
         _lhsOallRhsVars :: Set (Identifier, Identifier)
_lhsOallRhsVars = [(Identifier, Identifier)]
-> [Identifier] -> [Identifier] -> Set (Identifier, Identifier)
rule62 [(Identifier, Identifier)]
_usedAttrs [Identifier]
_usedFields [Identifier]
_usedLocals
         _copy :: Expression
_copy = Pos -> HsTokens -> Expression
rule63 Pos
arg_pos_ HsTokens
arg_tks_
         _lhsOcopy :: Expression
         _lhsOcopy :: Expression
_lhsOcopy = forall {p}. p -> p
rule64 Expression
_copy
         _lhsOtextLines :: [String]
         _lhsOtextLines :: [String]
_lhsOtextLines = forall {p}. p -> p
rule65 [String]
_textLines
         _lhsOusedAttrs :: [(Identifier,Identifier)]
         _lhsOusedAttrs :: [(Identifier, Identifier)]
_lhsOusedAttrs = forall {p}. p -> p
rule66 [(Identifier, Identifier)]
_usedAttrs
         _lhsOusedFields :: [Identifier]
         _lhsOusedFields :: [Identifier]
_lhsOusedFields = forall {p}. p -> p
rule67 [Identifier]
_usedFields
         _lhsOusedLocals :: [Identifier]
         _lhsOusedLocals :: [Identifier]
_lhsOusedLocals = forall {p}. p -> p
rule68 [Identifier]
_usedLocals
         __result_ :: T_Expression_vOut7
__result_ = Set (Identifier, Identifier)
-> Expression
-> Seq Error
-> [String]
-> [(Identifier, Identifier)]
-> [Identifier]
-> [Identifier]
-> T_Expression_vOut7
T_Expression_vOut7 Set (Identifier, Identifier)
_lhsOallRhsVars Expression
_lhsOcopy Seq Error
_lhsOerrors [String]
_lhsOtextLines [(Identifier, Identifier)]
_lhsOusedAttrs [Identifier]
_lhsOusedFields [Identifier]
_lhsOusedLocals
         in T_Expression_vOut7
__result_ )
     in T_Expression_v7 -> T_Expression_s8
C_Expression_s8 T_Expression_v7
v7
   {-# INLINE rule60 #-}
   {-# LINE 469 "src-ag/Order.ag" #-}
   rule60 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ((_lhsIallnts) :: [Identifier]) ((_lhsIattrs) :: [(Identifier,Identifier)]) ((_lhsIcon) :: Identifier) ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ((_lhsInt) :: Identifier) ((_lhsIoptions) :: Options) tks_ ->
                                {-# LINE 469 "src-ag/Order.ag" #-}
                                let mergedChildren = [ x | (_,xs) <- Map.elems _lhsImergeMap, x <- xs ]
                                    attrsIn = filter (\(fld,_) -> not (fld `elem` mergedChildren)) _lhsIattrs
                                    inherited = Inh_HsTokensRoot
                                                { attrs_Inh_HsTokensRoot      = attrsIn
                                                , con_Inh_HsTokensRoot        = _lhsIcon
                                                , allfields_Inh_HsTokensRoot  = _lhsIallfields
                                                , allnts_Inh_HsTokensRoot     = _lhsIallnts
                                                , nt_Inh_HsTokensRoot         = _lhsInt
                                                , options_Inh_HsTokensRoot    = _lhsIoptions
                                                }
                                    synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot tks_)) inherited
                                in case synthesized of
                                     Syn_HsTokensRoot
                                      { textLines_Syn_HsTokensRoot  = textLines
                                      , usedAttrs_Syn_HsTokensRoot  = usedAttrs
                                      , usedLocals_Syn_HsTokensRoot = usedLocals
                                      , usedFields_Syn_HsTokensRoot = usedFields
                                      }  -> let extraAttrs = [ (src,attr)
                                                             | (fld,attr) <- usedAttrs, let mbMerged = Map.lookup fld _lhsImergeMap, isJust mbMerged
                                                             , let (Just (_, srcs)) = mbMerged, src <- srcs ]
                                                usedAttrs' = usedAttrs ++ extraAttrs
                                            in (textLines,usedAttrs',usedLocals,usedFields)
                                {-# LINE 742 "src-generated/Order.hs" #-}
   {-# INLINE rule61 #-}
   {-# LINE 492 "src-ag/Order.ag" #-}
   rule61 = \  (_ :: ()) ->
                               {-# LINE 492 "src-ag/Order.ag" #-}
                               Seq.empty
                               {-# LINE 748 "src-generated/Order.hs" #-}
   {-# INLINE rule62 #-}
   {-# LINE 493 "src-ag/Order.ag" #-}
   rule62 = \ _usedAttrs _usedFields _usedLocals ->
                                   {-# LINE 493 "src-ag/Order.ag" #-}
                                   Set.fromList _usedAttrs
                                   `Set.union`
                                   Set.fromList [ (_LOC, l) | l <- _usedLocals    ]
                                   `Set.union`
                                   Set.fromList [ (_FIELD, fld) | fld <- _usedFields    ]
                                   {-# LINE 758 "src-generated/Order.hs" #-}
   {-# INLINE rule63 #-}
   rule63 = \ pos_ tks_ ->
     Expression pos_ tks_
   {-# INLINE rule64 #-}
   rule64 = \ _copy ->
     _copy
   {-# INLINE rule65 #-}
   rule65 = \ _textLines ->
     _textLines
   {-# INLINE rule66 #-}
   rule66 = \ _usedAttrs ->
     _usedAttrs
   {-# INLINE rule67 #-}
   rule67 = \ _usedFields ->
     _usedFields
   {-# INLINE rule68 #-}
   rule68 = \ _usedLocals ->
     _usedLocals

-- Grammar -----------------------------------------------------
-- wrapper
data Inh_Grammar  = Inh_Grammar { Inh_Grammar -> Options
options_Inh_Grammar :: (Options) }
data Syn_Grammar  = Syn_Grammar { Syn_Grammar -> Seq Error
errors_Syn_Grammar :: (Seq Error), Syn_Grammar -> Int
nAutoRules_Syn_Grammar :: (Int), Syn_Grammar -> Int
nExplicitRules_Syn_Grammar :: (Int), Syn_Grammar -> CGrammar
output_Syn_Grammar :: (CGrammar) }
{-# INLINABLE wrap_Grammar #-}
wrap_Grammar :: T_Grammar  -> Inh_Grammar  -> (Syn_Grammar )
wrap_Grammar :: T_Grammar -> Inh_Grammar -> Syn_Grammar
wrap_Grammar (T_Grammar Identity T_Grammar_s11
act) (Inh_Grammar Options
_lhsIoptions) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Grammar_s11
sem <- Identity T_Grammar_s11
act
        let arg10 :: T_Grammar_vIn10
arg10 = Options -> T_Grammar_vIn10
T_Grammar_vIn10 Options
_lhsIoptions
        (T_Grammar_vOut10 Seq Error
_lhsOerrors Int
_lhsOnAutoRules Int
_lhsOnExplicitRules CGrammar
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Grammar_s11 -> T_Grammar_v10
inv_Grammar_s11 T_Grammar_s11
sem T_Grammar_vIn10
arg10)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error -> Int -> Int -> CGrammar -> Syn_Grammar
Syn_Grammar Seq Error
_lhsOerrors Int
_lhsOnAutoRules Int
_lhsOnExplicitRules CGrammar
_lhsOoutput)
   )

-- cata
{-# INLINE sem_Grammar #-}
sem_Grammar :: Grammar  -> T_Grammar 
sem_Grammar :: Grammar -> T_Grammar
sem_Grammar ( Grammar TypeSyns
typeSyns_ UseMap
useMap_ Map Identifier (Set Identifier)
derivings_ Set Identifier
wrappers_ Nonterminals
nonts_ Map Identifier (Map Identifier (Set Identifier))
pragmas_ AttrOrderMap
manualAttrOrderMap_ ParamMap
paramMap_ ContextMap
contextMap_ QuantMap
quantMap_ UniqueMap
uniqueMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
augmentsMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
aroundsMap_ Map
  Identifier
  (Map
     Identifier (Map Identifier (Identifier, [Identifier], Expression)))
mergeMap_ ) = TypeSyns
-> UseMap
-> Map Identifier (Set Identifier)
-> Set Identifier
-> T_Nonterminals
-> Map Identifier (Map Identifier (Set Identifier))
-> AttrOrderMap
-> ParamMap
-> ContextMap
-> QuantMap
-> UniqueMap
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map
     Identifier
     (Map
        Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> T_Grammar
sem_Grammar_Grammar TypeSyns
typeSyns_ UseMap
useMap_ Map Identifier (Set Identifier)
derivings_ Set Identifier
wrappers_ ( Nonterminals -> T_Nonterminals
sem_Nonterminals Nonterminals
nonts_ ) Map Identifier (Map Identifier (Set Identifier))
pragmas_ AttrOrderMap
manualAttrOrderMap_ ParamMap
paramMap_ ContextMap
contextMap_ QuantMap
quantMap_ UniqueMap
uniqueMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
augmentsMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
aroundsMap_ Map
  Identifier
  (Map
     Identifier (Map Identifier (Identifier, [Identifier], Expression)))
mergeMap_

-- semantic domain
newtype T_Grammar  = T_Grammar {
                               T_Grammar -> Identity T_Grammar_s11
attach_T_Grammar :: Identity (T_Grammar_s11 )
                               }
newtype T_Grammar_s11  = C_Grammar_s11 {
                                       T_Grammar_s11 -> T_Grammar_v10
inv_Grammar_s11 :: (T_Grammar_v10 )
                                       }
data T_Grammar_s12  = C_Grammar_s12
type T_Grammar_v10  = (T_Grammar_vIn10 ) -> (T_Grammar_vOut10 )
data T_Grammar_vIn10  = T_Grammar_vIn10 (Options)
data T_Grammar_vOut10  = T_Grammar_vOut10 (Seq Error) (Int) (Int) (CGrammar)
{-# NOINLINE sem_Grammar_Grammar #-}
sem_Grammar_Grammar :: (TypeSyns) -> (UseMap) -> (Derivings) -> (Set NontermIdent) -> T_Nonterminals  -> (PragmaMap) -> (AttrOrderMap) -> (ParamMap) -> (ContextMap) -> (QuantMap) -> (UniqueMap) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) -> T_Grammar 
sem_Grammar_Grammar :: TypeSyns
-> UseMap
-> Map Identifier (Set Identifier)
-> Set Identifier
-> T_Nonterminals
-> Map Identifier (Map Identifier (Set Identifier))
-> AttrOrderMap
-> ParamMap
-> ContextMap
-> QuantMap
-> UniqueMap
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map
     Identifier
     (Map
        Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> T_Grammar
sem_Grammar_Grammar TypeSyns
arg_typeSyns_ UseMap
_ Map Identifier (Set Identifier)
arg_derivings_ Set Identifier
arg_wrappers_ T_Nonterminals
arg_nonts_ Map Identifier (Map Identifier (Set Identifier))
arg_pragmas_ AttrOrderMap
arg_manualAttrOrderMap_ ParamMap
arg_paramMap_ ContextMap
arg_contextMap_ QuantMap
arg_quantMap_ UniqueMap
_ Map Identifier (Map Identifier (Map Identifier [Expression]))
_ Map Identifier (Map Identifier (Map Identifier [Expression]))
arg_aroundsMap_ Map
  Identifier
  (Map
     Identifier (Map Identifier (Identifier, [Identifier], Expression)))
arg_mergeMap_ = Identity T_Grammar_s11 -> T_Grammar
T_Grammar (forall (m :: * -> *) a. Monad m => a -> m a
return T_Grammar_s11
st11) where
   {-# NOINLINE st11 #-}
   st11 :: T_Grammar_s11
st11 = let
      v10 :: T_Grammar_v10 
      v10 :: T_Grammar_v10
v10 = \ (T_Grammar_vIn10 Options
_lhsIoptions) -> ( let
         _nontsX17 :: T_Nonterminals_s17
_nontsX17 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Nonterminals -> Identity T_Nonterminals_s17
attach_T_Nonterminals (T_Nonterminals
arg_nonts_))
         (T_Nonterminals_vOut16 Int
_nontsIacount Seq (Int, Int)
_nontsIadditionalDep Seq (Int, Int, Int)
_nontsIaranges Seq (Int, Int)
_nontsIaroundDep CNonterminals
_nontsIcNonterminals Seq (Int, Int)
_nontsIdirectDep Seq Error
_nontsIerrors Map Identifier Attributes
_nontsIinhMap' Seq (Int, Int)
_nontsIinstDep Seq (Int, Int)
_nontsImergeDep Int
_nontsInAutoRules Int
_nontsInExplicitRules [(Identifier, [Identifier])]
_nontsInonts Seq (Int, NTAttr)
_nontsIntattrs Seq (Int, CRule)
_nontsIrules Map Identifier Attributes
_nontsIsynMap' Int
_nontsIvcount) = T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
_nontsX17 (Int
-> [Identifier]
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> CInterfaceMap
-> CVisitsMap
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Map Identifier Attributes
-> Int
-> T_Nonterminals_vIn16
T_Nonterminals_vIn16 Int
_nontsOacount [Identifier]
_nontsOallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_nontsOaroundMap CInterfaceMap
_nontsOcInterfaceMap CVisitsMap
_nontsOcVisitsMap Map Identifier Attributes
_nontsOinhMap AttrOrderMap
_nontsOmanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_nontsOmergeMap Bool
_nontsOo_case Bool
_nontsOo_cata Bool
_nontsOo_data Bool
_nontsOo_dovisit Bool
_nontsOo_newtypes Bool
_nontsOo_rename Bool
_nontsOo_sem Bool
_nontsOo_sig Bool
_nontsOo_unbox Bool
_nontsOo_wantvisit Options
_nontsOoptions String
_nontsOprefix Map Identifier Attributes
_nontsOsynMap Int
_nontsOvcount)
         _nontsOinhMap :: Map Identifier Attributes
_nontsOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule69 Map Identifier Attributes
_nontsIinhMap'
         _nontsOsynMap :: Map Identifier Attributes
_nontsOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule70 Map Identifier Attributes
_nontsIsynMap'
         _o_dovisit :: Bool
_o_dovisit = forall {a}. [a] -> Options -> Bool
rule71 [Error]
_cyclesErrors Options
_lhsIoptions
         _nontsOo_cata :: Bool
_nontsOo_cata = Options -> Bool
rule72 Options
_lhsIoptions
         _nontsOo_data :: Bool
_nontsOo_data = Options -> Bool
rule73 Options
_lhsIoptions
         _nontsOo_sig :: Bool
_nontsOo_sig = Options -> Bool
rule74 Options
_lhsIoptions
         _nontsOo_sem :: Bool
_nontsOo_sem = Options -> Bool
rule75 Options
_lhsIoptions
         _nontsOo_rename :: Bool
_nontsOo_rename = Options -> Bool
rule76 Options
_lhsIoptions
         _nontsOo_newtypes :: Bool
_nontsOo_newtypes = Options -> Bool
rule77 Options
_lhsIoptions
         _nontsOo_wantvisit :: Bool
_nontsOo_wantvisit = Options -> Bool
rule78 Options
_lhsIoptions
         _nontsOo_unbox :: Bool
_nontsOo_unbox = Options -> Bool
rule79 Options
_lhsIoptions
         _nontsOo_case :: Bool
_nontsOo_case = Options -> Bool
rule80 Options
_lhsIoptions
         _nontsOprefix :: String
_nontsOprefix = Options -> String
rule81 Options
_lhsIoptions
         _nontsOvcount :: Int
_nontsOvcount = () -> Int
rule82  ()
         _nontsOmanualAttrDepMap :: AttrOrderMap
_nontsOmanualAttrDepMap = forall {p}. p -> p
rule83 AttrOrderMap
arg_manualAttrOrderMap_
         _nontsOaroundMap :: Map Identifier (Map Identifier (Map Identifier [Expression]))
_nontsOaroundMap = forall {p}. p -> p
rule84 Map Identifier (Map Identifier (Map Identifier [Expression]))
arg_aroundsMap_
         _nontsOacount :: Int
_nontsOacount = () -> Int
rule85  ()
         _ruleTable :: Array Int CRule
_ruleTable = Seq (Int, CRule) -> Int -> Array Int CRule
rule86 Seq (Int, CRule)
_nontsIrules Int
_nontsIvcount
         _attrTable :: Array Int NTAttr
_attrTable = Int -> Seq (Int, NTAttr) -> Array Int NTAttr
rule87 Int
_nontsIacount Seq (Int, NTAttr)
_nontsIntattrs
         _attrVertex :: Map NTAttr Int
_attrVertex = Seq (Int, NTAttr) -> Map NTAttr Int
rule88 Seq (Int, NTAttr)
_nontsIntattrs
         _tdpToTds :: [(Int, Int)]
_tdpToTds = Map NTAttr Int -> Seq (Int, CRule) -> [(Int, Int)]
rule89 Map NTAttr Int
_attrVertex Seq (Int, CRule)
_nontsIrules
         _tdsToTdp :: [(Int, [Int])]
_tdsToTdp = forall {a}. [(a, Int)] -> [(Int, [a])]
rule90 [(Int, Int)]
_tdpToTds
         _directDep :: [(Int, Int)]
_directDep = Seq (Int, Int) -> Seq (Int, Int) -> [(Int, Int)]
rule91 Seq (Int, Int)
_nontsIadditionalDep Seq (Int, Int)
_nontsIdirectDep
         _instDep :: [(Int, Int)]
_instDep = Seq (Int, Int) -> [(Int, Int)]
rule92 Seq (Int, Int)
_nontsIinstDep
         _aroundDep :: [(Int, Int)]
_aroundDep = Seq (Int, Int) -> [(Int, Int)]
rule93 Seq (Int, Int)
_nontsIaroundDep
         _mergeDep :: [(Int, Int)]
_mergeDep = Seq (Int, Int) -> [(Int, Int)]
rule94 Seq (Int, Int)
_nontsImergeDep
         _info :: Info
_info = Array Int NTAttr
-> Int
-> Seq (Int, Int, Int)
-> [(Identifier, [Identifier])]
-> Int
-> Array Int CRule
-> [(Int, Int)]
-> [(Int, [Int])]
-> Set Identifier
-> Info
rule95 Array Int NTAttr
_attrTable Int
_nontsIacount Seq (Int, Int, Int)
_nontsIaranges [(Identifier, [Identifier])]
_nontsInonts Int
_nontsIvcount Array Int CRule
_ruleTable [(Int, Int)]
_tdpToTds [(Int, [Int])]
_tdsToTdp Set Identifier
arg_wrappers_
         (CInterfaceMap
_cInterfaceMap,CVisitsMap
_cVisitsMap,[Error]
_cyclesErrors) = [(Int, Int)]
-> Array Int NTAttr
-> [(Int, Int)]
-> Info
-> [(Int, Int)]
-> Options
-> [(Int, Int)]
-> Array Int CRule
-> (CInterfaceMap, CVisitsMap, [Error])
rule96 [(Int, Int)]
_aroundDep Array Int NTAttr
_attrTable [(Int, Int)]
_directDep Info
_info [(Int, Int)]
_instDep Options
_lhsIoptions [(Int, Int)]
_mergeDep Array Int CRule
_ruleTable
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = [Error] -> Options -> Seq Error -> Seq Error
rule97 [Error]
_cyclesErrors Options
_lhsIoptions Seq Error
_nontsIerrors
         _lhsOoutput :: CGrammar
         _lhsOoutput :: CGrammar
_lhsOoutput = Map Identifier (Map Identifier (Set Identifier))
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> CNonterminals
-> Bool
-> ContextMap
-> Map Identifier (Set Identifier)
-> ParamMap
-> Map Identifier (Map Identifier (Set Identifier))
-> QuantMap
-> TypeSyns
-> Set Identifier
-> CGrammar
rule98 Map Identifier (Map Identifier (Set Identifier))
_aroundMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_mergeMap CNonterminals
_nontsIcNonterminals Bool
_o_dovisit ContextMap
arg_contextMap_ Map Identifier (Set Identifier)
arg_derivings_ ParamMap
arg_paramMap_ Map Identifier (Map Identifier (Set Identifier))
arg_pragmas_ QuantMap
arg_quantMap_ TypeSyns
arg_typeSyns_ Set Identifier
arg_wrappers_
         _aroundMap :: Map Identifier (Map Identifier (Set Identifier))
_aroundMap = forall {k} {k} {k} {a}.
Map k (Map k (Map k a)) -> Map k (Map k (Set k))
rule99 Map Identifier (Map Identifier (Map Identifier [Expression]))
arg_aroundsMap_
         _mergeMap :: Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_mergeMap = forall {k} {k} {k} {a} {b} {c}.
Map k (Map k (Map k (a, b, c))) -> Map k (Map k (Map k (a, b)))
rule100 Map
  Identifier
  (Map
     Identifier (Map Identifier (Identifier, [Identifier], Expression)))
arg_mergeMap_
         _nontsOallnts :: [Identifier]
_nontsOallnts = [(Identifier, [Identifier])] -> [Identifier]
rule101 [(Identifier, [Identifier])]
_nontsInonts
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = Int -> Int
rule102 Int
_nontsInAutoRules
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = Int -> Int
rule103 Int
_nontsInExplicitRules
         _nontsOcInterfaceMap :: CInterfaceMap
_nontsOcInterfaceMap = forall {p}. p -> p
rule104 CInterfaceMap
_cInterfaceMap
         _nontsOcVisitsMap :: CVisitsMap
_nontsOcVisitsMap = forall {p}. p -> p
rule105 CVisitsMap
_cVisitsMap
         _nontsOmergeMap :: Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_nontsOmergeMap = forall {p}. p -> p
rule106 Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_mergeMap
         _nontsOo_dovisit :: Bool
_nontsOo_dovisit = forall {p}. p -> p
rule107 Bool
_o_dovisit
         _nontsOoptions :: Options
_nontsOoptions = Options -> Options
rule108 Options
_lhsIoptions
         __result_ :: T_Grammar_vOut10
__result_ = Seq Error -> Int -> Int -> CGrammar -> T_Grammar_vOut10
T_Grammar_vOut10 Seq Error
_lhsOerrors Int
_lhsOnAutoRules Int
_lhsOnExplicitRules CGrammar
_lhsOoutput
         in T_Grammar_vOut10
__result_ )
     in T_Grammar_v10 -> T_Grammar_s11
C_Grammar_s11 T_Grammar_v10
v10
   {-# INLINE rule69 #-}
   {-# LINE 15 "src-ag/DistChildAttr.ag" #-}
   rule69 = \ ((_nontsIinhMap') :: Map Identifier Attributes) ->
                             {-# LINE 15 "src-ag/DistChildAttr.ag" #-}
                             _nontsIinhMap'
                             {-# LINE 869 "src-generated/Order.hs" #-}
   {-# INLINE rule70 #-}
   {-# LINE 16 "src-ag/DistChildAttr.ag" #-}
   rule70 = \ ((_nontsIsynMap') :: Map Identifier Attributes) ->
                             {-# LINE 16 "src-ag/DistChildAttr.ag" #-}
                             _nontsIsynMap'
                             {-# LINE 875 "src-generated/Order.hs" #-}
   {-# INLINE rule71 #-}
   {-# LINE 123 "src-ag/Order.ag" #-}
   rule71 = \ _cyclesErrors ((_lhsIoptions) :: Options) ->
                                    {-# LINE 123 "src-ag/Order.ag" #-}
                                    visit     _lhsIoptions && null _cyclesErrors
                                    {-# LINE 881 "src-generated/Order.hs" #-}
   {-# INLINE rule72 #-}
   {-# LINE 124 "src-ag/Order.ag" #-}
   rule72 = \ ((_lhsIoptions) :: Options) ->
                                    {-# LINE 124 "src-ag/Order.ag" #-}
                                    folds     _lhsIoptions
                                    {-# LINE 887 "src-generated/Order.hs" #-}
   {-# INLINE rule73 #-}
   {-# LINE 125 "src-ag/Order.ag" #-}
   rule73 = \ ((_lhsIoptions) :: Options) ->
                                    {-# LINE 125 "src-ag/Order.ag" #-}
                                    dataTypes _lhsIoptions
                                    {-# LINE 893 "src-generated/Order.hs" #-}
   {-# INLINE rule74 #-}
   {-# LINE 126 "src-ag/Order.ag" #-}
   rule74 = \ ((_lhsIoptions) :: Options) ->
                                    {-# LINE 126 "src-ag/Order.ag" #-}
                                    typeSigs  _lhsIoptions
                                    {-# LINE 899 "src-generated/Order.hs" #-}
   {-# INLINE rule75 #-}
   {-# LINE 127 "src-ag/Order.ag" #-}
   rule75 = \ ((_lhsIoptions) :: Options) ->
                                    {-# LINE 127 "src-ag/Order.ag" #-}
                                    semfuns   _lhsIoptions
                                    {-# LINE 905 "src-generated/Order.hs" #-}
   {-# INLINE rule76 #-}
   {-# LINE 128 "src-ag/Order.ag" #-}
   rule76 = \ ((_lhsIoptions) :: Options) ->
                                    {-# LINE 128 "src-ag/Order.ag" #-}
                                    rename    _lhsIoptions
                                    {-# LINE 911 "src-generated/Order.hs" #-}
   {-# INLINE rule77 #-}
   {-# LINE 129 "src-ag/Order.ag" #-}
   rule77 = \ ((_lhsIoptions) :: Options) ->
                                    {-# LINE 129 "src-ag/Order.ag" #-}
                                    newtypes  _lhsIoptions
                                    {-# LINE 917 "src-generated/Order.hs" #-}
   {-# INLINE rule78 #-}
   {-# LINE 130 "src-ag/Order.ag" #-}
   rule78 = \ ((_lhsIoptions) :: Options) ->
                                      {-# LINE 130 "src-ag/Order.ag" #-}
                                      visit   _lhsIoptions
                                      {-# LINE 923 "src-generated/Order.hs" #-}
   {-# INLINE rule79 #-}
   {-# LINE 131 "src-ag/Order.ag" #-}
   rule79 = \ ((_lhsIoptions) :: Options) ->
                                    {-# LINE 131 "src-ag/Order.ag" #-}
                                    unbox     _lhsIoptions
                                    {-# LINE 929 "src-generated/Order.hs" #-}
   {-# INLINE rule80 #-}
   {-# LINE 132 "src-ag/Order.ag" #-}
   rule80 = \ ((_lhsIoptions) :: Options) ->
                                    {-# LINE 132 "src-ag/Order.ag" #-}
                                    cases     _lhsIoptions
                                    {-# LINE 935 "src-generated/Order.hs" #-}
   {-# INLINE rule81 #-}
   {-# LINE 133 "src-ag/Order.ag" #-}
   rule81 = \ ((_lhsIoptions) :: Options) ->
                                    {-# LINE 133 "src-ag/Order.ag" #-}
                                    prefix    _lhsIoptions
                                    {-# LINE 941 "src-generated/Order.hs" #-}
   {-# INLINE rule82 #-}
   {-# LINE 262 "src-ag/Order.ag" #-}
   rule82 = \  (_ :: ()) ->
                               {-# LINE 262 "src-ag/Order.ag" #-}
                               0
                               {-# LINE 947 "src-generated/Order.hs" #-}
   {-# INLINE rule83 #-}
   {-# LINE 288 "src-ag/Order.ag" #-}
   rule83 = \ manualAttrOrderMap_ ->
                                 {-# LINE 288 "src-ag/Order.ag" #-}
                                 manualAttrOrderMap_
                                 {-# LINE 953 "src-generated/Order.hs" #-}
   {-# INLINE rule84 #-}
   {-# LINE 417 "src-ag/Order.ag" #-}
   rule84 = \ aroundsMap_ ->
                                 {-# LINE 417 "src-ag/Order.ag" #-}
                                 aroundsMap_
                                 {-# LINE 959 "src-generated/Order.hs" #-}
   {-# INLINE rule85 #-}
   {-# LINE 508 "src-ag/Order.ag" #-}
   rule85 = \  (_ :: ()) ->
                             {-# LINE 508 "src-ag/Order.ag" #-}
                             0
                             {-# LINE 965 "src-generated/Order.hs" #-}
   {-# INLINE rule86 #-}
   {-# LINE 546 "src-ag/Order.ag" #-}
   rule86 = \ ((_nontsIrules) :: Seq (Vertex,CRule)) ((_nontsIvcount) :: Int) ->
                              {-# LINE 546 "src-ag/Order.ag" #-}
                              Array.array (0,_nontsIvcount-1) (toList _nontsIrules)
                              {-# LINE 971 "src-generated/Order.hs" #-}
   {-# INLINE rule87 #-}
   {-# LINE 547 "src-ag/Order.ag" #-}
   rule87 = \ ((_nontsIacount) :: Int) ((_nontsIntattrs) :: Seq (Vertex,NTAttr)) ->
                              {-# LINE 547 "src-ag/Order.ag" #-}
                              Array.array (0,_nontsIacount-1) (toList _nontsIntattrs)
                              {-# LINE 977 "src-generated/Order.hs" #-}
   {-# INLINE rule88 #-}
   {-# LINE 548 "src-ag/Order.ag" #-}
   rule88 = \ ((_nontsIntattrs) :: Seq (Vertex,NTAttr)) ->
                               {-# LINE 548 "src-ag/Order.ag" #-}
                               Map.fromList (map swap (toList _nontsIntattrs))
                               {-# LINE 983 "src-generated/Order.hs" #-}
   {-# INLINE rule89 #-}
   {-# LINE 549 "src-ag/Order.ag" #-}
   rule89 = \ _attrVertex ((_nontsIrules) :: Seq (Vertex,CRule)) ->
                              {-# LINE 549 "src-ag/Order.ag" #-}
                              [ (s, maybe (-1) (\v -> findWithErr1 "Grammar.tdpToTds" v _attrVertex) (ntattr cr))
                              | (s,cr) <- toList _nontsIrules]
                              {-# LINE 990 "src-generated/Order.hs" #-}
   {-# INLINE rule90 #-}
   {-# LINE 551 "src-ag/Order.ag" #-}
   rule90 = \ _tdpToTds ->
                               {-# LINE 551 "src-ag/Order.ag" #-}
                               let  eq (_,v) (_,v') = v == v'
                                    conv ((s,v):svs)  | v == -1 = Nothing
                                                      | otherwise = Just (v,s:map fst svs)
                               in mapMaybe conv (eqClasses eq _tdpToTds)
                               {-# LINE 999 "src-generated/Order.hs" #-}
   {-# INLINE rule91 #-}
   {-# LINE 555 "src-ag/Order.ag" #-}
   rule91 = \ ((_nontsIadditionalDep) :: Seq Edge) ((_nontsIdirectDep) :: Seq Edge) ->
                              {-# LINE 555 "src-ag/Order.ag" #-}
                              toList (_nontsIdirectDep Seq.>< _nontsIadditionalDep)
                              {-# LINE 1005 "src-generated/Order.hs" #-}
   {-# INLINE rule92 #-}
   {-# LINE 556 "src-ag/Order.ag" #-}
   rule92 = \ ((_nontsIinstDep) :: Seq Edge) ->
                              {-# LINE 556 "src-ag/Order.ag" #-}
                              toList _nontsIinstDep
                              {-# LINE 1011 "src-generated/Order.hs" #-}
   {-# INLINE rule93 #-}
   {-# LINE 557 "src-ag/Order.ag" #-}
   rule93 = \ ((_nontsIaroundDep) :: Seq Edge) ->
                              {-# LINE 557 "src-ag/Order.ag" #-}
                              toList _nontsIaroundDep
                              {-# LINE 1017 "src-generated/Order.hs" #-}
   {-# INLINE rule94 #-}
   {-# LINE 558 "src-ag/Order.ag" #-}
   rule94 = \ ((_nontsImergeDep) :: Seq Edge) ->
                              {-# LINE 558 "src-ag/Order.ag" #-}
                              toList _nontsImergeDep
                              {-# LINE 1023 "src-generated/Order.hs" #-}
   {-# INLINE rule95 #-}
   {-# LINE 559 "src-ag/Order.ag" #-}
   rule95 = \ _attrTable ((_nontsIacount) :: Int) ((_nontsIaranges) :: Seq (Int,Int,Int)) ((_nontsInonts) :: [(NontermIdent,[ConstructorIdent])]) ((_nontsIvcount) :: Int) _ruleTable _tdpToTds _tdsToTdp wrappers_ ->
                              {-# LINE 559 "src-ag/Order.ag" #-}
                              let def [] = -1
                                  def (v:vs) = v
                               in Info { tdsToTdp   = Array.array (0,_nontsIacount-1) _tdsToTdp
                                       , tdpToTds   = Array.array (0,_nontsIvcount-1) _tdpToTds
                                       , attrTable  = _attrTable
                                       , ruleTable  = _ruleTable
                                       , lmh        = toList _nontsIaranges
                                       , nonts      = _nontsInonts
                                       , wraps      = wrappers_
                                       }
                              {-# LINE 1038 "src-generated/Order.hs" #-}
   {-# INLINE rule96 #-}
   {-# LINE 571 "src-ag/Order.ag" #-}
   rule96 = \ _aroundDep _attrTable _directDep _info _instDep ((_lhsIoptions) :: Options) _mergeDep _ruleTable ->
                                {-# LINE 571 "src-ag/Order.ag" #-}
                                case computeSequential _info _directDep (_instDep ++ _aroundDep ++ _mergeDep    ) of
                                             CycleFree    cim cvm   -> ( cim
                                                                       , cvm
                                                                       , []
                                                                       )
                                             LocalCycle   errs      -> ( error "No interfaces for AG with local cycles"
                                                                       , error "No visit sub-sequences for AG with local cycles"
                                                                       , map (localCycleErr _ruleTable (visit _lhsIoptions)) errs
                                                                       )
                                             InstCycle    errs      -> ( error "No interfaces for AG with cycles through insts"
                                                                       , error "No visit sub-sequences for AG with cycles through insts"
                                                                       , map (instCycleErr _ruleTable (visit _lhsIoptions)) errs
                                                                       )
                                             DirectCycle  errs      -> ( error "No interfaces for AG with direct cycles"
                                                                       , error "No visit sub-sequences for AG with direct cycles"
                                                                       , directCycleErrs _attrTable _ruleTable (visit _lhsIoptions) errs
                                                                       )
                                             InducedCycle cim errs ->  ( cim
                                                                       , error "No visit sub-sequences for AG with induced cycles"
                                                                       , inducedCycleErrs _attrTable _ruleTable cim errs
                                                                       )
                                {-# LINE 1064 "src-generated/Order.hs" #-}
   {-# INLINE rule97 #-}
   {-# LINE 592 "src-ag/Order.ag" #-}
   rule97 = \ _cyclesErrors ((_lhsIoptions) :: Options) ((_nontsIerrors) :: Seq Error) ->
                           {-# LINE 592 "src-ag/Order.ag" #-}
                           (if withCycle _lhsIoptions then Seq.fromList _cyclesErrors else Seq.empty)
                            Seq.>< _nontsIerrors
                           {-# LINE 1071 "src-generated/Order.hs" #-}
   {-# INLINE rule98 #-}
   {-# LINE 624 "src-ag/Order.ag" #-}
   rule98 = \ _aroundMap _mergeMap ((_nontsIcNonterminals) :: CNonterminals) _o_dovisit contextMap_ derivings_ paramMap_ pragmas_ quantMap_ typeSyns_ wrappers_ ->
                             {-# LINE 624 "src-ag/Order.ag" #-}
                             CGrammar typeSyns_ derivings_ wrappers_ _nontsIcNonterminals pragmas_ paramMap_ contextMap_ quantMap_ _aroundMap     _mergeMap     _o_dovisit
                             {-# LINE 1077 "src-generated/Order.hs" #-}
   {-# INLINE rule99 #-}
   {-# LINE 637 "src-ag/Order.ag" #-}
   rule99 = \ aroundsMap_ ->
                               {-# LINE 637 "src-ag/Order.ag" #-}
                               Map.map (Map.map Map.keysSet) aroundsMap_
                               {-# LINE 1083 "src-generated/Order.hs" #-}
   {-# INLINE rule100 #-}
   {-# LINE 638 "src-ag/Order.ag" #-}
   rule100 = \ mergeMap_ ->
                               {-# LINE 638 "src-ag/Order.ag" #-}
                               Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_
                               {-# LINE 1089 "src-generated/Order.hs" #-}
   {-# INLINE rule101 #-}
   {-# LINE 655 "src-ag/Order.ag" #-}
   rule101 = \ ((_nontsInonts) :: [(NontermIdent,[ConstructorIdent])]) ->
                             {-# LINE 655 "src-ag/Order.ag" #-}
                             map fst (_nontsInonts)
                             {-# LINE 1095 "src-generated/Order.hs" #-}
   {-# INLINE rule102 #-}
   rule102 = \ ((_nontsInAutoRules) :: Int) ->
     _nontsInAutoRules
   {-# INLINE rule103 #-}
   rule103 = \ ((_nontsInExplicitRules) :: Int) ->
     _nontsInExplicitRules
   {-# INLINE rule104 #-}
   rule104 = \ _cInterfaceMap ->
     _cInterfaceMap
   {-# INLINE rule105 #-}
   rule105 = \ _cVisitsMap ->
     _cVisitsMap
   {-# INLINE rule106 #-}
   rule106 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule107 #-}
   rule107 = \ _o_dovisit ->
     _o_dovisit
   {-# INLINE rule108 #-}
   rule108 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions

-- Nonterminal -------------------------------------------------
-- wrapper
data Inh_Nonterminal  = Inh_Nonterminal { Inh_Nonterminal -> Int
acount_Inh_Nonterminal :: (Int), Inh_Nonterminal -> [Identifier]
allnts_Inh_Nonterminal :: ([Identifier]), Inh_Nonterminal
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
aroundMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), Inh_Nonterminal -> CInterfaceMap
cInterfaceMap_Inh_Nonterminal :: (CInterfaceMap), Inh_Nonterminal -> CVisitsMap
cVisitsMap_Inh_Nonterminal :: (CVisitsMap), Inh_Nonterminal -> Map Identifier Attributes
inhMap_Inh_Nonterminal :: (Map Identifier Attributes), Inh_Nonterminal -> AttrOrderMap
manualAttrDepMap_Inh_Nonterminal :: (AttrOrderMap), Inh_Nonterminal
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
mergeMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))), Inh_Nonterminal -> Bool
o_case_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Bool
o_cata_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Bool
o_data_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Bool
o_dovisit_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Bool
o_newtypes_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Bool
o_rename_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Bool
o_sem_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Bool
o_sig_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Bool
o_unbox_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Bool
o_wantvisit_Inh_Nonterminal :: (Bool), Inh_Nonterminal -> Options
options_Inh_Nonterminal :: (Options), Inh_Nonterminal -> String
prefix_Inh_Nonterminal :: (String), Inh_Nonterminal -> Map Identifier Attributes
synMap_Inh_Nonterminal :: (Map Identifier Attributes), Inh_Nonterminal -> Int
vcount_Inh_Nonterminal :: (Int) }
data Syn_Nonterminal  = Syn_Nonterminal { Syn_Nonterminal -> Int
acount_Syn_Nonterminal :: (Int), Syn_Nonterminal -> Seq (Int, Int)
additionalDep_Syn_Nonterminal :: (Seq Edge), Syn_Nonterminal -> Seq (Int, Int, Int)
aranges_Syn_Nonterminal :: (Seq (Int,Int,Int)), Syn_Nonterminal -> Seq (Int, Int)
aroundDep_Syn_Nonterminal :: (Seq Edge), Syn_Nonterminal -> CNonterminal
cNonterminal_Syn_Nonterminal :: (CNonterminal), Syn_Nonterminal -> Seq (Int, Int)
directDep_Syn_Nonterminal :: (Seq Edge), Syn_Nonterminal -> Seq Error
errors_Syn_Nonterminal :: (Seq Error), Syn_Nonterminal -> Map Identifier Attributes
inhMap'_Syn_Nonterminal :: (Map Identifier Attributes), Syn_Nonterminal -> Seq (Int, Int)
instDep_Syn_Nonterminal :: (Seq Edge), Syn_Nonterminal -> Seq (Int, Int)
mergeDep_Syn_Nonterminal :: (Seq Edge), Syn_Nonterminal -> Int
nAutoRules_Syn_Nonterminal :: (Int), Syn_Nonterminal -> Int
nExplicitRules_Syn_Nonterminal :: (Int), Syn_Nonterminal -> [(Identifier, [Identifier])]
nonts_Syn_Nonterminal :: ([(NontermIdent,[ConstructorIdent])]), Syn_Nonterminal -> Seq (Int, NTAttr)
ntattrs_Syn_Nonterminal :: (Seq (Vertex,NTAttr)), Syn_Nonterminal -> Seq (Int, CRule)
rules_Syn_Nonterminal :: (Seq (Vertex,CRule)), Syn_Nonterminal -> Map Identifier Attributes
synMap'_Syn_Nonterminal :: (Map Identifier Attributes), Syn_Nonterminal -> Int
vcount_Syn_Nonterminal :: (Int) }
{-# INLINABLE wrap_Nonterminal #-}
wrap_Nonterminal :: T_Nonterminal  -> Inh_Nonterminal  -> (Syn_Nonterminal )
wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> Syn_Nonterminal
wrap_Nonterminal (T_Nonterminal Identity T_Nonterminal_s14
act) (Inh_Nonterminal Int
_lhsIacount [Identifier]
_lhsIallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap CInterfaceMap
_lhsIcInterfaceMap CVisitsMap
_lhsIcVisitsMap Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_data Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Nonterminal_s14
sem <- Identity T_Nonterminal_s14
act
        let arg13 :: T_Nonterminal_vIn13
arg13 = Int
-> [Identifier]
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> CInterfaceMap
-> CVisitsMap
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Map Identifier Attributes
-> Int
-> T_Nonterminal_vIn13
T_Nonterminal_vIn13 Int
_lhsIacount [Identifier]
_lhsIallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap CInterfaceMap
_lhsIcInterfaceMap CVisitsMap
_lhsIcVisitsMap Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_data Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount
        (T_Nonterminal_vOut13 Int
_lhsOacount Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int, Int)
_lhsOaranges Seq (Int, Int)
_lhsOaroundDep CNonterminal
_lhsOcNonterminal Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules [(Identifier, [Identifier])]
_lhsOnonts Seq (Int, NTAttr)
_lhsOntattrs Seq (Int, CRule)
_lhsOrules Map Identifier Attributes
_lhsOsynMap' Int
_lhsOvcount) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Nonterminal_s14 -> T_Nonterminal_v13
inv_Nonterminal_s14 T_Nonterminal_s14
sem T_Nonterminal_vIn13
arg13)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Int
-> Seq (Int, Int)
-> Seq (Int, Int, Int)
-> Seq (Int, Int)
-> CNonterminal
-> Seq (Int, Int)
-> Seq Error
-> Map Identifier Attributes
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> [(Identifier, [Identifier])]
-> Seq (Int, NTAttr)
-> Seq (Int, CRule)
-> Map Identifier Attributes
-> Int
-> Syn_Nonterminal
Syn_Nonterminal Int
_lhsOacount Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int, Int)
_lhsOaranges Seq (Int, Int)
_lhsOaroundDep CNonterminal
_lhsOcNonterminal Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules [(Identifier, [Identifier])]
_lhsOnonts Seq (Int, NTAttr)
_lhsOntattrs Seq (Int, CRule)
_lhsOrules Map Identifier Attributes
_lhsOsynMap' Int
_lhsOvcount)
   )

-- cata
{-# INLINE sem_Nonterminal #-}
sem_Nonterminal :: Nonterminal  -> T_Nonterminal 
sem_Nonterminal :: Nonterminal -> T_Nonterminal
sem_Nonterminal ( Nonterminal Identifier
nt_ [Identifier]
params_ Attributes
inh_ Attributes
syn_ Productions
prods_ ) = Identifier
-> [Identifier]
-> Attributes
-> Attributes
-> T_Productions
-> T_Nonterminal
sem_Nonterminal_Nonterminal Identifier
nt_ [Identifier]
params_ Attributes
inh_ Attributes
syn_ ( Productions -> T_Productions
sem_Productions Productions
prods_ )

-- semantic domain
newtype T_Nonterminal  = T_Nonterminal {
                                       T_Nonterminal -> Identity T_Nonterminal_s14
attach_T_Nonterminal :: Identity (T_Nonterminal_s14 )
                                       }
newtype T_Nonterminal_s14  = C_Nonterminal_s14 {
                                               T_Nonterminal_s14 -> T_Nonterminal_v13
inv_Nonterminal_s14 :: (T_Nonterminal_v13 )
                                               }
data T_Nonterminal_s15  = C_Nonterminal_s15
type T_Nonterminal_v13  = (T_Nonterminal_vIn13 ) -> (T_Nonterminal_vOut13 )
data T_Nonterminal_vIn13  = T_Nonterminal_vIn13 (Int) ([Identifier]) (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) (CInterfaceMap) (CVisitsMap) (Map Identifier Attributes) (AttrOrderMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Map Identifier Attributes) (Int)
data T_Nonterminal_vOut13  = T_Nonterminal_vOut13 (Int) (Seq Edge) (Seq (Int,Int,Int)) (Seq Edge) (CNonterminal) (Seq Edge) (Seq Error) (Map Identifier Attributes) (Seq Edge) (Seq Edge) (Int) (Int) ([(NontermIdent,[ConstructorIdent])]) (Seq (Vertex,NTAttr)) (Seq (Vertex,CRule)) (Map Identifier Attributes) (Int)
{-# NOINLINE sem_Nonterminal_Nonterminal #-}
sem_Nonterminal_Nonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_Productions  -> T_Nonterminal 
sem_Nonterminal_Nonterminal :: Identifier
-> [Identifier]
-> Attributes
-> Attributes
-> T_Productions
-> T_Nonterminal
sem_Nonterminal_Nonterminal Identifier
arg_nt_ [Identifier]
arg_params_ Attributes
arg_inh_ Attributes
arg_syn_ T_Productions
arg_prods_ = Identity T_Nonterminal_s14 -> T_Nonterminal
T_Nonterminal (forall (m :: * -> *) a. Monad m => a -> m a
return T_Nonterminal_s14
st14) where
   {-# NOINLINE st14 #-}
   st14 :: T_Nonterminal_s14
st14 = let
      v13 :: T_Nonterminal_v13 
      v13 :: T_Nonterminal_v13
v13 = \ (T_Nonterminal_vIn13 Int
_lhsIacount [Identifier]
_lhsIallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap CInterfaceMap
_lhsIcInterfaceMap CVisitsMap
_lhsIcVisitsMap Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_data Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) -> ( let
         _prodsX29 :: T_Productions_s29
_prodsX29 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Productions -> Identity T_Productions_s29
attach_T_Productions (T_Productions
arg_prods_))
         (T_Productions_vOut28 Seq (Int, Int)
_prodsIadditionalDep Seq (Int, Int)
_prodsIaroundDep CProductions
_prodsIcProductions [Identifier]
_prodsIcons Seq (Int, Int)
_prodsIdirectDep Seq Error
_prodsIerrors Seq (Int, Int)
_prodsIinstDep Seq (Int, Int)
_prodsImergeDep Int
_prodsInAutoRules Int
_prodsInExplicitRules Seq (Int, CRule)
_prodsIrules Int
_prodsIvcount) = T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
_prodsX29 ([Identifier]
-> Map Identifier (Map Identifier [Expression])
-> CVisitsMap
-> Attributes
-> Map Identifier Attributes
-> AttrOrderMap
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> Int
-> T_Productions_vIn28
T_Productions_vIn28 [Identifier]
_prodsOallnts Map Identifier (Map Identifier [Expression])
_prodsOaroundMap CVisitsMap
_prodsOcVisitsMap Attributes
_prodsOinh Map Identifier Attributes
_prodsOinhMap AttrOrderMap
_prodsOmanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_prodsOmergeMap Identifier
_prodsOnt Bool
_prodsOo_case Bool
_prodsOo_cata Bool
_prodsOo_dovisit Bool
_prodsOo_newtypes Bool
_prodsOo_rename Bool
_prodsOo_sem Bool
_prodsOo_sig Bool
_prodsOo_unbox Bool
_prodsOo_wantvisit Options
_prodsOoptions String
_prodsOprefix Attributes
_prodsOsyn Map Identifier Attributes
_prodsOsynMap Int
_prodsOvcount)
         _lhsOinhMap' :: Map Identifier Attributes
         _lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = forall {a} {k}. a -> k -> Map k a
rule109 Attributes
arg_inh_ Identifier
arg_nt_
         _lhsOsynMap' :: Map Identifier Attributes
         _lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = forall k a. k -> a -> Map k a
rule110 Identifier
arg_nt_ Attributes
arg_syn_
         _prodsOnt :: Identifier
_prodsOnt = forall {p}. p -> p
rule111 Identifier
arg_nt_
         _prodsOinh :: Attributes
_prodsOinh = forall {p}. p -> p
rule112 Attributes
arg_inh_
         _prodsOsyn :: Attributes
_prodsOsyn = forall {p}. p -> p
rule113 Attributes
arg_syn_
         _mergeMap :: Map Identifier (Map Identifier (Identifier, [Identifier]))
_mergeMap = Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Identifier
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
rule114 Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Identifier
arg_nt_
         _aroundMap :: Map Identifier (Map Identifier [Expression])
_aroundMap = Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Identifier -> Map Identifier (Map Identifier [Expression])
rule115 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap Identifier
arg_nt_
         _ntattrs :: [NTAttr]
_ntattrs = Attributes -> Identifier -> Attributes -> [NTAttr]
rule116 Attributes
arg_inh_ Identifier
arg_nt_ Attributes
arg_syn_
         _lhsOntattrs :: Seq (Vertex,NTAttr)
         _lhsOntattrs :: Seq (Int, NTAttr)
_lhsOntattrs = forall {b}. Int -> [b] -> Seq (Int, b)
rule117 Int
_lhsIacount [NTAttr]
_ntattrs
         _lhsOacount :: Int
         _lhsOacount :: Int
_lhsOacount = forall {k} {a} {k} {a}. Int -> Map k a -> Map k a -> Int
rule118 Int
_lhsIacount Attributes
arg_inh_ Attributes
arg_syn_
         _lhsOaranges :: Seq (Int,Int,Int)
         _lhsOaranges :: Seq (Int, Int, Int)
_lhsOaranges = forall {k} {a} {k} {a}.
Int -> Map k a -> Map k a -> Seq (Int, Int, Int)
rule119 Int
_lhsIacount Attributes
arg_inh_ Attributes
arg_syn_
         _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]
         _lhsOnonts :: [(Identifier, [Identifier])]
_lhsOnonts = forall {a}. [Identifier] -> a -> [(a, [Identifier])]
rule120 [Identifier]
_prodsIcons Identifier
arg_nt_
         _cInter :: CInterface
_cInter = CInterfaceMap
-> Bool -> Attributes -> Identifier -> Attributes -> CInterface
rule121 CInterfaceMap
_lhsIcInterfaceMap Bool
_lhsIo_dovisit Attributes
arg_inh_ Identifier
arg_nt_ Attributes
arg_syn_
         _lhsOcNonterminal :: CNonterminal
         _lhsOcNonterminal :: CNonterminal
_lhsOcNonterminal = CInterface
-> CProductions
-> Attributes
-> Identifier
-> [Identifier]
-> Attributes
-> CNonterminal
rule122 CInterface
_cInter CProductions
_prodsIcProductions Attributes
arg_inh_ Identifier
arg_nt_ [Identifier]
arg_params_ Attributes
arg_syn_
         _lhsOadditionalDep :: Seq Edge
         _lhsOadditionalDep :: Seq (Int, Int)
_lhsOadditionalDep = Seq (Int, Int) -> Seq (Int, Int)
rule123 Seq (Int, Int)
_prodsIadditionalDep
         _lhsOaroundDep :: Seq Edge
         _lhsOaroundDep :: Seq (Int, Int)
_lhsOaroundDep = Seq (Int, Int) -> Seq (Int, Int)
rule124 Seq (Int, Int)
_prodsIaroundDep
         _lhsOdirectDep :: Seq Edge
         _lhsOdirectDep :: Seq (Int, Int)
_lhsOdirectDep = Seq (Int, Int) -> Seq (Int, Int)
rule125 Seq (Int, Int)
_prodsIdirectDep
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule126 Seq Error
_prodsIerrors
         _lhsOinstDep :: Seq Edge
         _lhsOinstDep :: Seq (Int, Int)
_lhsOinstDep = Seq (Int, Int) -> Seq (Int, Int)
rule127 Seq (Int, Int)
_prodsIinstDep
         _lhsOmergeDep :: Seq Edge
         _lhsOmergeDep :: Seq (Int, Int)
_lhsOmergeDep = Seq (Int, Int) -> Seq (Int, Int)
rule128 Seq (Int, Int)
_prodsImergeDep
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = Int -> Int
rule129 Int
_prodsInAutoRules
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = Int -> Int
rule130 Int
_prodsInExplicitRules
         _lhsOrules :: Seq (Vertex,CRule)
         _lhsOrules :: Seq (Int, CRule)
_lhsOrules = Seq (Int, CRule) -> Seq (Int, CRule)
rule131 Seq (Int, CRule)
_prodsIrules
         _lhsOvcount :: Int
         _lhsOvcount :: Int
_lhsOvcount = Int -> Int
rule132 Int
_prodsIvcount
         _prodsOallnts :: [Identifier]
_prodsOallnts = [Identifier] -> [Identifier]
rule133 [Identifier]
_lhsIallnts
         _prodsOaroundMap :: Map Identifier (Map Identifier [Expression])
_prodsOaroundMap = forall {p}. p -> p
rule134 Map Identifier (Map Identifier [Expression])
_aroundMap
         _prodsOcVisitsMap :: CVisitsMap
_prodsOcVisitsMap = CVisitsMap -> CVisitsMap
rule135 CVisitsMap
_lhsIcVisitsMap
         _prodsOinhMap :: Map Identifier Attributes
_prodsOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule136 Map Identifier Attributes
_lhsIinhMap
         _prodsOmanualAttrDepMap :: AttrOrderMap
_prodsOmanualAttrDepMap = AttrOrderMap -> AttrOrderMap
rule137 AttrOrderMap
_lhsImanualAttrDepMap
         _prodsOmergeMap :: Map Identifier (Map Identifier (Identifier, [Identifier]))
_prodsOmergeMap = forall {p}. p -> p
rule138 Map Identifier (Map Identifier (Identifier, [Identifier]))
_mergeMap
         _prodsOo_case :: Bool
_prodsOo_case = Bool -> Bool
rule139 Bool
_lhsIo_case
         _prodsOo_cata :: Bool
_prodsOo_cata = Bool -> Bool
rule140 Bool
_lhsIo_cata
         _prodsOo_dovisit :: Bool
_prodsOo_dovisit = Bool -> Bool
rule141 Bool
_lhsIo_dovisit
         _prodsOo_newtypes :: Bool
_prodsOo_newtypes = Bool -> Bool
rule142 Bool
_lhsIo_newtypes
         _prodsOo_rename :: Bool
_prodsOo_rename = Bool -> Bool
rule143 Bool
_lhsIo_rename
         _prodsOo_sem :: Bool
_prodsOo_sem = Bool -> Bool
rule144 Bool
_lhsIo_sem
         _prodsOo_sig :: Bool
_prodsOo_sig = Bool -> Bool
rule145 Bool
_lhsIo_sig
         _prodsOo_unbox :: Bool
_prodsOo_unbox = Bool -> Bool
rule146 Bool
_lhsIo_unbox
         _prodsOo_wantvisit :: Bool
_prodsOo_wantvisit = Bool -> Bool
rule147 Bool
_lhsIo_wantvisit
         _prodsOoptions :: Options
_prodsOoptions = Options -> Options
rule148 Options
_lhsIoptions
         _prodsOprefix :: String
_prodsOprefix = ShowS
rule149 String
_lhsIprefix
         _prodsOsynMap :: Map Identifier Attributes
_prodsOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule150 Map Identifier Attributes
_lhsIsynMap
         _prodsOvcount :: Int
_prodsOvcount = Int -> Int
rule151 Int
_lhsIvcount
         __result_ :: T_Nonterminal_vOut13
__result_ = Int
-> Seq (Int, Int)
-> Seq (Int, Int, Int)
-> Seq (Int, Int)
-> CNonterminal
-> Seq (Int, Int)
-> Seq Error
-> Map Identifier Attributes
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> [(Identifier, [Identifier])]
-> Seq (Int, NTAttr)
-> Seq (Int, CRule)
-> Map Identifier Attributes
-> Int
-> T_Nonterminal_vOut13
T_Nonterminal_vOut13 Int
_lhsOacount Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int, Int)
_lhsOaranges Seq (Int, Int)
_lhsOaroundDep CNonterminal
_lhsOcNonterminal Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules [(Identifier, [Identifier])]
_lhsOnonts Seq (Int, NTAttr)
_lhsOntattrs Seq (Int, CRule)
_lhsOrules Map Identifier Attributes
_lhsOsynMap' Int
_lhsOvcount
         in T_Nonterminal_vOut13
__result_ )
     in T_Nonterminal_v13 -> T_Nonterminal_s14
C_Nonterminal_s14 T_Nonterminal_v13
v13
   {-# INLINE rule109 #-}
   {-# LINE 7 "src-ag/DistChildAttr.ag" #-}
   rule109 = \ inh_ nt_ ->
                                 {-# LINE 7 "src-ag/DistChildAttr.ag" #-}
                                 Map.singleton nt_ inh_
                                 {-# LINE 1225 "src-generated/Order.hs" #-}
   {-# INLINE rule110 #-}
   {-# LINE 8 "src-ag/DistChildAttr.ag" #-}
   rule110 = \ nt_ syn_ ->
                                 {-# LINE 8 "src-ag/DistChildAttr.ag" #-}
                                 Map.singleton nt_ syn_
                                 {-# LINE 1231 "src-generated/Order.hs" #-}
   {-# INLINE rule111 #-}
   {-# LINE 97 "src-ag/Order.ag" #-}
   rule111 = \ nt_ ->
                               {-# LINE 97 "src-ag/Order.ag" #-}
                               nt_
                               {-# LINE 1237 "src-generated/Order.hs" #-}
   {-# INLINE rule112 #-}
   {-# LINE 100 "src-ag/Order.ag" #-}
   rule112 = \ inh_ ->
                               {-# LINE 100 "src-ag/Order.ag" #-}
                               inh_
                               {-# LINE 1243 "src-generated/Order.hs" #-}
   {-# INLINE rule113 #-}
   {-# LINE 101 "src-ag/Order.ag" #-}
   rule113 = \ syn_ ->
                               {-# LINE 101 "src-ag/Order.ag" #-}
                               syn_
                               {-# LINE 1249 "src-generated/Order.hs" #-}
   {-# INLINE rule114 #-}
   {-# LINE 360 "src-ag/Order.ag" #-}
   rule114 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) nt_ ->
                                                {-# LINE 360 "src-ag/Order.ag" #-}
                                                Map.findWithDefault Map.empty nt_ _lhsImergeMap
                                                {-# LINE 1255 "src-generated/Order.hs" #-}
   {-# INLINE rule115 #-}
   {-# LINE 413 "src-ag/Order.ag" #-}
   rule115 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) nt_ ->
                                                 {-# LINE 413 "src-ag/Order.ag" #-}
                                                 Map.findWithDefault Map.empty nt_ _lhsIaroundMap
                                                 {-# LINE 1261 "src-generated/Order.hs" #-}
   {-# INLINE rule116 #-}
   {-# LINE 511 "src-ag/Order.ag" #-}
   rule116 = \ inh_ nt_ syn_ ->
                                 {-# LINE 511 "src-ag/Order.ag" #-}
                                 [ NTAInh nt_ inh tp | (inh,tp) <- Map.assocs inh_ ]
                                 ++ [NTASyn nt_ syn tp | (syn,tp) <- Map.assocs syn_ ]
                                 {-# LINE 1268 "src-generated/Order.hs" #-}
   {-# INLINE rule117 #-}
   {-# LINE 513 "src-ag/Order.ag" #-}
   rule117 = \ ((_lhsIacount) :: Int) _ntattrs ->
                                {-# LINE 513 "src-ag/Order.ag" #-}
                                Seq.fromList (zip [_lhsIacount ..] _ntattrs)
                                {-# LINE 1274 "src-generated/Order.hs" #-}
   {-# INLINE rule118 #-}
   {-# LINE 514 "src-ag/Order.ag" #-}
   rule118 = \ ((_lhsIacount) :: Int) inh_ syn_ ->
                                {-# LINE 514 "src-ag/Order.ag" #-}
                                _lhsIacount + Map.size inh_ + Map.size syn_
                                {-# LINE 1280 "src-generated/Order.hs" #-}
   {-# INLINE rule119 #-}
   {-# LINE 515 "src-ag/Order.ag" #-}
   rule119 = \ ((_lhsIacount) :: Int) inh_ syn_ ->
                                 {-# LINE 515 "src-ag/Order.ag" #-}
                                 Seq.singleton
                                  (_lhsIacount
                                  ,_lhsIacount + Map.size inh_
                                  ,_lhsIacount + Map.size syn_ + Map.size inh_ - 1)
                                 {-# LINE 1289 "src-generated/Order.hs" #-}
   {-# INLINE rule120 #-}
   {-# LINE 524 "src-ag/Order.ag" #-}
   rule120 = \ ((_prodsIcons) :: [ConstructorIdent]) nt_ ->
                                {-# LINE 524 "src-ag/Order.ag" #-}
                                [(nt_,_prodsIcons)]
                                {-# LINE 1295 "src-generated/Order.hs" #-}
   {-# INLINE rule121 #-}
   {-# LINE 601 "src-ag/Order.ag" #-}
   rule121 = \ ((_lhsIcInterfaceMap) :: CInterfaceMap) ((_lhsIo_dovisit) :: Bool) inh_ nt_ syn_ ->
                                 {-# LINE 601 "src-ag/Order.ag" #-}
                                 if  _lhsIo_dovisit
                                        then findWithErr1 "Nonterminal.cInter" nt_ _lhsIcInterfaceMap
                                        else CInterface [CSegment inh_ syn_]
                                 {-# LINE 1303 "src-generated/Order.hs" #-}
   {-# INLINE rule122 #-}
   {-# LINE 629 "src-ag/Order.ag" #-}
   rule122 = \ _cInter ((_prodsIcProductions) :: CProductions) inh_ nt_ params_ syn_ ->
                                       {-# LINE 629 "src-ag/Order.ag" #-}
                                       CNonterminal nt_ params_ inh_ syn_ _prodsIcProductions _cInter
                                       {-# LINE 1309 "src-generated/Order.hs" #-}
   {-# INLINE rule123 #-}
   rule123 = \ ((_prodsIadditionalDep) :: Seq Edge) ->
     _prodsIadditionalDep
   {-# INLINE rule124 #-}
   rule124 = \ ((_prodsIaroundDep) :: Seq Edge) ->
     _prodsIaroundDep
   {-# INLINE rule125 #-}
   rule125 = \ ((_prodsIdirectDep) :: Seq Edge) ->
     _prodsIdirectDep
   {-# INLINE rule126 #-}
   rule126 = \ ((_prodsIerrors) :: Seq Error) ->
     _prodsIerrors
   {-# INLINE rule127 #-}
   rule127 = \ ((_prodsIinstDep) :: Seq Edge) ->
     _prodsIinstDep
   {-# INLINE rule128 #-}
   rule128 = \ ((_prodsImergeDep) :: Seq Edge) ->
     _prodsImergeDep
   {-# INLINE rule129 #-}
   rule129 = \ ((_prodsInAutoRules) :: Int) ->
     _prodsInAutoRules
   {-# INLINE rule130 #-}
   rule130 = \ ((_prodsInExplicitRules) :: Int) ->
     _prodsInExplicitRules
   {-# INLINE rule131 #-}
   rule131 = \ ((_prodsIrules) :: Seq (Vertex,CRule)) ->
     _prodsIrules
   {-# INLINE rule132 #-}
   rule132 = \ ((_prodsIvcount) :: Int) ->
     _prodsIvcount
   {-# INLINE rule133 #-}
   rule133 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule134 #-}
   rule134 = \ _aroundMap ->
     _aroundMap
   {-# INLINE rule135 #-}
   rule135 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->
     _lhsIcVisitsMap
   {-# INLINE rule136 #-}
   rule136 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule137 #-}
   rule137 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->
     _lhsImanualAttrDepMap
   {-# INLINE rule138 #-}
   rule138 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule139 #-}
   rule139 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule140 #-}
   rule140 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule141 #-}
   rule141 = \ ((_lhsIo_dovisit) :: Bool) ->
     _lhsIo_dovisit
   {-# INLINE rule142 #-}
   rule142 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule143 #-}
   rule143 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule144 #-}
   rule144 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule145 #-}
   rule145 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule146 #-}
   rule146 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule147 #-}
   rule147 = \ ((_lhsIo_wantvisit) :: Bool) ->
     _lhsIo_wantvisit
   {-# INLINE rule148 #-}
   rule148 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule149 #-}
   rule149 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule150 #-}
   rule150 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
   {-# INLINE rule151 #-}
   rule151 = \ ((_lhsIvcount) :: Int) ->
     _lhsIvcount

-- Nonterminals ------------------------------------------------
-- wrapper
data Inh_Nonterminals  = Inh_Nonterminals { Inh_Nonterminals -> Int
acount_Inh_Nonterminals :: (Int), Inh_Nonterminals -> [Identifier]
allnts_Inh_Nonterminals :: ([Identifier]), Inh_Nonterminals
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
aroundMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), Inh_Nonterminals -> CInterfaceMap
cInterfaceMap_Inh_Nonterminals :: (CInterfaceMap), Inh_Nonterminals -> CVisitsMap
cVisitsMap_Inh_Nonterminals :: (CVisitsMap), Inh_Nonterminals -> Map Identifier Attributes
inhMap_Inh_Nonterminals :: (Map Identifier Attributes), Inh_Nonterminals -> AttrOrderMap
manualAttrDepMap_Inh_Nonterminals :: (AttrOrderMap), Inh_Nonterminals
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
mergeMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))), Inh_Nonterminals -> Bool
o_case_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Bool
o_cata_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Bool
o_data_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Bool
o_dovisit_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Bool
o_newtypes_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Bool
o_rename_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Bool
o_sem_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Bool
o_sig_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Bool
o_unbox_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Bool
o_wantvisit_Inh_Nonterminals :: (Bool), Inh_Nonterminals -> Options
options_Inh_Nonterminals :: (Options), Inh_Nonterminals -> String
prefix_Inh_Nonterminals :: (String), Inh_Nonterminals -> Map Identifier Attributes
synMap_Inh_Nonterminals :: (Map Identifier Attributes), Inh_Nonterminals -> Int
vcount_Inh_Nonterminals :: (Int) }
data Syn_Nonterminals  = Syn_Nonterminals { Syn_Nonterminals -> Int
acount_Syn_Nonterminals :: (Int), Syn_Nonterminals -> Seq (Int, Int)
additionalDep_Syn_Nonterminals :: (Seq Edge), Syn_Nonterminals -> Seq (Int, Int, Int)
aranges_Syn_Nonterminals :: (Seq (Int,Int,Int)), Syn_Nonterminals -> Seq (Int, Int)
aroundDep_Syn_Nonterminals :: (Seq Edge), Syn_Nonterminals -> CNonterminals
cNonterminals_Syn_Nonterminals :: (CNonterminals), Syn_Nonterminals -> Seq (Int, Int)
directDep_Syn_Nonterminals :: (Seq Edge), Syn_Nonterminals -> Seq Error
errors_Syn_Nonterminals :: (Seq Error), Syn_Nonterminals -> Map Identifier Attributes
inhMap'_Syn_Nonterminals :: (Map Identifier Attributes), Syn_Nonterminals -> Seq (Int, Int)
instDep_Syn_Nonterminals :: (Seq Edge), Syn_Nonterminals -> Seq (Int, Int)
mergeDep_Syn_Nonterminals :: (Seq Edge), Syn_Nonterminals -> Int
nAutoRules_Syn_Nonterminals :: (Int), Syn_Nonterminals -> Int
nExplicitRules_Syn_Nonterminals :: (Int), Syn_Nonterminals -> [(Identifier, [Identifier])]
nonts_Syn_Nonterminals :: ([(NontermIdent,[ConstructorIdent])]), Syn_Nonterminals -> Seq (Int, NTAttr)
ntattrs_Syn_Nonterminals :: (Seq (Vertex,NTAttr)), Syn_Nonterminals -> Seq (Int, CRule)
rules_Syn_Nonterminals :: (Seq (Vertex,CRule)), Syn_Nonterminals -> Map Identifier Attributes
synMap'_Syn_Nonterminals :: (Map Identifier Attributes), Syn_Nonterminals -> Int
vcount_Syn_Nonterminals :: (Int) }
{-# INLINABLE wrap_Nonterminals #-}
wrap_Nonterminals :: T_Nonterminals  -> Inh_Nonterminals  -> (Syn_Nonterminals )
wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> Syn_Nonterminals
wrap_Nonterminals (T_Nonterminals Identity T_Nonterminals_s17
act) (Inh_Nonterminals Int
_lhsIacount [Identifier]
_lhsIallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap CInterfaceMap
_lhsIcInterfaceMap CVisitsMap
_lhsIcVisitsMap Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_data Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Nonterminals_s17
sem <- Identity T_Nonterminals_s17
act
        let arg16 :: T_Nonterminals_vIn16
arg16 = Int
-> [Identifier]
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> CInterfaceMap
-> CVisitsMap
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Map Identifier Attributes
-> Int
-> T_Nonterminals_vIn16
T_Nonterminals_vIn16 Int
_lhsIacount [Identifier]
_lhsIallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap CInterfaceMap
_lhsIcInterfaceMap CVisitsMap
_lhsIcVisitsMap Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_data Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount
        (T_Nonterminals_vOut16 Int
_lhsOacount Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int, Int)
_lhsOaranges Seq (Int, Int)
_lhsOaroundDep CNonterminals
_lhsOcNonterminals Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules [(Identifier, [Identifier])]
_lhsOnonts Seq (Int, NTAttr)
_lhsOntattrs Seq (Int, CRule)
_lhsOrules Map Identifier Attributes
_lhsOsynMap' Int
_lhsOvcount) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
sem T_Nonterminals_vIn16
arg16)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Int
-> Seq (Int, Int)
-> Seq (Int, Int, Int)
-> Seq (Int, Int)
-> CNonterminals
-> Seq (Int, Int)
-> Seq Error
-> Map Identifier Attributes
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> [(Identifier, [Identifier])]
-> Seq (Int, NTAttr)
-> Seq (Int, CRule)
-> Map Identifier Attributes
-> Int
-> Syn_Nonterminals
Syn_Nonterminals Int
_lhsOacount Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int, Int)
_lhsOaranges Seq (Int, Int)
_lhsOaroundDep CNonterminals
_lhsOcNonterminals Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules [(Identifier, [Identifier])]
_lhsOnonts Seq (Int, NTAttr)
_lhsOntattrs Seq (Int, CRule)
_lhsOrules Map Identifier Attributes
_lhsOsynMap' Int
_lhsOvcount)
   )

-- cata
{-# NOINLINE sem_Nonterminals #-}
sem_Nonterminals :: Nonterminals  -> T_Nonterminals 
sem_Nonterminals :: Nonterminals -> T_Nonterminals
sem_Nonterminals Nonterminals
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Nonterminal -> T_Nonterminals -> T_Nonterminals
sem_Nonterminals_Cons T_Nonterminals
sem_Nonterminals_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Nonterminal -> T_Nonterminal
sem_Nonterminal Nonterminals
list)

-- semantic domain
newtype T_Nonterminals  = T_Nonterminals {
                                         T_Nonterminals -> Identity T_Nonterminals_s17
attach_T_Nonterminals :: Identity (T_Nonterminals_s17 )
                                         }
newtype T_Nonterminals_s17  = C_Nonterminals_s17 {
                                                 T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 :: (T_Nonterminals_v16 )
                                                 }
data T_Nonterminals_s18  = C_Nonterminals_s18
type T_Nonterminals_v16  = (T_Nonterminals_vIn16 ) -> (T_Nonterminals_vOut16 )
data T_Nonterminals_vIn16  = T_Nonterminals_vIn16 (Int) ([Identifier]) (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) (CInterfaceMap) (CVisitsMap) (Map Identifier Attributes) (AttrOrderMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Map Identifier Attributes) (Int)
data T_Nonterminals_vOut16  = T_Nonterminals_vOut16 (Int) (Seq Edge) (Seq (Int,Int,Int)) (Seq Edge) (CNonterminals) (Seq Edge) (Seq Error) (Map Identifier Attributes) (Seq Edge) (Seq Edge) (Int) (Int) ([(NontermIdent,[ConstructorIdent])]) (Seq (Vertex,NTAttr)) (Seq (Vertex,CRule)) (Map Identifier Attributes) (Int)
{-# NOINLINE sem_Nonterminals_Cons #-}
sem_Nonterminals_Cons :: T_Nonterminal  -> T_Nonterminals  -> T_Nonterminals 
sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals -> T_Nonterminals
sem_Nonterminals_Cons T_Nonterminal
arg_hd_ T_Nonterminals
arg_tl_ = Identity T_Nonterminals_s17 -> T_Nonterminals
T_Nonterminals (forall (m :: * -> *) a. Monad m => a -> m a
return T_Nonterminals_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Nonterminals_s17
st17 = let
      v16 :: T_Nonterminals_v16 
      v16 :: T_Nonterminals_v16
v16 = \ (T_Nonterminals_vIn16 Int
_lhsIacount [Identifier]
_lhsIallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap CInterfaceMap
_lhsIcInterfaceMap CVisitsMap
_lhsIcVisitsMap Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_data Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) -> ( let
         _hdX14 :: T_Nonterminal_s14
_hdX14 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Nonterminal -> Identity T_Nonterminal_s14
attach_T_Nonterminal (T_Nonterminal
arg_hd_))
         _tlX17 :: T_Nonterminals_s17
_tlX17 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Nonterminals -> Identity T_Nonterminals_s17
attach_T_Nonterminals (T_Nonterminals
arg_tl_))
         (T_Nonterminal_vOut13 Int
_hdIacount Seq (Int, Int)
_hdIadditionalDep Seq (Int, Int, Int)
_hdIaranges Seq (Int, Int)
_hdIaroundDep CNonterminal
_hdIcNonterminal Seq (Int, Int)
_hdIdirectDep Seq Error
_hdIerrors Map Identifier Attributes
_hdIinhMap' Seq (Int, Int)
_hdIinstDep Seq (Int, Int)
_hdImergeDep Int
_hdInAutoRules Int
_hdInExplicitRules [(Identifier, [Identifier])]
_hdInonts Seq (Int, NTAttr)
_hdIntattrs Seq (Int, CRule)
_hdIrules Map Identifier Attributes
_hdIsynMap' Int
_hdIvcount) = T_Nonterminal_s14 -> T_Nonterminal_v13
inv_Nonterminal_s14 T_Nonterminal_s14
_hdX14 (Int
-> [Identifier]
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> CInterfaceMap
-> CVisitsMap
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Map Identifier Attributes
-> Int
-> T_Nonterminal_vIn13
T_Nonterminal_vIn13 Int
_hdOacount [Identifier]
_hdOallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_hdOaroundMap CInterfaceMap
_hdOcInterfaceMap CVisitsMap
_hdOcVisitsMap Map Identifier Attributes
_hdOinhMap AttrOrderMap
_hdOmanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_hdOmergeMap Bool
_hdOo_case Bool
_hdOo_cata Bool
_hdOo_data Bool
_hdOo_dovisit Bool
_hdOo_newtypes Bool
_hdOo_rename Bool
_hdOo_sem Bool
_hdOo_sig Bool
_hdOo_unbox Bool
_hdOo_wantvisit Options
_hdOoptions String
_hdOprefix Map Identifier Attributes
_hdOsynMap Int
_hdOvcount)
         (T_Nonterminals_vOut16 Int
_tlIacount Seq (Int, Int)
_tlIadditionalDep Seq (Int, Int, Int)
_tlIaranges Seq (Int, Int)
_tlIaroundDep CNonterminals
_tlIcNonterminals Seq (Int, Int)
_tlIdirectDep Seq Error
_tlIerrors Map Identifier Attributes
_tlIinhMap' Seq (Int, Int)
_tlIinstDep Seq (Int, Int)
_tlImergeDep Int
_tlInAutoRules Int
_tlInExplicitRules [(Identifier, [Identifier])]
_tlInonts Seq (Int, NTAttr)
_tlIntattrs Seq (Int, CRule)
_tlIrules Map Identifier Attributes
_tlIsynMap' Int
_tlIvcount) = T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
_tlX17 (Int
-> [Identifier]
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> CInterfaceMap
-> CVisitsMap
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Map Identifier Attributes
-> Int
-> T_Nonterminals_vIn16
T_Nonterminals_vIn16 Int
_tlOacount [Identifier]
_tlOallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_tlOaroundMap CInterfaceMap
_tlOcInterfaceMap CVisitsMap
_tlOcVisitsMap Map Identifier Attributes
_tlOinhMap AttrOrderMap
_tlOmanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_tlOmergeMap Bool
_tlOo_case Bool
_tlOo_cata Bool
_tlOo_data Bool
_tlOo_dovisit Bool
_tlOo_newtypes Bool
_tlOo_rename Bool
_tlOo_sem Bool
_tlOo_sig Bool
_tlOo_unbox Bool
_tlOo_wantvisit Options
_tlOoptions String
_tlOprefix Map Identifier Attributes
_tlOsynMap Int
_tlOvcount)
         _lhsOcNonterminals :: CNonterminals
         _lhsOcNonterminals :: CNonterminals
_lhsOcNonterminals = CNonterminal -> CNonterminals -> CNonterminals
rule152 CNonterminal
_hdIcNonterminal CNonterminals
_tlIcNonterminals
         _lhsOadditionalDep :: Seq Edge
         _lhsOadditionalDep :: Seq (Int, Int)
_lhsOadditionalDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule153 Seq (Int, Int)
_hdIadditionalDep Seq (Int, Int)
_tlIadditionalDep
         _lhsOaranges :: Seq (Int,Int,Int)
         _lhsOaranges :: Seq (Int, Int, Int)
_lhsOaranges = Seq (Int, Int, Int) -> Seq (Int, Int, Int) -> Seq (Int, Int, Int)
rule154 Seq (Int, Int, Int)
_hdIaranges Seq (Int, Int, Int)
_tlIaranges
         _lhsOaroundDep :: Seq Edge
         _lhsOaroundDep :: Seq (Int, Int)
_lhsOaroundDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule155 Seq (Int, Int)
_hdIaroundDep Seq (Int, Int)
_tlIaroundDep
         _lhsOdirectDep :: Seq Edge
         _lhsOdirectDep :: Seq (Int, Int)
_lhsOdirectDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule156 Seq (Int, Int)
_hdIdirectDep Seq (Int, Int)
_tlIdirectDep
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule157 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOinhMap' :: Map Identifier Attributes
         _lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule158 Map Identifier Attributes
_hdIinhMap' Map Identifier Attributes
_tlIinhMap'
         _lhsOinstDep :: Seq Edge
         _lhsOinstDep :: Seq (Int, Int)
_lhsOinstDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule159 Seq (Int, Int)
_hdIinstDep Seq (Int, Int)
_tlIinstDep
         _lhsOmergeDep :: Seq Edge
         _lhsOmergeDep :: Seq (Int, Int)
_lhsOmergeDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule160 Seq (Int, Int)
_hdImergeDep Seq (Int, Int)
_tlImergeDep
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = Int -> Int -> Int
rule161 Int
_hdInAutoRules Int
_tlInAutoRules
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = Int -> Int -> Int
rule162 Int
_hdInExplicitRules Int
_tlInExplicitRules
         _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]
         _lhsOnonts :: [(Identifier, [Identifier])]
_lhsOnonts = [(Identifier, [Identifier])]
-> [(Identifier, [Identifier])] -> [(Identifier, [Identifier])]
rule163 [(Identifier, [Identifier])]
_hdInonts [(Identifier, [Identifier])]
_tlInonts
         _lhsOntattrs :: Seq (Vertex,NTAttr)
         _lhsOntattrs :: Seq (Int, NTAttr)
_lhsOntattrs = Seq (Int, NTAttr) -> Seq (Int, NTAttr) -> Seq (Int, NTAttr)
rule164 Seq (Int, NTAttr)
_hdIntattrs Seq (Int, NTAttr)
_tlIntattrs
         _lhsOrules :: Seq (Vertex,CRule)
         _lhsOrules :: Seq (Int, CRule)
_lhsOrules = Seq (Int, CRule) -> Seq (Int, CRule) -> Seq (Int, CRule)
rule165 Seq (Int, CRule)
_hdIrules Seq (Int, CRule)
_tlIrules
         _lhsOsynMap' :: Map Identifier Attributes
         _lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule166 Map Identifier Attributes
_hdIsynMap' Map Identifier Attributes
_tlIsynMap'
         _lhsOacount :: Int
         _lhsOacount :: Int
_lhsOacount = Int -> Int
rule167 Int
_tlIacount
         _lhsOvcount :: Int
         _lhsOvcount :: Int
_lhsOvcount = Int -> Int
rule168 Int
_tlIvcount
         _hdOacount :: Int
_hdOacount = Int -> Int
rule169 Int
_lhsIacount
         _hdOallnts :: [Identifier]
_hdOallnts = [Identifier] -> [Identifier]
rule170 [Identifier]
_lhsIallnts
         _hdOaroundMap :: Map Identifier (Map Identifier (Map Identifier [Expression]))
_hdOaroundMap = Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
rule171 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap
         _hdOcInterfaceMap :: CInterfaceMap
_hdOcInterfaceMap = CInterfaceMap -> CInterfaceMap
rule172 CInterfaceMap
_lhsIcInterfaceMap
         _hdOcVisitsMap :: CVisitsMap
_hdOcVisitsMap = CVisitsMap -> CVisitsMap
rule173 CVisitsMap
_lhsIcVisitsMap
         _hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule174 Map Identifier Attributes
_lhsIinhMap
         _hdOmanualAttrDepMap :: AttrOrderMap
_hdOmanualAttrDepMap = AttrOrderMap -> AttrOrderMap
rule175 AttrOrderMap
_lhsImanualAttrDepMap
         _hdOmergeMap :: Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_hdOmergeMap = Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
rule176 Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap
         _hdOo_case :: Bool
_hdOo_case = Bool -> Bool
rule177 Bool
_lhsIo_case
         _hdOo_cata :: Bool
_hdOo_cata = Bool -> Bool
rule178 Bool
_lhsIo_cata
         _hdOo_data :: Bool
_hdOo_data = Bool -> Bool
rule179 Bool
_lhsIo_data
         _hdOo_dovisit :: Bool
_hdOo_dovisit = Bool -> Bool
rule180 Bool
_lhsIo_dovisit
         _hdOo_newtypes :: Bool
_hdOo_newtypes = Bool -> Bool
rule181 Bool
_lhsIo_newtypes
         _hdOo_rename :: Bool
_hdOo_rename = Bool -> Bool
rule182 Bool
_lhsIo_rename
         _hdOo_sem :: Bool
_hdOo_sem = Bool -> Bool
rule183 Bool
_lhsIo_sem
         _hdOo_sig :: Bool
_hdOo_sig = Bool -> Bool
rule184 Bool
_lhsIo_sig
         _hdOo_unbox :: Bool
_hdOo_unbox = Bool -> Bool
rule185 Bool
_lhsIo_unbox
         _hdOo_wantvisit :: Bool
_hdOo_wantvisit = Bool -> Bool
rule186 Bool
_lhsIo_wantvisit
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule187 Options
_lhsIoptions
         _hdOprefix :: String
_hdOprefix = ShowS
rule188 String
_lhsIprefix
         _hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule189 Map Identifier Attributes
_lhsIsynMap
         _hdOvcount :: Int
_hdOvcount = Int -> Int
rule190 Int
_lhsIvcount
         _tlOacount :: Int
_tlOacount = Int -> Int
rule191 Int
_hdIacount
         _tlOallnts :: [Identifier]
_tlOallnts = [Identifier] -> [Identifier]
rule192 [Identifier]
_lhsIallnts
         _tlOaroundMap :: Map Identifier (Map Identifier (Map Identifier [Expression]))
_tlOaroundMap = Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
rule193 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap
         _tlOcInterfaceMap :: CInterfaceMap
_tlOcInterfaceMap = CInterfaceMap -> CInterfaceMap
rule194 CInterfaceMap
_lhsIcInterfaceMap
         _tlOcVisitsMap :: CVisitsMap
_tlOcVisitsMap = CVisitsMap -> CVisitsMap
rule195 CVisitsMap
_lhsIcVisitsMap
         _tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule196 Map Identifier Attributes
_lhsIinhMap
         _tlOmanualAttrDepMap :: AttrOrderMap
_tlOmanualAttrDepMap = AttrOrderMap -> AttrOrderMap
rule197 AttrOrderMap
_lhsImanualAttrDepMap
         _tlOmergeMap :: Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_tlOmergeMap = Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
rule198 Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap
         _tlOo_case :: Bool
_tlOo_case = Bool -> Bool
rule199 Bool
_lhsIo_case
         _tlOo_cata :: Bool
_tlOo_cata = Bool -> Bool
rule200 Bool
_lhsIo_cata
         _tlOo_data :: Bool
_tlOo_data = Bool -> Bool
rule201 Bool
_lhsIo_data
         _tlOo_dovisit :: Bool
_tlOo_dovisit = Bool -> Bool
rule202 Bool
_lhsIo_dovisit
         _tlOo_newtypes :: Bool
_tlOo_newtypes = Bool -> Bool
rule203 Bool
_lhsIo_newtypes
         _tlOo_rename :: Bool
_tlOo_rename = Bool -> Bool
rule204 Bool
_lhsIo_rename
         _tlOo_sem :: Bool
_tlOo_sem = Bool -> Bool
rule205 Bool
_lhsIo_sem
         _tlOo_sig :: Bool
_tlOo_sig = Bool -> Bool
rule206 Bool
_lhsIo_sig
         _tlOo_unbox :: Bool
_tlOo_unbox = Bool -> Bool
rule207 Bool
_lhsIo_unbox
         _tlOo_wantvisit :: Bool
_tlOo_wantvisit = Bool -> Bool
rule208 Bool
_lhsIo_wantvisit
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule209 Options
_lhsIoptions
         _tlOprefix :: String
_tlOprefix = ShowS
rule210 String
_lhsIprefix
         _tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule211 Map Identifier Attributes
_lhsIsynMap
         _tlOvcount :: Int
_tlOvcount = Int -> Int
rule212 Int
_hdIvcount
         __result_ :: T_Nonterminals_vOut16
__result_ = Int
-> Seq (Int, Int)
-> Seq (Int, Int, Int)
-> Seq (Int, Int)
-> CNonterminals
-> Seq (Int, Int)
-> Seq Error
-> Map Identifier Attributes
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> [(Identifier, [Identifier])]
-> Seq (Int, NTAttr)
-> Seq (Int, CRule)
-> Map Identifier Attributes
-> Int
-> T_Nonterminals_vOut16
T_Nonterminals_vOut16 Int
_lhsOacount Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int, Int)
_lhsOaranges Seq (Int, Int)
_lhsOaroundDep CNonterminals
_lhsOcNonterminals Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules [(Identifier, [Identifier])]
_lhsOnonts Seq (Int, NTAttr)
_lhsOntattrs Seq (Int, CRule)
_lhsOrules Map Identifier Attributes
_lhsOsynMap' Int
_lhsOvcount
         in T_Nonterminals_vOut16
__result_ )
     in T_Nonterminals_v16 -> T_Nonterminals_s17
C_Nonterminals_s17 T_Nonterminals_v16
v16
   {-# INLINE rule152 #-}
   {-# LINE 626 "src-ag/Order.ag" #-}
   rule152 = \ ((_hdIcNonterminal) :: CNonterminal) ((_tlIcNonterminals) :: CNonterminals) ->
                                 {-# LINE 626 "src-ag/Order.ag" #-}
                                 _hdIcNonterminal : _tlIcNonterminals
                                 {-# LINE 1525 "src-generated/Order.hs" #-}
   {-# INLINE rule153 #-}
   rule153 = \ ((_hdIadditionalDep) :: Seq Edge) ((_tlIadditionalDep) :: Seq Edge) ->
     _hdIadditionalDep Seq.>< _tlIadditionalDep
   {-# INLINE rule154 #-}
   rule154 = \ ((_hdIaranges) :: Seq (Int,Int,Int)) ((_tlIaranges) :: Seq (Int,Int,Int)) ->
     _hdIaranges Seq.>< _tlIaranges
   {-# INLINE rule155 #-}
   rule155 = \ ((_hdIaroundDep) :: Seq Edge) ((_tlIaroundDep) :: Seq Edge) ->
     _hdIaroundDep Seq.>< _tlIaroundDep
   {-# INLINE rule156 #-}
   rule156 = \ ((_hdIdirectDep) :: Seq Edge) ((_tlIdirectDep) :: Seq Edge) ->
     _hdIdirectDep Seq.>< _tlIdirectDep
   {-# INLINE rule157 #-}
   rule157 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->
     _hdIerrors Seq.>< _tlIerrors
   {-# INLINE rule158 #-}
   rule158 = \ ((_hdIinhMap') :: Map Identifier Attributes) ((_tlIinhMap') :: Map Identifier Attributes) ->
     _hdIinhMap' `Map.union` _tlIinhMap'
   {-# INLINE rule159 #-}
   rule159 = \ ((_hdIinstDep) :: Seq Edge) ((_tlIinstDep) :: Seq Edge) ->
     _hdIinstDep Seq.>< _tlIinstDep
   {-# INLINE rule160 #-}
   rule160 = \ ((_hdImergeDep) :: Seq Edge) ((_tlImergeDep) :: Seq Edge) ->
     _hdImergeDep Seq.>< _tlImergeDep
   {-# INLINE rule161 #-}
   rule161 = \ ((_hdInAutoRules) :: Int) ((_tlInAutoRules) :: Int) ->
     _hdInAutoRules + _tlInAutoRules
   {-# INLINE rule162 #-}
   rule162 = \ ((_hdInExplicitRules) :: Int) ((_tlInExplicitRules) :: Int) ->
     _hdInExplicitRules + _tlInExplicitRules
   {-# INLINE rule163 #-}
   rule163 = \ ((_hdInonts) :: [(NontermIdent,[ConstructorIdent])]) ((_tlInonts) :: [(NontermIdent,[ConstructorIdent])]) ->
     _hdInonts ++ _tlInonts
   {-# INLINE rule164 #-}
   rule164 = \ ((_hdIntattrs) :: Seq (Vertex,NTAttr)) ((_tlIntattrs) :: Seq (Vertex,NTAttr)) ->
     _hdIntattrs Seq.>< _tlIntattrs
   {-# INLINE rule165 #-}
   rule165 = \ ((_hdIrules) :: Seq (Vertex,CRule)) ((_tlIrules) :: Seq (Vertex,CRule)) ->
     _hdIrules Seq.>< _tlIrules
   {-# INLINE rule166 #-}
   rule166 = \ ((_hdIsynMap') :: Map Identifier Attributes) ((_tlIsynMap') :: Map Identifier Attributes) ->
     _hdIsynMap' `Map.union` _tlIsynMap'
   {-# INLINE rule167 #-}
   rule167 = \ ((_tlIacount) :: Int) ->
     _tlIacount
   {-# INLINE rule168 #-}
   rule168 = \ ((_tlIvcount) :: Int) ->
     _tlIvcount
   {-# INLINE rule169 #-}
   rule169 = \ ((_lhsIacount) :: Int) ->
     _lhsIacount
   {-# INLINE rule170 #-}
   rule170 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule171 #-}
   rule171 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->
     _lhsIaroundMap
   {-# INLINE rule172 #-}
   rule172 = \ ((_lhsIcInterfaceMap) :: CInterfaceMap) ->
     _lhsIcInterfaceMap
   {-# INLINE rule173 #-}
   rule173 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->
     _lhsIcVisitsMap
   {-# INLINE rule174 #-}
   rule174 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule175 #-}
   rule175 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->
     _lhsImanualAttrDepMap
   {-# INLINE rule176 #-}
   rule176 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->
     _lhsImergeMap
   {-# INLINE rule177 #-}
   rule177 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule178 #-}
   rule178 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule179 #-}
   rule179 = \ ((_lhsIo_data) :: Bool) ->
     _lhsIo_data
   {-# INLINE rule180 #-}
   rule180 = \ ((_lhsIo_dovisit) :: Bool) ->
     _lhsIo_dovisit
   {-# INLINE rule181 #-}
   rule181 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule182 #-}
   rule182 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule183 #-}
   rule183 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule184 #-}
   rule184 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule185 #-}
   rule185 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule186 #-}
   rule186 = \ ((_lhsIo_wantvisit) :: Bool) ->
     _lhsIo_wantvisit
   {-# INLINE rule187 #-}
   rule187 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule188 #-}
   rule188 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule189 #-}
   rule189 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
   {-# INLINE rule190 #-}
   rule190 = \ ((_lhsIvcount) :: Int) ->
     _lhsIvcount
   {-# INLINE rule191 #-}
   rule191 = \ ((_hdIacount) :: Int) ->
     _hdIacount
   {-# INLINE rule192 #-}
   rule192 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule193 #-}
   rule193 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->
     _lhsIaroundMap
   {-# INLINE rule194 #-}
   rule194 = \ ((_lhsIcInterfaceMap) :: CInterfaceMap) ->
     _lhsIcInterfaceMap
   {-# INLINE rule195 #-}
   rule195 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->
     _lhsIcVisitsMap
   {-# INLINE rule196 #-}
   rule196 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule197 #-}
   rule197 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->
     _lhsImanualAttrDepMap
   {-# INLINE rule198 #-}
   rule198 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->
     _lhsImergeMap
   {-# INLINE rule199 #-}
   rule199 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule200 #-}
   rule200 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule201 #-}
   rule201 = \ ((_lhsIo_data) :: Bool) ->
     _lhsIo_data
   {-# INLINE rule202 #-}
   rule202 = \ ((_lhsIo_dovisit) :: Bool) ->
     _lhsIo_dovisit
   {-# INLINE rule203 #-}
   rule203 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule204 #-}
   rule204 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule205 #-}
   rule205 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule206 #-}
   rule206 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule207 #-}
   rule207 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule208 #-}
   rule208 = \ ((_lhsIo_wantvisit) :: Bool) ->
     _lhsIo_wantvisit
   {-# INLINE rule209 #-}
   rule209 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule210 #-}
   rule210 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule211 #-}
   rule211 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
   {-# INLINE rule212 #-}
   rule212 = \ ((_hdIvcount) :: Int) ->
     _hdIvcount
{-# NOINLINE sem_Nonterminals_Nil #-}
sem_Nonterminals_Nil ::  T_Nonterminals 
sem_Nonterminals_Nil :: T_Nonterminals
sem_Nonterminals_Nil  = Identity T_Nonterminals_s17 -> T_Nonterminals
T_Nonterminals (forall (m :: * -> *) a. Monad m => a -> m a
return T_Nonterminals_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Nonterminals_s17
st17 = let
      v16 :: T_Nonterminals_v16 
      v16 :: T_Nonterminals_v16
v16 = \ (T_Nonterminals_vIn16 Int
_lhsIacount [Identifier]
_lhsIallnts Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap CInterfaceMap
_lhsIcInterfaceMap CVisitsMap
_lhsIcVisitsMap Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_data Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) -> ( let
         _lhsOcNonterminals :: CNonterminals
         _lhsOcNonterminals :: CNonterminals
_lhsOcNonterminals = forall {a}. () -> [a]
rule213  ()
         _lhsOadditionalDep :: Seq Edge
         _lhsOadditionalDep :: Seq (Int, Int)
_lhsOadditionalDep = forall {a}. () -> Seq a
rule214  ()
         _lhsOaranges :: Seq (Int,Int,Int)
         _lhsOaranges :: Seq (Int, Int, Int)
_lhsOaranges = forall {a}. () -> Seq a
rule215  ()
         _lhsOaroundDep :: Seq Edge
         _lhsOaroundDep :: Seq (Int, Int)
_lhsOaroundDep = forall {a}. () -> Seq a
rule216  ()
         _lhsOdirectDep :: Seq Edge
         _lhsOdirectDep :: Seq (Int, Int)
_lhsOdirectDep = forall {a}. () -> Seq a
rule217  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule218  ()
         _lhsOinhMap' :: Map Identifier Attributes
         _lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = forall {k} {a}. () -> Map k a
rule219  ()
         _lhsOinstDep :: Seq Edge
         _lhsOinstDep :: Seq (Int, Int)
_lhsOinstDep = forall {a}. () -> Seq a
rule220  ()
         _lhsOmergeDep :: Seq Edge
         _lhsOmergeDep :: Seq (Int, Int)
_lhsOmergeDep = forall {a}. () -> Seq a
rule221  ()
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = () -> Int
rule222  ()
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = () -> Int
rule223  ()
         _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]
         _lhsOnonts :: [(Identifier, [Identifier])]
_lhsOnonts = forall {a}. () -> [a]
rule224  ()
         _lhsOntattrs :: Seq (Vertex,NTAttr)
         _lhsOntattrs :: Seq (Int, NTAttr)
_lhsOntattrs = forall {a}. () -> Seq a
rule225  ()
         _lhsOrules :: Seq (Vertex,CRule)
         _lhsOrules :: Seq (Int, CRule)
_lhsOrules = forall {a}. () -> Seq a
rule226  ()
         _lhsOsynMap' :: Map Identifier Attributes
         _lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = forall {k} {a}. () -> Map k a
rule227  ()
         _lhsOacount :: Int
         _lhsOacount :: Int
_lhsOacount = Int -> Int
rule228 Int
_lhsIacount
         _lhsOvcount :: Int
         _lhsOvcount :: Int
_lhsOvcount = Int -> Int
rule229 Int
_lhsIvcount
         __result_ :: T_Nonterminals_vOut16
__result_ = Int
-> Seq (Int, Int)
-> Seq (Int, Int, Int)
-> Seq (Int, Int)
-> CNonterminals
-> Seq (Int, Int)
-> Seq Error
-> Map Identifier Attributes
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> [(Identifier, [Identifier])]
-> Seq (Int, NTAttr)
-> Seq (Int, CRule)
-> Map Identifier Attributes
-> Int
-> T_Nonterminals_vOut16
T_Nonterminals_vOut16 Int
_lhsOacount Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int, Int)
_lhsOaranges Seq (Int, Int)
_lhsOaroundDep CNonterminals
_lhsOcNonterminals Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules [(Identifier, [Identifier])]
_lhsOnonts Seq (Int, NTAttr)
_lhsOntattrs Seq (Int, CRule)
_lhsOrules Map Identifier Attributes
_lhsOsynMap' Int
_lhsOvcount
         in T_Nonterminals_vOut16
__result_ )
     in T_Nonterminals_v16 -> T_Nonterminals_s17
C_Nonterminals_s17 T_Nonterminals_v16
v16
   {-# INLINE rule213 #-}
   {-# LINE 627 "src-ag/Order.ag" #-}
   rule213 = \  (_ :: ()) ->
                                 {-# LINE 627 "src-ag/Order.ag" #-}
                                 []
                                 {-# LINE 1755 "src-generated/Order.hs" #-}
   {-# INLINE rule214 #-}
   rule214 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule215 #-}
   rule215 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule216 #-}
   rule216 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule217 #-}
   rule217 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule218 #-}
   rule218 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule219 #-}
   rule219 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule220 #-}
   rule220 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule221 #-}
   rule221 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule222 #-}
   rule222 = \  (_ :: ()) ->
     0
   {-# INLINE rule223 #-}
   rule223 = \  (_ :: ()) ->
     0
   {-# INLINE rule224 #-}
   rule224 = \  (_ :: ()) ->
     []
   {-# INLINE rule225 #-}
   rule225 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule226 #-}
   rule226 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule227 #-}
   rule227 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule228 #-}
   rule228 = \ ((_lhsIacount) :: Int) ->
     _lhsIacount
   {-# INLINE rule229 #-}
   rule229 = \ ((_lhsIvcount) :: Int) ->
     _lhsIvcount

-- Pattern -----------------------------------------------------
-- wrapper
data Inh_Pattern  = Inh_Pattern { Inh_Pattern -> Attributes
allTypeSigs_Inh_Pattern :: (Map Identifier Type), Inh_Pattern -> Map AltAttr Int
altAttrs_Inh_Pattern :: (Map AltAttr Vertex), Inh_Pattern -> Identifier
con_Inh_Pattern :: (Identifier), Inh_Pattern -> Attributes
inh_Inh_Pattern :: (Attributes), Inh_Pattern -> Identifier
nt_Inh_Pattern :: (Identifier), Inh_Pattern -> Attributes
syn_Inh_Pattern :: (Attributes) }
data Syn_Pattern  = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> Seq Error
errors_Syn_Pattern :: (Seq Error), Syn_Pattern -> [AltAttr]
gathAltAttrs_Syn_Pattern :: ([AltAttr]), Syn_Pattern -> [Identifier]
instVars_Syn_Pattern :: ([Identifier]), Syn_Pattern -> [Identifier]
locVars_Syn_Pattern :: ([Identifier]), Syn_Pattern -> [(Identifier, Identifier, Bool)]
patternAttrs_Syn_Pattern :: ([(Identifier,Identifier,Bool)]) }
{-# INLINABLE wrap_Pattern #-}
wrap_Pattern :: T_Pattern  -> Inh_Pattern  -> (Syn_Pattern )
wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern
wrap_Pattern (T_Pattern Identity T_Pattern_s20
act) (Inh_Pattern Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Pattern_s20
sem <- Identity T_Pattern_s20
act
        let arg19 :: T_Pattern_vIn19
arg19 = Attributes
-> Map AltAttr Int
-> Identifier
-> Attributes
-> Identifier
-> Attributes
-> T_Pattern_vIn19
T_Pattern_vIn19 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn
        (T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
sem T_Pattern_vIn19
arg19)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Pattern
-> Seq Error
-> [AltAttr]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier, Bool)]
-> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs)
   )

-- cata
{-# NOINLINE sem_Pattern #-}
sem_Pattern :: Pattern  -> T_Pattern 
sem_Pattern :: Pattern -> T_Pattern
sem_Pattern ( Constr Identifier
name_ Patterns
pats_ ) = Identifier -> T_Patterns -> T_Pattern
sem_Pattern_Constr Identifier
name_ ( Patterns -> T_Patterns
sem_Patterns Patterns
pats_ )
sem_Pattern ( Product Pos
pos_ Patterns
pats_ ) = Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
pos_ ( Patterns -> T_Patterns
sem_Patterns Patterns
pats_ )
sem_Pattern ( Alias Identifier
field_ Identifier
attr_ Pattern
pat_ ) = Identifier -> Identifier -> T_Pattern -> T_Pattern
sem_Pattern_Alias Identifier
field_ Identifier
attr_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pat_ )
sem_Pattern ( Irrefutable Pattern
pat_ ) = T_Pattern -> T_Pattern
sem_Pattern_Irrefutable ( Pattern -> T_Pattern
sem_Pattern Pattern
pat_ )
sem_Pattern ( Underscore Pos
pos_ ) = Pos -> T_Pattern
sem_Pattern_Underscore Pos
pos_

-- semantic domain
newtype T_Pattern  = T_Pattern {
                               T_Pattern -> Identity T_Pattern_s20
attach_T_Pattern :: Identity (T_Pattern_s20 )
                               }
newtype T_Pattern_s20  = C_Pattern_s20 {
                                       T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 :: (T_Pattern_v19 )
                                       }
data T_Pattern_s21  = C_Pattern_s21
type T_Pattern_v19  = (T_Pattern_vIn19 ) -> (T_Pattern_vOut19 )
data T_Pattern_vIn19  = T_Pattern_vIn19 (Map Identifier Type) (Map AltAttr Vertex) (Identifier) (Attributes) (Identifier) (Attributes)
data T_Pattern_vOut19  = T_Pattern_vOut19 (Pattern) (Seq Error) ([AltAttr]) ([Identifier]) ([Identifier]) ([(Identifier,Identifier,Bool)])
{-# NOINLINE sem_Pattern_Constr #-}
sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns  -> T_Pattern 
sem_Pattern_Constr :: Identifier -> T_Patterns -> T_Pattern
sem_Pattern_Constr Identifier
arg_name_ T_Patterns
arg_pats_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _patsX23 :: T_Patterns_s23
_patsX23 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s23
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut22 Patterns
_patsIcopy Seq Error
_patsIerrors [AltAttr]
_patsIgathAltAttrs [Identifier]
_patsIinstVars [Identifier]
_patsIlocVars [(Identifier, Identifier, Bool)]
_patsIpatternAttrs) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_patsX23 (Attributes
-> Map AltAttr Int
-> Identifier
-> Attributes
-> Identifier
-> Attributes
-> T_Patterns_vIn22
T_Patterns_vIn22 Attributes
_patsOallTypeSigs Map AltAttr Int
_patsOaltAttrs Identifier
_patsOcon Attributes
_patsOinh Identifier
_patsOnt Attributes
_patsOsyn)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule230 Seq Error
_patsIerrors
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = [AltAttr] -> [AltAttr]
rule231 [AltAttr]
_patsIgathAltAttrs
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier]
rule232 [Identifier]
_patsIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier]
rule233 [Identifier]
_patsIlocVars
         _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]
         _lhsOpatternAttrs :: [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs = [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
rule234 [(Identifier, Identifier, Bool)]
_patsIpatternAttrs
         _copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule235 Patterns
_patsIcopy Identifier
arg_name_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule236 Pattern
_copy
         _patsOallTypeSigs :: Attributes
_patsOallTypeSigs = Attributes -> Attributes
rule237 Attributes
_lhsIallTypeSigs
         _patsOaltAttrs :: Map AltAttr Int
_patsOaltAttrs = Map AltAttr Int -> Map AltAttr Int
rule238 Map AltAttr Int
_lhsIaltAttrs
         _patsOcon :: Identifier
_patsOcon = Identifier -> Identifier
rule239 Identifier
_lhsIcon
         _patsOinh :: Attributes
_patsOinh = Attributes -> Attributes
rule240 Attributes
_lhsIinh
         _patsOnt :: Identifier
_patsOnt = Identifier -> Identifier
rule241 Identifier
_lhsInt
         _patsOsyn :: Attributes
_patsOsyn = Attributes -> Attributes
rule242 Attributes
_lhsIsyn
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [AltAttr]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier, Bool)]
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule230 #-}
   rule230 :: Seq Error -> Seq Error
rule230 = \ ((Seq Error
_patsIerrors) :: Seq Error) ->
     Seq Error
_patsIerrors
   {-# INLINE rule231 #-}
   rule231 :: [AltAttr] -> [AltAttr]
rule231 = \ (([AltAttr]
_patsIgathAltAttrs) :: [AltAttr]) ->
     [AltAttr]
_patsIgathAltAttrs
   {-# INLINE rule232 #-}
   rule232 :: [Identifier] -> [Identifier]
rule232 = \ (([Identifier]
_patsIinstVars) :: [Identifier]) ->
     [Identifier]
_patsIinstVars
   {-# INLINE rule233 #-}
   rule233 :: [Identifier] -> [Identifier]
rule233 = \ (([Identifier]
_patsIlocVars) :: [Identifier]) ->
     [Identifier]
_patsIlocVars
   {-# INLINE rule234 #-}
   rule234 :: [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
rule234 = \ (([(Identifier, Identifier, Bool)]
_patsIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->
     [(Identifier, Identifier, Bool)]
_patsIpatternAttrs
   {-# INLINE rule235 #-}
   rule235 :: Patterns -> Identifier -> Pattern
rule235 = \ ((Patterns
_patsIcopy) :: Patterns) Identifier
name_ ->
     Identifier -> Patterns -> Pattern
Constr Identifier
name_ Patterns
_patsIcopy
   {-# INLINE rule236 #-}
   rule236 :: p -> p
rule236 = \ p
_copy ->
     p
_copy
   {-# INLINE rule237 #-}
   rule237 :: Attributes -> Attributes
rule237 = \ ((Attributes
_lhsIallTypeSigs) :: Map Identifier Type) ->
     Attributes
_lhsIallTypeSigs
   {-# INLINE rule238 #-}
   rule238 :: Map AltAttr Int -> Map AltAttr Int
rule238 = \ ((Map AltAttr Int
_lhsIaltAttrs) :: Map AltAttr Vertex) ->
     Map AltAttr Int
_lhsIaltAttrs
   {-# INLINE rule239 #-}
   rule239 :: Identifier -> Identifier
rule239 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule240 #-}
   rule240 :: Attributes -> Attributes
rule240 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule241 #-}
   rule241 :: Identifier -> Identifier
rule241 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule242 #-}
   rule242 :: Attributes -> Attributes
rule242 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
{-# NOINLINE sem_Pattern_Product #-}
sem_Pattern_Product :: (Pos) -> T_Patterns  -> T_Pattern 
sem_Pattern_Product :: Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
arg_pos_ T_Patterns
arg_pats_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _patsX23 :: T_Patterns_s23
_patsX23 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s23
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut22 Patterns
_patsIcopy Seq Error
_patsIerrors [AltAttr]
_patsIgathAltAttrs [Identifier]
_patsIinstVars [Identifier]
_patsIlocVars [(Identifier, Identifier, Bool)]
_patsIpatternAttrs) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_patsX23 (Attributes
-> Map AltAttr Int
-> Identifier
-> Attributes
-> Identifier
-> Attributes
-> T_Patterns_vIn22
T_Patterns_vIn22 Attributes
_patsOallTypeSigs Map AltAttr Int
_patsOaltAttrs Identifier
_patsOcon Attributes
_patsOinh Identifier
_patsOnt Attributes
_patsOsyn)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule243 Seq Error
_patsIerrors
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = [AltAttr] -> [AltAttr]
rule244 [AltAttr]
_patsIgathAltAttrs
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier]
rule245 [Identifier]
_patsIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier]
rule246 [Identifier]
_patsIlocVars
         _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]
         _lhsOpatternAttrs :: [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs = [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
rule247 [(Identifier, Identifier, Bool)]
_patsIpatternAttrs
         _copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule248 Patterns
_patsIcopy Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule249 Pattern
_copy
         _patsOallTypeSigs :: Attributes
_patsOallTypeSigs = Attributes -> Attributes
rule250 Attributes
_lhsIallTypeSigs
         _patsOaltAttrs :: Map AltAttr Int
_patsOaltAttrs = Map AltAttr Int -> Map AltAttr Int
rule251 Map AltAttr Int
_lhsIaltAttrs
         _patsOcon :: Identifier
_patsOcon = Identifier -> Identifier
rule252 Identifier
_lhsIcon
         _patsOinh :: Attributes
_patsOinh = Attributes -> Attributes
rule253 Attributes
_lhsIinh
         _patsOnt :: Identifier
_patsOnt = Identifier -> Identifier
rule254 Identifier
_lhsInt
         _patsOsyn :: Attributes
_patsOsyn = Attributes -> Attributes
rule255 Attributes
_lhsIsyn
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [AltAttr]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier, Bool)]
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule243 #-}
   rule243 :: Seq Error -> Seq Error
rule243 = \ ((Seq Error
_patsIerrors) :: Seq Error) ->
     Seq Error
_patsIerrors
   {-# INLINE rule244 #-}
   rule244 :: [AltAttr] -> [AltAttr]
rule244 = \ (([AltAttr]
_patsIgathAltAttrs) :: [AltAttr]) ->
     [AltAttr]
_patsIgathAltAttrs
   {-# INLINE rule245 #-}
   rule245 :: [Identifier] -> [Identifier]
rule245 = \ (([Identifier]
_patsIinstVars) :: [Identifier]) ->
     [Identifier]
_patsIinstVars
   {-# INLINE rule246 #-}
   rule246 :: [Identifier] -> [Identifier]
rule246 = \ (([Identifier]
_patsIlocVars) :: [Identifier]) ->
     [Identifier]
_patsIlocVars
   {-# INLINE rule247 #-}
   rule247 :: [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
rule247 = \ (([(Identifier, Identifier, Bool)]
_patsIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->
     [(Identifier, Identifier, Bool)]
_patsIpatternAttrs
   {-# INLINE rule248 #-}
   rule248 :: Patterns -> Pos -> Pattern
rule248 = \ ((Patterns
_patsIcopy) :: Patterns) Pos
pos_ ->
     Pos -> Patterns -> Pattern
Product Pos
pos_ Patterns
_patsIcopy
   {-# INLINE rule249 #-}
   rule249 :: p -> p
rule249 = \ p
_copy ->
     p
_copy
   {-# INLINE rule250 #-}
   rule250 :: Attributes -> Attributes
rule250 = \ ((Attributes
_lhsIallTypeSigs) :: Map Identifier Type) ->
     Attributes
_lhsIallTypeSigs
   {-# INLINE rule251 #-}
   rule251 :: Map AltAttr Int -> Map AltAttr Int
rule251 = \ ((Map AltAttr Int
_lhsIaltAttrs) :: Map AltAttr Vertex) ->
     Map AltAttr Int
_lhsIaltAttrs
   {-# INLINE rule252 #-}
   rule252 :: Identifier -> Identifier
rule252 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule253 #-}
   rule253 :: Attributes -> Attributes
rule253 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule254 #-}
   rule254 :: Identifier -> Identifier
rule254 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule255 #-}
   rule255 :: Attributes -> Attributes
rule255 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
{-# NOINLINE sem_Pattern_Alias #-}
sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern  -> T_Pattern 
sem_Pattern_Alias :: Identifier -> Identifier -> T_Pattern -> T_Pattern
sem_Pattern_Alias Identifier
arg_field_ Identifier
arg_attr_ T_Pattern
arg_pat_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _patX20 :: T_Pattern_s20
_patX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s20
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut19 Pattern
_patIcopy Seq Error
_patIerrors [AltAttr]
_patIgathAltAttrs [Identifier]
_patIinstVars [Identifier]
_patIlocVars [(Identifier, Identifier, Bool)]
_patIpatternAttrs) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patX20 (Attributes
-> Map AltAttr Int
-> Identifier
-> Attributes
-> Identifier
-> Attributes
-> T_Pattern_vIn19
T_Pattern_vIn19 Attributes
_patOallTypeSigs Map AltAttr Int
_patOaltAttrs Identifier
_patOcon Attributes
_patOinh Identifier
_patOnt Attributes
_patOsyn)
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = Identifier -> Identifier -> [AltAttr]
rule256 Identifier
arg_attr_ Identifier
arg_field_
         _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]
         _lhsOpatternAttrs :: [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs = forall {b}. b -> Identifier -> [(Identifier, b, Bool)]
rule257 Identifier
arg_attr_ Identifier
arg_field_
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = forall {a}. a -> Identifier -> [a]
rule258 Identifier
arg_attr_ Identifier
arg_field_
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = forall {a}. a -> Identifier -> [a]
rule259 Identifier
arg_attr_ Identifier
arg_field_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule260 Seq Error
_patIerrors
         _copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule261 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule262 Pattern
_copy
         _patOallTypeSigs :: Attributes
_patOallTypeSigs = Attributes -> Attributes
rule263 Attributes
_lhsIallTypeSigs
         _patOaltAttrs :: Map AltAttr Int
_patOaltAttrs = Map AltAttr Int -> Map AltAttr Int
rule264 Map AltAttr Int
_lhsIaltAttrs
         _patOcon :: Identifier
_patOcon = Identifier -> Identifier
rule265 Identifier
_lhsIcon
         _patOinh :: Attributes
_patOinh = Attributes -> Attributes
rule266 Attributes
_lhsIinh
         _patOnt :: Identifier
_patOnt = Identifier -> Identifier
rule267 Identifier
_lhsInt
         _patOsyn :: Attributes
_patOsyn = Attributes -> Attributes
rule268 Attributes
_lhsIsyn
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [AltAttr]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier, Bool)]
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule256 #-}
   {-# LINE 187 "src-ag/Order.ag" #-}
   rule256 = \ attr_ field_ ->
                                {-# LINE 187 "src-ag/Order.ag" #-}
                                [AltAttr field_ attr_ (field_ == _LOC || field_ == _INST)]
                                {-# LINE 2015 "src-generated/Order.hs" #-}
   {-# INLINE rule257 #-}
   {-# LINE 253 "src-ag/Order.ag" #-}
   rule257 = \ attr_ field_ ->
                                {-# LINE 253 "src-ag/Order.ag" #-}
                                [(field_,attr_,(field_ == _LOC || field_ == _INST))]
                                {-# LINE 2021 "src-generated/Order.hs" #-}
   {-# INLINE rule258 #-}
   {-# LINE 685 "src-ag/Order.ag" #-}
   rule258 = \ attr_ field_ ->
                               {-# LINE 685 "src-ag/Order.ag" #-}
                               if field_ == _LOC
                                  then [attr_]
                                  else []
                               {-# LINE 2029 "src-generated/Order.hs" #-}
   {-# INLINE rule259 #-}
   {-# LINE 688 "src-ag/Order.ag" #-}
   rule259 = \ attr_ field_ ->
                               {-# LINE 688 "src-ag/Order.ag" #-}
                               if field_ == _INST
                                  then [attr_]
                                  else []
                               {-# LINE 2037 "src-generated/Order.hs" #-}
   {-# INLINE rule260 #-}
   rule260 = \ ((_patIerrors) :: Seq Error) ->
     _patIerrors
   {-# INLINE rule261 #-}
   rule261 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
     Alias field_ attr_ _patIcopy
   {-# INLINE rule262 #-}
   rule262 = \ _copy ->
     _copy
   {-# INLINE rule263 #-}
   rule263 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->
     _lhsIallTypeSigs
   {-# INLINE rule264 #-}
   rule264 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->
     _lhsIaltAttrs
   {-# INLINE rule265 #-}
   rule265 = \ ((_lhsIcon) :: Identifier) ->
     _lhsIcon
   {-# INLINE rule266 #-}
   rule266 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule267 #-}
   rule267 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule268 #-}
   rule268 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
{-# NOINLINE sem_Pattern_Irrefutable #-}
sem_Pattern_Irrefutable :: T_Pattern  -> T_Pattern 
sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern
sem_Pattern_Irrefutable T_Pattern
arg_pat_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _patX20 :: T_Pattern_s20
_patX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s20
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut19 Pattern
_patIcopy Seq Error
_patIerrors [AltAttr]
_patIgathAltAttrs [Identifier]
_patIinstVars [Identifier]
_patIlocVars [(Identifier, Identifier, Bool)]
_patIpatternAttrs) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patX20 (Attributes
-> Map AltAttr Int
-> Identifier
-> Attributes
-> Identifier
-> Attributes
-> T_Pattern_vIn19
T_Pattern_vIn19 Attributes
_patOallTypeSigs Map AltAttr Int
_patOaltAttrs Identifier
_patOcon Attributes
_patOinh Identifier
_patOnt Attributes
_patOsyn)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule269 Seq Error
_patIerrors
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = [AltAttr] -> [AltAttr]
rule270 [AltAttr]
_patIgathAltAttrs
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier]
rule271 [Identifier]
_patIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier]
rule272 [Identifier]
_patIlocVars
         _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]
         _lhsOpatternAttrs :: [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs = [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
rule273 [(Identifier, Identifier, Bool)]
_patIpatternAttrs
         _copy :: Pattern
_copy = Pattern -> Pattern
rule274 Pattern
_patIcopy
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule275 Pattern
_copy
         _patOallTypeSigs :: Attributes
_patOallTypeSigs = Attributes -> Attributes
rule276 Attributes
_lhsIallTypeSigs
         _patOaltAttrs :: Map AltAttr Int
_patOaltAttrs = Map AltAttr Int -> Map AltAttr Int
rule277 Map AltAttr Int
_lhsIaltAttrs
         _patOcon :: Identifier
_patOcon = Identifier -> Identifier
rule278 Identifier
_lhsIcon
         _patOinh :: Attributes
_patOinh = Attributes -> Attributes
rule279 Attributes
_lhsIinh
         _patOnt :: Identifier
_patOnt = Identifier -> Identifier
rule280 Identifier
_lhsInt
         _patOsyn :: Attributes
_patOsyn = Attributes -> Attributes
rule281 Attributes
_lhsIsyn
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [AltAttr]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier, Bool)]
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule269 #-}
   rule269 :: Seq Error -> Seq Error
rule269 = \ ((Seq Error
_patIerrors) :: Seq Error) ->
     Seq Error
_patIerrors
   {-# INLINE rule270 #-}
   rule270 :: [AltAttr] -> [AltAttr]
rule270 = \ (([AltAttr]
_patIgathAltAttrs) :: [AltAttr]) ->
     [AltAttr]
_patIgathAltAttrs
   {-# INLINE rule271 #-}
   rule271 :: [Identifier] -> [Identifier]
rule271 = \ (([Identifier]
_patIinstVars) :: [Identifier]) ->
     [Identifier]
_patIinstVars
   {-# INLINE rule272 #-}
   rule272 :: [Identifier] -> [Identifier]
rule272 = \ (([Identifier]
_patIlocVars) :: [Identifier]) ->
     [Identifier]
_patIlocVars
   {-# INLINE rule273 #-}
   rule273 :: [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
rule273 = \ (([(Identifier, Identifier, Bool)]
_patIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->
     [(Identifier, Identifier, Bool)]
_patIpatternAttrs
   {-# INLINE rule274 #-}
   rule274 :: Pattern -> Pattern
rule274 = \ ((Pattern
_patIcopy) :: Pattern) ->
     Pattern -> Pattern
Irrefutable Pattern
_patIcopy
   {-# INLINE rule275 #-}
   rule275 :: p -> p
rule275 = \ p
_copy ->
     p
_copy
   {-# INLINE rule276 #-}
   rule276 :: Attributes -> Attributes
rule276 = \ ((Attributes
_lhsIallTypeSigs) :: Map Identifier Type) ->
     Attributes
_lhsIallTypeSigs
   {-# INLINE rule277 #-}
   rule277 :: Map AltAttr Int -> Map AltAttr Int
rule277 = \ ((Map AltAttr Int
_lhsIaltAttrs) :: Map AltAttr Vertex) ->
     Map AltAttr Int
_lhsIaltAttrs
   {-# INLINE rule278 #-}
   rule278 :: Identifier -> Identifier
rule278 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule279 #-}
   rule279 :: Attributes -> Attributes
rule279 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule280 #-}
   rule280 :: Identifier -> Identifier
rule280 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule281 #-}
   rule281 :: Attributes -> Attributes
rule281 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
{-# NOINLINE sem_Pattern_Underscore #-}
sem_Pattern_Underscore :: (Pos) -> T_Pattern 
sem_Pattern_Underscore :: Pos -> T_Pattern
sem_Pattern_Underscore Pos
arg_pos_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule282  ()
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = forall {a}. () -> [a]
rule283  ()
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = forall {a}. () -> [a]
rule284  ()
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = forall {a}. () -> [a]
rule285  ()
         _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]
         _lhsOpatternAttrs :: [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs = forall {a}. () -> [a]
rule286  ()
         _copy :: Pattern
_copy = Pos -> Pattern
rule287 Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule288 Pattern
_copy
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [AltAttr]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier, Bool)]
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule282 #-}
   rule282 :: () -> Seq a
rule282 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule283 #-}
   rule283 :: () -> [a]
rule283 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule284 #-}
   rule284 :: () -> [a]
rule284 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule285 #-}
   rule285 :: () -> [a]
rule285 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule286 #-}
   rule286 :: () -> [a]
rule286 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule287 #-}
   rule287 :: Pos -> Pattern
rule287 = \ Pos
pos_ ->
     Pos -> Pattern
Underscore Pos
pos_
   {-# INLINE rule288 #-}
   rule288 :: p -> p
rule288 = \ p
_copy ->
     p
_copy

-- Patterns ----------------------------------------------------
-- wrapper
data Inh_Patterns  = Inh_Patterns { Inh_Patterns -> Attributes
allTypeSigs_Inh_Patterns :: (Map Identifier Type), Inh_Patterns -> Map AltAttr Int
altAttrs_Inh_Patterns :: (Map AltAttr Vertex), Inh_Patterns -> Identifier
con_Inh_Patterns :: (Identifier), Inh_Patterns -> Attributes
inh_Inh_Patterns :: (Attributes), Inh_Patterns -> Identifier
nt_Inh_Patterns :: (Identifier), Inh_Patterns -> Attributes
syn_Inh_Patterns :: (Attributes) }
data Syn_Patterns  = Syn_Patterns { Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> Seq Error
errors_Syn_Patterns :: (Seq Error), Syn_Patterns -> [AltAttr]
gathAltAttrs_Syn_Patterns :: ([AltAttr]), Syn_Patterns -> [Identifier]
instVars_Syn_Patterns :: ([Identifier]), Syn_Patterns -> [Identifier]
locVars_Syn_Patterns :: ([Identifier]), Syn_Patterns -> [(Identifier, Identifier, Bool)]
patternAttrs_Syn_Patterns :: ([(Identifier,Identifier,Bool)]) }
{-# INLINABLE wrap_Patterns #-}
wrap_Patterns :: T_Patterns  -> Inh_Patterns  -> (Syn_Patterns )
wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns
wrap_Patterns (T_Patterns Identity T_Patterns_s23
act) (Inh_Patterns Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Patterns_s23
sem <- Identity T_Patterns_s23
act
        let arg22 :: T_Patterns_vIn22
arg22 = Attributes
-> Map AltAttr Int
-> Identifier
-> Attributes
-> Identifier
-> Attributes
-> T_Patterns_vIn22
T_Patterns_vIn22 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn
        (T_Patterns_vOut22 Patterns
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
sem T_Patterns_vIn22
arg22)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Patterns
-> Seq Error
-> [AltAttr]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier, Bool)]
-> Syn_Patterns
Syn_Patterns Patterns
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs)
   )

-- cata
{-# NOINLINE sem_Patterns #-}
sem_Patterns :: Patterns  -> T_Patterns 
sem_Patterns :: Patterns -> T_Patterns
sem_Patterns Patterns
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Patterns
sem_Patterns_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Pattern -> T_Pattern
sem_Pattern Patterns
list)

-- semantic domain
newtype T_Patterns  = T_Patterns {
                                 T_Patterns -> Identity T_Patterns_s23
attach_T_Patterns :: Identity (T_Patterns_s23 )
                                 }
newtype T_Patterns_s23  = C_Patterns_s23 {
                                         T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 :: (T_Patterns_v22 )
                                         }
data T_Patterns_s24  = C_Patterns_s24
type T_Patterns_v22  = (T_Patterns_vIn22 ) -> (T_Patterns_vOut22 )
data T_Patterns_vIn22  = T_Patterns_vIn22 (Map Identifier Type) (Map AltAttr Vertex) (Identifier) (Attributes) (Identifier) (Attributes)
data T_Patterns_vOut22  = T_Patterns_vOut22 (Patterns) (Seq Error) ([AltAttr]) ([Identifier]) ([Identifier]) ([(Identifier,Identifier,Bool)])
{-# NOINLINE sem_Patterns_Cons #-}
sem_Patterns_Cons :: T_Pattern  -> T_Patterns  -> T_Patterns 
sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Pattern
arg_hd_ T_Patterns
arg_tl_ = Identity T_Patterns_s23 -> T_Patterns
T_Patterns (forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_Patterns_s23
st23 = let
      v22 :: T_Patterns_v22 
      v22 :: T_Patterns_v22
v22 = \ (T_Patterns_vIn22 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _hdX20 :: T_Pattern_s20
_hdX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s20
attach_T_Pattern (T_Pattern
arg_hd_))
         _tlX23 :: T_Patterns_s23
_tlX23 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s23
attach_T_Patterns (T_Patterns
arg_tl_))
         (T_Pattern_vOut19 Pattern
_hdIcopy Seq Error
_hdIerrors [AltAttr]
_hdIgathAltAttrs [Identifier]
_hdIinstVars [Identifier]
_hdIlocVars [(Identifier, Identifier, Bool)]
_hdIpatternAttrs) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_hdX20 (Attributes
-> Map AltAttr Int
-> Identifier
-> Attributes
-> Identifier
-> Attributes
-> T_Pattern_vIn19
T_Pattern_vIn19 Attributes
_hdOallTypeSigs Map AltAttr Int
_hdOaltAttrs Identifier
_hdOcon Attributes
_hdOinh Identifier
_hdOnt Attributes
_hdOsyn)
         (T_Patterns_vOut22 Patterns
_tlIcopy Seq Error
_tlIerrors [AltAttr]
_tlIgathAltAttrs [Identifier]
_tlIinstVars [Identifier]
_tlIlocVars [(Identifier, Identifier, Bool)]
_tlIpatternAttrs) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_tlX23 (Attributes
-> Map AltAttr Int
-> Identifier
-> Attributes
-> Identifier
-> Attributes
-> T_Patterns_vIn22
T_Patterns_vIn22 Attributes
_tlOallTypeSigs Map AltAttr Int
_tlOaltAttrs Identifier
_tlOcon Attributes
_tlOinh Identifier
_tlOnt Attributes
_tlOsyn)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule289 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = [AltAttr] -> [AltAttr] -> [AltAttr]
rule290 [AltAttr]
_hdIgathAltAttrs [AltAttr]
_tlIgathAltAttrs
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier] -> [Identifier]
rule291 [Identifier]
_hdIinstVars [Identifier]
_tlIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier] -> [Identifier]
rule292 [Identifier]
_hdIlocVars [Identifier]
_tlIlocVars
         _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]
         _lhsOpatternAttrs :: [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs = [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
rule293 [(Identifier, Identifier, Bool)]
_hdIpatternAttrs [(Identifier, Identifier, Bool)]
_tlIpatternAttrs
         _copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule294 Pattern
_hdIcopy Patterns
_tlIcopy
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = forall {p}. p -> p
rule295 Patterns
_copy
         _hdOallTypeSigs :: Attributes
_hdOallTypeSigs = Attributes -> Attributes
rule296 Attributes
_lhsIallTypeSigs
         _hdOaltAttrs :: Map AltAttr Int
_hdOaltAttrs = Map AltAttr Int -> Map AltAttr Int
rule297 Map AltAttr Int
_lhsIaltAttrs
         _hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule298 Identifier
_lhsIcon
         _hdOinh :: Attributes
_hdOinh = Attributes -> Attributes
rule299 Attributes
_lhsIinh
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule300 Identifier
_lhsInt
         _hdOsyn :: Attributes
_hdOsyn = Attributes -> Attributes
rule301 Attributes
_lhsIsyn
         _tlOallTypeSigs :: Attributes
_tlOallTypeSigs = Attributes -> Attributes
rule302 Attributes
_lhsIallTypeSigs
         _tlOaltAttrs :: Map AltAttr Int
_tlOaltAttrs = Map AltAttr Int -> Map AltAttr Int
rule303 Map AltAttr Int
_lhsIaltAttrs
         _tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule304 Identifier
_lhsIcon
         _tlOinh :: Attributes
_tlOinh = Attributes -> Attributes
rule305 Attributes
_lhsIinh
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule306 Identifier
_lhsInt
         _tlOsyn :: Attributes
_tlOsyn = Attributes -> Attributes
rule307 Attributes
_lhsIsyn
         __result_ :: T_Patterns_vOut22
__result_ = Patterns
-> Seq Error
-> [AltAttr]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier, Bool)]
-> T_Patterns_vOut22
T_Patterns_vOut22 Patterns
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs
         in T_Patterns_vOut22
__result_ )
     in T_Patterns_v22 -> T_Patterns_s23
C_Patterns_s23 T_Patterns_v22
v22
   {-# INLINE rule289 #-}
   rule289 :: Seq Error -> Seq Error -> Seq Error
rule289 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule290 #-}
   rule290 :: [AltAttr] -> [AltAttr] -> [AltAttr]
rule290 = \ (([AltAttr]
_hdIgathAltAttrs) :: [AltAttr]) (([AltAttr]
_tlIgathAltAttrs) :: [AltAttr]) ->
     [AltAttr]
_hdIgathAltAttrs forall a. [a] -> [a] -> [a]
++ [AltAttr]
_tlIgathAltAttrs
   {-# INLINE rule291 #-}
   rule291 :: [Identifier] -> [Identifier] -> [Identifier]
rule291 = \ (([Identifier]
_hdIinstVars) :: [Identifier]) (([Identifier]
_tlIinstVars) :: [Identifier]) ->
     [Identifier]
_hdIinstVars forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIinstVars
   {-# INLINE rule292 #-}
   rule292 :: [Identifier] -> [Identifier] -> [Identifier]
rule292 = \ (([Identifier]
_hdIlocVars) :: [Identifier]) (([Identifier]
_tlIlocVars) :: [Identifier]) ->
     [Identifier]
_hdIlocVars forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIlocVars
   {-# INLINE rule293 #-}
   rule293 :: [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
-> [(Identifier, Identifier, Bool)]
rule293 = \ (([(Identifier, Identifier, Bool)]
_hdIpatternAttrs) :: [(Identifier,Identifier,Bool)]) (([(Identifier, Identifier, Bool)]
_tlIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->
     [(Identifier, Identifier, Bool)]
_hdIpatternAttrs forall a. [a] -> [a] -> [a]
++ [(Identifier, Identifier, Bool)]
_tlIpatternAttrs
   {-# INLINE rule294 #-}
   rule294 :: Pattern -> Patterns -> Patterns
rule294 = \ ((Pattern
_hdIcopy) :: Pattern) ((Patterns
_tlIcopy) :: Patterns) ->
     (:) Pattern
_hdIcopy Patterns
_tlIcopy
   {-# INLINE rule295 #-}
   rule295 :: p -> p
rule295 = \ p
_copy ->
     p
_copy
   {-# INLINE rule296 #-}
   rule296 :: Attributes -> Attributes
rule296 = \ ((Attributes
_lhsIallTypeSigs) :: Map Identifier Type) ->
     Attributes
_lhsIallTypeSigs
   {-# INLINE rule297 #-}
   rule297 :: Map AltAttr Int -> Map AltAttr Int
rule297 = \ ((Map AltAttr Int
_lhsIaltAttrs) :: Map AltAttr Vertex) ->
     Map AltAttr Int
_lhsIaltAttrs
   {-# INLINE rule298 #-}
   rule298 :: Identifier -> Identifier
rule298 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule299 #-}
   rule299 :: Attributes -> Attributes
rule299 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule300 #-}
   rule300 :: Identifier -> Identifier
rule300 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule301 #-}
   rule301 :: Attributes -> Attributes
rule301 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
   {-# INLINE rule302 #-}
   rule302 :: Attributes -> Attributes
rule302 = \ ((Attributes
_lhsIallTypeSigs) :: Map Identifier Type) ->
     Attributes
_lhsIallTypeSigs
   {-# INLINE rule303 #-}
   rule303 :: Map AltAttr Int -> Map AltAttr Int
rule303 = \ ((Map AltAttr Int
_lhsIaltAttrs) :: Map AltAttr Vertex) ->
     Map AltAttr Int
_lhsIaltAttrs
   {-# INLINE rule304 #-}
   rule304 :: Identifier -> Identifier
rule304 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule305 #-}
   rule305 :: Attributes -> Attributes
rule305 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule306 #-}
   rule306 :: Identifier -> Identifier
rule306 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule307 #-}
   rule307 :: Attributes -> Attributes
rule307 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
{-# NOINLINE sem_Patterns_Nil #-}
sem_Patterns_Nil ::  T_Patterns 
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil  = Identity T_Patterns_s23 -> T_Patterns
T_Patterns (forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_Patterns_s23
st23 = let
      v22 :: T_Patterns_v22 
      v22 :: T_Patterns_v22
v22 = \ (T_Patterns_vIn22 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule308  ()
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = forall {a}. () -> [a]
rule309  ()
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = forall {a}. () -> [a]
rule310  ()
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = forall {a}. () -> [a]
rule311  ()
         _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]
         _lhsOpatternAttrs :: [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs = forall {a}. () -> [a]
rule312  ()
         _copy :: [a]
_copy = forall {a}. () -> [a]
rule313  ()
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = forall {p}. p -> p
rule314 forall a. [a]
_copy
         __result_ :: T_Patterns_vOut22
__result_ = Patterns
-> Seq Error
-> [AltAttr]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier, Bool)]
-> T_Patterns_vOut22
T_Patterns_vOut22 Patterns
_lhsOcopy Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars [(Identifier, Identifier, Bool)]
_lhsOpatternAttrs
         in T_Patterns_vOut22
__result_ )
     in T_Patterns_v22 -> T_Patterns_s23
C_Patterns_s23 T_Patterns_v22
v22
   {-# INLINE rule308 #-}
   rule308 :: () -> Seq a
rule308 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule309 #-}
   rule309 :: () -> [a]
rule309 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule310 #-}
   rule310 :: () -> [a]
rule310 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule311 #-}
   rule311 :: () -> [a]
rule311 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule312 #-}
   rule312 :: () -> [a]
rule312 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule313 #-}
   rule313 :: () -> [a]
rule313 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule314 #-}
   rule314 :: p -> p
rule314 = \ p
_copy ->
     p
_copy

-- Production --------------------------------------------------
-- wrapper
data Inh_Production  = Inh_Production { Inh_Production -> [Identifier]
allnts_Inh_Production :: ([Identifier]), Inh_Production -> Map Identifier (Map Identifier [Expression])
aroundMap_Inh_Production :: (Map ConstructorIdent (Map Identifier [Expression])), Inh_Production -> CVisitsMap
cVisitsMap_Inh_Production :: (CVisitsMap), Inh_Production -> Attributes
inh_Inh_Production :: (Attributes), Inh_Production -> Map Identifier Attributes
inhMap_Inh_Production :: (Map Identifier Attributes), Inh_Production -> AttrOrderMap
manualAttrDepMap_Inh_Production :: (AttrOrderMap), Inh_Production
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
mergeMap_Inh_Production :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))), Inh_Production -> Identifier
nt_Inh_Production :: (Identifier), Inh_Production -> Bool
o_case_Inh_Production :: (Bool), Inh_Production -> Bool
o_cata_Inh_Production :: (Bool), Inh_Production -> Bool
o_dovisit_Inh_Production :: (Bool), Inh_Production -> Bool
o_newtypes_Inh_Production :: (Bool), Inh_Production -> Bool
o_rename_Inh_Production :: (Bool), Inh_Production -> Bool
o_sem_Inh_Production :: (Bool), Inh_Production -> Bool
o_sig_Inh_Production :: (Bool), Inh_Production -> Bool
o_unbox_Inh_Production :: (Bool), Inh_Production -> Bool
o_wantvisit_Inh_Production :: (Bool), Inh_Production -> Options
options_Inh_Production :: (Options), Inh_Production -> String
prefix_Inh_Production :: (String), Inh_Production -> Attributes
syn_Inh_Production :: (Attributes), Inh_Production -> Map Identifier Attributes
synMap_Inh_Production :: (Map Identifier Attributes), Inh_Production -> Int
vcount_Inh_Production :: (Int) }
data Syn_Production  = Syn_Production { Syn_Production -> Seq (Int, Int)
additionalDep_Syn_Production :: (Seq Edge), Syn_Production -> Seq (Int, Int)
aroundDep_Syn_Production :: (Seq Edge), Syn_Production -> CProduction
cProduction_Syn_Production :: (CProduction), Syn_Production -> [Identifier]
cons_Syn_Production :: ([ConstructorIdent]), Syn_Production -> Seq (Int, Int)
directDep_Syn_Production :: (Seq Edge), Syn_Production -> Seq Error
errors_Syn_Production :: (Seq Error), Syn_Production -> Seq (Int, Int)
instDep_Syn_Production :: (Seq Edge), Syn_Production -> Seq (Int, Int)
mergeDep_Syn_Production :: (Seq Edge), Syn_Production -> Int
nAutoRules_Syn_Production :: (Int), Syn_Production -> Int
nExplicitRules_Syn_Production :: (Int), Syn_Production -> Seq (Int, CRule)
rules_Syn_Production :: (Seq (Vertex,CRule)), Syn_Production -> Int
vcount_Syn_Production :: (Int) }
{-# INLINABLE wrap_Production #-}
wrap_Production :: T_Production  -> Inh_Production  -> (Syn_Production )
wrap_Production :: T_Production -> Inh_Production -> Syn_Production
wrap_Production (T_Production Identity T_Production_s26
act) (Inh_Production [Identifier]
_lhsIallnts Map Identifier (Map Identifier [Expression])
_lhsIaroundMap CVisitsMap
_lhsIcVisitsMap Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Production_s26
sem <- Identity T_Production_s26
act
        let arg25 :: T_Production_vIn25
arg25 = [Identifier]
-> Map Identifier (Map Identifier [Expression])
-> CVisitsMap
-> Attributes
-> Map Identifier Attributes
-> AttrOrderMap
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> Int
-> T_Production_vIn25
T_Production_vIn25 [Identifier]
_lhsIallnts Map Identifier (Map Identifier [Expression])
_lhsIaroundMap CVisitsMap
_lhsIcVisitsMap Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount
        (T_Production_vOut25 Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int)
_lhsOaroundDep CProduction
_lhsOcProduction [Identifier]
_lhsOcons Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules Seq (Int, CRule)
_lhsOrules Int
_lhsOvcount) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Production_s26 -> T_Production_v25
inv_Production_s26 T_Production_s26
sem T_Production_vIn25
arg25)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq (Int, Int)
-> Seq (Int, Int)
-> CProduction
-> [Identifier]
-> Seq (Int, Int)
-> Seq Error
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> Seq (Int, CRule)
-> Int
-> Syn_Production
Syn_Production Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int)
_lhsOaroundDep CProduction
_lhsOcProduction [Identifier]
_lhsOcons Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules Seq (Int, CRule)
_lhsOrules Int
_lhsOvcount)
   )

-- cata
{-# INLINE sem_Production #-}
sem_Production :: Production  -> T_Production 
sem_Production :: Production -> T_Production
sem_Production ( Production Identifier
con_ [Identifier]
params_ [Type]
constraints_ Children
children_ Rules
rules_ TypeSigs
typeSigs_ MaybeMacro
macro_ ) = Identifier
-> [Identifier]
-> [Type]
-> T_Children
-> T_Rules
-> T_TypeSigs
-> MaybeMacro
-> T_Production
sem_Production_Production Identifier
con_ [Identifier]
params_ [Type]
constraints_ ( Children -> T_Children
sem_Children Children
children_ ) ( Rules -> T_Rules
sem_Rules Rules
rules_ ) ( TypeSigs -> T_TypeSigs
sem_TypeSigs TypeSigs
typeSigs_ ) MaybeMacro
macro_

-- semantic domain
newtype T_Production  = T_Production {
                                     T_Production -> Identity T_Production_s26
attach_T_Production :: Identity (T_Production_s26 )
                                     }
newtype T_Production_s26  = C_Production_s26 {
                                             T_Production_s26 -> T_Production_v25
inv_Production_s26 :: (T_Production_v25 )
                                             }
data T_Production_s27  = C_Production_s27
type T_Production_v25  = (T_Production_vIn25 ) -> (T_Production_vOut25 )
data T_Production_vIn25  = T_Production_vIn25 ([Identifier]) (Map ConstructorIdent (Map Identifier [Expression])) (CVisitsMap) (Attributes) (Map Identifier Attributes) (AttrOrderMap) (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Attributes) (Map Identifier Attributes) (Int)
data T_Production_vOut25  = T_Production_vOut25 (Seq Edge) (Seq Edge) (CProduction) ([ConstructorIdent]) (Seq Edge) (Seq Error) (Seq Edge) (Seq Edge) (Int) (Int) (Seq (Vertex,CRule)) (Int)
{-# NOINLINE sem_Production_Production #-}
sem_Production_Production :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_Children  -> T_Rules  -> T_TypeSigs  -> (MaybeMacro) -> T_Production 
sem_Production_Production :: Identifier
-> [Identifier]
-> [Type]
-> T_Children
-> T_Rules
-> T_TypeSigs
-> MaybeMacro
-> T_Production
sem_Production_Production Identifier
arg_con_ [Identifier]
_ [Type]
_ T_Children
arg_children_ T_Rules
arg_rules_ T_TypeSigs
arg_typeSigs_ MaybeMacro
_ = Identity T_Production_s26 -> T_Production
T_Production (forall (m :: * -> *) a. Monad m => a -> m a
return T_Production_s26
st26) where
   {-# NOINLINE st26 #-}
   st26 :: T_Production_s26
st26 = let
      v25 :: T_Production_v25 
      v25 :: T_Production_v25
v25 = \ (T_Production_vIn25 [Identifier]
_lhsIallnts Map Identifier (Map Identifier [Expression])
_lhsIaroundMap CVisitsMap
_lhsIcVisitsMap Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) -> ( let
         _childrenX5 :: T_Children_s5
_childrenX5 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Children -> Identity T_Children_s5
attach_T_Children (T_Children
arg_children_))
         _rulesX35 :: T_Rules_s35
_rulesX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Rules -> Identity T_Rules_s35
attach_T_Rules (T_Rules
arg_rules_))
         _typeSigsX41 :: T_TypeSigs_s41
_typeSigsX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_TypeSigs -> Identity T_TypeSigs_s41
attach_T_TypeSigs (T_TypeSigs
arg_typeSigs_))
         (T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_childrenIattributes Map Identifier Attributes
_childrenIcollectChildrenInhs Map Identifier Attributes
_childrenIcollectChildrenSyns Seq Error
_childrenIerrors [(Identifier, Type, ChildKind)]
_childrenIfields [AltAttr]
_childrenIgathAltAttrs Seq CRule
_childrenIgathRules Seq (Identifier, Attributes)
_childrenIinhs Seq (Identifier, Identifier)
_childrenInts [CRule]
_childrenIsinglevisits [Identifier]
_childrenIterminals) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_childrenX5 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Attributes
-> Map Identifier Attributes
-> T_Children_vIn4
T_Children_vIn4 [(Identifier, Type, ChildKind)]
_childrenOallfields [Identifier]
_childrenOallnts [(Identifier, Identifier)]
_childrenOattrs Identifier
_childrenOcon Attributes
_childrenOinh Map Identifier Attributes
_childrenOinhMap Map Identifier (Identifier, [Identifier])
_childrenOmergeMap Identifier
_childrenOnt Bool
_childrenOo_unbox Attributes
_childrenOsyn Map Identifier Attributes
_childrenOsynMap)
         (T_Rules_vOut34 Seq (Int, Int)
_rulesIdirectDep Seq Error
_rulesIerrors [AltAttr]
_rulesIgathAltAttrs Seq CRule
_rulesIgathRules Seq (Int, Int)
_rulesIinstDep [Identifier]
_rulesIinstVars [Identifier]
_rulesIlocVars Int
_rulesInAutoRules Int
_rulesInExplicitRules) = T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
_rulesX35 (Attributes
-> [(Identifier, Type, ChildKind)]
-> [Identifier]
-> Map AltAttr Int
-> [(Identifier, Identifier)]
-> Map Identifier Attributes
-> Map Identifier Identifier
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> T_Rules_vIn34
T_Rules_vIn34 Attributes
_rulesOallTypeSigs [(Identifier, Type, ChildKind)]
_rulesOallfields [Identifier]
_rulesOallnts Map AltAttr Int
_rulesOaltAttrs [(Identifier, Identifier)]
_rulesOattrs Map Identifier Attributes
_rulesOchildInhs Map Identifier Identifier
_rulesOchildNts Identifier
_rulesOcon Attributes
_rulesOinh Map Identifier Attributes
_rulesOinhsOfChildren Map Identifier (Identifier, [Identifier])
_rulesOmergeMap Identifier
_rulesOnt Bool
_rulesOo_case Bool
_rulesOo_cata Bool
_rulesOo_dovisit Bool
_rulesOo_newtypes Bool
_rulesOo_rename Bool
_rulesOo_sem Bool
_rulesOo_sig Bool
_rulesOo_wantvisit Options
_rulesOoptions String
_rulesOprefix Attributes
_rulesOsyn Map Identifier Attributes
_rulesOsynsOfChildren)
         (T_TypeSigs_vOut40 Attributes
_typeSigsItypeSigs) = T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
_typeSigsX41 (Attributes -> T_TypeSigs_vIn40
T_TypeSigs_vIn40 forall k a. Map k a
_typeSigsOtypeSigs)
         _childrenOcon :: Identifier
_childrenOcon = forall {p}. p -> p
rule315 Identifier
arg_con_
         _rulesOcon :: Identifier
_rulesOcon = forall {p}. p -> p
rule316 Identifier
arg_con_
         _gathAltAttrs :: [AltAttr]
_gathAltAttrs = [AltAttr] -> Attributes -> [AltAttr] -> [AltAttr]
rule317 [AltAttr]
_childrenIgathAltAttrs Attributes
_lhsIinh [AltAttr]
_rulesIgathAltAttrs
         _altAttrs :: Map AltAttr Int
_altAttrs = [AltAttr] -> Int -> Map AltAttr Int
rule318 [AltAttr]
_gathAltAttrs Int
_lhsIvcount
         _rulesOchildNts :: Map Identifier Identifier
_rulesOchildNts = Seq (Identifier, Identifier) -> Map Identifier Identifier
rule319 Seq (Identifier, Identifier)
_childrenInts
         _rulesOchildInhs :: Map Identifier Attributes
_rulesOchildInhs = Seq (Identifier, Attributes) -> Map Identifier Attributes
rule320 Seq (Identifier, Attributes)
_childrenIinhs
         _inhRules :: [CRule]
_inhRules = Attributes -> Identifier -> Identifier -> [CRule]
rule321 Attributes
_lhsIinh Identifier
_lhsInt Identifier
arg_con_
         _gathRules :: [CRule]
_gathRules = Seq CRule -> [CRule] -> Seq CRule -> [CRule]
rule322 Seq CRule
_childrenIgathRules [CRule]
_inhRules Seq CRule
_rulesIgathRules
         _lhsOrules :: Seq (Vertex,CRule)
         _lhsOrules :: Seq (Int, CRule)
_lhsOrules = forall {b}. [b] -> Int -> Seq (Int, b)
rule323 [CRule]
_gathRules Int
_lhsIvcount
         _lhsOvcount :: Int
         _lhsOvcount :: Int
_lhsOvcount = forall {a}. [a] -> Int -> Int
rule324 [CRule]
_gathRules Int
_lhsIvcount
         _manualDeps :: [Dependency]
_manualDeps = AttrOrderMap -> Identifier -> Identifier -> [Dependency]
rule325 AttrOrderMap
_lhsImanualAttrDepMap Identifier
_lhsInt Identifier
arg_con_
         _lhsOadditionalDep :: Seq Edge
         _lhsOadditionalDep :: Seq (Int, Int)
_lhsOadditionalDep = Map AltAttr Int -> [Dependency] -> Seq (Int, Int)
rule326 Map AltAttr Int
_altAttrs [Dependency]
_manualDeps
         _rulesOsynsOfChildren :: Map Identifier Attributes
_rulesOsynsOfChildren = Map Identifier Attributes -> Map Identifier Attributes
rule327 Map Identifier Attributes
_childrenIcollectChildrenSyns
         _rulesOinhsOfChildren :: Map Identifier Attributes
_rulesOinhsOfChildren = Map Identifier Attributes -> Map Identifier Attributes
rule328 Map Identifier Attributes
_childrenIcollectChildrenInhs
         _mergeMap :: Map Identifier (Identifier, [Identifier])
_mergeMap = Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier -> Map Identifier (Identifier, [Identifier])
rule329 Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
arg_con_
         _lhsOmergeDep :: Seq Edge
         _lhsOmergeDep :: Seq (Int, Int)
_lhsOmergeDep = forall a. Seq a -> Seq a -> Seq a
rule330 Seq (Int, Int)
_mergeDep1 Seq (Int, Int)
_mergeDep2
         _mergeDep1 :: Seq (Int, Int)
_mergeDep1 = forall {a}.
Map AltAttr Int
-> Map Identifier Attributes -> Map Identifier a -> Seq (Int, Int)
rule331 Map AltAttr Int
_altAttrs Map Identifier Attributes
_childrenIcollectChildrenSyns Map Identifier (Identifier, [Identifier])
_mergeMap
         _mergeDep2 :: Seq (Int, Int)
_mergeDep2 = forall {a}.
Map AltAttr Int
-> Map Identifier Attributes
-> Map Identifier (a, [Identifier])
-> Seq (Int, Int)
rule332 Map AltAttr Int
_altAttrs Map Identifier Attributes
_childrenIcollectChildrenSyns Map Identifier (Identifier, [Identifier])
_mergeMap
         _aroundMap :: Map Identifier [Expression]
_aroundMap = Map Identifier (Map Identifier [Expression])
-> Identifier -> Map Identifier [Expression]
rule333 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap Identifier
arg_con_
         _aroundDep1 :: Seq (Int, Int)
_aroundDep1 = forall {a}.
Map AltAttr Int
-> Map Identifier a -> Map Identifier Attributes -> Seq (Int, Int)
rule334 Map AltAttr Int
_altAttrs Map Identifier [Expression]
_aroundMap Map Identifier Attributes
_childrenIcollectChildrenSyns
         _aroundDep2 :: Seq (Int, Int)
_aroundDep2 = forall {a}.
Map AltAttr Int
-> Map Identifier a -> Map Identifier Attributes -> Seq (Int, Int)
rule335 Map AltAttr Int
_altAttrs Map Identifier [Expression]
_aroundMap Map Identifier Attributes
_childrenIcollectChildrenInhs
         _lhsOaroundDep :: Seq Edge
         _lhsOaroundDep :: Seq (Int, Int)
_lhsOaroundDep = forall a. Seq a -> Seq a -> Seq a
rule336 Seq (Int, Int)
_aroundDep1 Seq (Int, Int)
_aroundDep2
         _lhsOcons :: [ConstructorIdent]
         _lhsOcons :: [Identifier]
_lhsOcons = forall {a}. a -> [a]
rule337 Identifier
arg_con_
         _typeSigsOtypeSigs :: Map k a
_typeSigsOtypeSigs = forall {k} {a}. () -> Map k a
rule338  ()
         _rulesOallTypeSigs :: Attributes
_rulesOallTypeSigs = Attributes -> Attributes
rule339 Attributes
_typeSigsItypeSigs
         _cVisits :: CVisits
_cVisits = [CRule]
-> [CRule]
-> CVisitsMap
-> Attributes
-> Identifier
-> Bool
-> Attributes
-> Identifier
-> CVisits
rule340 [CRule]
_childrenIsinglevisits [CRule]
_gathRules CVisitsMap
_lhsIcVisitsMap Attributes
_lhsIinh Identifier
_lhsInt Bool
_lhsIo_dovisit Attributes
_lhsIsyn Identifier
arg_con_
         _lhsOcProduction :: CProduction
         _lhsOcProduction :: CProduction
_lhsOcProduction = CVisits
-> [(Identifier, Type, ChildKind)]
-> [Identifier]
-> Identifier
-> CProduction
rule341 CVisits
_cVisits [(Identifier, Type, ChildKind)]
_childrenIfields [Identifier]
_childrenIterminals Identifier
arg_con_
         _allfields :: [(Identifier, Type, ChildKind)]
_allfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule342 [(Identifier, Type, ChildKind)]
_childrenIfields
         _attrs :: [(Identifier, Identifier)]
_attrs = [(Identifier, Attributes, Attributes)]
-> [Identifier]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier)]
rule343 [(Identifier, Attributes, Attributes)]
_childrenIattributes [Identifier]
_inhnames [Identifier]
_rulesIinstVars [Identifier]
_rulesIlocVars
         _inhnames :: [Identifier]
_inhnames = Attributes -> [Identifier]
rule344 Attributes
_lhsIinh
         _synnames :: [Identifier]
_synnames = Attributes -> [Identifier]
rule345 Attributes
_lhsIsyn
         _lhsOdirectDep :: Seq Edge
         _lhsOdirectDep :: Seq (Int, Int)
_lhsOdirectDep = Seq (Int, Int) -> Seq (Int, Int)
rule346 Seq (Int, Int)
_rulesIdirectDep
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule347 Seq Error
_childrenIerrors Seq Error
_rulesIerrors
         _lhsOinstDep :: Seq Edge
         _lhsOinstDep :: Seq (Int, Int)
_lhsOinstDep = Seq (Int, Int) -> Seq (Int, Int)
rule348 Seq (Int, Int)
_rulesIinstDep
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = Int -> Int
rule349 Int
_rulesInAutoRules
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = Int -> Int
rule350 Int
_rulesInExplicitRules
         _childrenOallfields :: [(Identifier, Type, ChildKind)]
_childrenOallfields = forall {p}. p -> p
rule351 [(Identifier, Type, ChildKind)]
_allfields
         _childrenOallnts :: [Identifier]
_childrenOallnts = [Identifier] -> [Identifier]
rule352 [Identifier]
_lhsIallnts
         _childrenOattrs :: [(Identifier, Identifier)]
_childrenOattrs = forall {p}. p -> p
rule353 [(Identifier, Identifier)]
_attrs
         _childrenOinh :: Attributes
_childrenOinh = Attributes -> Attributes
rule354 Attributes
_lhsIinh
         _childrenOinhMap :: Map Identifier Attributes
_childrenOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule355 Map Identifier Attributes
_lhsIinhMap
         _childrenOmergeMap :: Map Identifier (Identifier, [Identifier])
_childrenOmergeMap = forall {p}. p -> p
rule356 Map Identifier (Identifier, [Identifier])
_mergeMap
         _childrenOnt :: Identifier
_childrenOnt = Identifier -> Identifier
rule357 Identifier
_lhsInt
         _childrenOo_unbox :: Bool
_childrenOo_unbox = Bool -> Bool
rule358 Bool
_lhsIo_unbox
         _childrenOsyn :: Attributes
_childrenOsyn = Attributes -> Attributes
rule359 Attributes
_lhsIsyn
         _childrenOsynMap :: Map Identifier Attributes
_childrenOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule360 Map Identifier Attributes
_lhsIsynMap
         _rulesOallfields :: [(Identifier, Type, ChildKind)]
_rulesOallfields = forall {p}. p -> p
rule361 [(Identifier, Type, ChildKind)]
_allfields
         _rulesOallnts :: [Identifier]
_rulesOallnts = [Identifier] -> [Identifier]
rule362 [Identifier]
_lhsIallnts
         _rulesOaltAttrs :: Map AltAttr Int
_rulesOaltAttrs = forall {p}. p -> p
rule363 Map AltAttr Int
_altAttrs
         _rulesOattrs :: [(Identifier, Identifier)]
_rulesOattrs = forall {p}. p -> p
rule364 [(Identifier, Identifier)]
_attrs
         _rulesOinh :: Attributes
_rulesOinh = Attributes -> Attributes
rule365 Attributes
_lhsIinh
         _rulesOmergeMap :: Map Identifier (Identifier, [Identifier])
_rulesOmergeMap = forall {p}. p -> p
rule366 Map Identifier (Identifier, [Identifier])
_mergeMap
         _rulesOnt :: Identifier
_rulesOnt = Identifier -> Identifier
rule367 Identifier
_lhsInt
         _rulesOo_case :: Bool
_rulesOo_case = Bool -> Bool
rule368 Bool
_lhsIo_case
         _rulesOo_cata :: Bool
_rulesOo_cata = Bool -> Bool
rule369 Bool
_lhsIo_cata
         _rulesOo_dovisit :: Bool
_rulesOo_dovisit = Bool -> Bool
rule370 Bool
_lhsIo_dovisit
         _rulesOo_newtypes :: Bool
_rulesOo_newtypes = Bool -> Bool
rule371 Bool
_lhsIo_newtypes
         _rulesOo_rename :: Bool
_rulesOo_rename = Bool -> Bool
rule372 Bool
_lhsIo_rename
         _rulesOo_sem :: Bool
_rulesOo_sem = Bool -> Bool
rule373 Bool
_lhsIo_sem
         _rulesOo_sig :: Bool
_rulesOo_sig = Bool -> Bool
rule374 Bool
_lhsIo_sig
         _rulesOo_wantvisit :: Bool
_rulesOo_wantvisit = Bool -> Bool
rule375 Bool
_lhsIo_wantvisit
         _rulesOoptions :: Options
_rulesOoptions = Options -> Options
rule376 Options
_lhsIoptions
         _rulesOprefix :: String
_rulesOprefix = ShowS
rule377 String
_lhsIprefix
         _rulesOsyn :: Attributes
_rulesOsyn = Attributes -> Attributes
rule378 Attributes
_lhsIsyn
         __result_ :: T_Production_vOut25
__result_ = Seq (Int, Int)
-> Seq (Int, Int)
-> CProduction
-> [Identifier]
-> Seq (Int, Int)
-> Seq Error
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> Seq (Int, CRule)
-> Int
-> T_Production_vOut25
T_Production_vOut25 Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int)
_lhsOaroundDep CProduction
_lhsOcProduction [Identifier]
_lhsOcons Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules Seq (Int, CRule)
_lhsOrules Int
_lhsOvcount
         in T_Production_vOut25
__result_ )
     in T_Production_v25 -> T_Production_s26
C_Production_s26 T_Production_v25
v25
   {-# INLINE rule315 #-}
   {-# LINE 93 "src-ag/Order.ag" #-}
   rule315 = \ con_ ->
                                  {-# LINE 93 "src-ag/Order.ag" #-}
                                  con_
                                  {-# LINE 2478 "src-generated/Order.hs" #-}
   {-# INLINE rule316 #-}
   {-# LINE 95 "src-ag/Order.ag" #-}
   rule316 = \ con_ ->
                               {-# LINE 95 "src-ag/Order.ag" #-}
                               con_
                               {-# LINE 2484 "src-generated/Order.hs" #-}
   {-# INLINE rule317 #-}
   {-# LINE 175 "src-ag/Order.ag" #-}
   rule317 = \ ((_childrenIgathAltAttrs) :: [AltAttr]) ((_lhsIinh) :: Attributes) ((_rulesIgathAltAttrs) :: [AltAttr]) ->
                                       {-# LINE 175 "src-ag/Order.ag" #-}
                                       [ AltAttr _LHS inh True | inh <- Map.keys _lhsIinh ]
                                        ++ _childrenIgathAltAttrs
                                        ++ _rulesIgathAltAttrs
                                       {-# LINE 2492 "src-generated/Order.hs" #-}
   {-# INLINE rule318 #-}
   {-# LINE 191 "src-ag/Order.ag" #-}
   rule318 = \ _gathAltAttrs ((_lhsIvcount) :: Int) ->
                                 {-# LINE 191 "src-ag/Order.ag" #-}
                                 Map.fromList (zip _gathAltAttrs [_lhsIvcount..])
                                 {-# LINE 2498 "src-generated/Order.hs" #-}
   {-# INLINE rule319 #-}
   {-# LINE 204 "src-ag/Order.ag" #-}
   rule319 = \ ((_childrenInts) :: Seq (Identifier,NontermIdent)) ->
                                    {-# LINE 204 "src-ag/Order.ag" #-}
                                    Map.fromList (toList _childrenInts)
                                    {-# LINE 2504 "src-generated/Order.hs" #-}
   {-# INLINE rule320 #-}
   {-# LINE 205 "src-ag/Order.ag" #-}
   rule320 = \ ((_childrenIinhs) :: Seq (Identifier,Attributes)) ->
                                      {-# LINE 205 "src-ag/Order.ag" #-}
                                      Map.fromList (toList _childrenIinhs)
                                      {-# LINE 2510 "src-generated/Order.hs" #-}
   {-# INLINE rule321 #-}
   {-# LINE 211 "src-ag/Order.ag" #-}
   rule321 = \ ((_lhsIinh) :: Attributes) ((_lhsInt) :: Identifier) con_ ->
                                  {-# LINE 211 "src-ag/Order.ag" #-}
                                  [ cRuleLhsInh inh _lhsInt con_ tp | (inh,tp) <- Map.assocs _lhsIinh ]
                                  {-# LINE 2516 "src-generated/Order.hs" #-}
   {-# INLINE rule322 #-}
   {-# LINE 212 "src-ag/Order.ag" #-}
   rule322 = \ ((_childrenIgathRules) :: Seq CRule) _inhRules ((_rulesIgathRules) :: Seq CRule) ->
                                    {-# LINE 212 "src-ag/Order.ag" #-}
                                    _inhRules ++ toList (_childrenIgathRules Seq.>< _rulesIgathRules)
                                    {-# LINE 2522 "src-generated/Order.hs" #-}
   {-# INLINE rule323 #-}
   {-# LINE 264 "src-ag/Order.ag" #-}
   rule323 = \ _gathRules ((_lhsIvcount) :: Int) ->
                               {-# LINE 264 "src-ag/Order.ag" #-}
                               Seq.fromList (zip [_lhsIvcount..] _gathRules)
                               {-# LINE 2528 "src-generated/Order.hs" #-}
   {-# INLINE rule324 #-}
   {-# LINE 265 "src-ag/Order.ag" #-}
   rule324 = \ _gathRules ((_lhsIvcount) :: Int) ->
                                 {-# LINE 265 "src-ag/Order.ag" #-}
                                 _lhsIvcount + length _gathRules
                                 {-# LINE 2534 "src-generated/Order.hs" #-}
   {-# INLINE rule325 #-}
   {-# LINE 293 "src-ag/Order.ag" #-}
   rule325 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ((_lhsInt) :: Identifier) con_ ->
            {-# LINE 293 "src-ag/Order.ag" #-}
            Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrDepMap
            {-# LINE 2540 "src-generated/Order.hs" #-}
   {-# INLINE rule326 #-}
   {-# LINE 296 "src-ag/Order.ag" #-}
   rule326 = \ _altAttrs _manualDeps ->
            {-# LINE 296 "src-ag/Order.ag" #-}
            Seq.fromList [ (vertex True occA, vertex False occB)
                         | Dependency occA occB <- _manualDeps
                         , let vertex inout (OccAttr child nm)
                                 | child == _LOC = findWithErr2 (AltAttr _LOC nm True) _altAttrs
                                 | otherwise     = findWithErr2 (AltAttr child nm inout) _altAttrs
                               vertex _ (OccRule nm)
                                 = findWithErr2 (AltAttr _LOC (Ident ("_rule_" ++ show nm) (getPos nm)) True) _altAttrs
                         ]
            {-# LINE 2553 "src-generated/Order.hs" #-}
   {-# INLINE rule327 #-}
   {-# LINE 342 "src-ag/Order.ag" #-}
   rule327 = \ ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) ->
                                         {-# LINE 342 "src-ag/Order.ag" #-}
                                         _childrenIcollectChildrenSyns
                                         {-# LINE 2559 "src-generated/Order.hs" #-}
   {-# INLINE rule328 #-}
   {-# LINE 343 "src-ag/Order.ag" #-}
   rule328 = \ ((_childrenIcollectChildrenInhs) :: Map Identifier Attributes ) ->
                                         {-# LINE 343 "src-ag/Order.ag" #-}
                                         _childrenIcollectChildrenInhs
                                         {-# LINE 2565 "src-generated/Order.hs" #-}
   {-# INLINE rule329 #-}
   {-# LINE 361 "src-ag/Order.ag" #-}
   rule329 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) con_ ->
                                                {-# LINE 361 "src-ag/Order.ag" #-}
                                                Map.findWithDefault Map.empty con_ _lhsImergeMap
                                                {-# LINE 2571 "src-generated/Order.hs" #-}
   {-# INLINE rule330 #-}
   {-# LINE 372 "src-ag/Order.ag" #-}
   rule330 = \ _mergeDep1 _mergeDep2 ->
                       {-# LINE 372 "src-ag/Order.ag" #-}
                       _mergeDep1     Seq.>< _mergeDep2
                       {-# LINE 2577 "src-generated/Order.hs" #-}
   {-# INLINE rule331 #-}
   {-# LINE 374 "src-ag/Order.ag" #-}
   rule331 = \ _altAttrs ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) _mergeMap ->
            {-# LINE 374 "src-ag/Order.ag" #-}
            Seq.fromList $
               [ (childVert, synVert)
               | childNm <- Map.keys _mergeMap
               , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)
               , let childNm' = Ident (show childNm ++ "_merge") (getPos childNm)
                     childAttr = AltAttr _LOC childNm' True
                     synAttr  = AltAttr childNm synNm True
                     childVert = findWithErr2 childAttr _altAttrs
                     synVert  = findWithErr2 synAttr _altAttrs
               ]
            {-# LINE 2592 "src-generated/Order.hs" #-}
   {-# INLINE rule332 #-}
   {-# LINE 385 "src-ag/Order.ag" #-}
   rule332 = \ _altAttrs ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) _mergeMap ->
            {-# LINE 385 "src-ag/Order.ag" #-}
            Seq.fromList $
               [ (mergedVert, sourceVert)
               | (childNm, (_,cs)) <- Map.assocs _mergeMap
               , c <- cs
               , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)
               , let sourceAttr = AltAttr childNm synNm True
                     mergedAttr = AltAttr c synNm True
                     sourceVert = findWithErr2 sourceAttr _altAttrs
                     mergedVert = findWithErr2 mergedAttr _altAttrs
               ]
            {-# LINE 2607 "src-generated/Order.hs" #-}
   {-# INLINE rule333 #-}
   {-# LINE 414 "src-ag/Order.ag" #-}
   rule333 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) con_ ->
                                                 {-# LINE 414 "src-ag/Order.ag" #-}
                                                 Map.findWithDefault Map.empty con_ _lhsIaroundMap
                                                 {-# LINE 2613 "src-generated/Order.hs" #-}
   {-# INLINE rule334 #-}
   {-# LINE 422 "src-ag/Order.ag" #-}
   rule334 = \ _altAttrs _aroundMap ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) ->
           {-# LINE 422 "src-ag/Order.ag" #-}
           Seq.fromList $
             [ (childVert, synVert)
             | childNm <- Map.keys _aroundMap
             , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)
             , let childNm' = Ident (show childNm ++ "_around") (getPos childNm)
                   childAttr = AltAttr _LOC childNm' True
                   synAttr  = AltAttr childNm synNm True
                   childVert = findWithErr2 childAttr _altAttrs
                   synVert  = findWithErr2 synAttr _altAttrs
             ]
           {-# LINE 2628 "src-generated/Order.hs" #-}
   {-# INLINE rule335 #-}
   {-# LINE 433 "src-ag/Order.ag" #-}
   rule335 = \ _altAttrs _aroundMap ((_childrenIcollectChildrenInhs) :: Map Identifier Attributes ) ->
            {-# LINE 433 "src-ag/Order.ag" #-}
            Seq.fromList $
              [ (childVert, inhVert)
              | childNm <- Map.keys _aroundMap
              , inhNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenInhs)
              , let childNm'  = Ident (show childNm ++ "_around") (getPos childNm)
                    childAttr = AltAttr _LOC childNm' True
                    inhAttr   = AltAttr childNm inhNm False
                    childVert = findWithErr2 childAttr _altAttrs
                    inhVert   = findWithErr2 inhAttr _altAttrs
              ]
            {-# LINE 2643 "src-generated/Order.hs" #-}
   {-# INLINE rule336 #-}
   {-# LINE 443 "src-ag/Order.ag" #-}
   rule336 = \ _aroundDep1 _aroundDep2 ->
                       {-# LINE 443 "src-ag/Order.ag" #-}
                       _aroundDep1     Seq.>< _aroundDep2
                       {-# LINE 2649 "src-generated/Order.hs" #-}
   {-# INLINE rule337 #-}
   {-# LINE 527 "src-ag/Order.ag" #-}
   rule337 = \ con_ ->
                              {-# LINE 527 "src-ag/Order.ag" #-}
                              [con_]
                              {-# LINE 2655 "src-generated/Order.hs" #-}
   {-# INLINE rule338 #-}
   {-# LINE 534 "src-ag/Order.ag" #-}
   rule338 = \  (_ :: ()) ->
                                     {-# LINE 534 "src-ag/Order.ag" #-}
                                     Map.empty
                                     {-# LINE 2661 "src-generated/Order.hs" #-}
   {-# INLINE rule339 #-}
   {-# LINE 540 "src-ag/Order.ag" #-}
   rule339 = \ ((_typeSigsItypeSigs) :: Map Identifier Type) ->
                                      {-# LINE 540 "src-ag/Order.ag" #-}
                                      _typeSigsItypeSigs
                                      {-# LINE 2667 "src-generated/Order.hs" #-}
   {-# INLINE rule340 #-}
   {-# LINE 608 "src-ag/Order.ag" #-}
   rule340 = \ ((_childrenIsinglevisits) :: [CRule]) _gathRules ((_lhsIcVisitsMap) :: CVisitsMap) ((_lhsIinh) :: Attributes) ((_lhsInt) :: Identifier) ((_lhsIo_dovisit) :: Bool) ((_lhsIsyn) :: Attributes) con_ ->
                                {-# LINE 608 "src-ag/Order.ag" #-}
                                if  _lhsIo_dovisit
                                     then let prodsVisitsMap = findWithErr1 "Production.cVisits.nt" _lhsInt _lhsIcVisitsMap
                                              visits = findWithErr1 "Production.cVisits.con" con_ prodsVisitsMap
                                           in visits
                                     else  let  vss = nubBy eqCRuleDefines _gathRules ++ _childrenIsinglevisits
                                           in  [CVisit _lhsIinh _lhsIsyn vss [] False]
                                {-# LINE 2678 "src-generated/Order.hs" #-}
   {-# INLINE rule341 #-}
   {-# LINE 634 "src-ag/Order.ag" #-}
   rule341 = \ _cVisits ((_childrenIfields) :: [(Identifier,Type,ChildKind)]) ((_childrenIterminals) :: [Identifier]) con_ ->
                                     {-# LINE 634 "src-ag/Order.ag" #-}
                                     CProduction con_ _cVisits _childrenIfields _childrenIterminals
                                     {-# LINE 2684 "src-generated/Order.hs" #-}
   {-# INLINE rule342 #-}
   {-# LINE 662 "src-ag/Order.ag" #-}
   rule342 = \ ((_childrenIfields) :: [(Identifier,Type,ChildKind)]) ->
                                  {-# LINE 662 "src-ag/Order.ag" #-}
                                  _childrenIfields
                                  {-# LINE 2690 "src-generated/Order.hs" #-}
   {-# INLINE rule343 #-}
   {-# LINE 663 "src-ag/Order.ag" #-}
   rule343 = \ ((_childrenIattributes) :: [(Identifier,Attributes,Attributes)]) _inhnames ((_rulesIinstVars) :: [Identifier]) ((_rulesIlocVars) :: [Identifier]) ->
                                   {-# LINE 663 "src-ag/Order.ag" #-}
                                   map ((,) _LOC)  _rulesIlocVars ++
                                   map ((,) _INST) _rulesIinstVars ++
                                   map ((,) _LHS)  _inhnames ++
                                   concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]
                                   {-# LINE 2699 "src-generated/Order.hs" #-}
   {-# INLINE rule344 #-}
   {-# LINE 667 "src-ag/Order.ag" #-}
   rule344 = \ ((_lhsIinh) :: Attributes) ->
                                   {-# LINE 667 "src-ag/Order.ag" #-}
                                   Map.keys _lhsIinh
                                   {-# LINE 2705 "src-generated/Order.hs" #-}
   {-# INLINE rule345 #-}
   {-# LINE 668 "src-ag/Order.ag" #-}
   rule345 = \ ((_lhsIsyn) :: Attributes) ->
                                   {-# LINE 668 "src-ag/Order.ag" #-}
                                   Map.keys _lhsIsyn
                                   {-# LINE 2711 "src-generated/Order.hs" #-}
   {-# INLINE rule346 #-}
   rule346 = \ ((_rulesIdirectDep) :: Seq Edge) ->
     _rulesIdirectDep
   {-# INLINE rule347 #-}
   rule347 = \ ((_childrenIerrors) :: Seq Error) ((_rulesIerrors) :: Seq Error) ->
     _childrenIerrors Seq.>< _rulesIerrors
   {-# INLINE rule348 #-}
   rule348 = \ ((_rulesIinstDep) :: Seq Edge) ->
     _rulesIinstDep
   {-# INLINE rule349 #-}
   rule349 = \ ((_rulesInAutoRules) :: Int) ->
     _rulesInAutoRules
   {-# INLINE rule350 #-}
   rule350 = \ ((_rulesInExplicitRules) :: Int) ->
     _rulesInExplicitRules
   {-# INLINE rule351 #-}
   rule351 = \ _allfields ->
     _allfields
   {-# INLINE rule352 #-}
   rule352 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule353 #-}
   rule353 = \ _attrs ->
     _attrs
   {-# INLINE rule354 #-}
   rule354 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule355 #-}
   rule355 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule356 #-}
   rule356 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule357 #-}
   rule357 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule358 #-}
   rule358 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule359 #-}
   rule359 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule360 #-}
   rule360 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
   {-# INLINE rule361 #-}
   rule361 = \ _allfields ->
     _allfields
   {-# INLINE rule362 #-}
   rule362 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule363 #-}
   rule363 = \ _altAttrs ->
     _altAttrs
   {-# INLINE rule364 #-}
   rule364 = \ _attrs ->
     _attrs
   {-# INLINE rule365 #-}
   rule365 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule366 #-}
   rule366 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule367 #-}
   rule367 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule368 #-}
   rule368 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule369 #-}
   rule369 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule370 #-}
   rule370 = \ ((_lhsIo_dovisit) :: Bool) ->
     _lhsIo_dovisit
   {-# INLINE rule371 #-}
   rule371 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule372 #-}
   rule372 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule373 #-}
   rule373 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule374 #-}
   rule374 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule375 #-}
   rule375 = \ ((_lhsIo_wantvisit) :: Bool) ->
     _lhsIo_wantvisit
   {-# INLINE rule376 #-}
   rule376 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule377 #-}
   rule377 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule378 #-}
   rule378 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn

-- Productions -------------------------------------------------
-- wrapper
data Inh_Productions  = Inh_Productions { Inh_Productions -> [Identifier]
allnts_Inh_Productions :: ([Identifier]), Inh_Productions -> Map Identifier (Map Identifier [Expression])
aroundMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier [Expression])), Inh_Productions -> CVisitsMap
cVisitsMap_Inh_Productions :: (CVisitsMap), Inh_Productions -> Attributes
inh_Inh_Productions :: (Attributes), Inh_Productions -> Map Identifier Attributes
inhMap_Inh_Productions :: (Map Identifier Attributes), Inh_Productions -> AttrOrderMap
manualAttrDepMap_Inh_Productions :: (AttrOrderMap), Inh_Productions
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
mergeMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))), Inh_Productions -> Identifier
nt_Inh_Productions :: (Identifier), Inh_Productions -> Bool
o_case_Inh_Productions :: (Bool), Inh_Productions -> Bool
o_cata_Inh_Productions :: (Bool), Inh_Productions -> Bool
o_dovisit_Inh_Productions :: (Bool), Inh_Productions -> Bool
o_newtypes_Inh_Productions :: (Bool), Inh_Productions -> Bool
o_rename_Inh_Productions :: (Bool), Inh_Productions -> Bool
o_sem_Inh_Productions :: (Bool), Inh_Productions -> Bool
o_sig_Inh_Productions :: (Bool), Inh_Productions -> Bool
o_unbox_Inh_Productions :: (Bool), Inh_Productions -> Bool
o_wantvisit_Inh_Productions :: (Bool), Inh_Productions -> Options
options_Inh_Productions :: (Options), Inh_Productions -> String
prefix_Inh_Productions :: (String), Inh_Productions -> Attributes
syn_Inh_Productions :: (Attributes), Inh_Productions -> Map Identifier Attributes
synMap_Inh_Productions :: (Map Identifier Attributes), Inh_Productions -> Int
vcount_Inh_Productions :: (Int) }
data Syn_Productions  = Syn_Productions { Syn_Productions -> Seq (Int, Int)
additionalDep_Syn_Productions :: (Seq Edge), Syn_Productions -> Seq (Int, Int)
aroundDep_Syn_Productions :: (Seq Edge), Syn_Productions -> CProductions
cProductions_Syn_Productions :: (CProductions), Syn_Productions -> [Identifier]
cons_Syn_Productions :: ([ConstructorIdent]), Syn_Productions -> Seq (Int, Int)
directDep_Syn_Productions :: (Seq Edge), Syn_Productions -> Seq Error
errors_Syn_Productions :: (Seq Error), Syn_Productions -> Seq (Int, Int)
instDep_Syn_Productions :: (Seq Edge), Syn_Productions -> Seq (Int, Int)
mergeDep_Syn_Productions :: (Seq Edge), Syn_Productions -> Int
nAutoRules_Syn_Productions :: (Int), Syn_Productions -> Int
nExplicitRules_Syn_Productions :: (Int), Syn_Productions -> Seq (Int, CRule)
rules_Syn_Productions :: (Seq (Vertex,CRule)), Syn_Productions -> Int
vcount_Syn_Productions :: (Int) }
{-# INLINABLE wrap_Productions #-}
wrap_Productions :: T_Productions  -> Inh_Productions  -> (Syn_Productions )
wrap_Productions :: T_Productions -> Inh_Productions -> Syn_Productions
wrap_Productions (T_Productions Identity T_Productions_s29
act) (Inh_Productions [Identifier]
_lhsIallnts Map Identifier (Map Identifier [Expression])
_lhsIaroundMap CVisitsMap
_lhsIcVisitsMap Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Productions_s29
sem <- Identity T_Productions_s29
act
        let arg28 :: T_Productions_vIn28
arg28 = [Identifier]
-> Map Identifier (Map Identifier [Expression])
-> CVisitsMap
-> Attributes
-> Map Identifier Attributes
-> AttrOrderMap
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> Int
-> T_Productions_vIn28
T_Productions_vIn28 [Identifier]
_lhsIallnts Map Identifier (Map Identifier [Expression])
_lhsIaroundMap CVisitsMap
_lhsIcVisitsMap Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount
        (T_Productions_vOut28 Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int)
_lhsOaroundDep CProductions
_lhsOcProductions [Identifier]
_lhsOcons Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules Seq (Int, CRule)
_lhsOrules Int
_lhsOvcount) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
sem T_Productions_vIn28
arg28)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq (Int, Int)
-> Seq (Int, Int)
-> CProductions
-> [Identifier]
-> Seq (Int, Int)
-> Seq Error
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> Seq (Int, CRule)
-> Int
-> Syn_Productions
Syn_Productions Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int)
_lhsOaroundDep CProductions
_lhsOcProductions [Identifier]
_lhsOcons Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules Seq (Int, CRule)
_lhsOrules Int
_lhsOvcount)
   )

-- cata
{-# NOINLINE sem_Productions #-}
sem_Productions :: Productions  -> T_Productions 
sem_Productions :: Productions -> T_Productions
sem_Productions Productions
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Production -> T_Productions -> T_Productions
sem_Productions_Cons T_Productions
sem_Productions_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Production -> T_Production
sem_Production Productions
list)

-- semantic domain
newtype T_Productions  = T_Productions {
                                       T_Productions -> Identity T_Productions_s29
attach_T_Productions :: Identity (T_Productions_s29 )
                                       }
newtype T_Productions_s29  = C_Productions_s29 {
                                               T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 :: (T_Productions_v28 )
                                               }
data T_Productions_s30  = C_Productions_s30
type T_Productions_v28  = (T_Productions_vIn28 ) -> (T_Productions_vOut28 )
data T_Productions_vIn28  = T_Productions_vIn28 ([Identifier]) (Map ConstructorIdent (Map Identifier [Expression])) (CVisitsMap) (Attributes) (Map Identifier Attributes) (AttrOrderMap) (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Attributes) (Map Identifier Attributes) (Int)
data T_Productions_vOut28  = T_Productions_vOut28 (Seq Edge) (Seq Edge) (CProductions) ([ConstructorIdent]) (Seq Edge) (Seq Error) (Seq Edge) (Seq Edge) (Int) (Int) (Seq (Vertex,CRule)) (Int)
{-# NOINLINE sem_Productions_Cons #-}
sem_Productions_Cons :: T_Production  -> T_Productions  -> T_Productions 
sem_Productions_Cons :: T_Production -> T_Productions -> T_Productions
sem_Productions_Cons T_Production
arg_hd_ T_Productions
arg_tl_ = Identity T_Productions_s29 -> T_Productions
T_Productions (forall (m :: * -> *) a. Monad m => a -> m a
return T_Productions_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_Productions_s29
st29 = let
      v28 :: T_Productions_v28 
      v28 :: T_Productions_v28
v28 = \ (T_Productions_vIn28 [Identifier]
_lhsIallnts Map Identifier (Map Identifier [Expression])
_lhsIaroundMap CVisitsMap
_lhsIcVisitsMap Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) -> ( let
         _hdX26 :: T_Production_s26
_hdX26 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Production -> Identity T_Production_s26
attach_T_Production (T_Production
arg_hd_))
         _tlX29 :: T_Productions_s29
_tlX29 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Productions -> Identity T_Productions_s29
attach_T_Productions (T_Productions
arg_tl_))
         (T_Production_vOut25 Seq (Int, Int)
_hdIadditionalDep Seq (Int, Int)
_hdIaroundDep CProduction
_hdIcProduction [Identifier]
_hdIcons Seq (Int, Int)
_hdIdirectDep Seq Error
_hdIerrors Seq (Int, Int)
_hdIinstDep Seq (Int, Int)
_hdImergeDep Int
_hdInAutoRules Int
_hdInExplicitRules Seq (Int, CRule)
_hdIrules Int
_hdIvcount) = T_Production_s26 -> T_Production_v25
inv_Production_s26 T_Production_s26
_hdX26 ([Identifier]
-> Map Identifier (Map Identifier [Expression])
-> CVisitsMap
-> Attributes
-> Map Identifier Attributes
-> AttrOrderMap
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> Int
-> T_Production_vIn25
T_Production_vIn25 [Identifier]
_hdOallnts Map Identifier (Map Identifier [Expression])
_hdOaroundMap CVisitsMap
_hdOcVisitsMap Attributes
_hdOinh Map Identifier Attributes
_hdOinhMap AttrOrderMap
_hdOmanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_hdOmergeMap Identifier
_hdOnt Bool
_hdOo_case Bool
_hdOo_cata Bool
_hdOo_dovisit Bool
_hdOo_newtypes Bool
_hdOo_rename Bool
_hdOo_sem Bool
_hdOo_sig Bool
_hdOo_unbox Bool
_hdOo_wantvisit Options
_hdOoptions String
_hdOprefix Attributes
_hdOsyn Map Identifier Attributes
_hdOsynMap Int
_hdOvcount)
         (T_Productions_vOut28 Seq (Int, Int)
_tlIadditionalDep Seq (Int, Int)
_tlIaroundDep CProductions
_tlIcProductions [Identifier]
_tlIcons Seq (Int, Int)
_tlIdirectDep Seq Error
_tlIerrors Seq (Int, Int)
_tlIinstDep Seq (Int, Int)
_tlImergeDep Int
_tlInAutoRules Int
_tlInExplicitRules Seq (Int, CRule)
_tlIrules Int
_tlIvcount) = T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
_tlX29 ([Identifier]
-> Map Identifier (Map Identifier [Expression])
-> CVisitsMap
-> Attributes
-> Map Identifier Attributes
-> AttrOrderMap
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> Int
-> T_Productions_vIn28
T_Productions_vIn28 [Identifier]
_tlOallnts Map Identifier (Map Identifier [Expression])
_tlOaroundMap CVisitsMap
_tlOcVisitsMap Attributes
_tlOinh Map Identifier Attributes
_tlOinhMap AttrOrderMap
_tlOmanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_tlOmergeMap Identifier
_tlOnt Bool
_tlOo_case Bool
_tlOo_cata Bool
_tlOo_dovisit Bool
_tlOo_newtypes Bool
_tlOo_rename Bool
_tlOo_sem Bool
_tlOo_sig Bool
_tlOo_unbox Bool
_tlOo_wantvisit Options
_tlOoptions String
_tlOprefix Attributes
_tlOsyn Map Identifier Attributes
_tlOsynMap Int
_tlOvcount)
         _lhsOcProductions :: CProductions
         _lhsOcProductions :: CProductions
_lhsOcProductions = CProduction -> CProductions -> CProductions
rule379 CProduction
_hdIcProduction CProductions
_tlIcProductions
         _lhsOadditionalDep :: Seq Edge
         _lhsOadditionalDep :: Seq (Int, Int)
_lhsOadditionalDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule380 Seq (Int, Int)
_hdIadditionalDep Seq (Int, Int)
_tlIadditionalDep
         _lhsOaroundDep :: Seq Edge
         _lhsOaroundDep :: Seq (Int, Int)
_lhsOaroundDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule381 Seq (Int, Int)
_hdIaroundDep Seq (Int, Int)
_tlIaroundDep
         _lhsOcons :: [ConstructorIdent]
         _lhsOcons :: [Identifier]
_lhsOcons = [Identifier] -> [Identifier] -> [Identifier]
rule382 [Identifier]
_hdIcons [Identifier]
_tlIcons
         _lhsOdirectDep :: Seq Edge
         _lhsOdirectDep :: Seq (Int, Int)
_lhsOdirectDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule383 Seq (Int, Int)
_hdIdirectDep Seq (Int, Int)
_tlIdirectDep
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule384 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOinstDep :: Seq Edge
         _lhsOinstDep :: Seq (Int, Int)
_lhsOinstDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule385 Seq (Int, Int)
_hdIinstDep Seq (Int, Int)
_tlIinstDep
         _lhsOmergeDep :: Seq Edge
         _lhsOmergeDep :: Seq (Int, Int)
_lhsOmergeDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule386 Seq (Int, Int)
_hdImergeDep Seq (Int, Int)
_tlImergeDep
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = Int -> Int -> Int
rule387 Int
_hdInAutoRules Int
_tlInAutoRules
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = Int -> Int -> Int
rule388 Int
_hdInExplicitRules Int
_tlInExplicitRules
         _lhsOrules :: Seq (Vertex,CRule)
         _lhsOrules :: Seq (Int, CRule)
_lhsOrules = Seq (Int, CRule) -> Seq (Int, CRule) -> Seq (Int, CRule)
rule389 Seq (Int, CRule)
_hdIrules Seq (Int, CRule)
_tlIrules
         _lhsOvcount :: Int
         _lhsOvcount :: Int
_lhsOvcount = Int -> Int
rule390 Int
_tlIvcount
         _hdOallnts :: [Identifier]
_hdOallnts = [Identifier] -> [Identifier]
rule391 [Identifier]
_lhsIallnts
         _hdOaroundMap :: Map Identifier (Map Identifier [Expression])
_hdOaroundMap = Map Identifier (Map Identifier [Expression])
-> Map Identifier (Map Identifier [Expression])
rule392 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap
         _hdOcVisitsMap :: CVisitsMap
_hdOcVisitsMap = CVisitsMap -> CVisitsMap
rule393 CVisitsMap
_lhsIcVisitsMap
         _hdOinh :: Attributes
_hdOinh = Attributes -> Attributes
rule394 Attributes
_lhsIinh
         _hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule395 Map Identifier Attributes
_lhsIinhMap
         _hdOmanualAttrDepMap :: AttrOrderMap
_hdOmanualAttrDepMap = AttrOrderMap -> AttrOrderMap
rule396 AttrOrderMap
_lhsImanualAttrDepMap
         _hdOmergeMap :: Map Identifier (Map Identifier (Identifier, [Identifier]))
_hdOmergeMap = Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
rule397 Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule398 Identifier
_lhsInt
         _hdOo_case :: Bool
_hdOo_case = Bool -> Bool
rule399 Bool
_lhsIo_case
         _hdOo_cata :: Bool
_hdOo_cata = Bool -> Bool
rule400 Bool
_lhsIo_cata
         _hdOo_dovisit :: Bool
_hdOo_dovisit = Bool -> Bool
rule401 Bool
_lhsIo_dovisit
         _hdOo_newtypes :: Bool
_hdOo_newtypes = Bool -> Bool
rule402 Bool
_lhsIo_newtypes
         _hdOo_rename :: Bool
_hdOo_rename = Bool -> Bool
rule403 Bool
_lhsIo_rename
         _hdOo_sem :: Bool
_hdOo_sem = Bool -> Bool
rule404 Bool
_lhsIo_sem
         _hdOo_sig :: Bool
_hdOo_sig = Bool -> Bool
rule405 Bool
_lhsIo_sig
         _hdOo_unbox :: Bool
_hdOo_unbox = Bool -> Bool
rule406 Bool
_lhsIo_unbox
         _hdOo_wantvisit :: Bool
_hdOo_wantvisit = Bool -> Bool
rule407 Bool
_lhsIo_wantvisit
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule408 Options
_lhsIoptions
         _hdOprefix :: String
_hdOprefix = ShowS
rule409 String
_lhsIprefix
         _hdOsyn :: Attributes
_hdOsyn = Attributes -> Attributes
rule410 Attributes
_lhsIsyn
         _hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule411 Map Identifier Attributes
_lhsIsynMap
         _hdOvcount :: Int
_hdOvcount = Int -> Int
rule412 Int
_lhsIvcount
         _tlOallnts :: [Identifier]
_tlOallnts = [Identifier] -> [Identifier]
rule413 [Identifier]
_lhsIallnts
         _tlOaroundMap :: Map Identifier (Map Identifier [Expression])
_tlOaroundMap = Map Identifier (Map Identifier [Expression])
-> Map Identifier (Map Identifier [Expression])
rule414 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap
         _tlOcVisitsMap :: CVisitsMap
_tlOcVisitsMap = CVisitsMap -> CVisitsMap
rule415 CVisitsMap
_lhsIcVisitsMap
         _tlOinh :: Attributes
_tlOinh = Attributes -> Attributes
rule416 Attributes
_lhsIinh
         _tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule417 Map Identifier Attributes
_lhsIinhMap
         _tlOmanualAttrDepMap :: AttrOrderMap
_tlOmanualAttrDepMap = AttrOrderMap -> AttrOrderMap
rule418 AttrOrderMap
_lhsImanualAttrDepMap
         _tlOmergeMap :: Map Identifier (Map Identifier (Identifier, [Identifier]))
_tlOmergeMap = Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
rule419 Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule420 Identifier
_lhsInt
         _tlOo_case :: Bool
_tlOo_case = Bool -> Bool
rule421 Bool
_lhsIo_case
         _tlOo_cata :: Bool
_tlOo_cata = Bool -> Bool
rule422 Bool
_lhsIo_cata
         _tlOo_dovisit :: Bool
_tlOo_dovisit = Bool -> Bool
rule423 Bool
_lhsIo_dovisit
         _tlOo_newtypes :: Bool
_tlOo_newtypes = Bool -> Bool
rule424 Bool
_lhsIo_newtypes
         _tlOo_rename :: Bool
_tlOo_rename = Bool -> Bool
rule425 Bool
_lhsIo_rename
         _tlOo_sem :: Bool
_tlOo_sem = Bool -> Bool
rule426 Bool
_lhsIo_sem
         _tlOo_sig :: Bool
_tlOo_sig = Bool -> Bool
rule427 Bool
_lhsIo_sig
         _tlOo_unbox :: Bool
_tlOo_unbox = Bool -> Bool
rule428 Bool
_lhsIo_unbox
         _tlOo_wantvisit :: Bool
_tlOo_wantvisit = Bool -> Bool
rule429 Bool
_lhsIo_wantvisit
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule430 Options
_lhsIoptions
         _tlOprefix :: String
_tlOprefix = ShowS
rule431 String
_lhsIprefix
         _tlOsyn :: Attributes
_tlOsyn = Attributes -> Attributes
rule432 Attributes
_lhsIsyn
         _tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule433 Map Identifier Attributes
_lhsIsynMap
         _tlOvcount :: Int
_tlOvcount = Int -> Int
rule434 Int
_hdIvcount
         __result_ :: T_Productions_vOut28
__result_ = Seq (Int, Int)
-> Seq (Int, Int)
-> CProductions
-> [Identifier]
-> Seq (Int, Int)
-> Seq Error
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> Seq (Int, CRule)
-> Int
-> T_Productions_vOut28
T_Productions_vOut28 Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int)
_lhsOaroundDep CProductions
_lhsOcProductions [Identifier]
_lhsOcons Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules Seq (Int, CRule)
_lhsOrules Int
_lhsOvcount
         in T_Productions_vOut28
__result_ )
     in T_Productions_v28 -> T_Productions_s29
C_Productions_s29 T_Productions_v28
v28
   {-# INLINE rule379 #-}
   {-# LINE 631 "src-ag/Order.ag" #-}
   rule379 = \ ((_hdIcProduction) :: CProduction) ((_tlIcProductions) :: CProductions) ->
                                {-# LINE 631 "src-ag/Order.ag" #-}
                                _hdIcProduction : _tlIcProductions
                                {-# LINE 2929 "src-generated/Order.hs" #-}
   {-# INLINE rule380 #-}
   rule380 = \ ((_hdIadditionalDep) :: Seq Edge) ((_tlIadditionalDep) :: Seq Edge) ->
     _hdIadditionalDep Seq.>< _tlIadditionalDep
   {-# INLINE rule381 #-}
   rule381 = \ ((_hdIaroundDep) :: Seq Edge) ((_tlIaroundDep) :: Seq Edge) ->
     _hdIaroundDep Seq.>< _tlIaroundDep
   {-# INLINE rule382 #-}
   rule382 = \ ((_hdIcons) :: [ConstructorIdent]) ((_tlIcons) :: [ConstructorIdent]) ->
     _hdIcons ++ _tlIcons
   {-# INLINE rule383 #-}
   rule383 = \ ((_hdIdirectDep) :: Seq Edge) ((_tlIdirectDep) :: Seq Edge) ->
     _hdIdirectDep Seq.>< _tlIdirectDep
   {-# INLINE rule384 #-}
   rule384 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->
     _hdIerrors Seq.>< _tlIerrors
   {-# INLINE rule385 #-}
   rule385 = \ ((_hdIinstDep) :: Seq Edge) ((_tlIinstDep) :: Seq Edge) ->
     _hdIinstDep Seq.>< _tlIinstDep
   {-# INLINE rule386 #-}
   rule386 = \ ((_hdImergeDep) :: Seq Edge) ((_tlImergeDep) :: Seq Edge) ->
     _hdImergeDep Seq.>< _tlImergeDep
   {-# INLINE rule387 #-}
   rule387 = \ ((_hdInAutoRules) :: Int) ((_tlInAutoRules) :: Int) ->
     _hdInAutoRules + _tlInAutoRules
   {-# INLINE rule388 #-}
   rule388 = \ ((_hdInExplicitRules) :: Int) ((_tlInExplicitRules) :: Int) ->
     _hdInExplicitRules + _tlInExplicitRules
   {-# INLINE rule389 #-}
   rule389 = \ ((_hdIrules) :: Seq (Vertex,CRule)) ((_tlIrules) :: Seq (Vertex,CRule)) ->
     _hdIrules Seq.>< _tlIrules
   {-# INLINE rule390 #-}
   rule390 = \ ((_tlIvcount) :: Int) ->
     _tlIvcount
   {-# INLINE rule391 #-}
   rule391 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule392 #-}
   rule392 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) ->
     _lhsIaroundMap
   {-# INLINE rule393 #-}
   rule393 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->
     _lhsIcVisitsMap
   {-# INLINE rule394 #-}
   rule394 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule395 #-}
   rule395 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule396 #-}
   rule396 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->
     _lhsImanualAttrDepMap
   {-# INLINE rule397 #-}
   rule397 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->
     _lhsImergeMap
   {-# INLINE rule398 #-}
   rule398 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule399 #-}
   rule399 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule400 #-}
   rule400 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule401 #-}
   rule401 = \ ((_lhsIo_dovisit) :: Bool) ->
     _lhsIo_dovisit
   {-# INLINE rule402 #-}
   rule402 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule403 #-}
   rule403 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule404 #-}
   rule404 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule405 #-}
   rule405 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule406 #-}
   rule406 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule407 #-}
   rule407 = \ ((_lhsIo_wantvisit) :: Bool) ->
     _lhsIo_wantvisit
   {-# INLINE rule408 #-}
   rule408 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule409 #-}
   rule409 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule410 #-}
   rule410 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule411 #-}
   rule411 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
   {-# INLINE rule412 #-}
   rule412 = \ ((_lhsIvcount) :: Int) ->
     _lhsIvcount
   {-# INLINE rule413 #-}
   rule413 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule414 #-}
   rule414 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) ->
     _lhsIaroundMap
   {-# INLINE rule415 #-}
   rule415 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->
     _lhsIcVisitsMap
   {-# INLINE rule416 #-}
   rule416 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule417 #-}
   rule417 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule418 #-}
   rule418 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->
     _lhsImanualAttrDepMap
   {-# INLINE rule419 #-}
   rule419 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->
     _lhsImergeMap
   {-# INLINE rule420 #-}
   rule420 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule421 #-}
   rule421 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule422 #-}
   rule422 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule423 #-}
   rule423 = \ ((_lhsIo_dovisit) :: Bool) ->
     _lhsIo_dovisit
   {-# INLINE rule424 #-}
   rule424 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule425 #-}
   rule425 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule426 #-}
   rule426 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule427 #-}
   rule427 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule428 #-}
   rule428 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule429 #-}
   rule429 = \ ((_lhsIo_wantvisit) :: Bool) ->
     _lhsIo_wantvisit
   {-# INLINE rule430 #-}
   rule430 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule431 #-}
   rule431 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule432 #-}
   rule432 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule433 #-}
   rule433 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
   {-# INLINE rule434 #-}
   rule434 = \ ((_hdIvcount) :: Int) ->
     _hdIvcount
{-# NOINLINE sem_Productions_Nil #-}
sem_Productions_Nil ::  T_Productions 
sem_Productions_Nil :: T_Productions
sem_Productions_Nil  = Identity T_Productions_s29 -> T_Productions
T_Productions (forall (m :: * -> *) a. Monad m => a -> m a
return T_Productions_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_Productions_s29
st29 = let
      v28 :: T_Productions_v28 
      v28 :: T_Productions_v28
v28 = \ (T_Productions_vIn28 [Identifier]
_lhsIallnts Map Identifier (Map Identifier [Expression])
_lhsIaroundMap CVisitsMap
_lhsIcVisitsMap Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualAttrDepMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_unbox Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap Int
_lhsIvcount) -> ( let
         _lhsOcProductions :: CProductions
         _lhsOcProductions :: CProductions
_lhsOcProductions = forall {a}. () -> [a]
rule435  ()
         _lhsOadditionalDep :: Seq Edge
         _lhsOadditionalDep :: Seq (Int, Int)
_lhsOadditionalDep = forall {a}. () -> Seq a
rule436  ()
         _lhsOaroundDep :: Seq Edge
         _lhsOaroundDep :: Seq (Int, Int)
_lhsOaroundDep = forall {a}. () -> Seq a
rule437  ()
         _lhsOcons :: [ConstructorIdent]
         _lhsOcons :: [Identifier]
_lhsOcons = forall {a}. () -> [a]
rule438  ()
         _lhsOdirectDep :: Seq Edge
         _lhsOdirectDep :: Seq (Int, Int)
_lhsOdirectDep = forall {a}. () -> Seq a
rule439  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule440  ()
         _lhsOinstDep :: Seq Edge
         _lhsOinstDep :: Seq (Int, Int)
_lhsOinstDep = forall {a}. () -> Seq a
rule441  ()
         _lhsOmergeDep :: Seq Edge
         _lhsOmergeDep :: Seq (Int, Int)
_lhsOmergeDep = forall {a}. () -> Seq a
rule442  ()
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = () -> Int
rule443  ()
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = () -> Int
rule444  ()
         _lhsOrules :: Seq (Vertex,CRule)
         _lhsOrules :: Seq (Int, CRule)
_lhsOrules = forall {a}. () -> Seq a
rule445  ()
         _lhsOvcount :: Int
         _lhsOvcount :: Int
_lhsOvcount = Int -> Int
rule446 Int
_lhsIvcount
         __result_ :: T_Productions_vOut28
__result_ = Seq (Int, Int)
-> Seq (Int, Int)
-> CProductions
-> [Identifier]
-> Seq (Int, Int)
-> Seq Error
-> Seq (Int, Int)
-> Seq (Int, Int)
-> Int
-> Int
-> Seq (Int, CRule)
-> Int
-> T_Productions_vOut28
T_Productions_vOut28 Seq (Int, Int)
_lhsOadditionalDep Seq (Int, Int)
_lhsOaroundDep CProductions
_lhsOcProductions [Identifier]
_lhsOcons Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors Seq (Int, Int)
_lhsOinstDep Seq (Int, Int)
_lhsOmergeDep Int
_lhsOnAutoRules Int
_lhsOnExplicitRules Seq (Int, CRule)
_lhsOrules Int
_lhsOvcount
         in T_Productions_vOut28
__result_ )
     in T_Productions_v28 -> T_Productions_s29
C_Productions_s29 T_Productions_v28
v28
   {-# INLINE rule435 #-}
   {-# LINE 632 "src-ag/Order.ag" #-}
   rule435 = \  (_ :: ()) ->
                                {-# LINE 632 "src-ag/Order.ag" #-}
                                []
                                {-# LINE 3134 "src-generated/Order.hs" #-}
   {-# INLINE rule436 #-}
   rule436 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule437 #-}
   rule437 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule438 #-}
   rule438 = \  (_ :: ()) ->
     []
   {-# INLINE rule439 #-}
   rule439 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule440 #-}
   rule440 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule441 #-}
   rule441 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule442 #-}
   rule442 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule443 #-}
   rule443 = \  (_ :: ()) ->
     0
   {-# INLINE rule444 #-}
   rule444 = \  (_ :: ()) ->
     0
   {-# INLINE rule445 #-}
   rule445 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule446 #-}
   rule446 = \ ((_lhsIvcount) :: Int) ->
     _lhsIvcount

-- Rule --------------------------------------------------------
-- wrapper
data Inh_Rule  = Inh_Rule { Inh_Rule -> Attributes
allTypeSigs_Inh_Rule :: (Map Identifier Type), Inh_Rule -> [(Identifier, Type, ChildKind)]
allfields_Inh_Rule :: ([(Identifier,Type,ChildKind)]), Inh_Rule -> [Identifier]
allnts_Inh_Rule :: ([Identifier]), Inh_Rule -> Map AltAttr Int
altAttrs_Inh_Rule :: (Map AltAttr Vertex), Inh_Rule -> [(Identifier, Identifier)]
attrs_Inh_Rule :: ([(Identifier,Identifier)]), Inh_Rule -> Map Identifier Attributes
childInhs_Inh_Rule :: (Map Identifier Attributes), Inh_Rule -> Map Identifier Identifier
childNts_Inh_Rule :: (Map Identifier NontermIdent), Inh_Rule -> Identifier
con_Inh_Rule :: (Identifier), Inh_Rule -> Attributes
inh_Inh_Rule :: (Attributes), Inh_Rule -> Map Identifier Attributes
inhsOfChildren_Inh_Rule :: (Map Identifier Attributes), Inh_Rule -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Rule :: (Map Identifier (Identifier,[Identifier])), Inh_Rule -> Identifier
nt_Inh_Rule :: (Identifier), Inh_Rule -> Bool
o_case_Inh_Rule :: (Bool), Inh_Rule -> Bool
o_cata_Inh_Rule :: (Bool), Inh_Rule -> Bool
o_dovisit_Inh_Rule :: (Bool), Inh_Rule -> Bool
o_newtypes_Inh_Rule :: (Bool), Inh_Rule -> Bool
o_rename_Inh_Rule :: (Bool), Inh_Rule -> Bool
o_sem_Inh_Rule :: (Bool), Inh_Rule -> Bool
o_sig_Inh_Rule :: (Bool), Inh_Rule -> Bool
o_wantvisit_Inh_Rule :: (Bool), Inh_Rule -> Options
options_Inh_Rule :: (Options), Inh_Rule -> String
prefix_Inh_Rule :: (String), Inh_Rule -> Attributes
syn_Inh_Rule :: (Attributes), Inh_Rule -> Map Identifier Attributes
synsOfChildren_Inh_Rule :: (Map Identifier Attributes) }
data Syn_Rule  = Syn_Rule { Syn_Rule -> Seq (Int, Int)
directDep_Syn_Rule :: (Seq Edge), Syn_Rule -> Seq Error
errors_Syn_Rule :: (Seq Error), Syn_Rule -> [AltAttr]
gathAltAttrs_Syn_Rule :: ([AltAttr]), Syn_Rule -> Seq CRule
gathRules_Syn_Rule :: (Seq CRule), Syn_Rule -> Seq (Int, Int)
instDep_Syn_Rule :: (Seq Edge), Syn_Rule -> [Identifier]
instVars_Syn_Rule :: ([Identifier]), Syn_Rule -> [Identifier]
locVars_Syn_Rule :: ([Identifier]), Syn_Rule -> Int
nAutoRules_Syn_Rule :: (Int), Syn_Rule -> Int
nExplicitRules_Syn_Rule :: (Int) }
{-# INLINABLE wrap_Rule #-}
wrap_Rule :: T_Rule  -> Inh_Rule  -> (Syn_Rule )
wrap_Rule :: T_Rule -> Inh_Rule -> Syn_Rule
wrap_Rule (T_Rule Identity T_Rule_s32
act) (Inh_Rule Attributes
_lhsIallTypeSigs [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts Map AltAttr Int
_lhsIaltAttrs [(Identifier, Identifier)]
_lhsIattrs Map Identifier Attributes
_lhsIchildInhs Map Identifier Identifier
_lhsIchildNts Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhsOfChildren Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynsOfChildren) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Rule_s32
sem <- Identity T_Rule_s32
act
        let arg31 :: T_Rule_vIn31
arg31 = Attributes
-> [(Identifier, Type, ChildKind)]
-> [Identifier]
-> Map AltAttr Int
-> [(Identifier, Identifier)]
-> Map Identifier Attributes
-> Map Identifier Identifier
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> T_Rule_vIn31
T_Rule_vIn31 Attributes
_lhsIallTypeSigs [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts Map AltAttr Int
_lhsIaltAttrs [(Identifier, Identifier)]
_lhsIattrs Map Identifier Attributes
_lhsIchildInhs Map Identifier Identifier
_lhsIchildNts Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhsOfChildren Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynsOfChildren
        (T_Rule_vOut31 Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Int, Int)
_lhsOinstDep [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Int
_lhsOnAutoRules Int
_lhsOnExplicitRules) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Rule_s32 -> T_Rule_v31
inv_Rule_s32 T_Rule_s32
sem T_Rule_vIn31
arg31)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq (Int, Int)
-> Seq Error
-> [AltAttr]
-> Seq CRule
-> Seq (Int, Int)
-> [Identifier]
-> [Identifier]
-> Int
-> Int
-> Syn_Rule
Syn_Rule Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Int, Int)
_lhsOinstDep [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Int
_lhsOnAutoRules Int
_lhsOnExplicitRules)
   )

-- cata
{-# INLINE sem_Rule #-}
sem_Rule :: Rule  -> T_Rule 
sem_Rule :: Rule -> T_Rule
sem_Rule ( Rule Maybe Identifier
mbName_ Pattern
pattern_ Expression
rhs_ Bool
owrt_ String
origin_ Bool
explicit_ Bool
pure_ Bool
identity_ Maybe Error
mbError_ Bool
eager_ ) = Maybe Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> String
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Bool
-> T_Rule
sem_Rule_Rule Maybe Identifier
mbName_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pattern_ ) ( Expression -> T_Expression
sem_Expression Expression
rhs_ ) Bool
owrt_ String
origin_ Bool
explicit_ Bool
pure_ Bool
identity_ Maybe Error
mbError_ Bool
eager_

-- semantic domain
newtype T_Rule  = T_Rule {
                         T_Rule -> Identity T_Rule_s32
attach_T_Rule :: Identity (T_Rule_s32 )
                         }
newtype T_Rule_s32  = C_Rule_s32 {
                                 T_Rule_s32 -> T_Rule_v31
inv_Rule_s32 :: (T_Rule_v31 )
                                 }
data T_Rule_s33  = C_Rule_s33
type T_Rule_v31  = (T_Rule_vIn31 ) -> (T_Rule_vOut31 )
data T_Rule_vIn31  = T_Rule_vIn31 (Map Identifier Type) ([(Identifier,Type,ChildKind)]) ([Identifier]) (Map AltAttr Vertex) ([(Identifier,Identifier)]) (Map Identifier Attributes) (Map Identifier NontermIdent) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Attributes) (Map Identifier Attributes)
data T_Rule_vOut31  = T_Rule_vOut31 (Seq Edge) (Seq Error) ([AltAttr]) (Seq CRule) (Seq Edge) ([Identifier]) ([Identifier]) (Int) (Int)
{-# NOINLINE sem_Rule_Rule #-}
sem_Rule_Rule :: (Maybe Identifier) -> T_Pattern  -> T_Expression  -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Bool) -> (Maybe Error) -> (Bool) -> T_Rule 
sem_Rule_Rule :: Maybe Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> String
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Bool
-> T_Rule
sem_Rule_Rule Maybe Identifier
arg_mbName_ T_Pattern
arg_pattern_ T_Expression
arg_rhs_ Bool
arg_owrt_ String
arg_origin_ Bool
arg_explicit_ Bool
_ Bool
_ Maybe Error
_ Bool
_ = Identity T_Rule_s32 -> T_Rule
T_Rule (forall (m :: * -> *) a. Monad m => a -> m a
return T_Rule_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_Rule_s32
st32 = let
      v31 :: T_Rule_v31 
      v31 :: T_Rule_v31
v31 = \ (T_Rule_vIn31 Attributes
_lhsIallTypeSigs [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts Map AltAttr Int
_lhsIaltAttrs [(Identifier, Identifier)]
_lhsIattrs Map Identifier Attributes
_lhsIchildInhs Map Identifier Identifier
_lhsIchildNts Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhsOfChildren Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynsOfChildren) -> ( let
         _patternX20 :: T_Pattern_s20
_patternX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s20
attach_T_Pattern (T_Pattern
arg_pattern_))
         _rhsX8 :: T_Expression_s8
_rhsX8 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expression -> Identity T_Expression_s8
attach_T_Expression (T_Expression
arg_rhs_))
         (T_Pattern_vOut19 Pattern
_patternIcopy Seq Error
_patternIerrors [AltAttr]
_patternIgathAltAttrs [Identifier]
_patternIinstVars [Identifier]
_patternIlocVars [(Identifier, Identifier, Bool)]
_patternIpatternAttrs) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patternX20 (Attributes
-> Map AltAttr Int
-> Identifier
-> Attributes
-> Identifier
-> Attributes
-> T_Pattern_vIn19
T_Pattern_vIn19 Attributes
_patternOallTypeSigs Map AltAttr Int
_patternOaltAttrs Identifier
_patternOcon Attributes
_patternOinh Identifier
_patternOnt Attributes
_patternOsyn)
         (T_Expression_vOut7 Set (Identifier, Identifier)
_rhsIallRhsVars Expression
_rhsIcopy Seq Error
_rhsIerrors [String]
_rhsItextLines [(Identifier, Identifier)]
_rhsIusedAttrs [Identifier]
_rhsIusedFields [Identifier]
_rhsIusedLocals) = T_Expression_s8 -> T_Expression_v7
inv_Expression_s8 T_Expression_s8
_rhsX8 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> T_Expression_vIn7
T_Expression_vIn7 [(Identifier, Type, ChildKind)]
_rhsOallfields [Identifier]
_rhsOallnts [(Identifier, Identifier)]
_rhsOattrs Identifier
_rhsOcon Map Identifier (Identifier, [Identifier])
_rhsOmergeMap Identifier
_rhsOnt Options
_rhsOoptions)
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = Bool -> Int
rule447 Bool
arg_explicit_
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = String -> Int
rule448 String
arg_origin_
         _defines :: Map Int (Identifier, Identifier, Maybe Type)
_defines = Attributes
-> Map AltAttr Int
-> Map Identifier Attributes
-> Attributes
-> [(Identifier, Identifier, Bool)]
-> Map Int (Identifier, Identifier, Maybe Type)
rule449 Attributes
_lhsIallTypeSigs Map AltAttr Int
_lhsIaltAttrs Map Identifier Attributes
_lhsIchildInhs Attributes
_lhsIsyn [(Identifier, Identifier, Bool)]
_patternIpatternAttrs
         _gathRules :: Seq CRule
_gathRules = Map Int (Identifier, Identifier, Maybe Type)
-> Map Identifier Identifier
-> Identifier
-> Identifier
-> Pattern
-> Set (Identifier, Identifier)
-> [String]
-> Bool
-> Maybe Identifier
-> String
-> Bool
-> Seq CRule
rule450 Map Int (Identifier, Identifier, Maybe Type)
_defines Map Identifier Identifier
_lhsIchildNts Identifier
_lhsIcon Identifier
_lhsInt Pattern
_patternIcopy Set (Identifier, Identifier)
_rhsIallRhsVars [String]
_rhsItextLines Bool
arg_explicit_ Maybe Identifier
arg_mbName_ String
arg_origin_ Bool
arg_owrt_
         _lhsOdirectDep :: Seq Edge
         _lhsOdirectDep :: Seq (Int, Int)
_lhsOdirectDep = forall {b} {a}.
Map b a
-> Map AltAttr Int
-> [(Identifier, Identifier)]
-> [Identifier]
-> [Identifier]
-> Seq (Int, b)
rule451 Map Int (Identifier, Identifier, Maybe Type)
_defines Map AltAttr Int
_lhsIaltAttrs [(Identifier, Identifier)]
_rhsIusedAttrs [Identifier]
_rhsIusedFields [Identifier]
_rhsIusedLocals
         _instDep1 :: Seq (Int, Int)
_instDep1 = forall {k} {c}.
Map k (Identifier, Identifier, c)
-> Map AltAttr Int -> Map Identifier Attributes -> Seq (Int, Int)
rule452 Map Int (Identifier, Identifier, Maybe Type)
_defines Map AltAttr Int
_lhsIaltAttrs Map Identifier Attributes
_lhsIsynsOfChildren
         _instDep2 :: Seq (Int, Int)
_instDep2 = forall {k} {c}.
Map k (Identifier, Identifier, c)
-> Map AltAttr Int -> Map Identifier Attributes -> Seq (Int, Int)
rule453 Map Int (Identifier, Identifier, Maybe Type)
_defines Map AltAttr Int
_lhsIaltAttrs Map Identifier Attributes
_lhsIinhsOfChildren
         _lhsOinstDep :: Seq Edge
         _lhsOinstDep :: Seq (Int, Int)
_lhsOinstDep = forall a. Seq a -> Seq a -> Seq a
rule454 Seq (Int, Int)
_instDep1 Seq (Int, Int)
_instDep2
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule455 Seq Error
_patternIerrors Seq Error
_rhsIerrors
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = [AltAttr] -> [AltAttr]
rule456 [AltAttr]
_patternIgathAltAttrs
         _lhsOgathRules :: Seq CRule
         _lhsOgathRules :: Seq CRule
_lhsOgathRules = forall {p}. p -> p
rule457 Seq CRule
_gathRules
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier]
rule458 [Identifier]
_patternIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier]
rule459 [Identifier]
_patternIlocVars
         _patternOallTypeSigs :: Attributes
_patternOallTypeSigs = Attributes -> Attributes
rule460 Attributes
_lhsIallTypeSigs
         _patternOaltAttrs :: Map AltAttr Int
_patternOaltAttrs = Map AltAttr Int -> Map AltAttr Int
rule461 Map AltAttr Int
_lhsIaltAttrs
         _patternOcon :: Identifier
_patternOcon = Identifier -> Identifier
rule462 Identifier
_lhsIcon
         _patternOinh :: Attributes
_patternOinh = Attributes -> Attributes
rule463 Attributes
_lhsIinh
         _patternOnt :: Identifier
_patternOnt = Identifier -> Identifier
rule464 Identifier
_lhsInt
         _patternOsyn :: Attributes
_patternOsyn = Attributes -> Attributes
rule465 Attributes
_lhsIsyn
         _rhsOallfields :: [(Identifier, Type, ChildKind)]
_rhsOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule466 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _rhsOallnts :: [Identifier]
_rhsOallnts = [Identifier] -> [Identifier]
rule467 [Identifier]
_lhsIallnts
         _rhsOattrs :: [(Identifier, Identifier)]
_rhsOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule468 [(Identifier, Identifier)]
_lhsIattrs
         _rhsOcon :: Identifier
_rhsOcon = Identifier -> Identifier
rule469 Identifier
_lhsIcon
         _rhsOmergeMap :: Map Identifier (Identifier, [Identifier])
_rhsOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule470 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _rhsOnt :: Identifier
_rhsOnt = Identifier -> Identifier
rule471 Identifier
_lhsInt
         _rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule472 Options
_lhsIoptions
         __result_ :: T_Rule_vOut31
__result_ = Seq (Int, Int)
-> Seq Error
-> [AltAttr]
-> Seq CRule
-> Seq (Int, Int)
-> [Identifier]
-> [Identifier]
-> Int
-> Int
-> T_Rule_vOut31
T_Rule_vOut31 Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Int, Int)
_lhsOinstDep [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Int
_lhsOnAutoRules Int
_lhsOnExplicitRules
         in T_Rule_vOut31
__result_ )
     in T_Rule_v31 -> T_Rule_s32
C_Rule_s32 T_Rule_v31
v31
   {-# INLINE rule447 #-}
   {-# LINE 64 "src-ag/Order.ag" #-}
   rule447 = \ explicit_ ->
                                 {-# LINE 64 "src-ag/Order.ag" #-}
                                 if explicit_
                                 then 1
                                 else 0
                                 {-# LINE 3255 "src-generated/Order.hs" #-}
   {-# INLINE rule448 #-}
   {-# LINE 67 "src-ag/Order.ag" #-}
   rule448 = \ origin_ ->
                             {-# LINE 67 "src-ag/Order.ag" #-}
                             if startsWith "use rule" origin_ || startsWith "copy rule" origin_
                             then 1
                             else 0
                             {-# LINE 3263 "src-generated/Order.hs" #-}
   {-# INLINE rule449 #-}
   {-# LINE 220 "src-ag/Order.ag" #-}
   rule449 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_lhsIchildInhs) :: Map Identifier Attributes) ((_lhsIsyn) :: Attributes) ((_patternIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->
                           {-# LINE 220 "src-ag/Order.ag" #-}
                           let  tp field attr      | field == _LOC || field == _INST
                                                                    = Map.lookup attr _lhsIallTypeSigs
                                                    | field == _LHS = Map.lookup attr _lhsIsyn
                                                    | otherwise     = Map.lookup attr (findWithErr1 "Rule.defines.tp" field _lhsIchildInhs)
                                typ :: Pattern -> Maybe Type
                                typ (Alias field attr _)       = tp field attr
                                typ (Underscore _)             = Nothing
                                typ _                          = Nothing
                           in Map.fromList  [ (findWithErr1 "Rule.defines" aa _lhsIaltAttrs, (field,attr,(tp field attr)))
                                            | (field,attr,isLocalOrInst) <- _patternIpatternAttrs
                                            , let aa = AltAttr field attr isLocalOrInst
                                            ]
                           {-# LINE 3280 "src-generated/Order.hs" #-}
   {-# INLINE rule450 #-}
   {-# LINE 234 "src-ag/Order.ag" #-}
   rule450 = \ _defines ((_lhsIchildNts) :: Map Identifier NontermIdent) ((_lhsIcon) :: Identifier) ((_lhsInt) :: Identifier) ((_patternIcopy) :: Pattern) ((_rhsIallRhsVars) :: Set (Identifier,Identifier)) ((_rhsItextLines) :: [String]) explicit_ mbName_ origin_ owrt_ ->
                              {-# LINE 234 "src-ag/Order.ag" #-}
                              let childnt field = Map.lookup field _lhsIchildNts
                              in Seq.fromList [ CRule attr False True _lhsInt _lhsIcon field (childnt field) tp _patternIcopy _rhsItextLines _defines owrt_ origin_ _rhsIallRhsVars explicit_ mbName_
                                              | (field,attr,tp) <- Map.elems _defines
                                              ]
                              {-# LINE 3289 "src-generated/Order.hs" #-}
   {-# INLINE rule451 #-}
   {-# LINE 273 "src-ag/Order.ag" #-}
   rule451 = \ _defines ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_rhsIusedAttrs) :: [(Identifier,Identifier)]) ((_rhsIusedFields) :: [Identifier]) ((_rhsIusedLocals) :: [Identifier]) ->
                 {-# LINE 273 "src-ag/Order.ag" #-}
                 let  defined = Map.keys _defines
                      used =  [ Map.lookup (AltAttr field attr True) _lhsIaltAttrs | (field,attr) <- _rhsIusedAttrs]
                              ++ [ Map.lookup (AltAttr _LOC attr True) _lhsIaltAttrs | attr <- _rhsIusedLocals ++ _rhsIusedFields ]
                 in Seq.fromList [ (x,y) | Just x <- used, y <- defined ]
                 {-# LINE 3298 "src-generated/Order.hs" #-}
   {-# INLINE rule452 #-}
   {-# LINE 317 "src-ag/Order.ag" #-}
   rule452 = \ _defines ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_lhsIsynsOfChildren) :: Map Identifier Attributes) ->
            {-# LINE 317 "src-ag/Order.ag" #-}
            Seq.fromList $
              [ (instVert, synVert)
              | (field,instNm,_) <- Map.elems _defines
              , field == _INST
              , synNm <- Map.keys (findWithErr2 instNm _lhsIsynsOfChildren)
              , let instAttr = AltAttr _INST instNm True
                    synAttr  = AltAttr instNm synNm True
                    instVert = findWithErr2 instAttr _lhsIaltAttrs
                    synVert  = findWithErr2 synAttr _lhsIaltAttrs
              ]
            {-# LINE 3313 "src-generated/Order.hs" #-}
   {-# INLINE rule453 #-}
   {-# LINE 328 "src-ag/Order.ag" #-}
   rule453 = \ _defines ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_lhsIinhsOfChildren) :: Map Identifier Attributes) ->
            {-# LINE 328 "src-ag/Order.ag" #-}
            Seq.fromList $
              [ (instVert, inhVert)
              | (field,instNm,_) <- Map.elems _defines
              , field == _INST
              , inhNm <- Map.keys (findWithErr2 instNm _lhsIinhsOfChildren)
              , let instAttr = AltAttr _INST instNm True
                    inhAttr  = AltAttr instNm inhNm False
                    instVert = findWithErr2 instAttr _lhsIaltAttrs
                    inhVert  = findWithErr2 inhAttr _lhsIaltAttrs
              ]
            {-# LINE 3328 "src-generated/Order.hs" #-}
   {-# INLINE rule454 #-}
   {-# LINE 338 "src-ag/Order.ag" #-}
   rule454 = \ _instDep1 _instDep2 ->
                     {-# LINE 338 "src-ag/Order.ag" #-}
                     _instDep1     Seq.>< _instDep2
                     {-# LINE 3334 "src-generated/Order.hs" #-}
   {-# INLINE rule455 #-}
   rule455 = \ ((_patternIerrors) :: Seq Error) ((_rhsIerrors) :: Seq Error) ->
     _patternIerrors Seq.>< _rhsIerrors
   {-# INLINE rule456 #-}
   rule456 = \ ((_patternIgathAltAttrs) :: [AltAttr]) ->
     _patternIgathAltAttrs
   {-# INLINE rule457 #-}
   rule457 = \ _gathRules ->
     _gathRules
   {-# INLINE rule458 #-}
   rule458 = \ ((_patternIinstVars) :: [Identifier]) ->
     _patternIinstVars
   {-# INLINE rule459 #-}
   rule459 = \ ((_patternIlocVars) :: [Identifier]) ->
     _patternIlocVars
   {-# INLINE rule460 #-}
   rule460 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->
     _lhsIallTypeSigs
   {-# INLINE rule461 #-}
   rule461 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->
     _lhsIaltAttrs
   {-# INLINE rule462 #-}
   rule462 = \ ((_lhsIcon) :: Identifier) ->
     _lhsIcon
   {-# INLINE rule463 #-}
   rule463 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule464 #-}
   rule464 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule465 #-}
   rule465 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule466 #-}
   rule466 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     _lhsIallfields
   {-# INLINE rule467 #-}
   rule467 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule468 #-}
   rule468 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->
     _lhsIattrs
   {-# INLINE rule469 #-}
   rule469 = \ ((_lhsIcon) :: Identifier) ->
     _lhsIcon
   {-# INLINE rule470 #-}
   rule470 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule471 #-}
   rule471 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule472 #-}
   rule472 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions

-- Rules -------------------------------------------------------
-- wrapper
data Inh_Rules  = Inh_Rules { Inh_Rules -> Attributes
allTypeSigs_Inh_Rules :: (Map Identifier Type), Inh_Rules -> [(Identifier, Type, ChildKind)]
allfields_Inh_Rules :: ([(Identifier,Type,ChildKind)]), Inh_Rules -> [Identifier]
allnts_Inh_Rules :: ([Identifier]), Inh_Rules -> Map AltAttr Int
altAttrs_Inh_Rules :: (Map AltAttr Vertex), Inh_Rules -> [(Identifier, Identifier)]
attrs_Inh_Rules :: ([(Identifier,Identifier)]), Inh_Rules -> Map Identifier Attributes
childInhs_Inh_Rules :: (Map Identifier Attributes), Inh_Rules -> Map Identifier Identifier
childNts_Inh_Rules :: (Map Identifier NontermIdent), Inh_Rules -> Identifier
con_Inh_Rules :: (Identifier), Inh_Rules -> Attributes
inh_Inh_Rules :: (Attributes), Inh_Rules -> Map Identifier Attributes
inhsOfChildren_Inh_Rules :: (Map Identifier Attributes), Inh_Rules -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Rules :: (Map Identifier (Identifier,[Identifier])), Inh_Rules -> Identifier
nt_Inh_Rules :: (Identifier), Inh_Rules -> Bool
o_case_Inh_Rules :: (Bool), Inh_Rules -> Bool
o_cata_Inh_Rules :: (Bool), Inh_Rules -> Bool
o_dovisit_Inh_Rules :: (Bool), Inh_Rules -> Bool
o_newtypes_Inh_Rules :: (Bool), Inh_Rules -> Bool
o_rename_Inh_Rules :: (Bool), Inh_Rules -> Bool
o_sem_Inh_Rules :: (Bool), Inh_Rules -> Bool
o_sig_Inh_Rules :: (Bool), Inh_Rules -> Bool
o_wantvisit_Inh_Rules :: (Bool), Inh_Rules -> Options
options_Inh_Rules :: (Options), Inh_Rules -> String
prefix_Inh_Rules :: (String), Inh_Rules -> Attributes
syn_Inh_Rules :: (Attributes), Inh_Rules -> Map Identifier Attributes
synsOfChildren_Inh_Rules :: (Map Identifier Attributes) }
data Syn_Rules  = Syn_Rules { Syn_Rules -> Seq (Int, Int)
directDep_Syn_Rules :: (Seq Edge), Syn_Rules -> Seq Error
errors_Syn_Rules :: (Seq Error), Syn_Rules -> [AltAttr]
gathAltAttrs_Syn_Rules :: ([AltAttr]), Syn_Rules -> Seq CRule
gathRules_Syn_Rules :: (Seq CRule), Syn_Rules -> Seq (Int, Int)
instDep_Syn_Rules :: (Seq Edge), Syn_Rules -> [Identifier]
instVars_Syn_Rules :: ([Identifier]), Syn_Rules -> [Identifier]
locVars_Syn_Rules :: ([Identifier]), Syn_Rules -> Int
nAutoRules_Syn_Rules :: (Int), Syn_Rules -> Int
nExplicitRules_Syn_Rules :: (Int) }
{-# INLINABLE wrap_Rules #-}
wrap_Rules :: T_Rules  -> Inh_Rules  -> (Syn_Rules )
wrap_Rules :: T_Rules -> Inh_Rules -> Syn_Rules
wrap_Rules (T_Rules Identity T_Rules_s35
act) (Inh_Rules Attributes
_lhsIallTypeSigs [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts Map AltAttr Int
_lhsIaltAttrs [(Identifier, Identifier)]
_lhsIattrs Map Identifier Attributes
_lhsIchildInhs Map Identifier Identifier
_lhsIchildNts Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhsOfChildren Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynsOfChildren) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Rules_s35
sem <- Identity T_Rules_s35
act
        let arg34 :: T_Rules_vIn34
arg34 = Attributes
-> [(Identifier, Type, ChildKind)]
-> [Identifier]
-> Map AltAttr Int
-> [(Identifier, Identifier)]
-> Map Identifier Attributes
-> Map Identifier Identifier
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> T_Rules_vIn34
T_Rules_vIn34 Attributes
_lhsIallTypeSigs [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts Map AltAttr Int
_lhsIaltAttrs [(Identifier, Identifier)]
_lhsIattrs Map Identifier Attributes
_lhsIchildInhs Map Identifier Identifier
_lhsIchildNts Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhsOfChildren Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynsOfChildren
        (T_Rules_vOut34 Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Int, Int)
_lhsOinstDep [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Int
_lhsOnAutoRules Int
_lhsOnExplicitRules) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
sem T_Rules_vIn34
arg34)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq (Int, Int)
-> Seq Error
-> [AltAttr]
-> Seq CRule
-> Seq (Int, Int)
-> [Identifier]
-> [Identifier]
-> Int
-> Int
-> Syn_Rules
Syn_Rules Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Int, Int)
_lhsOinstDep [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Int
_lhsOnAutoRules Int
_lhsOnExplicitRules)
   )

-- cata
{-# NOINLINE sem_Rules #-}
sem_Rules :: Rules  -> T_Rules 
sem_Rules :: Rules -> T_Rules
sem_Rules Rules
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Rule -> T_Rules -> T_Rules
sem_Rules_Cons T_Rules
sem_Rules_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Rule -> T_Rule
sem_Rule Rules
list)

-- semantic domain
newtype T_Rules  = T_Rules {
                           T_Rules -> Identity T_Rules_s35
attach_T_Rules :: Identity (T_Rules_s35 )
                           }
newtype T_Rules_s35  = C_Rules_s35 {
                                   T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 :: (T_Rules_v34 )
                                   }
data T_Rules_s36  = C_Rules_s36
type T_Rules_v34  = (T_Rules_vIn34 ) -> (T_Rules_vOut34 )
data T_Rules_vIn34  = T_Rules_vIn34 (Map Identifier Type) ([(Identifier,Type,ChildKind)]) ([Identifier]) (Map AltAttr Vertex) ([(Identifier,Identifier)]) (Map Identifier Attributes) (Map Identifier NontermIdent) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Attributes) (Map Identifier Attributes)
data T_Rules_vOut34  = T_Rules_vOut34 (Seq Edge) (Seq Error) ([AltAttr]) (Seq CRule) (Seq Edge) ([Identifier]) ([Identifier]) (Int) (Int)
{-# NOINLINE sem_Rules_Cons #-}
sem_Rules_Cons :: T_Rule  -> T_Rules  -> T_Rules 
sem_Rules_Cons :: T_Rule -> T_Rules -> T_Rules
sem_Rules_Cons T_Rule
arg_hd_ T_Rules
arg_tl_ = Identity T_Rules_s35 -> T_Rules
T_Rules (forall (m :: * -> *) a. Monad m => a -> m a
return T_Rules_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Rules_s35
st35 = let
      v34 :: T_Rules_v34 
      v34 :: T_Rules_v34
v34 = \ (T_Rules_vIn34 Attributes
_lhsIallTypeSigs [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts Map AltAttr Int
_lhsIaltAttrs [(Identifier, Identifier)]
_lhsIattrs Map Identifier Attributes
_lhsIchildInhs Map Identifier Identifier
_lhsIchildNts Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhsOfChildren Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynsOfChildren) -> ( let
         _hdX32 :: T_Rule_s32
_hdX32 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Rule -> Identity T_Rule_s32
attach_T_Rule (T_Rule
arg_hd_))
         _tlX35 :: T_Rules_s35
_tlX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Rules -> Identity T_Rules_s35
attach_T_Rules (T_Rules
arg_tl_))
         (T_Rule_vOut31 Seq (Int, Int)
_hdIdirectDep Seq Error
_hdIerrors [AltAttr]
_hdIgathAltAttrs Seq CRule
_hdIgathRules Seq (Int, Int)
_hdIinstDep [Identifier]
_hdIinstVars [Identifier]
_hdIlocVars Int
_hdInAutoRules Int
_hdInExplicitRules) = T_Rule_s32 -> T_Rule_v31
inv_Rule_s32 T_Rule_s32
_hdX32 (Attributes
-> [(Identifier, Type, ChildKind)]
-> [Identifier]
-> Map AltAttr Int
-> [(Identifier, Identifier)]
-> Map Identifier Attributes
-> Map Identifier Identifier
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> T_Rule_vIn31
T_Rule_vIn31 Attributes
_hdOallTypeSigs [(Identifier, Type, ChildKind)]
_hdOallfields [Identifier]
_hdOallnts Map AltAttr Int
_hdOaltAttrs [(Identifier, Identifier)]
_hdOattrs Map Identifier Attributes
_hdOchildInhs Map Identifier Identifier
_hdOchildNts Identifier
_hdOcon Attributes
_hdOinh Map Identifier Attributes
_hdOinhsOfChildren Map Identifier (Identifier, [Identifier])
_hdOmergeMap Identifier
_hdOnt Bool
_hdOo_case Bool
_hdOo_cata Bool
_hdOo_dovisit Bool
_hdOo_newtypes Bool
_hdOo_rename Bool
_hdOo_sem Bool
_hdOo_sig Bool
_hdOo_wantvisit Options
_hdOoptions String
_hdOprefix Attributes
_hdOsyn Map Identifier Attributes
_hdOsynsOfChildren)
         (T_Rules_vOut34 Seq (Int, Int)
_tlIdirectDep Seq Error
_tlIerrors [AltAttr]
_tlIgathAltAttrs Seq CRule
_tlIgathRules Seq (Int, Int)
_tlIinstDep [Identifier]
_tlIinstVars [Identifier]
_tlIlocVars Int
_tlInAutoRules Int
_tlInExplicitRules) = T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
_tlX35 (Attributes
-> [(Identifier, Type, ChildKind)]
-> [Identifier]
-> Map AltAttr Int
-> [(Identifier, Identifier)]
-> Map Identifier Attributes
-> Map Identifier Identifier
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> String
-> Attributes
-> Map Identifier Attributes
-> T_Rules_vIn34
T_Rules_vIn34 Attributes
_tlOallTypeSigs [(Identifier, Type, ChildKind)]
_tlOallfields [Identifier]
_tlOallnts Map AltAttr Int
_tlOaltAttrs [(Identifier, Identifier)]
_tlOattrs Map Identifier Attributes
_tlOchildInhs Map Identifier Identifier
_tlOchildNts Identifier
_tlOcon Attributes
_tlOinh Map Identifier Attributes
_tlOinhsOfChildren Map Identifier (Identifier, [Identifier])
_tlOmergeMap Identifier
_tlOnt Bool
_tlOo_case Bool
_tlOo_cata Bool
_tlOo_dovisit Bool
_tlOo_newtypes Bool
_tlOo_rename Bool
_tlOo_sem Bool
_tlOo_sig Bool
_tlOo_wantvisit Options
_tlOoptions String
_tlOprefix Attributes
_tlOsyn Map Identifier Attributes
_tlOsynsOfChildren)
         _lhsOdirectDep :: Seq Edge
         _lhsOdirectDep :: Seq (Int, Int)
_lhsOdirectDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule473 Seq (Int, Int)
_hdIdirectDep Seq (Int, Int)
_tlIdirectDep
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule474 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = [AltAttr] -> [AltAttr] -> [AltAttr]
rule475 [AltAttr]
_hdIgathAltAttrs [AltAttr]
_tlIgathAltAttrs
         _lhsOgathRules :: Seq CRule
         _lhsOgathRules :: Seq CRule
_lhsOgathRules = Seq CRule -> Seq CRule -> Seq CRule
rule476 Seq CRule
_hdIgathRules Seq CRule
_tlIgathRules
         _lhsOinstDep :: Seq Edge
         _lhsOinstDep :: Seq (Int, Int)
_lhsOinstDep = Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule477 Seq (Int, Int)
_hdIinstDep Seq (Int, Int)
_tlIinstDep
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier] -> [Identifier]
rule478 [Identifier]
_hdIinstVars [Identifier]
_tlIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier] -> [Identifier]
rule479 [Identifier]
_hdIlocVars [Identifier]
_tlIlocVars
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = Int -> Int -> Int
rule480 Int
_hdInAutoRules Int
_tlInAutoRules
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = Int -> Int -> Int
rule481 Int
_hdInExplicitRules Int
_tlInExplicitRules
         _hdOallTypeSigs :: Attributes
_hdOallTypeSigs = Attributes -> Attributes
rule482 Attributes
_lhsIallTypeSigs
         _hdOallfields :: [(Identifier, Type, ChildKind)]
_hdOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule483 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _hdOallnts :: [Identifier]
_hdOallnts = [Identifier] -> [Identifier]
rule484 [Identifier]
_lhsIallnts
         _hdOaltAttrs :: Map AltAttr Int
_hdOaltAttrs = Map AltAttr Int -> Map AltAttr Int
rule485 Map AltAttr Int
_lhsIaltAttrs
         _hdOattrs :: [(Identifier, Identifier)]
_hdOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule486 [(Identifier, Identifier)]
_lhsIattrs
         _hdOchildInhs :: Map Identifier Attributes
_hdOchildInhs = Map Identifier Attributes -> Map Identifier Attributes
rule487 Map Identifier Attributes
_lhsIchildInhs
         _hdOchildNts :: Map Identifier Identifier
_hdOchildNts = Map Identifier Identifier -> Map Identifier Identifier
rule488 Map Identifier Identifier
_lhsIchildNts
         _hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule489 Identifier
_lhsIcon
         _hdOinh :: Attributes
_hdOinh = Attributes -> Attributes
rule490 Attributes
_lhsIinh
         _hdOinhsOfChildren :: Map Identifier Attributes
_hdOinhsOfChildren = Map Identifier Attributes -> Map Identifier Attributes
rule491 Map Identifier Attributes
_lhsIinhsOfChildren
         _hdOmergeMap :: Map Identifier (Identifier, [Identifier])
_hdOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule492 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule493 Identifier
_lhsInt
         _hdOo_case :: Bool
_hdOo_case = Bool -> Bool
rule494 Bool
_lhsIo_case
         _hdOo_cata :: Bool
_hdOo_cata = Bool -> Bool
rule495 Bool
_lhsIo_cata
         _hdOo_dovisit :: Bool
_hdOo_dovisit = Bool -> Bool
rule496 Bool
_lhsIo_dovisit
         _hdOo_newtypes :: Bool
_hdOo_newtypes = Bool -> Bool
rule497 Bool
_lhsIo_newtypes
         _hdOo_rename :: Bool
_hdOo_rename = Bool -> Bool
rule498 Bool
_lhsIo_rename
         _hdOo_sem :: Bool
_hdOo_sem = Bool -> Bool
rule499 Bool
_lhsIo_sem
         _hdOo_sig :: Bool
_hdOo_sig = Bool -> Bool
rule500 Bool
_lhsIo_sig
         _hdOo_wantvisit :: Bool
_hdOo_wantvisit = Bool -> Bool
rule501 Bool
_lhsIo_wantvisit
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule502 Options
_lhsIoptions
         _hdOprefix :: String
_hdOprefix = ShowS
rule503 String
_lhsIprefix
         _hdOsyn :: Attributes
_hdOsyn = Attributes -> Attributes
rule504 Attributes
_lhsIsyn
         _hdOsynsOfChildren :: Map Identifier Attributes
_hdOsynsOfChildren = Map Identifier Attributes -> Map Identifier Attributes
rule505 Map Identifier Attributes
_lhsIsynsOfChildren
         _tlOallTypeSigs :: Attributes
_tlOallTypeSigs = Attributes -> Attributes
rule506 Attributes
_lhsIallTypeSigs
         _tlOallfields :: [(Identifier, Type, ChildKind)]
_tlOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule507 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _tlOallnts :: [Identifier]
_tlOallnts = [Identifier] -> [Identifier]
rule508 [Identifier]
_lhsIallnts
         _tlOaltAttrs :: Map AltAttr Int
_tlOaltAttrs = Map AltAttr Int -> Map AltAttr Int
rule509 Map AltAttr Int
_lhsIaltAttrs
         _tlOattrs :: [(Identifier, Identifier)]
_tlOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule510 [(Identifier, Identifier)]
_lhsIattrs
         _tlOchildInhs :: Map Identifier Attributes
_tlOchildInhs = Map Identifier Attributes -> Map Identifier Attributes
rule511 Map Identifier Attributes
_lhsIchildInhs
         _tlOchildNts :: Map Identifier Identifier
_tlOchildNts = Map Identifier Identifier -> Map Identifier Identifier
rule512 Map Identifier Identifier
_lhsIchildNts
         _tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule513 Identifier
_lhsIcon
         _tlOinh :: Attributes
_tlOinh = Attributes -> Attributes
rule514 Attributes
_lhsIinh
         _tlOinhsOfChildren :: Map Identifier Attributes
_tlOinhsOfChildren = Map Identifier Attributes -> Map Identifier Attributes
rule515 Map Identifier Attributes
_lhsIinhsOfChildren
         _tlOmergeMap :: Map Identifier (Identifier, [Identifier])
_tlOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule516 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule517 Identifier
_lhsInt
         _tlOo_case :: Bool
_tlOo_case = Bool -> Bool
rule518 Bool
_lhsIo_case
         _tlOo_cata :: Bool
_tlOo_cata = Bool -> Bool
rule519 Bool
_lhsIo_cata
         _tlOo_dovisit :: Bool
_tlOo_dovisit = Bool -> Bool
rule520 Bool
_lhsIo_dovisit
         _tlOo_newtypes :: Bool
_tlOo_newtypes = Bool -> Bool
rule521 Bool
_lhsIo_newtypes
         _tlOo_rename :: Bool
_tlOo_rename = Bool -> Bool
rule522 Bool
_lhsIo_rename
         _tlOo_sem :: Bool
_tlOo_sem = Bool -> Bool
rule523 Bool
_lhsIo_sem
         _tlOo_sig :: Bool
_tlOo_sig = Bool -> Bool
rule524 Bool
_lhsIo_sig
         _tlOo_wantvisit :: Bool
_tlOo_wantvisit = Bool -> Bool
rule525 Bool
_lhsIo_wantvisit
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule526 Options
_lhsIoptions
         _tlOprefix :: String
_tlOprefix = ShowS
rule527 String
_lhsIprefix
         _tlOsyn :: Attributes
_tlOsyn = Attributes -> Attributes
rule528 Attributes
_lhsIsyn
         _tlOsynsOfChildren :: Map Identifier Attributes
_tlOsynsOfChildren = Map Identifier Attributes -> Map Identifier Attributes
rule529 Map Identifier Attributes
_lhsIsynsOfChildren
         __result_ :: T_Rules_vOut34
__result_ = Seq (Int, Int)
-> Seq Error
-> [AltAttr]
-> Seq CRule
-> Seq (Int, Int)
-> [Identifier]
-> [Identifier]
-> Int
-> Int
-> T_Rules_vOut34
T_Rules_vOut34 Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Int, Int)
_lhsOinstDep [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Int
_lhsOnAutoRules Int
_lhsOnExplicitRules
         in T_Rules_vOut34
__result_ )
     in T_Rules_v34 -> T_Rules_s35
C_Rules_s35 T_Rules_v34
v34
   {-# INLINE rule473 #-}
   rule473 :: Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule473 = \ ((Seq (Int, Int)
_hdIdirectDep) :: Seq Edge) ((Seq (Int, Int)
_tlIdirectDep) :: Seq Edge) ->
     Seq (Int, Int)
_hdIdirectDep forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq (Int, Int)
_tlIdirectDep
   {-# INLINE rule474 #-}
   rule474 :: Seq Error -> Seq Error -> Seq Error
rule474 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule475 #-}
   rule475 :: [AltAttr] -> [AltAttr] -> [AltAttr]
rule475 = \ (([AltAttr]
_hdIgathAltAttrs) :: [AltAttr]) (([AltAttr]
_tlIgathAltAttrs) :: [AltAttr]) ->
     [AltAttr]
_hdIgathAltAttrs forall a. [a] -> [a] -> [a]
++ [AltAttr]
_tlIgathAltAttrs
   {-# INLINE rule476 #-}
   rule476 :: Seq CRule -> Seq CRule -> Seq CRule
rule476 = \ ((Seq CRule
_hdIgathRules) :: Seq CRule) ((Seq CRule
_tlIgathRules) :: Seq CRule) ->
     Seq CRule
_hdIgathRules forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq CRule
_tlIgathRules
   {-# INLINE rule477 #-}
   rule477 :: Seq (Int, Int) -> Seq (Int, Int) -> Seq (Int, Int)
rule477 = \ ((Seq (Int, Int)
_hdIinstDep) :: Seq Edge) ((Seq (Int, Int)
_tlIinstDep) :: Seq Edge) ->
     Seq (Int, Int)
_hdIinstDep forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq (Int, Int)
_tlIinstDep
   {-# INLINE rule478 #-}
   rule478 :: [Identifier] -> [Identifier] -> [Identifier]
rule478 = \ (([Identifier]
_hdIinstVars) :: [Identifier]) (([Identifier]
_tlIinstVars) :: [Identifier]) ->
     [Identifier]
_hdIinstVars forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIinstVars
   {-# INLINE rule479 #-}
   rule479 :: [Identifier] -> [Identifier] -> [Identifier]
rule479 = \ (([Identifier]
_hdIlocVars) :: [Identifier]) (([Identifier]
_tlIlocVars) :: [Identifier]) ->
     [Identifier]
_hdIlocVars forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIlocVars
   {-# INLINE rule480 #-}
   rule480 :: Int -> Int -> Int
rule480 = \ ((Int
_hdInAutoRules) :: Int) ((Int
_tlInAutoRules) :: Int) ->
     Int
_hdInAutoRules forall a. Num a => a -> a -> a
+ Int
_tlInAutoRules
   {-# INLINE rule481 #-}
   rule481 :: Int -> Int -> Int
rule481 = \ ((Int
_hdInExplicitRules) :: Int) ((Int
_tlInExplicitRules) :: Int) ->
     Int
_hdInExplicitRules forall a. Num a => a -> a -> a
+ Int
_tlInExplicitRules
   {-# INLINE rule482 #-}
   rule482 :: Attributes -> Attributes
rule482 = \ ((Attributes
_lhsIallTypeSigs) :: Map Identifier Type) ->
     Attributes
_lhsIallTypeSigs
   {-# INLINE rule483 #-}
   rule483 :: [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule483 = \ (([(Identifier, Type, ChildKind)]
_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     [(Identifier, Type, ChildKind)]
_lhsIallfields
   {-# INLINE rule484 #-}
   rule484 :: [Identifier] -> [Identifier]
rule484 = \ (([Identifier]
_lhsIallnts) :: [Identifier]) ->
     [Identifier]
_lhsIallnts
   {-# INLINE rule485 #-}
   rule485 :: Map AltAttr Int -> Map AltAttr Int
rule485 = \ ((Map AltAttr Int
_lhsIaltAttrs) :: Map AltAttr Vertex) ->
     Map AltAttr Int
_lhsIaltAttrs
   {-# INLINE rule486 #-}
   rule486 :: [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule486 = \ (([(Identifier, Identifier)]
_lhsIattrs) :: [(Identifier,Identifier)]) ->
     [(Identifier, Identifier)]
_lhsIattrs
   {-# INLINE rule487 #-}
   rule487 :: Map Identifier Attributes -> Map Identifier Attributes
rule487 = \ ((Map Identifier Attributes
_lhsIchildInhs) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIchildInhs
   {-# INLINE rule488 #-}
   rule488 :: Map Identifier Identifier -> Map Identifier Identifier
rule488 = \ ((Map Identifier Identifier
_lhsIchildNts) :: Map Identifier NontermIdent) ->
     Map Identifier Identifier
_lhsIchildNts
   {-# INLINE rule489 #-}
   rule489 :: Identifier -> Identifier
rule489 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule490 #-}
   rule490 :: Attributes -> Attributes
rule490 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule491 #-}
   rule491 :: Map Identifier Attributes -> Map Identifier Attributes
rule491 = \ ((Map Identifier Attributes
_lhsIinhsOfChildren) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIinhsOfChildren
   {-# INLINE rule492 #-}
   rule492 :: Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule492 = \ ((Map Identifier (Identifier, [Identifier])
_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     Map Identifier (Identifier, [Identifier])
_lhsImergeMap
   {-# INLINE rule493 #-}
   rule493 :: Identifier -> Identifier
rule493 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule494 #-}
   rule494 :: Bool -> Bool
rule494 = \ ((Bool
_lhsIo_case) :: Bool) ->
     Bool
_lhsIo_case
   {-# INLINE rule495 #-}
   rule495 :: Bool -> Bool
rule495 = \ ((Bool
_lhsIo_cata) :: Bool) ->
     Bool
_lhsIo_cata
   {-# INLINE rule496 #-}
   rule496 :: Bool -> Bool
rule496 = \ ((Bool
_lhsIo_dovisit) :: Bool) ->
     Bool
_lhsIo_dovisit
   {-# INLINE rule497 #-}
   rule497 :: Bool -> Bool
rule497 = \ ((Bool
_lhsIo_newtypes) :: Bool) ->
     Bool
_lhsIo_newtypes
   {-# INLINE rule498 #-}
   rule498 :: Bool -> Bool
rule498 = \ ((Bool
_lhsIo_rename) :: Bool) ->
     Bool
_lhsIo_rename
   {-# INLINE rule499 #-}
   rule499 :: Bool -> Bool
rule499 = \ ((Bool
_lhsIo_sem) :: Bool) ->
     Bool
_lhsIo_sem
   {-# INLINE rule500 #-}
   rule500 :: Bool -> Bool
rule500 = \ ((Bool
_lhsIo_sig) :: Bool) ->
     Bool
_lhsIo_sig
   {-# INLINE rule501 #-}
   rule501 :: Bool -> Bool
rule501 = \ ((Bool
_lhsIo_wantvisit) :: Bool) ->
     Bool
_lhsIo_wantvisit
   {-# INLINE rule502 #-}
   rule502 :: Options -> Options
rule502 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule503 #-}
   rule503 :: ShowS
rule503 = \ ((String
_lhsIprefix) :: String) ->
     String
_lhsIprefix
   {-# INLINE rule504 #-}
   rule504 :: Attributes -> Attributes
rule504 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
   {-# INLINE rule505 #-}
   rule505 :: Map Identifier Attributes -> Map Identifier Attributes
rule505 = \ ((Map Identifier Attributes
_lhsIsynsOfChildren) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIsynsOfChildren
   {-# INLINE rule506 #-}
   rule506 :: Attributes -> Attributes
rule506 = \ ((Attributes
_lhsIallTypeSigs) :: Map Identifier Type) ->
     Attributes
_lhsIallTypeSigs
   {-# INLINE rule507 #-}
   rule507 :: [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule507 = \ (([(Identifier, Type, ChildKind)]
_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     [(Identifier, Type, ChildKind)]
_lhsIallfields
   {-# INLINE rule508 #-}
   rule508 :: [Identifier] -> [Identifier]
rule508 = \ (([Identifier]
_lhsIallnts) :: [Identifier]) ->
     [Identifier]
_lhsIallnts
   {-# INLINE rule509 #-}
   rule509 :: Map AltAttr Int -> Map AltAttr Int
rule509 = \ ((Map AltAttr Int
_lhsIaltAttrs) :: Map AltAttr Vertex) ->
     Map AltAttr Int
_lhsIaltAttrs
   {-# INLINE rule510 #-}
   rule510 :: [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule510 = \ (([(Identifier, Identifier)]
_lhsIattrs) :: [(Identifier,Identifier)]) ->
     [(Identifier, Identifier)]
_lhsIattrs
   {-# INLINE rule511 #-}
   rule511 :: Map Identifier Attributes -> Map Identifier Attributes
rule511 = \ ((Map Identifier Attributes
_lhsIchildInhs) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIchildInhs
   {-# INLINE rule512 #-}
   rule512 :: Map Identifier Identifier -> Map Identifier Identifier
rule512 = \ ((Map Identifier Identifier
_lhsIchildNts) :: Map Identifier NontermIdent) ->
     Map Identifier Identifier
_lhsIchildNts
   {-# INLINE rule513 #-}
   rule513 :: Identifier -> Identifier
rule513 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule514 #-}
   rule514 :: Attributes -> Attributes
rule514 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule515 #-}
   rule515 :: Map Identifier Attributes -> Map Identifier Attributes
rule515 = \ ((Map Identifier Attributes
_lhsIinhsOfChildren) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIinhsOfChildren
   {-# INLINE rule516 #-}
   rule516 :: Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule516 = \ ((Map Identifier (Identifier, [Identifier])
_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     Map Identifier (Identifier, [Identifier])
_lhsImergeMap
   {-# INLINE rule517 #-}
   rule517 :: Identifier -> Identifier
rule517 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule518 #-}
   rule518 :: Bool -> Bool
rule518 = \ ((Bool
_lhsIo_case) :: Bool) ->
     Bool
_lhsIo_case
   {-# INLINE rule519 #-}
   rule519 :: Bool -> Bool
rule519 = \ ((Bool
_lhsIo_cata) :: Bool) ->
     Bool
_lhsIo_cata
   {-# INLINE rule520 #-}
   rule520 :: Bool -> Bool
rule520 = \ ((Bool
_lhsIo_dovisit) :: Bool) ->
     Bool
_lhsIo_dovisit
   {-# INLINE rule521 #-}
   rule521 :: Bool -> Bool
rule521 = \ ((Bool
_lhsIo_newtypes) :: Bool) ->
     Bool
_lhsIo_newtypes
   {-# INLINE rule522 #-}
   rule522 :: Bool -> Bool
rule522 = \ ((Bool
_lhsIo_rename) :: Bool) ->
     Bool
_lhsIo_rename
   {-# INLINE rule523 #-}
   rule523 :: Bool -> Bool
rule523 = \ ((Bool
_lhsIo_sem) :: Bool) ->
     Bool
_lhsIo_sem
   {-# INLINE rule524 #-}
   rule524 :: Bool -> Bool
rule524 = \ ((Bool
_lhsIo_sig) :: Bool) ->
     Bool
_lhsIo_sig
   {-# INLINE rule525 #-}
   rule525 :: Bool -> Bool
rule525 = \ ((Bool
_lhsIo_wantvisit) :: Bool) ->
     Bool
_lhsIo_wantvisit
   {-# INLINE rule526 #-}
   rule526 :: Options -> Options
rule526 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule527 #-}
   rule527 :: ShowS
rule527 = \ ((String
_lhsIprefix) :: String) ->
     String
_lhsIprefix
   {-# INLINE rule528 #-}
   rule528 :: Attributes -> Attributes
rule528 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
   {-# INLINE rule529 #-}
   rule529 :: Map Identifier Attributes -> Map Identifier Attributes
rule529 = \ ((Map Identifier Attributes
_lhsIsynsOfChildren) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIsynsOfChildren
{-# NOINLINE sem_Rules_Nil #-}
sem_Rules_Nil ::  T_Rules 
sem_Rules_Nil :: T_Rules
sem_Rules_Nil  = Identity T_Rules_s35 -> T_Rules
T_Rules (forall (m :: * -> *) a. Monad m => a -> m a
return T_Rules_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Rules_s35
st35 = let
      v34 :: T_Rules_v34 
      v34 :: T_Rules_v34
v34 = \ (T_Rules_vIn34 Attributes
_lhsIallTypeSigs [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts Map AltAttr Int
_lhsIaltAttrs [(Identifier, Identifier)]
_lhsIattrs Map Identifier Attributes
_lhsIchildInhs Map Identifier Identifier
_lhsIchildNts Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhsOfChildren Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_dovisit Bool
_lhsIo_newtypes Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_wantvisit Options
_lhsIoptions String
_lhsIprefix Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynsOfChildren) -> ( let
         _lhsOdirectDep :: Seq Edge
         _lhsOdirectDep :: Seq (Int, Int)
_lhsOdirectDep = forall {a}. () -> Seq a
rule530  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule531  ()
         _lhsOgathAltAttrs :: [AltAttr]
         _lhsOgathAltAttrs :: [AltAttr]
_lhsOgathAltAttrs = forall {a}. () -> [a]
rule532  ()
         _lhsOgathRules :: Seq CRule
         _lhsOgathRules :: Seq CRule
_lhsOgathRules = forall {a}. () -> Seq a
rule533  ()
         _lhsOinstDep :: Seq Edge
         _lhsOinstDep :: Seq (Int, Int)
_lhsOinstDep = forall {a}. () -> Seq a
rule534  ()
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = forall {a}. () -> [a]
rule535  ()
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = forall {a}. () -> [a]
rule536  ()
         _lhsOnAutoRules :: Int
         _lhsOnAutoRules :: Int
_lhsOnAutoRules = () -> Int
rule537  ()
         _lhsOnExplicitRules :: Int
         _lhsOnExplicitRules :: Int
_lhsOnExplicitRules = () -> Int
rule538  ()
         __result_ :: T_Rules_vOut34
__result_ = Seq (Int, Int)
-> Seq Error
-> [AltAttr]
-> Seq CRule
-> Seq (Int, Int)
-> [Identifier]
-> [Identifier]
-> Int
-> Int
-> T_Rules_vOut34
T_Rules_vOut34 Seq (Int, Int)
_lhsOdirectDep Seq Error
_lhsOerrors [AltAttr]
_lhsOgathAltAttrs Seq CRule
_lhsOgathRules Seq (Int, Int)
_lhsOinstDep [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Int
_lhsOnAutoRules Int
_lhsOnExplicitRules
         in T_Rules_vOut34
__result_ )
     in T_Rules_v34 -> T_Rules_s35
C_Rules_s35 T_Rules_v34
v34
   {-# INLINE rule530 #-}
   rule530 :: () -> Seq a
rule530 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule531 #-}
   rule531 :: () -> Seq a
rule531 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule532 #-}
   rule532 :: () -> [a]
rule532 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule533 #-}
   rule533 :: () -> Seq a
rule533 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule534 #-}
   rule534 :: () -> Seq a
rule534 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule535 #-}
   rule535 :: () -> [a]
rule535 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule536 #-}
   rule536 :: () -> [a]
rule536 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule537 #-}
   rule537 :: () -> Int
rule537 = \  (()
_ :: ()) ->
     Int
0
   {-# INLINE rule538 #-}
   rule538 :: () -> Int
rule538 = \  (()
_ :: ()) ->
     Int
0

-- TypeSig -----------------------------------------------------
-- wrapper
data Inh_TypeSig  = Inh_TypeSig { Inh_TypeSig -> Attributes
typeSigs_Inh_TypeSig :: (Map Identifier Type) }
data Syn_TypeSig  = Syn_TypeSig { Syn_TypeSig -> Attributes
typeSigs_Syn_TypeSig :: (Map Identifier Type) }
{-# INLINABLE wrap_TypeSig #-}
wrap_TypeSig :: T_TypeSig  -> Inh_TypeSig  -> (Syn_TypeSig )
wrap_TypeSig :: T_TypeSig -> Inh_TypeSig -> Syn_TypeSig
wrap_TypeSig (T_TypeSig Identity T_TypeSig_s38
act) (Inh_TypeSig Attributes
_lhsItypeSigs) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_TypeSig_s38
sem <- Identity T_TypeSig_s38
act
        let arg37 :: T_TypeSig_vIn37
arg37 = Attributes -> T_TypeSig_vIn37
T_TypeSig_vIn37 Attributes
_lhsItypeSigs
        (T_TypeSig_vOut37 Attributes
_lhsOtypeSigs) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_TypeSig_s38 -> T_TypeSig_v37
inv_TypeSig_s38 T_TypeSig_s38
sem T_TypeSig_vIn37
arg37)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Attributes -> Syn_TypeSig
Syn_TypeSig Attributes
_lhsOtypeSigs)
   )

-- cata
{-# INLINE sem_TypeSig #-}
sem_TypeSig :: TypeSig  -> T_TypeSig 
sem_TypeSig :: TypeSig -> T_TypeSig
sem_TypeSig ( TypeSig Identifier
name_ Type
tp_ ) = Identifier -> Type -> T_TypeSig
sem_TypeSig_TypeSig Identifier
name_ Type
tp_

-- semantic domain
newtype T_TypeSig  = T_TypeSig {
                               T_TypeSig -> Identity T_TypeSig_s38
attach_T_TypeSig :: Identity (T_TypeSig_s38 )
                               }
newtype T_TypeSig_s38  = C_TypeSig_s38 {
                                       T_TypeSig_s38 -> T_TypeSig_v37
inv_TypeSig_s38 :: (T_TypeSig_v37 )
                                       }
data T_TypeSig_s39  = C_TypeSig_s39
type T_TypeSig_v37  = (T_TypeSig_vIn37 ) -> (T_TypeSig_vOut37 )
data T_TypeSig_vIn37  = T_TypeSig_vIn37 (Map Identifier Type)
data T_TypeSig_vOut37  = T_TypeSig_vOut37 (Map Identifier Type)
{-# NOINLINE sem_TypeSig_TypeSig #-}
sem_TypeSig_TypeSig :: (Identifier) -> (Type) -> T_TypeSig 
sem_TypeSig_TypeSig :: Identifier -> Type -> T_TypeSig
sem_TypeSig_TypeSig Identifier
arg_name_ Type
arg_tp_ = Identity T_TypeSig_s38 -> T_TypeSig
T_TypeSig (forall (m :: * -> *) a. Monad m => a -> m a
return T_TypeSig_s38
st38) where
   {-# NOINLINE st38 #-}
   st38 :: T_TypeSig_s38
st38 = let
      v37 :: T_TypeSig_v37 
      v37 :: T_TypeSig_v37
v37 = \ (T_TypeSig_vIn37 Attributes
_lhsItypeSigs) -> ( let
         _lhsOtypeSigs :: Map Identifier Type
         _lhsOtypeSigs :: Attributes
_lhsOtypeSigs = Attributes -> Identifier -> Type -> Attributes
rule539 Attributes
_lhsItypeSigs Identifier
arg_name_ Type
arg_tp_
         __result_ :: T_TypeSig_vOut37
__result_ = Attributes -> T_TypeSig_vOut37
T_TypeSig_vOut37 Attributes
_lhsOtypeSigs
         in T_TypeSig_vOut37
__result_ )
     in T_TypeSig_v37 -> T_TypeSig_s38
C_TypeSig_s38 T_TypeSig_v37
v37
   {-# INLINE rule539 #-}
   {-# LINE 536 "src-ag/Order.ag" #-}
   rule539 = \ ((_lhsItypeSigs) :: Map Identifier Type) name_ tp_ ->
                             {-# LINE 536 "src-ag/Order.ag" #-}
                             Map.insert name_ tp_ _lhsItypeSigs
                             {-# LINE 3774 "src-generated/Order.hs" #-}

-- TypeSigs ----------------------------------------------------
-- wrapper
data Inh_TypeSigs  = Inh_TypeSigs { Inh_TypeSigs -> Attributes
typeSigs_Inh_TypeSigs :: (Map Identifier Type) }
data Syn_TypeSigs  = Syn_TypeSigs { Syn_TypeSigs -> Attributes
typeSigs_Syn_TypeSigs :: (Map Identifier Type) }
{-# INLINABLE wrap_TypeSigs #-}
wrap_TypeSigs :: T_TypeSigs  -> Inh_TypeSigs  -> (Syn_TypeSigs )
wrap_TypeSigs :: T_TypeSigs -> Inh_TypeSigs -> Syn_TypeSigs
wrap_TypeSigs (T_TypeSigs Identity T_TypeSigs_s41
act) (Inh_TypeSigs Attributes
_lhsItypeSigs) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_TypeSigs_s41
sem <- Identity T_TypeSigs_s41
act
        let arg40 :: T_TypeSigs_vIn40
arg40 = Attributes -> T_TypeSigs_vIn40
T_TypeSigs_vIn40 Attributes
_lhsItypeSigs
        (T_TypeSigs_vOut40 Attributes
_lhsOtypeSigs) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
sem T_TypeSigs_vIn40
arg40)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Attributes -> Syn_TypeSigs
Syn_TypeSigs Attributes
_lhsOtypeSigs)
   )

-- cata
{-# NOINLINE sem_TypeSigs #-}
sem_TypeSigs :: TypeSigs  -> T_TypeSigs 
sem_TypeSigs :: TypeSigs -> T_TypeSigs
sem_TypeSigs TypeSigs
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_TypeSig -> T_TypeSigs -> T_TypeSigs
sem_TypeSigs_Cons T_TypeSigs
sem_TypeSigs_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map TypeSig -> T_TypeSig
sem_TypeSig TypeSigs
list)

-- semantic domain
newtype T_TypeSigs  = T_TypeSigs {
                                 T_TypeSigs -> Identity T_TypeSigs_s41
attach_T_TypeSigs :: Identity (T_TypeSigs_s41 )
                                 }
newtype T_TypeSigs_s41  = C_TypeSigs_s41 {
                                         T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 :: (T_TypeSigs_v40 )
                                         }
data T_TypeSigs_s42  = C_TypeSigs_s42
type T_TypeSigs_v40  = (T_TypeSigs_vIn40 ) -> (T_TypeSigs_vOut40 )
data T_TypeSigs_vIn40  = T_TypeSigs_vIn40 (Map Identifier Type)
data T_TypeSigs_vOut40  = T_TypeSigs_vOut40 (Map Identifier Type)
{-# NOINLINE sem_TypeSigs_Cons #-}
sem_TypeSigs_Cons :: T_TypeSig  -> T_TypeSigs  -> T_TypeSigs 
sem_TypeSigs_Cons :: T_TypeSig -> T_TypeSigs -> T_TypeSigs
sem_TypeSigs_Cons T_TypeSig
arg_hd_ T_TypeSigs
arg_tl_ = Identity T_TypeSigs_s41 -> T_TypeSigs
T_TypeSigs (forall (m :: * -> *) a. Monad m => a -> m a
return T_TypeSigs_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_TypeSigs_s41
st41 = let
      v40 :: T_TypeSigs_v40 
      v40 :: T_TypeSigs_v40
v40 = \ (T_TypeSigs_vIn40 Attributes
_lhsItypeSigs) -> ( let
         _hdX38 :: T_TypeSig_s38
_hdX38 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_TypeSig -> Identity T_TypeSig_s38
attach_T_TypeSig (T_TypeSig
arg_hd_))
         _tlX41 :: T_TypeSigs_s41
_tlX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_TypeSigs -> Identity T_TypeSigs_s41
attach_T_TypeSigs (T_TypeSigs
arg_tl_))
         (T_TypeSig_vOut37 Attributes
_hdItypeSigs) = T_TypeSig_s38 -> T_TypeSig_v37
inv_TypeSig_s38 T_TypeSig_s38
_hdX38 (Attributes -> T_TypeSig_vIn37
T_TypeSig_vIn37 Attributes
_hdOtypeSigs)
         (T_TypeSigs_vOut40 Attributes
_tlItypeSigs) = T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
_tlX41 (Attributes -> T_TypeSigs_vIn40
T_TypeSigs_vIn40 Attributes
_tlOtypeSigs)
         _lhsOtypeSigs :: Map Identifier Type
         _lhsOtypeSigs :: Attributes
_lhsOtypeSigs = Attributes -> Attributes
rule540 Attributes
_tlItypeSigs
         _hdOtypeSigs :: Attributes
_hdOtypeSigs = Attributes -> Attributes
rule541 Attributes
_lhsItypeSigs
         _tlOtypeSigs :: Attributes
_tlOtypeSigs = Attributes -> Attributes
rule542 Attributes
_hdItypeSigs
         __result_ :: T_TypeSigs_vOut40
__result_ = Attributes -> T_TypeSigs_vOut40
T_TypeSigs_vOut40 Attributes
_lhsOtypeSigs
         in T_TypeSigs_vOut40
__result_ )
     in T_TypeSigs_v40 -> T_TypeSigs_s41
C_TypeSigs_s41 T_TypeSigs_v40
v40
   {-# INLINE rule540 #-}
   rule540 :: Attributes -> Attributes
rule540 = \ ((Attributes
_tlItypeSigs) :: Map Identifier Type) ->
     Attributes
_tlItypeSigs
   {-# INLINE rule541 #-}
   rule541 :: Attributes -> Attributes
rule541 = \ ((Attributes
_lhsItypeSigs) :: Map Identifier Type) ->
     Attributes
_lhsItypeSigs
   {-# INLINE rule542 #-}
   rule542 :: Attributes -> Attributes
rule542 = \ ((Attributes
_hdItypeSigs) :: Map Identifier Type) ->
     Attributes
_hdItypeSigs
{-# NOINLINE sem_TypeSigs_Nil #-}
sem_TypeSigs_Nil ::  T_TypeSigs 
sem_TypeSigs_Nil :: T_TypeSigs
sem_TypeSigs_Nil  = Identity T_TypeSigs_s41 -> T_TypeSigs
T_TypeSigs (forall (m :: * -> *) a. Monad m => a -> m a
return T_TypeSigs_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_TypeSigs_s41
st41 = let
      v40 :: T_TypeSigs_v40 
      v40 :: T_TypeSigs_v40
v40 = \ (T_TypeSigs_vIn40 Attributes
_lhsItypeSigs) -> ( let
         _lhsOtypeSigs :: Map Identifier Type
         _lhsOtypeSigs :: Attributes
_lhsOtypeSigs = Attributes -> Attributes
rule543 Attributes
_lhsItypeSigs
         __result_ :: T_TypeSigs_vOut40
__result_ = Attributes -> T_TypeSigs_vOut40
T_TypeSigs_vOut40 Attributes
_lhsOtypeSigs
         in T_TypeSigs_vOut40
__result_ )
     in T_TypeSigs_v40 -> T_TypeSigs_s41
C_TypeSigs_s41 T_TypeSigs_v40
v40
   {-# INLINE rule543 #-}
   rule543 :: Attributes -> Attributes
rule543 = \ ((Attributes
_lhsItypeSigs) :: Map Identifier Type) ->
     Attributes
_lhsItypeSigs