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

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

-- Patterns.ag imports

import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 12 "src-generated/PrintCleanCode.hs" #-}

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

import Patterns
import Data.Set(Set)
import qualified Data.Set as Set
import Data.Map(Map)
import qualified Data.Map as Map
{-# LINE 21 "src-generated/PrintCleanCode.hs" #-}

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

import Data.Char (isAlphaNum)
import Pretty
import Code
import Options
import CommonTypes (attrname, _LOC, nullIdent)
import Data.List(intersperse)
import System.IO
import System.Directory
import System.FilePath
import CommonTypes(BlockInfo, BlockKind(..))
{-# LINE 35 "src-generated/PrintCleanCode.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 146 "src-ag/Code.ag" #-}

-- Unboxed tuples

--   unbox  Whether unboxed tuples are wanted or not

--   inh    The inherited attributes.

--          If there are none, no unboxing can take place,

--          because in that case the semantic function (a top-level identifier) would have an unboxed type.

-- Of course we can't have an unboxed 1-tuple

mkTupleExpr :: Bool -> Bool -> Exprs -> Expr
mkTupleExpr unbox' noInh exprs | not unbox' || noInh || length exprs == 1 = TupleExpr exprs
                               | otherwise                                = UnboxedTupleExpr exprs
mkTupleType :: Bool -> Bool -> Types -> Type
mkTupleType unbox' noInh tps | not unbox' || noInh || length tps == 1 = TupleType tps
                             | otherwise                              = UnboxedTupleType tps
mkTupleLhs :: Bool -> Bool -> [String] -> Lhs
mkTupleLhs  unbox' noInh comps | not unbox' || noInh || length comps == 1 = TupleLhs comps
                               | otherwise                                = UnboxedTupleLhs comps
{-# LINE 55 "src-generated/PrintCleanCode.hs" #-}

{-# LINE 23 "src-ag/PrintCleanCode.ag" #-}

type PP_Docs = [PP_Doc]
{-# LINE 60 "src-generated/PrintCleanCode.hs" #-}

{-# LINE 27 "src-ag/PrintCleanCode.ag" #-}

ppMultiSeqH :: [PP_Doc] -> PP_Doc -> PP_Doc
ppMultiSeqH = ppMultiSeq' (>#<)

ppMultiSeqV :: [PP_Doc] -> PP_Doc -> PP_Doc
ppMultiSeqV = ppMultiSeq' (>-<)

ppMultiSeq' :: (PP_Doc -> PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> PP_Doc
ppMultiSeq' next strictArgs expr
  = foldr (\v r -> (v >#< "`seq`") `next` pp_parens r) expr strictArgs
{-# LINE 73 "src-generated/PrintCleanCode.hs" #-}

{-# LINE 322 "src-ag/PrintCleanCode.ag" #-}


reallySimple :: String -> Bool
reallySimple = and . map (\x -> isAlphaNum x || x=='_')

ppTuple :: Bool -> [PP_Doc] -> PP_Doc
ppTuple _     [x] = pp x
ppTuple True  pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps
ppTuple False pps = "(" >|< pp_block " " ")" "," pps
ppUnboxedTuple :: Bool -> [PP_Doc] -> PP_Doc
ppUnboxedTuple = ppTuple
--ppUnboxedTuple True pps  = "(# " >|< pp_block " " (concat $ replicate (length pps `max` 1) " #)") ",(# " pps

--ppUnboxedTuple False pps = "(# " >|< pp_block " " " #)" "," pps


{-# LINE 90 "src-generated/PrintCleanCode.hs" #-}

{-# LINE 425 "src-ag/PrintCleanCode.ag" #-}

locname' :: Identifier -> [Char]
locname' n = "_loc_" ++ getName n
{-# LINE 96 "src-generated/PrintCleanCode.hs" #-}

{-# LINE 500 "src-ag/PrintCleanCode.ag" #-}

renderDocs :: [PP_Doc] -> String
renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""
{-# LINE 102 "src-generated/PrintCleanCode.hs" #-}

{-# LINE 548 "src-ag/PrintCleanCode.ag" #-}

writeModule :: FilePath -> [PP_Doc] -> IO ()
writeModule path docs
  = do bExists <- doesFileExist path
       if bExists
        then do input <- readFile path
                seq (length input) (return ())
                if input /= output
                 then dumpIt
                 else return ()
        else dumpIt
  where
    output = renderDocs docs
    dumpIt = writeFile path output
{-# LINE 119 "src-generated/PrintCleanCode.hs" #-}
-- CaseAlt -----------------------------------------------------
-- wrapper
data Inh_CaseAlt  = Inh_CaseAlt { Inh_CaseAlt -> Bool
nested_Inh_CaseAlt :: !(Bool), Inh_CaseAlt -> Options
options_Inh_CaseAlt :: !(Options), Inh_CaseAlt -> String
outputfile_Inh_CaseAlt :: !(String) }
data Syn_CaseAlt  = Syn_CaseAlt { Syn_CaseAlt -> [PP_Doc]
pps_Syn_CaseAlt :: !(PP_Docs) }
{-# INLINABLE wrap_CaseAlt #-}
wrap_CaseAlt :: T_CaseAlt  -> Inh_CaseAlt  -> (Syn_CaseAlt )
wrap_CaseAlt :: T_CaseAlt -> Inh_CaseAlt -> Syn_CaseAlt
wrap_CaseAlt !(T_CaseAlt Identity T_CaseAlt_s2
act) !(Inh_CaseAlt Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) =
   Identity Syn_CaseAlt -> Syn_CaseAlt
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_CaseAlt_s2
sem <- Identity T_CaseAlt_s2
act
        let arg1 :: T_CaseAlt_vIn1
arg1 = Bool -> Options -> String -> T_CaseAlt_vIn1
T_CaseAlt_vIn1 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile
        !(T_CaseAlt_vOut1 [PP_Doc]
_lhsOpps) <- T_CaseAlt_vOut1 -> Identity T_CaseAlt_vOut1
forall (m :: * -> *) a. Monad m => a -> m a
return (T_CaseAlt_s2 -> T_CaseAlt_v1
inv_CaseAlt_s2 T_CaseAlt_s2
sem T_CaseAlt_vIn1
arg1)
        Syn_CaseAlt -> Identity Syn_CaseAlt
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_CaseAlt
Syn_CaseAlt [PP_Doc]
_lhsOpps)
   )

-- cata
{-# NOINLINE sem_CaseAlt #-}
sem_CaseAlt :: CaseAlt  -> T_CaseAlt 
sem_CaseAlt :: CaseAlt -> T_CaseAlt
sem_CaseAlt ( CaseAlt Lhs
left_ Expr
expr_ ) = T_Lhs -> T_Expr -> T_CaseAlt
sem_CaseAlt_CaseAlt ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
expr_ )

-- semantic domain
newtype T_CaseAlt  = T_CaseAlt {
                               T_CaseAlt -> Identity T_CaseAlt_s2
attach_T_CaseAlt :: Identity (T_CaseAlt_s2 )
                               }
newtype T_CaseAlt_s2  = C_CaseAlt_s2 {
                                     T_CaseAlt_s2 -> T_CaseAlt_v1
inv_CaseAlt_s2 :: (T_CaseAlt_v1 )
                                     }
data T_CaseAlt_s3  = C_CaseAlt_s3
type T_CaseAlt_v1  = (T_CaseAlt_vIn1 ) -> (T_CaseAlt_vOut1 )
data T_CaseAlt_vIn1  = T_CaseAlt_vIn1 (Bool) (Options) (String)
data T_CaseAlt_vOut1  = T_CaseAlt_vOut1 (PP_Docs)
{-# NOINLINE sem_CaseAlt_CaseAlt #-}
sem_CaseAlt_CaseAlt :: T_Lhs  -> T_Expr  -> T_CaseAlt 
sem_CaseAlt_CaseAlt :: T_Lhs -> T_Expr -> T_CaseAlt
sem_CaseAlt_CaseAlt T_Lhs
arg_left_ T_Expr
arg_expr_ = Identity T_CaseAlt_s2 -> T_CaseAlt
T_CaseAlt (T_CaseAlt_s2 -> Identity T_CaseAlt_s2
forall (m :: * -> *) a. Monad m => a -> m a
return T_CaseAlt_s2
st2) where
   {-# NOINLINE st2 #-}
   !st2 :: T_CaseAlt_s2
st2 = let
      v1 :: T_CaseAlt_v1 
      v1 :: T_CaseAlt_v1
v1 = \ !(T_CaseAlt_vIn1 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
         _exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
         (T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Bool -> Bool -> Options -> String -> T_Lhs_vIn31
T_Lhs_vIn31 Bool
_leftOisDeclOfLet Bool
_leftOnested Options
_leftOoptions String
_leftOoutputfile)
         (T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_exprOnested Options
_exprOoptions String
_exprOoutputfile)
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> PP_Doc -> [PP_Doc]
rule0 PP_Doc
_exprIpp PP_Doc
_leftIpp
         _leftOisDeclOfLet :: Bool
_leftOisDeclOfLet = () -> Bool
rule1  ()
         _leftOnested :: Bool
_leftOnested = Bool -> Bool
rule2 Bool
_lhsInested
         _leftOoptions :: Options
_leftOoptions = Options -> Options
rule3 Options
_lhsIoptions
         _leftOoutputfile :: String
_leftOoutputfile = String -> String
rule4 String
_lhsIoutputfile
         _exprOnested :: Bool
_exprOnested = Bool -> Bool
rule5 Bool
_lhsInested
         _exprOoptions :: Options
_exprOoptions = Options -> Options
rule6 Options
_lhsIoptions
         _exprOoutputfile :: String
_exprOoutputfile = String -> String
rule7 String
_lhsIoutputfile
         !__result_ :: T_CaseAlt_vOut1
__result_ = [PP_Doc] -> T_CaseAlt_vOut1
T_CaseAlt_vOut1 [PP_Doc]
_lhsOpps
         in T_CaseAlt_vOut1
__result_ )
     in T_CaseAlt_v1 -> T_CaseAlt_s2
C_CaseAlt_s2 T_CaseAlt_v1
v1
   {-# INLINE rule0 #-}
   {-# LINE 228 "src-ag/PrintCleanCode.ag" #-}
   rule0 = \ ((_exprIpp) :: PP_Doc) ((_leftIpp) :: PP_Doc) ->
                               {-# LINE 228 "src-ag/PrintCleanCode.ag" #-}
                               ["{" >#< _leftIpp >#< "->", _exprIpp >#< "}"]
                               {-# LINE 178 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule1 #-}
   {-# LINE 449 "src-ag/PrintCleanCode.ag" #-}
   rule1 = \  (_ :: ()) ->
                           {-# LINE 449 "src-ag/PrintCleanCode.ag" #-}
                           False
                           {-# LINE 184 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule2 #-}
   rule2 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule3 #-}
   rule3 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule4 #-}
   rule4 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule5 #-}
   rule5 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule6 #-}
   rule6 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule7 #-}
   rule7 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile

-- CaseAlts ----------------------------------------------------
-- wrapper
data Inh_CaseAlts  = Inh_CaseAlts { Inh_CaseAlts -> Bool
nested_Inh_CaseAlts :: !(Bool), Inh_CaseAlts -> Options
options_Inh_CaseAlts :: !(Options), Inh_CaseAlts -> String
outputfile_Inh_CaseAlts :: !(String) }
data Syn_CaseAlts  = Syn_CaseAlts { Syn_CaseAlts -> [PP_Doc]
pps_Syn_CaseAlts :: !(PP_Docs) }
{-# INLINABLE wrap_CaseAlts #-}
wrap_CaseAlts :: T_CaseAlts  -> Inh_CaseAlts  -> (Syn_CaseAlts )
wrap_CaseAlts :: T_CaseAlts -> Inh_CaseAlts -> Syn_CaseAlts
wrap_CaseAlts !(T_CaseAlts Identity T_CaseAlts_s5
act) !(Inh_CaseAlts Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) =
   Identity Syn_CaseAlts -> Syn_CaseAlts
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_CaseAlts_s5
sem <- Identity T_CaseAlts_s5
act
        let arg4 :: T_CaseAlts_vIn4
arg4 = Bool -> Options -> String -> T_CaseAlts_vIn4
T_CaseAlts_vIn4 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile
        !(T_CaseAlts_vOut4 [PP_Doc]
_lhsOpps) <- T_CaseAlts_vOut4 -> Identity T_CaseAlts_vOut4
forall (m :: * -> *) a. Monad m => a -> m a
return (T_CaseAlts_s5 -> T_CaseAlts_v4
inv_CaseAlts_s5 T_CaseAlts_s5
sem T_CaseAlts_vIn4
arg4)
        Syn_CaseAlts -> Identity Syn_CaseAlts
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_CaseAlts
Syn_CaseAlts [PP_Doc]
_lhsOpps)
   )

-- cata
{-# NOINLINE sem_CaseAlts #-}
sem_CaseAlts :: CaseAlts  -> T_CaseAlts 
sem_CaseAlts :: CaseAlts -> T_CaseAlts
sem_CaseAlts CaseAlts
list = (T_CaseAlt -> T_CaseAlts -> T_CaseAlts)
-> T_CaseAlts -> [T_CaseAlt] -> T_CaseAlts
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_CaseAlt -> T_CaseAlts -> T_CaseAlts
sem_CaseAlts_Cons T_CaseAlts
sem_CaseAlts_Nil ((CaseAlt -> T_CaseAlt) -> CaseAlts -> [T_CaseAlt]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map CaseAlt -> T_CaseAlt
sem_CaseAlt CaseAlts
list)

-- semantic domain
newtype T_CaseAlts  = T_CaseAlts {
                                 T_CaseAlts -> Identity T_CaseAlts_s5
attach_T_CaseAlts :: Identity (T_CaseAlts_s5 )
                                 }
newtype T_CaseAlts_s5  = C_CaseAlts_s5 {
                                       T_CaseAlts_s5 -> T_CaseAlts_v4
inv_CaseAlts_s5 :: (T_CaseAlts_v4 )
                                       }
data T_CaseAlts_s6  = C_CaseAlts_s6
type T_CaseAlts_v4  = (T_CaseAlts_vIn4 ) -> (T_CaseAlts_vOut4 )
data T_CaseAlts_vIn4  = T_CaseAlts_vIn4 (Bool) (Options) (String)
data T_CaseAlts_vOut4  = T_CaseAlts_vOut4 (PP_Docs)
{-# NOINLINE sem_CaseAlts_Cons #-}
sem_CaseAlts_Cons :: T_CaseAlt  -> T_CaseAlts  -> T_CaseAlts 
sem_CaseAlts_Cons :: T_CaseAlt -> T_CaseAlts -> T_CaseAlts
sem_CaseAlts_Cons T_CaseAlt
arg_hd_ T_CaseAlts
arg_tl_ = Identity T_CaseAlts_s5 -> T_CaseAlts
T_CaseAlts (T_CaseAlts_s5 -> Identity T_CaseAlts_s5
forall (m :: * -> *) a. Monad m => a -> m a
return T_CaseAlts_s5
st5) where
   {-# NOINLINE st5 #-}
   !st5 :: T_CaseAlts_s5
st5 = let
      v4 :: T_CaseAlts_v4 
      v4 :: T_CaseAlts_v4
v4 = \ !(T_CaseAlts_vIn4 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _hdX2 :: T_CaseAlt_s2
_hdX2 = Identity T_CaseAlt_s2 -> T_CaseAlt_s2
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CaseAlt -> Identity T_CaseAlt_s2
attach_T_CaseAlt (T_CaseAlt
arg_hd_))
         _tlX5 :: T_CaseAlts_s5
_tlX5 = Identity T_CaseAlts_s5 -> T_CaseAlts_s5
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CaseAlts -> Identity T_CaseAlts_s5
attach_T_CaseAlts (T_CaseAlts
arg_tl_))
         (T_CaseAlt_vOut1 [PP_Doc]
_hdIpps) = T_CaseAlt_s2 -> T_CaseAlt_v1
inv_CaseAlt_s2 T_CaseAlt_s2
_hdX2 (Bool -> Options -> String -> T_CaseAlt_vIn1
T_CaseAlt_vIn1 Bool
_hdOnested Options
_hdOoptions String
_hdOoutputfile)
         (T_CaseAlts_vOut4 [PP_Doc]
_tlIpps) = T_CaseAlts_s5 -> T_CaseAlts_v4
inv_CaseAlts_s5 T_CaseAlts_s5
_tlX5 (Bool -> Options -> String -> T_CaseAlts_vIn4
T_CaseAlts_vIn4 Bool
_tlOnested Options
_tlOoptions String
_tlOoutputfile)
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule8 [PP_Doc]
_hdIpps [PP_Doc]
_tlIpps
         _hdOnested :: Bool
_hdOnested = Bool -> Bool
rule9 Bool
_lhsInested
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule10 Options
_lhsIoptions
         _hdOoutputfile :: String
_hdOoutputfile = String -> String
rule11 String
_lhsIoutputfile
         _tlOnested :: Bool
_tlOnested = Bool -> Bool
rule12 Bool
_lhsInested
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule13 Options
_lhsIoptions
         _tlOoutputfile :: String
_tlOoutputfile = String -> String
rule14 String
_lhsIoutputfile
         !__result_ :: T_CaseAlts_vOut4
__result_ = [PP_Doc] -> T_CaseAlts_vOut4
T_CaseAlts_vOut4 [PP_Doc]
_lhsOpps
         in T_CaseAlts_vOut4
__result_ )
     in T_CaseAlts_v4 -> T_CaseAlts_s5
C_CaseAlts_s5 T_CaseAlts_v4
v4
   {-# INLINE rule8 #-}
   {-# LINE 72 "src-ag/PrintCleanCode.ag" #-}
   rule8 = \ ((_hdIpps) :: PP_Docs) ((_tlIpps) :: PP_Docs) ->
                     {-# LINE 72 "src-ag/PrintCleanCode.ag" #-}
                     _hdIpps ++ _tlIpps
                     {-# LINE 261 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule9 #-}
   rule9 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule10 #-}
   rule10 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule11 #-}
   rule11 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule12 #-}
   rule12 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule13 #-}
   rule13 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule14 #-}
   rule14 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_CaseAlts_Nil #-}
sem_CaseAlts_Nil ::  T_CaseAlts 
sem_CaseAlts_Nil :: T_CaseAlts
sem_CaseAlts_Nil  = Identity T_CaseAlts_s5 -> T_CaseAlts
T_CaseAlts (T_CaseAlts_s5 -> Identity T_CaseAlts_s5
forall (m :: * -> *) a. Monad m => a -> m a
return T_CaseAlts_s5
st5) where
   {-# NOINLINE st5 #-}
   !st5 :: T_CaseAlts_s5
st5 = let
      v4 :: T_CaseAlts_v4 
      v4 :: T_CaseAlts_v4
v4 = \ !(T_CaseAlts_vIn4 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule15  ()
         !__result_ :: T_CaseAlts_vOut4
__result_ = [PP_Doc] -> T_CaseAlts_vOut4
T_CaseAlts_vOut4 [PP_Doc]
_lhsOpps
         in T_CaseAlts_vOut4
__result_ )
     in T_CaseAlts_v4 -> T_CaseAlts_s5
C_CaseAlts_s5 T_CaseAlts_v4
v4
   {-# INLINE rule15 #-}
   {-# LINE 73 "src-ag/PrintCleanCode.ag" #-}
   rule15 = \  (_ :: ()) ->
                     {-# LINE 73 "src-ag/PrintCleanCode.ag" #-}
                     []
                     {-# LINE 297 "src-generated/PrintCleanCode.hs" #-}

-- Chunk -------------------------------------------------------
-- wrapper
data Inh_Chunk  = Inh_Chunk { Inh_Chunk -> PP_Doc
importBlocks_Inh_Chunk :: !(PP_Doc), Inh_Chunk -> Bool
isDeclOfLet_Inh_Chunk :: !(Bool), Inh_Chunk -> String
mainFile_Inh_Chunk :: !(String), Inh_Chunk -> String
mainName_Inh_Chunk :: !(String), Inh_Chunk -> String -> String -> String -> Bool -> String
moduleHeader_Inh_Chunk :: !(String -> String -> String -> Bool -> String), Inh_Chunk -> Bool
nested_Inh_Chunk :: !(Bool), Inh_Chunk -> Options
options_Inh_Chunk :: !(Options), Inh_Chunk -> String
optionsLine_Inh_Chunk :: !(String), Inh_Chunk -> String
pragmaBlocks_Inh_Chunk :: !(String), Inh_Chunk -> Map BlockInfo PP_Doc
textBlockMap_Inh_Chunk :: !(Map BlockInfo PP_Doc), Inh_Chunk -> PP_Doc
textBlocks_Inh_Chunk :: !(PP_Doc) }
data Syn_Chunk  = Syn_Chunk { Syn_Chunk -> [[PP_Doc]]
appendCommon_Syn_Chunk :: !([[PP_Doc]]), Syn_Chunk -> [[PP_Doc]]
appendMain_Syn_Chunk :: !([[PP_Doc]]), Syn_Chunk -> IO ()
genSems_Syn_Chunk :: !(IO ()), Syn_Chunk -> [String]
imports_Syn_Chunk :: !([String]), Syn_Chunk -> [PP_Doc]
pps_Syn_Chunk :: !(PP_Docs) }
{-# INLINABLE wrap_Chunk #-}
wrap_Chunk :: T_Chunk  -> Inh_Chunk  -> (Syn_Chunk )
wrap_Chunk :: T_Chunk -> Inh_Chunk -> Syn_Chunk
wrap_Chunk !(T_Chunk Identity T_Chunk_s8
act) !(Inh_Chunk PP_Doc
_lhsIimportBlocks Bool
_lhsIisDeclOfLet String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Bool
_lhsInested Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) =
   Identity Syn_Chunk -> Syn_Chunk
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Chunk_s8
sem <- Identity T_Chunk_s8
act
        let arg7 :: T_Chunk_vIn7
arg7 = PP_Doc
-> Bool
-> String
-> String
-> (String -> String -> String -> Bool -> String)
-> Bool
-> Options
-> String
-> String
-> Map BlockInfo PP_Doc
-> PP_Doc
-> T_Chunk_vIn7
T_Chunk_vIn7 PP_Doc
_lhsIimportBlocks Bool
_lhsIisDeclOfLet String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Bool
_lhsInested Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks
        !(T_Chunk_vOut7 [[PP_Doc]]
_lhsOappendCommon [[PP_Doc]]
_lhsOappendMain IO ()
_lhsOgenSems [String]
_lhsOimports [PP_Doc]
_lhsOpps) <- T_Chunk_vOut7 -> Identity T_Chunk_vOut7
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Chunk_s8 -> T_Chunk_v7
inv_Chunk_s8 T_Chunk_s8
sem T_Chunk_vIn7
arg7)
        Syn_Chunk -> Identity Syn_Chunk
forall (m :: * -> *) a. Monad m => a -> m a
return ([[PP_Doc]]
-> [[PP_Doc]] -> IO () -> [String] -> [PP_Doc] -> Syn_Chunk
Syn_Chunk [[PP_Doc]]
_lhsOappendCommon [[PP_Doc]]
_lhsOappendMain IO ()
_lhsOgenSems [String]
_lhsOimports [PP_Doc]
_lhsOpps)
   )

-- cata
{-# INLINE sem_Chunk #-}
sem_Chunk :: Chunk  -> T_Chunk 
sem_Chunk :: Chunk -> T_Chunk
sem_Chunk ( Chunk !String
name_ Decl
comment_ Decls
info_ Decls
dataDef_ Decls
cataFun_ Decls
semDom_ Decls
semWrapper_ Decls
semFunctions_ ![String]
semNames_ ) = String
-> T_Decl
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> [String]
-> T_Chunk
sem_Chunk_Chunk String
name_ ( Decl -> T_Decl
sem_Decl Decl
comment_ ) ( Decls -> T_Decls
sem_Decls Decls
info_ ) ( Decls -> T_Decls
sem_Decls Decls
dataDef_ ) ( Decls -> T_Decls
sem_Decls Decls
cataFun_ ) ( Decls -> T_Decls
sem_Decls Decls
semDom_ ) ( Decls -> T_Decls
sem_Decls Decls
semWrapper_ ) ( Decls -> T_Decls
sem_Decls Decls
semFunctions_ ) [String]
semNames_

-- semantic domain
newtype T_Chunk  = T_Chunk {
                           T_Chunk -> Identity T_Chunk_s8
attach_T_Chunk :: Identity (T_Chunk_s8 )
                           }
newtype T_Chunk_s8  = C_Chunk_s8 {
                                 T_Chunk_s8 -> T_Chunk_v7
inv_Chunk_s8 :: (T_Chunk_v7 )
                                 }
data T_Chunk_s9  = C_Chunk_s9
type T_Chunk_v7  = (T_Chunk_vIn7 ) -> (T_Chunk_vOut7 )
data T_Chunk_vIn7  = T_Chunk_vIn7 (PP_Doc) (Bool) (String) (String) (String -> String -> String -> Bool -> String) (Bool) (Options) (String) (String) (Map BlockInfo PP_Doc) (PP_Doc)
data T_Chunk_vOut7  = T_Chunk_vOut7 ([[PP_Doc]]) ([[PP_Doc]]) (IO ()) ([String]) (PP_Docs)
{-# NOINLINE sem_Chunk_Chunk #-}
sem_Chunk_Chunk :: (String) -> T_Decl  -> T_Decls  -> T_Decls  -> T_Decls  -> T_Decls  -> T_Decls  -> T_Decls  -> ([String]) -> T_Chunk 
sem_Chunk_Chunk :: String
-> T_Decl
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> T_Decls
-> [String]
-> T_Chunk
sem_Chunk_Chunk !String
arg_name_ T_Decl
arg_comment_ T_Decls
arg_info_ T_Decls
arg_dataDef_ T_Decls
arg_cataFun_ T_Decls
arg_semDom_ T_Decls
arg_semWrapper_ T_Decls
arg_semFunctions_ ![String]
arg_semNames_ = Identity T_Chunk_s8 -> T_Chunk
T_Chunk (T_Chunk_s8 -> Identity T_Chunk_s8
forall (m :: * -> *) a. Monad m => a -> m a
return T_Chunk_s8
st8) where
   {-# NOINLINE st8 #-}
   !st8 :: T_Chunk_s8
st8 = let
      v7 :: T_Chunk_v7 
      v7 :: T_Chunk_v7
v7 = \ !(T_Chunk_vIn7 PP_Doc
_lhsIimportBlocks Bool
_lhsIisDeclOfLet String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Bool
_lhsInested Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) -> ( let
         _commentX20 :: T_Decl_s20
_commentX20 = Identity T_Decl_s20 -> T_Decl_s20
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decl -> Identity T_Decl_s20
attach_T_Decl (T_Decl
arg_comment_))
         _infoX23 :: T_Decls_s23
_infoX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_info_))
         _dataDefX23 :: T_Decls_s23
_dataDefX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_dataDef_))
         _cataFunX23 :: T_Decls_s23
_cataFunX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_cataFun_))
         _semDomX23 :: T_Decls_s23
_semDomX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_semDom_))
         _semWrapperX23 :: T_Decls_s23
_semWrapperX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_semWrapper_))
         _semFunctionsX23 :: T_Decls_s23
_semFunctionsX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_semFunctions_))
         (T_Decl_vOut19 PP_Doc
_commentIpp PP_Doc
_commentIppa) = T_Decl_s20 -> T_Decl_v19
inv_Decl_s20 T_Decl_s20
_commentX20 (Bool -> Bool -> Options -> String -> T_Decl_vIn19
T_Decl_vIn19 Bool
_commentOisDeclOfLet Bool
_commentOnested Options
_commentOoptions String
_commentOoutputfile)
         (T_Decls_vOut22 [PP_Doc]
_infoIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_infoX23 (Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_infoOisDeclOfLet Bool
_infoOnested Options
_infoOoptions String
_infoOoutputfile)
         (T_Decls_vOut22 [PP_Doc]
_dataDefIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_dataDefX23 (Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_dataDefOisDeclOfLet Bool
_dataDefOnested Options
_dataDefOoptions String
_dataDefOoutputfile)
         (T_Decls_vOut22 [PP_Doc]
_cataFunIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_cataFunX23 (Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_cataFunOisDeclOfLet Bool
_cataFunOnested Options
_cataFunOoptions String
_cataFunOoutputfile)
         (T_Decls_vOut22 [PP_Doc]
_semDomIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_semDomX23 (Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_semDomOisDeclOfLet Bool
_semDomOnested Options
_semDomOoptions String
_semDomOoutputfile)
         (T_Decls_vOut22 [PP_Doc]
_semWrapperIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_semWrapperX23 (Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_semWrapperOisDeclOfLet Bool
_semWrapperOnested Options
_semWrapperOoptions String
_semWrapperOoutputfile)
         (T_Decls_vOut22 [PP_Doc]
_semFunctionsIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_semFunctionsX23 (Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_semFunctionsOisDeclOfLet Bool
_semFunctionsOnested Options
_semFunctionsOoptions String
_semFunctionsOoutputfile)
         _outputfile :: String
_outputfile = String -> Options -> String -> String
rule16 String
_lhsImainFile Options
_lhsIoptions String
arg_name_
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = [PP_Doc]
-> PP_Doc
-> [PP_Doc]
-> [PP_Doc]
-> Map BlockInfo PP_Doc
-> [PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> String
-> [PP_Doc]
rule17 [PP_Doc]
_cataFunIpps PP_Doc
_commentIpp [PP_Doc]
_dataDefIpps [PP_Doc]
_infoIpps Map BlockInfo PP_Doc
_lhsItextBlockMap [PP_Doc]
_semDomIpps [PP_Doc]
_semFunctionsIpps [PP_Doc]
_semWrapperIpps String
arg_name_
         _lhsOimports :: [String]
         _lhsOimports :: [String]
_lhsOimports = String -> String -> [String]
rule18 String
_lhsImainName String
arg_name_
         _lhsOappendCommon :: [[PP_Doc]]
         _lhsOappendCommon :: [[PP_Doc]]
_lhsOappendCommon = PP_Doc -> [PP_Doc] -> Options -> [PP_Doc] -> [PP_Doc] -> [[PP_Doc]]
rule19 PP_Doc
_commentIpp [PP_Doc]
_dataDefIpps Options
_lhsIoptions [PP_Doc]
_semDomIpps [PP_Doc]
_semWrapperIpps
         _lhsOappendMain :: [[PP_Doc]]
         _lhsOappendMain :: [[PP_Doc]]
_lhsOappendMain = [PP_Doc] -> PP_Doc -> Options -> [PP_Doc] -> [[PP_Doc]]
rule20 [PP_Doc]
_cataFunIpps PP_Doc
_commentIpp Options
_lhsIoptions [PP_Doc]
_semWrapperIpps
         _lhsOgenSems :: IO ()
         _lhsOgenSems :: IO ()
_lhsOgenSems = PP_Doc
-> String
-> [PP_Doc]
-> String
-> (String -> String -> String -> Bool -> String)
-> String
-> String
-> Map BlockInfo PP_Doc
-> String
-> [PP_Doc]
-> String
-> IO ()
rule21 PP_Doc
_commentIpp String
_exports [PP_Doc]
_infoIpps String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap String
_outputfile [PP_Doc]
_semFunctionsIpps String
arg_name_
         _exports :: String
_exports = [String] -> String
rule22 [String]
arg_semNames_
         _commentOisDeclOfLet :: Bool
_commentOisDeclOfLet = Bool -> Bool
rule23 Bool
_lhsIisDeclOfLet
         _commentOnested :: Bool
_commentOnested = Bool -> Bool
rule24 Bool
_lhsInested
         _commentOoptions :: Options
_commentOoptions = Options -> Options
rule25 Options
_lhsIoptions
         _commentOoutputfile :: String
_commentOoutputfile = String -> String
forall a. a -> a
rule26 String
_outputfile
         _infoOisDeclOfLet :: Bool
_infoOisDeclOfLet = Bool -> Bool
rule27 Bool
_lhsIisDeclOfLet
         _infoOnested :: Bool
_infoOnested = Bool -> Bool
rule28 Bool
_lhsInested
         _infoOoptions :: Options
_infoOoptions = Options -> Options
rule29 Options
_lhsIoptions
         _infoOoutputfile :: String
_infoOoutputfile = String -> String
forall a. a -> a
rule30 String
_outputfile
         _dataDefOisDeclOfLet :: Bool
_dataDefOisDeclOfLet = Bool -> Bool
rule31 Bool
_lhsIisDeclOfLet
         _dataDefOnested :: Bool
_dataDefOnested = Bool -> Bool
rule32 Bool
_lhsInested
         _dataDefOoptions :: Options
_dataDefOoptions = Options -> Options
rule33 Options
_lhsIoptions
         _dataDefOoutputfile :: String
_dataDefOoutputfile = String -> String
forall a. a -> a
rule34 String
_outputfile
         _cataFunOisDeclOfLet :: Bool
_cataFunOisDeclOfLet = Bool -> Bool
rule35 Bool
_lhsIisDeclOfLet
         _cataFunOnested :: Bool
_cataFunOnested = Bool -> Bool
rule36 Bool
_lhsInested
         _cataFunOoptions :: Options
_cataFunOoptions = Options -> Options
rule37 Options
_lhsIoptions
         _cataFunOoutputfile :: String
_cataFunOoutputfile = String -> String
forall a. a -> a
rule38 String
_outputfile
         _semDomOisDeclOfLet :: Bool
_semDomOisDeclOfLet = Bool -> Bool
rule39 Bool
_lhsIisDeclOfLet
         _semDomOnested :: Bool
_semDomOnested = Bool -> Bool
rule40 Bool
_lhsInested
         _semDomOoptions :: Options
_semDomOoptions = Options -> Options
rule41 Options
_lhsIoptions
         _semDomOoutputfile :: String
_semDomOoutputfile = String -> String
forall a. a -> a
rule42 String
_outputfile
         _semWrapperOisDeclOfLet :: Bool
_semWrapperOisDeclOfLet = Bool -> Bool
rule43 Bool
_lhsIisDeclOfLet
         _semWrapperOnested :: Bool
_semWrapperOnested = Bool -> Bool
rule44 Bool
_lhsInested
         _semWrapperOoptions :: Options
_semWrapperOoptions = Options -> Options
rule45 Options
_lhsIoptions
         _semWrapperOoutputfile :: String
_semWrapperOoutputfile = String -> String
forall a. a -> a
rule46 String
_outputfile
         _semFunctionsOisDeclOfLet :: Bool
_semFunctionsOisDeclOfLet = Bool -> Bool
rule47 Bool
_lhsIisDeclOfLet
         _semFunctionsOnested :: Bool
_semFunctionsOnested = Bool -> Bool
rule48 Bool
_lhsInested
         _semFunctionsOoptions :: Options
_semFunctionsOoptions = Options -> Options
rule49 Options
_lhsIoptions
         _semFunctionsOoutputfile :: String
_semFunctionsOoutputfile = String -> String
forall a. a -> a
rule50 String
_outputfile
         !__result_ :: T_Chunk_vOut7
__result_ = [[PP_Doc]]
-> [[PP_Doc]] -> IO () -> [String] -> [PP_Doc] -> T_Chunk_vOut7
T_Chunk_vOut7 [[PP_Doc]]
_lhsOappendCommon [[PP_Doc]]
_lhsOappendMain IO ()
_lhsOgenSems [String]
_lhsOimports [PP_Doc]
_lhsOpps
         in T_Chunk_vOut7
__result_ )
     in T_Chunk_v7 -> T_Chunk_s8
C_Chunk_s8 T_Chunk_v7
v7
   {-# INLINE rule16 #-}
   {-# LINE 43 "src-ag/PrintCleanCode.ag" #-}
   rule16 = \ ((_lhsImainFile) :: String) ((_lhsIoptions) :: Options) name_ ->
                         {-# LINE 43 "src-ag/PrintCleanCode.ag" #-}
                         if sepSemMods _lhsIoptions
                         then replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_" ++ name_)
                         else _lhsImainFile
                         {-# LINE 400 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule17 #-}
   {-# LINE 104 "src-ag/PrintCleanCode.ag" #-}
   rule17 = \ ((_cataFunIpps) :: PP_Docs) ((_commentIpp) :: PP_Doc) ((_dataDefIpps) :: PP_Docs) ((_infoIpps) :: PP_Docs) ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ((_semDomIpps) :: PP_Docs) ((_semFunctionsIpps) :: PP_Docs) ((_semWrapperIpps) :: PP_Docs) name_ ->
                                {-# LINE 104 "src-ag/PrintCleanCode.ag" #-}
                                _commentIpp
                                :  _infoIpps
                                ++ _dataDefIpps
                                ++ _cataFunIpps
                                ++ _semDomIpps
                                ++ _semWrapperIpps
                                ++ _semFunctionsIpps
                                ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]
                                {-# LINE 413 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule18 #-}
   {-# LINE 508 "src-ag/PrintCleanCode.ag" #-}
   rule18 = \ ((_lhsImainName) :: String) name_ ->
                      {-# LINE 508 "src-ag/PrintCleanCode.ag" #-}
                      ["import " ++ _lhsImainName ++ "_" ++ name_ ++ "\n"]
                      {-# LINE 419 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule19 #-}
   {-# LINE 515 "src-ag/PrintCleanCode.ag" #-}
   rule19 = \ ((_commentIpp) :: PP_Doc) ((_dataDefIpps) :: PP_Docs) ((_lhsIoptions) :: Options) ((_semDomIpps) :: PP_Docs) ((_semWrapperIpps) :: PP_Docs) ->
            {-# LINE 515 "src-ag/PrintCleanCode.ag" #-}
            [ [_commentIpp]
            , _dataDefIpps
            , _semDomIpps
            , if reference _lhsIoptions then _semWrapperIpps else []
            ]
            {-# LINE 429 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule20 #-}
   {-# LINE 521 "src-ag/PrintCleanCode.ag" #-}
   rule20 = \ ((_cataFunIpps) :: PP_Docs) ((_commentIpp) :: PP_Doc) ((_lhsIoptions) :: Options) ((_semWrapperIpps) :: PP_Docs) ->
            {-# LINE 521 "src-ag/PrintCleanCode.ag" #-}
            [ [_commentIpp]
            , _cataFunIpps
            , if reference _lhsIoptions then [] else _semWrapperIpps
            ]
            {-# LINE 438 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule21 #-}
   {-# LINE 531 "src-ag/PrintCleanCode.ag" #-}
   rule21 = \ ((_commentIpp) :: PP_Doc) _exports ((_infoIpps) :: PP_Docs) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptionsLine) :: String) ((_lhsIpragmaBlocks) :: String) ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) _outputfile ((_semFunctionsIpps) :: PP_Docs) name_ ->
            {-# LINE 531 "src-ag/PrintCleanCode.ag" #-}
            writeModule _outputfile
              [ pp $ _lhsIpragmaBlocks
              , pp $ Map.findWithDefault empty (BlockPragma, Just $ identifier name_) _lhsItextBlockMap
              , pp $ _lhsIoptionsLine
              , pp $ _lhsImoduleHeader _lhsImainName ("_" ++ name_) _exports     True
              , pp $ ("import " ++ _lhsImainName ++ "_common\n")
              , pp $ Map.findWithDefault empty (BlockImport, Just $ identifier name_) _lhsItextBlockMap
              , _commentIpp
              , vlist_sep "" _infoIpps
              , vlist_sep "" _semFunctionsIpps
              , Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap
              ]
            {-# LINE 455 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule22 #-}
   {-# LINE 546 "src-ag/PrintCleanCode.ag" #-}
   rule22 = \ semNames_ ->
                      {-# LINE 546 "src-ag/PrintCleanCode.ag" #-}
                      concat $ intersperse "," semNames_
                      {-# LINE 461 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule23 #-}
   rule23 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule24 #-}
   rule24 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule25 #-}
   rule25 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule26 #-}
   rule26 = \ _outputfile ->
     _outputfile
   {-# INLINE rule27 #-}
   rule27 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule28 #-}
   rule28 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule29 #-}
   rule29 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule30 #-}
   rule30 = \ _outputfile ->
     _outputfile
   {-# INLINE rule31 #-}
   rule31 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule32 #-}
   rule32 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule33 #-}
   rule33 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule34 #-}
   rule34 = \ _outputfile ->
     _outputfile
   {-# INLINE rule35 #-}
   rule35 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule36 #-}
   rule36 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule37 #-}
   rule37 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule38 #-}
   rule38 = \ _outputfile ->
     _outputfile
   {-# INLINE rule39 #-}
   rule39 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule40 #-}
   rule40 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule41 #-}
   rule41 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule42 #-}
   rule42 = \ _outputfile ->
     _outputfile
   {-# INLINE rule43 #-}
   rule43 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule44 #-}
   rule44 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule45 #-}
   rule45 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule46 #-}
   rule46 = \ _outputfile ->
     _outputfile
   {-# INLINE rule47 #-}
   rule47 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule48 #-}
   rule48 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule49 #-}
   rule49 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule50 #-}
   rule50 = \ _outputfile ->
     _outputfile

-- Chunks ------------------------------------------------------
-- wrapper
data Inh_Chunks  = Inh_Chunks { Inh_Chunks -> PP_Doc
importBlocks_Inh_Chunks :: !(PP_Doc), Inh_Chunks -> Bool
isDeclOfLet_Inh_Chunks :: !(Bool), Inh_Chunks -> String
mainFile_Inh_Chunks :: !(String), Inh_Chunks -> String
mainName_Inh_Chunks :: !(String), Inh_Chunks -> String -> String -> String -> Bool -> String
moduleHeader_Inh_Chunks :: !(String -> String -> String -> Bool -> String), Inh_Chunks -> Bool
nested_Inh_Chunks :: !(Bool), Inh_Chunks -> Options
options_Inh_Chunks :: !(Options), Inh_Chunks -> String
optionsLine_Inh_Chunks :: !(String), Inh_Chunks -> String
pragmaBlocks_Inh_Chunks :: !(String), Inh_Chunks -> Map BlockInfo PP_Doc
textBlockMap_Inh_Chunks :: !(Map BlockInfo PP_Doc), Inh_Chunks -> PP_Doc
textBlocks_Inh_Chunks :: !(PP_Doc) }
data Syn_Chunks  = Syn_Chunks { Syn_Chunks -> [[PP_Doc]]
appendCommon_Syn_Chunks :: !([[PP_Doc]]), Syn_Chunks -> [[PP_Doc]]
appendMain_Syn_Chunks :: !([[PP_Doc]]), Syn_Chunks -> IO ()
genSems_Syn_Chunks :: !(IO ()), Syn_Chunks -> [String]
imports_Syn_Chunks :: !([String]), Syn_Chunks -> [PP_Doc]
pps_Syn_Chunks :: !(PP_Docs) }
{-# INLINABLE wrap_Chunks #-}
wrap_Chunks :: T_Chunks  -> Inh_Chunks  -> (Syn_Chunks )
wrap_Chunks :: T_Chunks -> Inh_Chunks -> Syn_Chunks
wrap_Chunks !(T_Chunks Identity T_Chunks_s11
act) !(Inh_Chunks PP_Doc
_lhsIimportBlocks Bool
_lhsIisDeclOfLet String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Bool
_lhsInested Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) =
   Identity Syn_Chunks -> Syn_Chunks
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Chunks_s11
sem <- Identity T_Chunks_s11
act
        let arg10 :: T_Chunks_vIn10
arg10 = PP_Doc
-> Bool
-> String
-> String
-> (String -> String -> String -> Bool -> String)
-> Bool
-> Options
-> String
-> String
-> Map BlockInfo PP_Doc
-> PP_Doc
-> T_Chunks_vIn10
T_Chunks_vIn10 PP_Doc
_lhsIimportBlocks Bool
_lhsIisDeclOfLet String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Bool
_lhsInested Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks
        !(T_Chunks_vOut10 [[PP_Doc]]
_lhsOappendCommon [[PP_Doc]]
_lhsOappendMain IO ()
_lhsOgenSems [String]
_lhsOimports [PP_Doc]
_lhsOpps) <- T_Chunks_vOut10 -> Identity T_Chunks_vOut10
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Chunks_s11 -> T_Chunks_v10
inv_Chunks_s11 T_Chunks_s11
sem T_Chunks_vIn10
arg10)
        Syn_Chunks -> Identity Syn_Chunks
forall (m :: * -> *) a. Monad m => a -> m a
return ([[PP_Doc]]
-> [[PP_Doc]] -> IO () -> [String] -> [PP_Doc] -> Syn_Chunks
Syn_Chunks [[PP_Doc]]
_lhsOappendCommon [[PP_Doc]]
_lhsOappendMain IO ()
_lhsOgenSems [String]
_lhsOimports [PP_Doc]
_lhsOpps)
   )

-- cata
{-# NOINLINE sem_Chunks #-}
sem_Chunks :: Chunks  -> T_Chunks 
sem_Chunks :: Chunks -> T_Chunks
sem_Chunks Chunks
list = (T_Chunk -> T_Chunks -> T_Chunks)
-> T_Chunks -> [T_Chunk] -> T_Chunks
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Chunk -> T_Chunks -> T_Chunks
sem_Chunks_Cons T_Chunks
sem_Chunks_Nil ((Chunk -> T_Chunk) -> Chunks -> [T_Chunk]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Chunk -> T_Chunk
sem_Chunk Chunks
list)

-- semantic domain
newtype T_Chunks  = T_Chunks {
                             T_Chunks -> Identity T_Chunks_s11
attach_T_Chunks :: Identity (T_Chunks_s11 )
                             }
newtype T_Chunks_s11  = C_Chunks_s11 {
                                     T_Chunks_s11 -> T_Chunks_v10
inv_Chunks_s11 :: (T_Chunks_v10 )
                                     }
data T_Chunks_s12  = C_Chunks_s12
type T_Chunks_v10  = (T_Chunks_vIn10 ) -> (T_Chunks_vOut10 )
data T_Chunks_vIn10  = T_Chunks_vIn10 (PP_Doc) (Bool) (String) (String) (String -> String -> String -> Bool -> String) (Bool) (Options) (String) (String) (Map BlockInfo PP_Doc) (PP_Doc)
data T_Chunks_vOut10  = T_Chunks_vOut10 ([[PP_Doc]]) ([[PP_Doc]]) (IO ()) ([String]) (PP_Docs)
{-# NOINLINE sem_Chunks_Cons #-}
sem_Chunks_Cons :: T_Chunk  -> T_Chunks  -> T_Chunks 
sem_Chunks_Cons :: T_Chunk -> T_Chunks -> T_Chunks
sem_Chunks_Cons T_Chunk
arg_hd_ T_Chunks
arg_tl_ = Identity T_Chunks_s11 -> T_Chunks
T_Chunks (T_Chunks_s11 -> Identity T_Chunks_s11
forall (m :: * -> *) a. Monad m => a -> m a
return T_Chunks_s11
st11) where
   {-# NOINLINE st11 #-}
   !st11 :: T_Chunks_s11
st11 = let
      v10 :: T_Chunks_v10 
      v10 :: T_Chunks_v10
v10 = \ !(T_Chunks_vIn10 PP_Doc
_lhsIimportBlocks Bool
_lhsIisDeclOfLet String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Bool
_lhsInested Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) -> ( let
         _hdX8 :: T_Chunk_s8
_hdX8 = Identity T_Chunk_s8 -> T_Chunk_s8
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Chunk -> Identity T_Chunk_s8
attach_T_Chunk (T_Chunk
arg_hd_))
         _tlX11 :: T_Chunks_s11
_tlX11 = Identity T_Chunks_s11 -> T_Chunks_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Chunks -> Identity T_Chunks_s11
attach_T_Chunks (T_Chunks
arg_tl_))
         (T_Chunk_vOut7 [[PP_Doc]]
_hdIappendCommon [[PP_Doc]]
_hdIappendMain IO ()
_hdIgenSems [String]
_hdIimports [PP_Doc]
_hdIpps) = T_Chunk_s8 -> T_Chunk_v7
inv_Chunk_s8 T_Chunk_s8
_hdX8 (PP_Doc
-> Bool
-> String
-> String
-> (String -> String -> String -> Bool -> String)
-> Bool
-> Options
-> String
-> String
-> Map BlockInfo PP_Doc
-> PP_Doc
-> T_Chunk_vIn7
T_Chunk_vIn7 PP_Doc
_hdOimportBlocks Bool
_hdOisDeclOfLet String
_hdOmainFile String
_hdOmainName String -> String -> String -> Bool -> String
_hdOmoduleHeader Bool
_hdOnested Options
_hdOoptions String
_hdOoptionsLine String
_hdOpragmaBlocks Map BlockInfo PP_Doc
_hdOtextBlockMap PP_Doc
_hdOtextBlocks)
         (T_Chunks_vOut10 [[PP_Doc]]
_tlIappendCommon [[PP_Doc]]
_tlIappendMain IO ()
_tlIgenSems [String]
_tlIimports [PP_Doc]
_tlIpps) = T_Chunks_s11 -> T_Chunks_v10
inv_Chunks_s11 T_Chunks_s11
_tlX11 (PP_Doc
-> Bool
-> String
-> String
-> (String -> String -> String -> Bool -> String)
-> Bool
-> Options
-> String
-> String
-> Map BlockInfo PP_Doc
-> PP_Doc
-> T_Chunks_vIn10
T_Chunks_vIn10 PP_Doc
_tlOimportBlocks Bool
_tlOisDeclOfLet String
_tlOmainFile String
_tlOmainName String -> String -> String -> Bool -> String
_tlOmoduleHeader Bool
_tlOnested Options
_tlOoptions String
_tlOoptionsLine String
_tlOpragmaBlocks Map BlockInfo PP_Doc
_tlOtextBlockMap PP_Doc
_tlOtextBlocks)
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule51 [PP_Doc]
_hdIpps [PP_Doc]
_tlIpps
         _lhsOappendCommon :: [[PP_Doc]]
         _lhsOappendCommon :: [[PP_Doc]]
_lhsOappendCommon = [[PP_Doc]] -> [[PP_Doc]] -> [[PP_Doc]]
rule52 [[PP_Doc]]
_hdIappendCommon [[PP_Doc]]
_tlIappendCommon
         _lhsOappendMain :: [[PP_Doc]]
         _lhsOappendMain :: [[PP_Doc]]
_lhsOappendMain = [[PP_Doc]] -> [[PP_Doc]] -> [[PP_Doc]]
rule53 [[PP_Doc]]
_hdIappendMain [[PP_Doc]]
_tlIappendMain
         _lhsOgenSems :: IO ()
         _lhsOgenSems :: IO ()
_lhsOgenSems = IO () -> IO () -> IO ()
rule54 IO ()
_hdIgenSems IO ()
_tlIgenSems
         _lhsOimports :: [String]
         _lhsOimports :: [String]
_lhsOimports = [String] -> [String] -> [String]
rule55 [String]
_hdIimports [String]
_tlIimports
         _hdOimportBlocks :: PP_Doc
_hdOimportBlocks = PP_Doc -> PP_Doc
rule56 PP_Doc
_lhsIimportBlocks
         _hdOisDeclOfLet :: Bool
_hdOisDeclOfLet = Bool -> Bool
rule57 Bool
_lhsIisDeclOfLet
         _hdOmainFile :: String
_hdOmainFile = String -> String
rule58 String
_lhsImainFile
         _hdOmainName :: String
_hdOmainName = String -> String
rule59 String
_lhsImainName
         _hdOmoduleHeader :: String -> String -> String -> Bool -> String
_hdOmoduleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule60 String -> String -> String -> Bool -> String
_lhsImoduleHeader
         _hdOnested :: Bool
_hdOnested = Bool -> Bool
rule61 Bool
_lhsInested
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule62 Options
_lhsIoptions
         _hdOoptionsLine :: String
_hdOoptionsLine = String -> String
rule63 String
_lhsIoptionsLine
         _hdOpragmaBlocks :: String
_hdOpragmaBlocks = String -> String
rule64 String
_lhsIpragmaBlocks
         _hdOtextBlockMap :: Map BlockInfo PP_Doc
_hdOtextBlockMap = Map BlockInfo PP_Doc -> Map BlockInfo PP_Doc
rule65 Map BlockInfo PP_Doc
_lhsItextBlockMap
         _hdOtextBlocks :: PP_Doc
_hdOtextBlocks = PP_Doc -> PP_Doc
rule66 PP_Doc
_lhsItextBlocks
         _tlOimportBlocks :: PP_Doc
_tlOimportBlocks = PP_Doc -> PP_Doc
rule67 PP_Doc
_lhsIimportBlocks
         _tlOisDeclOfLet :: Bool
_tlOisDeclOfLet = Bool -> Bool
rule68 Bool
_lhsIisDeclOfLet
         _tlOmainFile :: String
_tlOmainFile = String -> String
rule69 String
_lhsImainFile
         _tlOmainName :: String
_tlOmainName = String -> String
rule70 String
_lhsImainName
         _tlOmoduleHeader :: String -> String -> String -> Bool -> String
_tlOmoduleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule71 String -> String -> String -> Bool -> String
_lhsImoduleHeader
         _tlOnested :: Bool
_tlOnested = Bool -> Bool
rule72 Bool
_lhsInested
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule73 Options
_lhsIoptions
         _tlOoptionsLine :: String
_tlOoptionsLine = String -> String
rule74 String
_lhsIoptionsLine
         _tlOpragmaBlocks :: String
_tlOpragmaBlocks = String -> String
rule75 String
_lhsIpragmaBlocks
         _tlOtextBlockMap :: Map BlockInfo PP_Doc
_tlOtextBlockMap = Map BlockInfo PP_Doc -> Map BlockInfo PP_Doc
rule76 Map BlockInfo PP_Doc
_lhsItextBlockMap
         _tlOtextBlocks :: PP_Doc
_tlOtextBlocks = PP_Doc -> PP_Doc
rule77 PP_Doc
_lhsItextBlocks
         !__result_ :: T_Chunks_vOut10
__result_ = [[PP_Doc]]
-> [[PP_Doc]] -> IO () -> [String] -> [PP_Doc] -> T_Chunks_vOut10
T_Chunks_vOut10 [[PP_Doc]]
_lhsOappendCommon [[PP_Doc]]
_lhsOappendMain IO ()
_lhsOgenSems [String]
_lhsOimports [PP_Doc]
_lhsOpps
         in T_Chunks_vOut10
__result_ )
     in T_Chunks_v10 -> T_Chunks_s11
C_Chunks_s11 T_Chunks_v10
v10
   {-# INLINE rule51 #-}
   {-# LINE 96 "src-ag/PrintCleanCode.ag" #-}
   rule51 = \ ((_hdIpps) :: PP_Docs) ((_tlIpps) :: PP_Docs) ->
                     {-# LINE 96 "src-ag/PrintCleanCode.ag" #-}
                     _hdIpps ++ _tlIpps
                     {-# LINE 628 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule52 #-}
   rule52 = \ ((_hdIappendCommon) :: [[PP_Doc]]) ((_tlIappendCommon) :: [[PP_Doc]]) ->
     _hdIappendCommon ++ _tlIappendCommon
   {-# INLINE rule53 #-}
   rule53 = \ ((_hdIappendMain) :: [[PP_Doc]]) ((_tlIappendMain) :: [[PP_Doc]]) ->
     _hdIappendMain ++ _tlIappendMain
   {-# INLINE rule54 #-}
   rule54 = \ ((_hdIgenSems) :: IO ()) ((_tlIgenSems) :: IO ()) ->
     _hdIgenSems >> _tlIgenSems
   {-# INLINE rule55 #-}
   rule55 = \ ((_hdIimports) :: [String]) ((_tlIimports) :: [String]) ->
     _hdIimports ++ _tlIimports
   {-# INLINE rule56 #-}
   rule56 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
     _lhsIimportBlocks
   {-# INLINE rule57 #-}
   rule57 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule58 #-}
   rule58 = \ ((_lhsImainFile) :: String) ->
     _lhsImainFile
   {-# INLINE rule59 #-}
   rule59 = \ ((_lhsImainName) :: String) ->
     _lhsImainName
   {-# INLINE rule60 #-}
   rule60 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     _lhsImoduleHeader
   {-# INLINE rule61 #-}
   rule61 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule62 #-}
   rule62 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule63 #-}
   rule63 = \ ((_lhsIoptionsLine) :: String) ->
     _lhsIoptionsLine
   {-# INLINE rule64 #-}
   rule64 = \ ((_lhsIpragmaBlocks) :: String) ->
     _lhsIpragmaBlocks
   {-# INLINE rule65 #-}
   rule65 = \ ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ->
     _lhsItextBlockMap
   {-# INLINE rule66 #-}
   rule66 = \ ((_lhsItextBlocks) :: PP_Doc) ->
     _lhsItextBlocks
   {-# INLINE rule67 #-}
   rule67 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
     _lhsIimportBlocks
   {-# INLINE rule68 #-}
   rule68 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule69 #-}
   rule69 = \ ((_lhsImainFile) :: String) ->
     _lhsImainFile
   {-# INLINE rule70 #-}
   rule70 = \ ((_lhsImainName) :: String) ->
     _lhsImainName
   {-# INLINE rule71 #-}
   rule71 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     _lhsImoduleHeader
   {-# INLINE rule72 #-}
   rule72 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule73 #-}
   rule73 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule74 #-}
   rule74 = \ ((_lhsIoptionsLine) :: String) ->
     _lhsIoptionsLine
   {-# INLINE rule75 #-}
   rule75 = \ ((_lhsIpragmaBlocks) :: String) ->
     _lhsIpragmaBlocks
   {-# INLINE rule76 #-}
   rule76 = \ ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ->
     _lhsItextBlockMap
   {-# INLINE rule77 #-}
   rule77 = \ ((_lhsItextBlocks) :: PP_Doc) ->
     _lhsItextBlocks
{-# NOINLINE sem_Chunks_Nil #-}
sem_Chunks_Nil ::  T_Chunks 
sem_Chunks_Nil :: T_Chunks
sem_Chunks_Nil  = Identity T_Chunks_s11 -> T_Chunks
T_Chunks (T_Chunks_s11 -> Identity T_Chunks_s11
forall (m :: * -> *) a. Monad m => a -> m a
return T_Chunks_s11
st11) where
   {-# NOINLINE st11 #-}
   !st11 :: T_Chunks_s11
st11 = let
      v10 :: T_Chunks_v10 
      v10 :: T_Chunks_v10
v10 = \ !(T_Chunks_vIn10 PP_Doc
_lhsIimportBlocks Bool
_lhsIisDeclOfLet String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Bool
_lhsInested Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) -> ( let
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule78  ()
         _lhsOappendCommon :: [[PP_Doc]]
         _lhsOappendCommon :: [[PP_Doc]]
_lhsOappendCommon = () -> [[PP_Doc]]
forall a. () -> [a]
rule79  ()
         _lhsOappendMain :: [[PP_Doc]]
         _lhsOappendMain :: [[PP_Doc]]
_lhsOappendMain = () -> [[PP_Doc]]
forall a. () -> [a]
rule80  ()
         _lhsOgenSems :: IO ()
         _lhsOgenSems :: IO ()
_lhsOgenSems = () -> IO ()
rule81  ()
         _lhsOimports :: [String]
         _lhsOimports :: [String]
_lhsOimports = () -> [String]
forall a. () -> [a]
rule82  ()
         !__result_ :: T_Chunks_vOut10
__result_ = [[PP_Doc]]
-> [[PP_Doc]] -> IO () -> [String] -> [PP_Doc] -> T_Chunks_vOut10
T_Chunks_vOut10 [[PP_Doc]]
_lhsOappendCommon [[PP_Doc]]
_lhsOappendMain IO ()
_lhsOgenSems [String]
_lhsOimports [PP_Doc]
_lhsOpps
         in T_Chunks_vOut10
__result_ )
     in T_Chunks_v10 -> T_Chunks_s11
C_Chunks_s11 T_Chunks_v10
v10
   {-# INLINE rule78 #-}
   {-# LINE 97 "src-ag/PrintCleanCode.ag" #-}
   rule78 = \  (_ :: ()) ->
                     {-# LINE 97 "src-ag/PrintCleanCode.ag" #-}
                     []
                     {-# LINE 732 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule79 #-}
   rule79 = \  (_ :: ()) ->
     []
   {-# INLINE rule80 #-}
   rule80 = \  (_ :: ()) ->
     []
   {-# INLINE rule81 #-}
   rule81 = \  (_ :: ()) ->
     return ()
   {-# INLINE rule82 #-}
   rule82 = \  (_ :: ()) ->
     []

-- DataAlt -----------------------------------------------------
-- wrapper
data Inh_DataAlt  = Inh_DataAlt { Inh_DataAlt -> Bool
nested_Inh_DataAlt :: !(Bool), Inh_DataAlt -> PP_Doc
strictPre_Inh_DataAlt :: !(PP_Doc) }
data Syn_DataAlt  = Syn_DataAlt { Syn_DataAlt -> PP_Doc
pp_Syn_DataAlt :: !(PP_Doc), Syn_DataAlt -> PP_Doc
ppa_Syn_DataAlt :: !(PP_Doc) }
{-# INLINABLE wrap_DataAlt #-}
wrap_DataAlt :: T_DataAlt  -> Inh_DataAlt  -> (Syn_DataAlt )
wrap_DataAlt :: T_DataAlt -> Inh_DataAlt -> Syn_DataAlt
wrap_DataAlt !(T_DataAlt Identity T_DataAlt_s14
act) !(Inh_DataAlt Bool
_lhsInested PP_Doc
_lhsIstrictPre) =
   Identity Syn_DataAlt -> Syn_DataAlt
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_DataAlt_s14
sem <- Identity T_DataAlt_s14
act
        let arg13 :: T_DataAlt_vIn13
arg13 = Bool -> PP_Doc -> T_DataAlt_vIn13
T_DataAlt_vIn13 Bool
_lhsInested PP_Doc
_lhsIstrictPre
        !(T_DataAlt_vOut13 PP_Doc
_lhsOpp PP_Doc
_lhsOppa) <- T_DataAlt_vOut13 -> Identity T_DataAlt_vOut13
forall (m :: * -> *) a. Monad m => a -> m a
return (T_DataAlt_s14 -> T_DataAlt_v13
inv_DataAlt_s14 T_DataAlt_s14
sem T_DataAlt_vIn13
arg13)
        Syn_DataAlt -> Identity Syn_DataAlt
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> PP_Doc -> Syn_DataAlt
Syn_DataAlt PP_Doc
_lhsOpp PP_Doc
_lhsOppa)
   )

-- cata
{-# NOINLINE sem_DataAlt #-}
sem_DataAlt :: DataAlt  -> T_DataAlt 
sem_DataAlt :: DataAlt -> T_DataAlt
sem_DataAlt ( DataAlt !String
name_ Types
args_ ) = String -> T_Types -> T_DataAlt
sem_DataAlt_DataAlt String
name_ ( Types -> T_Types
sem_Types Types
args_ )
sem_DataAlt ( Record !String
name_ NamedTypes
args_ ) = String -> T_NamedTypes -> T_DataAlt
sem_DataAlt_Record String
name_ ( NamedTypes -> T_NamedTypes
sem_NamedTypes NamedTypes
args_ )

-- semantic domain
newtype T_DataAlt  = T_DataAlt {
                               T_DataAlt -> Identity T_DataAlt_s14
attach_T_DataAlt :: Identity (T_DataAlt_s14 )
                               }
newtype T_DataAlt_s14  = C_DataAlt_s14 {
                                       T_DataAlt_s14 -> T_DataAlt_v13
inv_DataAlt_s14 :: (T_DataAlt_v13 )
                                       }
data T_DataAlt_s15  = C_DataAlt_s15
type T_DataAlt_v13  = (T_DataAlt_vIn13 ) -> (T_DataAlt_vOut13 )
data T_DataAlt_vIn13  = T_DataAlt_vIn13 (Bool) (PP_Doc)
data T_DataAlt_vOut13  = T_DataAlt_vOut13 (PP_Doc) (PP_Doc)
{-# NOINLINE sem_DataAlt_DataAlt #-}
sem_DataAlt_DataAlt :: (String) -> T_Types  -> T_DataAlt 
sem_DataAlt_DataAlt :: String -> T_Types -> T_DataAlt
sem_DataAlt_DataAlt !String
arg_name_ T_Types
arg_args_ = Identity T_DataAlt_s14 -> T_DataAlt
T_DataAlt (T_DataAlt_s14 -> Identity T_DataAlt_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_DataAlt_s14
st14) where
   {-# NOINLINE st14 #-}
   !st14 :: T_DataAlt_s14
st14 = let
      v13 :: T_DataAlt_v13 
      v13 :: T_DataAlt_v13
v13 = \ !(T_DataAlt_vIn13 Bool
_lhsInested PP_Doc
_lhsIstrictPre) -> ( let
         _argsX53 :: T_Types_s53
_argsX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_args_))
         (T_Types_vOut52 Types
_argsIcopy [PP_Doc]
_argsIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_argsX53 (Bool -> T_Types_vIn52
T_Types_vIn52 Bool
_argsOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc -> String -> PP_Doc
rule83 [PP_Doc]
_argsIpps PP_Doc
_lhsIstrictPre String
arg_name_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule84  ()
         _argsOnested :: Bool
_argsOnested = Bool -> Bool
rule85 Bool
_lhsInested
         !__result_ :: T_DataAlt_vOut13
__result_ = PP_Doc -> PP_Doc -> T_DataAlt_vOut13
T_DataAlt_vOut13 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_DataAlt_vOut13
__result_ )
     in T_DataAlt_v13 -> T_DataAlt_s14
C_DataAlt_s14 T_DataAlt_v13
v13
   {-# INLINE rule83 #-}
   {-# LINE 231 "src-ag/PrintCleanCode.ag" #-}
   rule83 = \ ((_argsIpps) :: PP_Docs) ((_lhsIstrictPre) :: PP_Doc) name_ ->
                               {-# LINE 231 "src-ag/PrintCleanCode.ag" #-}
                               name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens) _argsIpps)
                               {-# LINE 799 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule84 #-}
   {-# LINE 232 "src-ag/PrintCleanCode.ag" #-}
   rule84 = \  (_ :: ()) ->
                               {-# LINE 232 "src-ag/PrintCleanCode.ag" #-}
                               empty
                               {-# LINE 805 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule85 #-}
   rule85 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_DataAlt_Record #-}
sem_DataAlt_Record :: (String) -> T_NamedTypes  -> T_DataAlt 
sem_DataAlt_Record :: String -> T_NamedTypes -> T_DataAlt
sem_DataAlt_Record !String
arg_name_ T_NamedTypes
arg_args_ = Identity T_DataAlt_s14 -> T_DataAlt
T_DataAlt (T_DataAlt_s14 -> Identity T_DataAlt_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_DataAlt_s14
st14) where
   {-# NOINLINE st14 #-}
   !st14 :: T_DataAlt_s14
st14 = let
      v13 :: T_DataAlt_v13 
      v13 :: T_DataAlt_v13
v13 = \ !(T_DataAlt_vIn13 Bool
_lhsInested PP_Doc
_lhsIstrictPre) -> ( let
         _argsX38 :: T_NamedTypes_s38
_argsX38 = Identity T_NamedTypes_s38 -> T_NamedTypes_s38
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NamedTypes -> Identity T_NamedTypes_s38
attach_T_NamedTypes (T_NamedTypes
arg_args_))
         (T_NamedTypes_vOut37 [PP_Doc]
_argsIppas [PP_Doc]
_argsIpps) = T_NamedTypes_s38 -> T_NamedTypes_v37
inv_NamedTypes_s38 T_NamedTypes_s38
_argsX38 (Bool -> T_NamedTypes_vIn37
T_NamedTypes_vIn37 Bool
_argsOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc -> String -> PP_Doc
rule86 [PP_Doc]
_argsIpps PP_Doc
_lhsIstrictPre String
arg_name_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = [PP_Doc] -> String -> PP_Doc
rule87 [PP_Doc]
_argsIppas String
arg_name_
         _argsOnested :: Bool
_argsOnested = Bool -> Bool
rule88 Bool
_lhsInested
         !__result_ :: T_DataAlt_vOut13
__result_ = PP_Doc -> PP_Doc -> T_DataAlt_vOut13
T_DataAlt_vOut13 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_DataAlt_vOut13
__result_ )
     in T_DataAlt_v13 -> T_DataAlt_s14
C_DataAlt_s14 T_DataAlt_v13
v13
   {-# INLINE rule86 #-}
   {-# LINE 233 "src-ag/PrintCleanCode.ag" #-}
   rule86 = \ ((_argsIpps) :: PP_Docs) ((_lhsIstrictPre) :: PP_Doc) name_ ->
                               {-# LINE 233 "src-ag/PrintCleanCode.ag" #-}
                               name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens) _argsIpps)
                               {-# LINE 831 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule87 #-}
   {-# LINE 234 "src-ag/PrintCleanCode.ag" #-}
   rule87 = \ ((_argsIppas) :: PP_Docs) name_ ->
                               {-# LINE 234 "src-ag/PrintCleanCode.ag" #-}
                               let f n d = d >#< (pp_block ("(" ++ name_) ")" "" $ map pp (ppat n))
                                           >#< pp "=" >#< pp "x"
                                   ppat n = replicate (length _argsIppas - n - 1) (pp " _") ++ [pp " x"] ++ replicate n (pp " _")
                               in  snd $ foldr (\x (n, xs) -> (n + 1, f n x >-< xs)) (0, empty) _argsIppas
                               {-# LINE 840 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule88 #-}
   rule88 = \ ((_lhsInested) :: Bool) ->
     _lhsInested

-- DataAlts ----------------------------------------------------
-- wrapper
data Inh_DataAlts  = Inh_DataAlts { Inh_DataAlts -> Bool
nested_Inh_DataAlts :: !(Bool), Inh_DataAlts -> PP_Doc
strictPre_Inh_DataAlts :: !(PP_Doc) }
data Syn_DataAlts  = Syn_DataAlts { Syn_DataAlts -> [PP_Doc]
ppas_Syn_DataAlts :: !(PP_Docs), Syn_DataAlts -> [PP_Doc]
pps_Syn_DataAlts :: !(PP_Docs) }
{-# INLINABLE wrap_DataAlts #-}
wrap_DataAlts :: T_DataAlts  -> Inh_DataAlts  -> (Syn_DataAlts )
wrap_DataAlts :: T_DataAlts -> Inh_DataAlts -> Syn_DataAlts
wrap_DataAlts !(T_DataAlts Identity T_DataAlts_s17
act) !(Inh_DataAlts Bool
_lhsInested PP_Doc
_lhsIstrictPre) =
   Identity Syn_DataAlts -> Syn_DataAlts
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_DataAlts_s17
sem <- Identity T_DataAlts_s17
act
        let arg16 :: T_DataAlts_vIn16
arg16 = Bool -> PP_Doc -> T_DataAlts_vIn16
T_DataAlts_vIn16 Bool
_lhsInested PP_Doc
_lhsIstrictPre
        !(T_DataAlts_vOut16 [PP_Doc]
_lhsOppas [PP_Doc]
_lhsOpps) <- T_DataAlts_vOut16 -> Identity T_DataAlts_vOut16
forall (m :: * -> *) a. Monad m => a -> m a
return (T_DataAlts_s17 -> T_DataAlts_v16
inv_DataAlts_s17 T_DataAlts_s17
sem T_DataAlts_vIn16
arg16)
        Syn_DataAlts -> Identity Syn_DataAlts
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> [PP_Doc] -> Syn_DataAlts
Syn_DataAlts [PP_Doc]
_lhsOppas [PP_Doc]
_lhsOpps)
   )

-- cata
{-# NOINLINE sem_DataAlts #-}
sem_DataAlts :: DataAlts  -> T_DataAlts 
sem_DataAlts :: DataAlts -> T_DataAlts
sem_DataAlts DataAlts
list = (T_DataAlt -> T_DataAlts -> T_DataAlts)
-> T_DataAlts -> [T_DataAlt] -> T_DataAlts
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_DataAlt -> T_DataAlts -> T_DataAlts
sem_DataAlts_Cons T_DataAlts
sem_DataAlts_Nil ((DataAlt -> T_DataAlt) -> DataAlts -> [T_DataAlt]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map DataAlt -> T_DataAlt
sem_DataAlt DataAlts
list)

-- semantic domain
newtype T_DataAlts  = T_DataAlts {
                                 T_DataAlts -> Identity T_DataAlts_s17
attach_T_DataAlts :: Identity (T_DataAlts_s17 )
                                 }
newtype T_DataAlts_s17  = C_DataAlts_s17 {
                                         T_DataAlts_s17 -> T_DataAlts_v16
inv_DataAlts_s17 :: (T_DataAlts_v16 )
                                         }
data T_DataAlts_s18  = C_DataAlts_s18
type T_DataAlts_v16  = (T_DataAlts_vIn16 ) -> (T_DataAlts_vOut16 )
data T_DataAlts_vIn16  = T_DataAlts_vIn16 (Bool) (PP_Doc)
data T_DataAlts_vOut16  = T_DataAlts_vOut16 (PP_Docs) (PP_Docs)
{-# NOINLINE sem_DataAlts_Cons #-}
sem_DataAlts_Cons :: T_DataAlt  -> T_DataAlts  -> T_DataAlts 
sem_DataAlts_Cons :: T_DataAlt -> T_DataAlts -> T_DataAlts
sem_DataAlts_Cons T_DataAlt
arg_hd_ T_DataAlts
arg_tl_ = Identity T_DataAlts_s17 -> T_DataAlts
T_DataAlts (T_DataAlts_s17 -> Identity T_DataAlts_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_DataAlts_s17
st17) where
   {-# NOINLINE st17 #-}
   !st17 :: T_DataAlts_s17
st17 = let
      v16 :: T_DataAlts_v16 
      v16 :: T_DataAlts_v16
v16 = \ !(T_DataAlts_vIn16 Bool
_lhsInested PP_Doc
_lhsIstrictPre) -> ( let
         _hdX14 :: T_DataAlt_s14
_hdX14 = Identity T_DataAlt_s14 -> T_DataAlt_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_DataAlt -> Identity T_DataAlt_s14
attach_T_DataAlt (T_DataAlt
arg_hd_))
         _tlX17 :: T_DataAlts_s17
_tlX17 = Identity T_DataAlts_s17 -> T_DataAlts_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_DataAlts -> Identity T_DataAlts_s17
attach_T_DataAlts (T_DataAlts
arg_tl_))
         (T_DataAlt_vOut13 PP_Doc
_hdIpp PP_Doc
_hdIppa) = T_DataAlt_s14 -> T_DataAlt_v13
inv_DataAlt_s14 T_DataAlt_s14
_hdX14 (Bool -> PP_Doc -> T_DataAlt_vIn13
T_DataAlt_vIn13 Bool
_hdOnested PP_Doc
_hdOstrictPre)
         (T_DataAlts_vOut16 [PP_Doc]
_tlIppas [PP_Doc]
_tlIpps) = T_DataAlts_s17 -> T_DataAlts_v16
inv_DataAlts_s17 T_DataAlts_s17
_tlX17 (Bool -> PP_Doc -> T_DataAlts_vIn16
T_DataAlts_vIn16 Bool
_tlOnested PP_Doc
_tlOstrictPre)
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule89 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
         _lhsOppas :: PP_Docs
         _lhsOppas :: [PP_Doc]
_lhsOppas = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule90 PP_Doc
_hdIppa [PP_Doc]
_tlIppas
         _hdOnested :: Bool
_hdOnested = Bool -> Bool
rule91 Bool
_lhsInested
         _hdOstrictPre :: PP_Doc
_hdOstrictPre = PP_Doc -> PP_Doc
rule92 PP_Doc
_lhsIstrictPre
         _tlOnested :: Bool
_tlOnested = Bool -> Bool
rule93 Bool
_lhsInested
         _tlOstrictPre :: PP_Doc
_tlOstrictPre = PP_Doc -> PP_Doc
rule94 PP_Doc
_lhsIstrictPre
         !__result_ :: T_DataAlts_vOut16
__result_ = [PP_Doc] -> [PP_Doc] -> T_DataAlts_vOut16
T_DataAlts_vOut16 [PP_Doc]
_lhsOppas [PP_Doc]
_lhsOpps
         in T_DataAlts_vOut16
__result_ )
     in T_DataAlts_v16 -> T_DataAlts_s17
C_DataAlts_s17 T_DataAlts_v16
v16
   {-# INLINE rule89 #-}
   {-# LINE 76 "src-ag/PrintCleanCode.ag" #-}
   rule89 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
                      {-# LINE 76 "src-ag/PrintCleanCode.ag" #-}
                      _hdIpp : _tlIpps
                      {-# LINE 902 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule90 #-}
   {-# LINE 77 "src-ag/PrintCleanCode.ag" #-}
   rule90 = \ ((_hdIppa) :: PP_Doc) ((_tlIppas) :: PP_Docs) ->
                      {-# LINE 77 "src-ag/PrintCleanCode.ag" #-}
                      _hdIppa : _tlIppas
                      {-# LINE 908 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule91 #-}
   rule91 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule92 #-}
   rule92 = \ ((_lhsIstrictPre) :: PP_Doc) ->
     _lhsIstrictPre
   {-# INLINE rule93 #-}
   rule93 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule94 #-}
   rule94 = \ ((_lhsIstrictPre) :: PP_Doc) ->
     _lhsIstrictPre
{-# NOINLINE sem_DataAlts_Nil #-}
sem_DataAlts_Nil ::  T_DataAlts 
sem_DataAlts_Nil :: T_DataAlts
sem_DataAlts_Nil  = Identity T_DataAlts_s17 -> T_DataAlts
T_DataAlts (T_DataAlts_s17 -> Identity T_DataAlts_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_DataAlts_s17
st17) where
   {-# NOINLINE st17 #-}
   !st17 :: T_DataAlts_s17
st17 = let
      v16 :: T_DataAlts_v16 
      v16 :: T_DataAlts_v16
v16 = \ !(T_DataAlts_vIn16 Bool
_lhsInested PP_Doc
_lhsIstrictPre) -> ( let
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule95  ()
         _lhsOppas :: PP_Docs
         _lhsOppas :: [PP_Doc]
_lhsOppas = () -> [PP_Doc]
forall a. () -> [a]
rule96  ()
         !__result_ :: T_DataAlts_vOut16
__result_ = [PP_Doc] -> [PP_Doc] -> T_DataAlts_vOut16
T_DataAlts_vOut16 [PP_Doc]
_lhsOppas [PP_Doc]
_lhsOpps
         in T_DataAlts_vOut16
__result_ )
     in T_DataAlts_v16 -> T_DataAlts_s17
C_DataAlts_s17 T_DataAlts_v16
v16
   {-# INLINE rule95 #-}
   {-# LINE 78 "src-ag/PrintCleanCode.ag" #-}
   rule95 = \  (_ :: ()) ->
                      {-# LINE 78 "src-ag/PrintCleanCode.ag" #-}
                      []
                      {-# LINE 940 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule96 #-}
   {-# LINE 79 "src-ag/PrintCleanCode.ag" #-}
   rule96 = \  (_ :: ()) ->
                      {-# LINE 79 "src-ag/PrintCleanCode.ag" #-}
                      []
                      {-# LINE 946 "src-generated/PrintCleanCode.hs" #-}

-- Decl --------------------------------------------------------
-- wrapper
data Inh_Decl  = Inh_Decl { Inh_Decl -> Bool
isDeclOfLet_Inh_Decl :: !(Bool), Inh_Decl -> Bool
nested_Inh_Decl :: !(Bool), Inh_Decl -> Options
options_Inh_Decl :: !(Options), Inh_Decl -> String
outputfile_Inh_Decl :: !(String) }
data Syn_Decl  = Syn_Decl { Syn_Decl -> PP_Doc
pp_Syn_Decl :: !(PP_Doc), Syn_Decl -> PP_Doc
ppa_Syn_Decl :: !(PP_Doc) }
{-# INLINABLE wrap_Decl #-}
wrap_Decl :: T_Decl  -> Inh_Decl  -> (Syn_Decl )
wrap_Decl :: T_Decl -> Inh_Decl -> Syn_Decl
wrap_Decl !(T_Decl Identity T_Decl_s20
act) !(Inh_Decl Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) =
   Identity Syn_Decl -> Syn_Decl
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Decl_s20
sem <- Identity T_Decl_s20
act
        let arg19 :: T_Decl_vIn19
arg19 = Bool -> Bool -> Options -> String -> T_Decl_vIn19
T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile
        !(T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa) <- T_Decl_vOut19 -> Identity T_Decl_vOut19
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Decl_s20 -> T_Decl_v19
inv_Decl_s20 T_Decl_s20
sem T_Decl_vIn19
arg19)
        Syn_Decl -> Identity Syn_Decl
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> PP_Doc -> Syn_Decl
Syn_Decl PP_Doc
_lhsOpp PP_Doc
_lhsOppa)
   )

-- cata
{-# NOINLINE sem_Decl #-}
sem_Decl :: Decl  -> T_Decl 
sem_Decl :: Decl -> T_Decl
sem_Decl ( Decl Lhs
left_ Expr
rhs_ !Set String
binds_ !Set String
uses_ ) = T_Lhs -> T_Expr -> Set String -> Set String -> T_Decl
sem_Decl_Decl ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ ) Set String
binds_ Set String
uses_
sem_Decl ( Bind Lhs
left_ Expr
rhs_ ) = T_Lhs -> T_Expr -> T_Decl
sem_Decl_Bind ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )
sem_Decl ( BindLet Lhs
left_ Expr
rhs_ ) = T_Lhs -> T_Expr -> T_Decl
sem_Decl_BindLet ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )
sem_Decl ( Data !String
name_ ![String]
params_ DataAlts
alts_ !Bool
strict_ ![String]
derivings_ ) = String -> [String] -> T_DataAlts -> Bool -> [String] -> T_Decl
sem_Decl_Data String
name_ [String]
params_ ( DataAlts -> T_DataAlts
sem_DataAlts DataAlts
alts_ ) Bool
strict_ [String]
derivings_
sem_Decl ( NewType !String
name_ ![String]
params_ !String
con_ Type
tp_ ) = String -> [String] -> String -> T_Type -> T_Decl
sem_Decl_NewType String
name_ [String]
params_ String
con_ ( Type -> T_Type
sem_Type Type
tp_ )
sem_Decl ( Type !String
name_ ![String]
params_ Type
tp_ ) = String -> [String] -> T_Type -> T_Decl
sem_Decl_Type String
name_ [String]
params_ ( Type -> T_Type
sem_Type Type
tp_ )
sem_Decl ( TSig !String
name_ Type
tp_ ) = String -> T_Type -> T_Decl
sem_Decl_TSig String
name_ ( Type -> T_Type
sem_Type Type
tp_ )
sem_Decl ( Comment !String
txt_ ) = String -> T_Decl
sem_Decl_Comment String
txt_
sem_Decl ( PragmaDecl !String
txt_ ) = String -> T_Decl
sem_Decl_PragmaDecl String
txt_
sem_Decl ( Resume !Bool
monadic_ !String
nt_ Lhs
left_ Expr
rhs_ ) = Bool -> String -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_Resume Bool
monadic_ String
nt_ ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )
sem_Decl ( EvalDecl !String
nt_ Lhs
left_ Expr
rhs_ ) = String -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_EvalDecl String
nt_ ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )

-- semantic domain
newtype T_Decl  = T_Decl {
                         T_Decl -> Identity T_Decl_s20
attach_T_Decl :: Identity (T_Decl_s20 )
                         }
newtype T_Decl_s20  = C_Decl_s20 {
                                 T_Decl_s20 -> T_Decl_v19
inv_Decl_s20 :: (T_Decl_v19 )
                                 }
data T_Decl_s21  = C_Decl_s21
type T_Decl_v19  = (T_Decl_vIn19 ) -> (T_Decl_vOut19 )
data T_Decl_vIn19  = T_Decl_vIn19 (Bool) (Bool) (Options) (String)
data T_Decl_vOut19  = T_Decl_vOut19 (PP_Doc) (PP_Doc)
{-# NOINLINE sem_Decl_Decl #-}
sem_Decl_Decl :: T_Lhs  -> T_Expr  -> (Set String) -> (Set String) -> T_Decl 
sem_Decl_Decl :: T_Lhs -> T_Expr -> Set String -> Set String -> T_Decl
sem_Decl_Decl T_Lhs
arg_left_ T_Expr
arg_rhs_ Set String
_ Set String
_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
         _rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
         (T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Bool -> Bool -> Options -> String -> T_Lhs_vIn31
T_Lhs_vIn31 Bool
_leftOisDeclOfLet Bool
_leftOnested Options
_leftOoptions String
_leftOoutputfile)
         (T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_rhsOnested Options
_rhsOoptions String
_rhsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule97 PP_Doc
_leftIpp PP_Doc
_rhsIpp
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule98  ()
         _leftOisDeclOfLet :: Bool
_leftOisDeclOfLet = Bool -> Bool
rule99 Bool
_lhsIisDeclOfLet
         _leftOnested :: Bool
_leftOnested = Bool -> Bool
rule100 Bool
_lhsInested
         _leftOoptions :: Options
_leftOoptions = Options -> Options
rule101 Options
_lhsIoptions
         _leftOoutputfile :: String
_leftOoutputfile = String -> String
rule102 String
_lhsIoutputfile
         _rhsOnested :: Bool
_rhsOnested = Bool -> Bool
rule103 Bool
_lhsInested
         _rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule104 Options
_lhsIoptions
         _rhsOoutputfile :: String
_rhsOoutputfile = String -> String
rule105 String
_lhsIoutputfile
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule97 #-}
   {-# LINE 114 "src-ag/PrintCleanCode.ag" #-}
   rule97 = \ ((_leftIpp) :: PP_Doc) ((_rhsIpp) :: PP_Doc) ->
                               {-# LINE 114 "src-ag/PrintCleanCode.ag" #-}
                               _leftIpp >#< "="
                               >-< indent 4 _rhsIpp
                               {-# LINE 1019 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule98 #-}
   rule98 = \  (_ :: ()) ->
     empty
   {-# INLINE rule99 #-}
   rule99 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule100 #-}
   rule100 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule101 #-}
   rule101 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule102 #-}
   rule102 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule103 #-}
   rule103 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule104 #-}
   rule104 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule105 #-}
   rule105 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Decl_Bind #-}
sem_Decl_Bind :: T_Lhs  -> T_Expr  -> T_Decl 
sem_Decl_Bind :: T_Lhs -> T_Expr -> T_Decl
sem_Decl_Bind T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
         _rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
         (T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Bool -> Bool -> Options -> String -> T_Lhs_vIn31
T_Lhs_vIn31 Bool
_leftOisDeclOfLet Bool
_leftOnested Options
_leftOoptions String
_leftOoutputfile)
         (T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_rhsOnested Options
_rhsOoptions String
_rhsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule106 PP_Doc
_leftIpp PP_Doc
_rhsIpp
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule107  ()
         _leftOisDeclOfLet :: Bool
_leftOisDeclOfLet = Bool -> Bool
rule108 Bool
_lhsIisDeclOfLet
         _leftOnested :: Bool
_leftOnested = Bool -> Bool
rule109 Bool
_lhsInested
         _leftOoptions :: Options
_leftOoptions = Options -> Options
rule110 Options
_lhsIoptions
         _leftOoutputfile :: String
_leftOoutputfile = String -> String
rule111 String
_lhsIoutputfile
         _rhsOnested :: Bool
_rhsOnested = Bool -> Bool
rule112 Bool
_lhsInested
         _rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule113 Options
_lhsIoptions
         _rhsOoutputfile :: String
_rhsOoutputfile = String -> String
rule114 String
_lhsIoutputfile
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule106 #-}
   {-# LINE 116 "src-ag/PrintCleanCode.ag" #-}
   rule106 = \ ((_leftIpp) :: PP_Doc) ((_rhsIpp) :: PP_Doc) ->
                               {-# LINE 116 "src-ag/PrintCleanCode.ag" #-}
                               _leftIpp >#< "<-" >#< _rhsIpp
                               {-# LINE 1074 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule107 #-}
   rule107 = \  (_ :: ()) ->
     empty
   {-# INLINE rule108 #-}
   rule108 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule109 #-}
   rule109 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule110 #-}
   rule110 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule111 #-}
   rule111 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule112 #-}
   rule112 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule113 #-}
   rule113 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule114 #-}
   rule114 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Decl_BindLet #-}
sem_Decl_BindLet :: T_Lhs  -> T_Expr  -> T_Decl 
sem_Decl_BindLet :: T_Lhs -> T_Expr -> T_Decl
sem_Decl_BindLet T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
         _rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
         (T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Bool -> Bool -> Options -> String -> T_Lhs_vIn31
T_Lhs_vIn31 Bool
_leftOisDeclOfLet Bool
_leftOnested Options
_leftOoptions String
_leftOoutputfile)
         (T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_rhsOnested Options
_rhsOoptions String
_rhsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule115 PP_Doc
_leftIpp PP_Doc
_rhsIpp
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule116  ()
         _leftOisDeclOfLet :: Bool
_leftOisDeclOfLet = Bool -> Bool
rule117 Bool
_lhsIisDeclOfLet
         _leftOnested :: Bool
_leftOnested = Bool -> Bool
rule118 Bool
_lhsInested
         _leftOoptions :: Options
_leftOoptions = Options -> Options
rule119 Options
_lhsIoptions
         _leftOoutputfile :: String
_leftOoutputfile = String -> String
rule120 String
_lhsIoutputfile
         _rhsOnested :: Bool
_rhsOnested = Bool -> Bool
rule121 Bool
_lhsInested
         _rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule122 Options
_lhsIoptions
         _rhsOoutputfile :: String
_rhsOoutputfile = String -> String
rule123 String
_lhsIoutputfile
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule115 #-}
   {-# LINE 117 "src-ag/PrintCleanCode.ag" #-}
   rule115 = \ ((_leftIpp) :: PP_Doc) ((_rhsIpp) :: PP_Doc) ->
                               {-# LINE 117 "src-ag/PrintCleanCode.ag" #-}
                               "let" >#< _leftIpp >#< "=" >#< _rhsIpp
                               {-# LINE 1129 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule116 #-}
   rule116 = \  (_ :: ()) ->
     empty
   {-# INLINE rule117 #-}
   rule117 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule118 #-}
   rule118 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule119 #-}
   rule119 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule120 #-}
   rule120 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule121 #-}
   rule121 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule122 #-}
   rule122 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule123 #-}
   rule123 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Decl_Data #-}
sem_Decl_Data :: (String) -> ([String]) -> T_DataAlts  -> (Bool) -> ([String]) -> T_Decl 
sem_Decl_Data :: String -> [String] -> T_DataAlts -> Bool -> [String] -> T_Decl
sem_Decl_Data !String
arg_name_ ![String]
arg_params_ T_DataAlts
arg_alts_ !Bool
arg_strict_ ![String]
arg_derivings_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _altsX17 :: T_DataAlts_s17
_altsX17 = Identity T_DataAlts_s17 -> T_DataAlts_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_DataAlts -> Identity T_DataAlts_s17
attach_T_DataAlts (T_DataAlts
arg_alts_))
         (T_DataAlts_vOut16 [PP_Doc]
_altsIppas [PP_Doc]
_altsIpps) = T_DataAlts_s17 -> T_DataAlts_v16
inv_DataAlts_s17 T_DataAlts_s17
_altsX17 (Bool -> PP_Doc -> T_DataAlts_vIn16
T_DataAlts_vIn16 Bool
_altsOnested PP_Doc
_altsOstrictPre)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> [PP_Doc] -> [String] -> String -> [String] -> PP_Doc
rule124 [PP_Doc]
_altsIppas [PP_Doc]
_altsIpps [String]
arg_derivings_ String
arg_name_ [String]
arg_params_
         _altsOstrictPre :: PP_Doc
_altsOstrictPre = Bool -> PP_Doc
rule125 Bool
arg_strict_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule126  ()
         _altsOnested :: Bool
_altsOnested = Bool -> Bool
rule127 Bool
_lhsInested
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule124 #-}
   {-# LINE 118 "src-ag/PrintCleanCode.ag" #-}
   rule124 = \ ((_altsIppas) :: PP_Docs) ((_altsIpps) :: PP_Docs) derivings_ name_ params_ ->
                               {-# LINE 118 "src-ag/PrintCleanCode.ag" #-}
                               "::" >#< hv_sp (name_ : params_)
                               >#<  ( case _altsIpps of
                                            [] -> empty
                                            (x:xs) ->              "=" >#<  x
                                                   >-< vlist (map ("|" >#<) xs)
                                       >-< if null derivings_
                                              then empty
                                              else "deriving" >#< ppTuple False (map text derivings_)
                                    )
                               >-< foldr (>-<) empty _altsIppas
                               {-# LINE 1186 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule125 #-}
   {-# LINE 346 "src-ag/PrintCleanCode.ag" #-}
   rule125 = \ strict_ ->
                            {-# LINE 346 "src-ag/PrintCleanCode.ag" #-}
                            if strict_ then pp "!" else empty
                            {-# LINE 1192 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule126 #-}
   rule126 = \  (_ :: ()) ->
     empty
   {-# INLINE rule127 #-}
   rule127 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Decl_NewType #-}
sem_Decl_NewType :: (String) -> ([String]) -> (String) -> T_Type  -> T_Decl 
sem_Decl_NewType :: String -> [String] -> String -> T_Type -> T_Decl
sem_Decl_NewType !String
arg_name_ ![String]
arg_params_ !String
arg_con_ T_Type
arg_tp_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
         (T_Type_vOut49 Type
_tpIcopy PP_Doc
_tpIpp Int
_tpIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_tpOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> String -> [String] -> PP_Doc
rule128 PP_Doc
_tpIpp String
arg_con_ String
arg_name_ [String]
arg_params_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule129  ()
         _tpOnested :: Bool
_tpOnested = Bool -> Bool
rule130 Bool
_lhsInested
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule128 #-}
   {-# LINE 129 "src-ag/PrintCleanCode.ag" #-}
   rule128 = \ ((_tpIpp) :: PP_Doc) con_ name_ params_ ->
                               {-# LINE 129 "src-ag/PrintCleanCode.ag" #-}
                               "::" >#< hv_sp (name_ : params_) >#< "=" >#< con_ >#< pp_parens _tpIpp
                               {-# LINE 1221 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule129 #-}
   rule129 = \  (_ :: ()) ->
     empty
   {-# INLINE rule130 #-}
   rule130 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Decl_Type #-}
sem_Decl_Type :: (String) -> ([String]) -> T_Type  -> T_Decl 
sem_Decl_Type :: String -> [String] -> T_Type -> T_Decl
sem_Decl_Type !String
arg_name_ ![String]
arg_params_ T_Type
arg_tp_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
         (T_Type_vOut49 Type
_tpIcopy PP_Doc
_tpIpp Int
_tpIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_tpOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> [String] -> PP_Doc
rule131 PP_Doc
_tpIpp String
arg_name_ [String]
arg_params_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule132  ()
         _tpOnested :: Bool
_tpOnested = Bool -> Bool
rule133 Bool
_lhsInested
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule131 #-}
   {-# LINE 130 "src-ag/PrintCleanCode.ag" #-}
   rule131 = \ ((_tpIpp) :: PP_Doc) name_ params_ ->
                               {-# LINE 130 "src-ag/PrintCleanCode.ag" #-}
                               "::" >#< hv_sp (name_ : params_) >#< ":==" >#<  _tpIpp
                               {-# LINE 1250 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule132 #-}
   rule132 = \  (_ :: ()) ->
     empty
   {-# INLINE rule133 #-}
   rule133 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Decl_TSig #-}
sem_Decl_TSig :: (String) -> T_Type  -> T_Decl 
sem_Decl_TSig :: String -> T_Type -> T_Decl
sem_Decl_TSig !String
arg_name_ T_Type
arg_tp_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
         (T_Type_vOut49 Type
_tpIcopy PP_Doc
_tpIpp Int
_tpIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_tpOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> PP_Doc
rule134 PP_Doc
_tpIpp String
arg_name_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule135  ()
         _tpOnested :: Bool
_tpOnested = Bool -> Bool
rule136 Bool
_lhsInested
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule134 #-}
   {-# LINE 131 "src-ag/PrintCleanCode.ag" #-}
   rule134 = \ ((_tpIpp) :: PP_Doc) name_ ->
                               {-# LINE 131 "src-ag/PrintCleanCode.ag" #-}
                               name_ >#< "::" >#< _tpIpp
                               {-# LINE 1279 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule135 #-}
   rule135 = \  (_ :: ()) ->
     empty
   {-# INLINE rule136 #-}
   rule136 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Decl_Comment #-}
sem_Decl_Comment :: (String) -> T_Decl 
sem_Decl_Comment :: String -> T_Decl
sem_Decl_Comment !String
arg_txt_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = String -> PP_Doc
rule137 String
arg_txt_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule138  ()
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule137 #-}
   {-# LINE 132 "src-ag/PrintCleanCode.ag" #-}
   rule137 = \ txt_ ->
                               {-# LINE 132 "src-ag/PrintCleanCode.ag" #-}
                               if '\n' `elem` txt_
                                 then "/*" >-< vlist (lines txt_) >-< "*/"
                                 else "//" >#< txt_
                               {-# LINE 1307 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule138 #-}
   rule138 = \  (_ :: ()) ->
     empty
{-# NOINLINE sem_Decl_PragmaDecl #-}
sem_Decl_PragmaDecl :: (String) -> T_Decl 
sem_Decl_PragmaDecl :: String -> T_Decl
sem_Decl_PragmaDecl !String
arg_txt_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = String -> PP_Doc
rule139 String
arg_txt_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule140  ()
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule139 #-}
   {-# LINE 135 "src-ag/PrintCleanCode.ag" #-}
   rule139 = \ txt_ ->
                               {-# LINE 135 "src-ag/PrintCleanCode.ag" #-}
                               "/*#" >#< text txt_ >#< "#*/"
                               {-# LINE 1330 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule140 #-}
   rule140 = \  (_ :: ()) ->
     empty
{-# NOINLINE sem_Decl_Resume #-}
sem_Decl_Resume :: (Bool) -> (String) -> T_Lhs  -> T_Expr  -> T_Decl 
sem_Decl_Resume :: Bool -> String -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_Resume !Bool
arg_monadic_ String
_ T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
         _rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
         (T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Bool -> Bool -> Options -> String -> T_Lhs_vIn31
T_Lhs_vIn31 Bool
_leftOisDeclOfLet Bool
_leftOnested Options
_leftOoptions String
_leftOoutputfile)
         (T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_rhsOnested Options
_rhsOoptions String
_rhsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> Bool -> PP_Doc
rule141 PP_Doc
_leftIpp PP_Doc
_rhsIpp Bool
arg_monadic_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule142  ()
         _leftOisDeclOfLet :: Bool
_leftOisDeclOfLet = Bool -> Bool
rule143 Bool
_lhsIisDeclOfLet
         _leftOnested :: Bool
_leftOnested = Bool -> Bool
rule144 Bool
_lhsInested
         _leftOoptions :: Options
_leftOoptions = Options -> Options
rule145 Options
_lhsIoptions
         _leftOoutputfile :: String
_leftOoutputfile = String -> String
rule146 String
_lhsIoutputfile
         _rhsOnested :: Bool
_rhsOnested = Bool -> Bool
rule147 Bool
_lhsInested
         _rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule148 Options
_lhsIoptions
         _rhsOoutputfile :: String
_rhsOoutputfile = String -> String
rule149 String
_lhsIoutputfile
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule141 #-}
   {-# LINE 136 "src-ag/PrintCleanCode.ag" #-}
   rule141 = \ ((_leftIpp) :: PP_Doc) ((_rhsIpp) :: PP_Doc) monadic_ ->
                               {-# LINE 136 "src-ag/PrintCleanCode.ag" #-}
                               if monadic_
                               then _leftIpp >#< "<-" >#< _rhsIpp
                               else _leftIpp >#< "=" >-< indent 4 _rhsIpp
                               {-# LINE 1366 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule142 #-}
   rule142 = \  (_ :: ()) ->
     empty
   {-# INLINE rule143 #-}
   rule143 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule144 #-}
   rule144 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule145 #-}
   rule145 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule146 #-}
   rule146 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule147 #-}
   rule147 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule148 #-}
   rule148 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule149 #-}
   rule149 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Decl_EvalDecl #-}
sem_Decl_EvalDecl :: (String) -> T_Lhs  -> T_Expr  -> T_Decl 
sem_Decl_EvalDecl :: String -> T_Lhs -> T_Expr -> T_Decl
sem_Decl_EvalDecl !String
arg_nt_ T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Decl_s20 -> T_Decl
T_Decl (T_Decl_s20 -> Identity T_Decl_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decl_s20
st20) where
   {-# NOINLINE st20 #-}
   !st20 :: T_Decl_s20
st20 = let
      v19 :: T_Decl_v19 
      v19 :: T_Decl_v19
v19 = \ !(T_Decl_vIn19 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
         _rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
         (T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Bool -> Bool -> Options -> String -> T_Lhs_vIn31
T_Lhs_vIn31 Bool
_leftOisDeclOfLet Bool
_leftOnested Options
_leftOoptions String
_leftOoutputfile)
         (T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_rhsOnested Options
_rhsOoptions String
_rhsOoutputfile)
         _strat :: String
_strat = Options -> String
rule150 Options
_lhsIoptions
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> Options -> PP_Doc -> String -> String -> PP_Doc
rule151 PP_Doc
_leftIpp Options
_lhsIoptions PP_Doc
_rhsIpp String
_strat String
arg_nt_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = () -> PP_Doc
rule152  ()
         _leftOisDeclOfLet :: Bool
_leftOisDeclOfLet = Bool -> Bool
rule153 Bool
_lhsIisDeclOfLet
         _leftOnested :: Bool
_leftOnested = Bool -> Bool
rule154 Bool
_lhsInested
         _leftOoptions :: Options
_leftOoptions = Options -> Options
rule155 Options
_lhsIoptions
         _leftOoutputfile :: String
_leftOoutputfile = String -> String
rule156 String
_lhsIoutputfile
         _rhsOnested :: Bool
_rhsOnested = Bool -> Bool
rule157 Bool
_lhsInested
         _rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule158 Options
_lhsIoptions
         _rhsOoutputfile :: String
_rhsOoutputfile = String -> String
rule159 String
_lhsIoutputfile
         !__result_ :: T_Decl_vOut19
__result_ = PP_Doc -> PP_Doc -> T_Decl_vOut19
T_Decl_vOut19 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_Decl_vOut19
__result_ )
     in T_Decl_v19 -> T_Decl_s20
C_Decl_s20 T_Decl_v19
v19
   {-# INLINE rule150 #-}
   {-# LINE 139 "src-ag/PrintCleanCode.ag" #-}
   rule150 = \ ((_lhsIoptions) :: Options) ->
                               {-# LINE 139 "src-ag/PrintCleanCode.ag" #-}
                               if breadthFirstStrict _lhsIoptions
                               then "stepwiseEval"
                               else "lazyEval"
                               {-# LINE 1424 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule151 #-}
   {-# LINE 142 "src-ag/PrintCleanCode.ag" #-}
   rule151 = \ ((_leftIpp) :: PP_Doc) ((_lhsIoptions) :: Options) ((_rhsIpp) :: PP_Doc) _strat nt_ ->
                               {-# LINE 142 "src-ag/PrintCleanCode.ag" #-}
                               if breadthFirst _lhsIoptions
                               then _leftIpp >#< "=" >#< "case" >#< _strat     >#< pp_parens _rhsIpp >#< "of"
                                    >-< indent 4 (
                                      pp_parens (nt_ >|< "_Syn" >#< "_val") >#< "-> _val"
                                    )
                               else _leftIpp >#< "=" >#< _rhsIpp
                               {-# LINE 1435 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule152 #-}
   rule152 = \  (_ :: ()) ->
     empty
   {-# INLINE rule153 #-}
   rule153 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule154 #-}
   rule154 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule155 #-}
   rule155 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule156 #-}
   rule156 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule157 #-}
   rule157 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule158 #-}
   rule158 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule159 #-}
   rule159 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile

-- Decls -------------------------------------------------------
-- wrapper
data Inh_Decls  = Inh_Decls { Inh_Decls -> Bool
isDeclOfLet_Inh_Decls :: !(Bool), Inh_Decls -> Bool
nested_Inh_Decls :: !(Bool), Inh_Decls -> Options
options_Inh_Decls :: !(Options), Inh_Decls -> String
outputfile_Inh_Decls :: !(String) }
data Syn_Decls  = Syn_Decls { Syn_Decls -> [PP_Doc]
pps_Syn_Decls :: !(PP_Docs) }
{-# INLINABLE wrap_Decls #-}
wrap_Decls :: T_Decls  -> Inh_Decls  -> (Syn_Decls )
wrap_Decls :: T_Decls -> Inh_Decls -> Syn_Decls
wrap_Decls !(T_Decls Identity T_Decls_s23
act) !(Inh_Decls Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) =
   Identity Syn_Decls -> Syn_Decls
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Decls_s23
sem <- Identity T_Decls_s23
act
        let arg22 :: T_Decls_vIn22
arg22 = Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile
        !(T_Decls_vOut22 [PP_Doc]
_lhsOpps) <- T_Decls_vOut22 -> Identity T_Decls_vOut22
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
sem T_Decls_vIn22
arg22)
        Syn_Decls -> Identity Syn_Decls
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_Decls
Syn_Decls [PP_Doc]
_lhsOpps)
   )

-- cata
{-# NOINLINE sem_Decls #-}
sem_Decls :: Decls  -> T_Decls 
sem_Decls :: Decls -> T_Decls
sem_Decls Decls
list = (T_Decl -> T_Decls -> T_Decls) -> T_Decls -> [T_Decl] -> T_Decls
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Decl -> T_Decls -> T_Decls
sem_Decls_Cons T_Decls
sem_Decls_Nil ((Decl -> T_Decl) -> Decls -> [T_Decl]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Decl -> T_Decl
sem_Decl Decls
list)

-- semantic domain
newtype T_Decls  = T_Decls {
                           T_Decls -> Identity T_Decls_s23
attach_T_Decls :: Identity (T_Decls_s23 )
                           }
newtype T_Decls_s23  = C_Decls_s23 {
                                   T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 :: (T_Decls_v22 )
                                   }
data T_Decls_s24  = C_Decls_s24
type T_Decls_v22  = (T_Decls_vIn22 ) -> (T_Decls_vOut22 )
data T_Decls_vIn22  = T_Decls_vIn22 (Bool) (Bool) (Options) (String)
data T_Decls_vOut22  = T_Decls_vOut22 (PP_Docs)
{-# NOINLINE sem_Decls_Cons #-}
sem_Decls_Cons :: T_Decl  -> T_Decls  -> T_Decls 
sem_Decls_Cons :: T_Decl -> T_Decls -> T_Decls
sem_Decls_Cons T_Decl
arg_hd_ T_Decls
arg_tl_ = Identity T_Decls_s23 -> T_Decls
T_Decls (T_Decls_s23 -> Identity T_Decls_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decls_s23
st23) where
   {-# NOINLINE st23 #-}
   !st23 :: T_Decls_s23
st23 = let
      v22 :: T_Decls_v22 
      v22 :: T_Decls_v22
v22 = \ !(T_Decls_vIn22 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _hdX20 :: T_Decl_s20
_hdX20 = Identity T_Decl_s20 -> T_Decl_s20
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decl -> Identity T_Decl_s20
attach_T_Decl (T_Decl
arg_hd_))
         _tlX23 :: T_Decls_s23
_tlX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_tl_))
         (T_Decl_vOut19 PP_Doc
_hdIpp PP_Doc
_hdIppa) = T_Decl_s20 -> T_Decl_v19
inv_Decl_s20 T_Decl_s20
_hdX20 (Bool -> Bool -> Options -> String -> T_Decl_vIn19
T_Decl_vIn19 Bool
_hdOisDeclOfLet Bool
_hdOnested Options
_hdOoptions String
_hdOoutputfile)
         (T_Decls_vOut22 [PP_Doc]
_tlIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_tlX23 (Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_tlOisDeclOfLet Bool
_tlOnested Options
_tlOoptions String
_tlOoutputfile)
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule160 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
         _hdOisDeclOfLet :: Bool
_hdOisDeclOfLet = Bool -> Bool
rule161 Bool
_lhsIisDeclOfLet
         _hdOnested :: Bool
_hdOnested = Bool -> Bool
rule162 Bool
_lhsInested
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule163 Options
_lhsIoptions
         _hdOoutputfile :: String
_hdOoutputfile = String -> String
rule164 String
_lhsIoutputfile
         _tlOisDeclOfLet :: Bool
_tlOisDeclOfLet = Bool -> Bool
rule165 Bool
_lhsIisDeclOfLet
         _tlOnested :: Bool
_tlOnested = Bool -> Bool
rule166 Bool
_lhsInested
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule167 Options
_lhsIoptions
         _tlOoutputfile :: String
_tlOoutputfile = String -> String
rule168 String
_lhsIoutputfile
         !__result_ :: T_Decls_vOut22
__result_ = [PP_Doc] -> T_Decls_vOut22
T_Decls_vOut22 [PP_Doc]
_lhsOpps
         in T_Decls_vOut22
__result_ )
     in T_Decls_v22 -> T_Decls_s23
C_Decls_s23 T_Decls_v22
v22
   {-# INLINE rule160 #-}
   {-# LINE 92 "src-ag/PrintCleanCode.ag" #-}
   rule160 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
                     {-# LINE 92 "src-ag/PrintCleanCode.ag" #-}
                     _hdIpp : _tlIpps
                     {-# LINE 1520 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule161 #-}
   rule161 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule162 #-}
   rule162 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule163 #-}
   rule163 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule164 #-}
   rule164 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule165 #-}
   rule165 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule166 #-}
   rule166 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule167 #-}
   rule167 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule168 #-}
   rule168 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Decls_Nil #-}
sem_Decls_Nil ::  T_Decls 
sem_Decls_Nil :: T_Decls
sem_Decls_Nil  = Identity T_Decls_s23 -> T_Decls
T_Decls (T_Decls_s23 -> Identity T_Decls_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_Decls_s23
st23) where
   {-# NOINLINE st23 #-}
   !st23 :: T_Decls_s23
st23 = let
      v22 :: T_Decls_v22 
      v22 :: T_Decls_v22
v22 = \ !(T_Decls_vIn22 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule169  ()
         !__result_ :: T_Decls_vOut22
__result_ = [PP_Doc] -> T_Decls_vOut22
T_Decls_vOut22 [PP_Doc]
_lhsOpps
         in T_Decls_vOut22
__result_ )
     in T_Decls_v22 -> T_Decls_s23
C_Decls_s23 T_Decls_v22
v22
   {-# INLINE rule169 #-}
   {-# LINE 93 "src-ag/PrintCleanCode.ag" #-}
   rule169 = \  (_ :: ()) ->
                     {-# LINE 93 "src-ag/PrintCleanCode.ag" #-}
                     []
                     {-# LINE 1562 "src-generated/PrintCleanCode.hs" #-}

-- Expr --------------------------------------------------------
-- wrapper
data Inh_Expr  = Inh_Expr { Inh_Expr -> Bool
nested_Inh_Expr :: !(Bool), Inh_Expr -> Options
options_Inh_Expr :: !(Options), Inh_Expr -> String
outputfile_Inh_Expr :: !(String) }
data Syn_Expr  = Syn_Expr { Syn_Expr -> PP_Doc
pp_Syn_Expr :: !(PP_Doc) }
{-# INLINABLE wrap_Expr #-}
wrap_Expr :: T_Expr  -> Inh_Expr  -> (Syn_Expr )
wrap_Expr :: T_Expr -> Inh_Expr -> Syn_Expr
wrap_Expr !(T_Expr Identity T_Expr_s26
act) !(Inh_Expr Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) =
   Identity Syn_Expr -> Syn_Expr
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Expr_s26
sem <- Identity T_Expr_s26
act
        let arg25 :: T_Expr_vIn25
arg25 = Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile
        !(T_Expr_vOut25 PP_Doc
_lhsOpp) <- T_Expr_vOut25 -> Identity T_Expr_vOut25
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
sem T_Expr_vIn25
arg25)
        Syn_Expr -> Identity Syn_Expr
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Expr
Syn_Expr PP_Doc
_lhsOpp)
   )

-- cata
{-# NOINLINE sem_Expr #-}
sem_Expr :: Expr  -> T_Expr 
sem_Expr :: Expr -> T_Expr
sem_Expr ( Let Decls
decls_ Expr
body_ ) = T_Decls -> T_Expr -> T_Expr
sem_Expr_Let ( Decls -> T_Decls
sem_Decls Decls
decls_ ) ( Expr -> T_Expr
sem_Expr Expr
body_ )
sem_Expr ( Case Expr
expr_ CaseAlts
alts_ ) = T_Expr -> T_CaseAlts -> T_Expr
sem_Expr_Case ( Expr -> T_Expr
sem_Expr Expr
expr_ ) ( CaseAlts -> T_CaseAlts
sem_CaseAlts CaseAlts
alts_ )
sem_Expr ( Do Decls
stmts_ Expr
body_ ) = T_Decls -> T_Expr -> T_Expr
sem_Expr_Do ( Decls -> T_Decls
sem_Decls Decls
stmts_ ) ( Expr -> T_Expr
sem_Expr Expr
body_ )
sem_Expr ( Lambda Exprs
args_ Expr
body_ ) = T_Exprs -> T_Expr -> T_Expr
sem_Expr_Lambda ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ ) ( Expr -> T_Expr
sem_Expr Expr
body_ )
sem_Expr ( TupleExpr Exprs
exprs_ ) = T_Exprs -> T_Expr
sem_Expr_TupleExpr ( Exprs -> T_Exprs
sem_Exprs Exprs
exprs_ )
sem_Expr ( UnboxedTupleExpr Exprs
exprs_ ) = T_Exprs -> T_Expr
sem_Expr_UnboxedTupleExpr ( Exprs -> T_Exprs
sem_Exprs Exprs
exprs_ )
sem_Expr ( App !String
name_ Exprs
args_ ) = String -> T_Exprs -> T_Expr
sem_Expr_App String
name_ ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ )
sem_Expr ( SimpleExpr !String
txt_ ) = String -> T_Expr
sem_Expr_SimpleExpr String
txt_
sem_Expr ( TextExpr ![String]
lns_ ) = [String] -> T_Expr
sem_Expr_TextExpr [String]
lns_
sem_Expr ( Trace !String
txt_ Expr
expr_ ) = String -> T_Expr -> T_Expr
sem_Expr_Trace String
txt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ )
sem_Expr ( PragmaExpr !Bool
onLeftSide_ !Bool
onNewLine_ !String
txt_ Expr
expr_ ) = Bool -> Bool -> String -> T_Expr -> T_Expr
sem_Expr_PragmaExpr Bool
onLeftSide_ Bool
onNewLine_ String
txt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ )
sem_Expr ( LineExpr Expr
expr_ ) = T_Expr -> T_Expr
sem_Expr_LineExpr ( Expr -> T_Expr
sem_Expr Expr
expr_ )
sem_Expr ( TypedExpr Expr
expr_ Type
tp_ ) = T_Expr -> T_Type -> T_Expr
sem_Expr_TypedExpr ( Expr -> T_Expr
sem_Expr Expr
expr_ ) ( Type -> T_Type
sem_Type Type
tp_ )
sem_Expr ( ResultExpr !String
nt_ Expr
expr_ ) = String -> T_Expr -> T_Expr
sem_Expr_ResultExpr String
nt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ )
sem_Expr ( InvokeExpr !String
nt_ Expr
expr_ Exprs
args_ ) = String -> T_Expr -> T_Exprs -> T_Expr
sem_Expr_InvokeExpr String
nt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ ) ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ )
sem_Expr ( ResumeExpr !String
nt_ Expr
expr_ Lhs
left_ Expr
rhs_ ) = String -> T_Expr -> T_Lhs -> T_Expr -> T_Expr
sem_Expr_ResumeExpr String
nt_ ( Expr -> T_Expr
sem_Expr Expr
expr_ ) ( Lhs -> T_Lhs
sem_Lhs Lhs
left_ ) ( Expr -> T_Expr
sem_Expr Expr
rhs_ )
sem_Expr ( SemFun !String
nt_ Exprs
args_ Expr
body_ ) = String -> T_Exprs -> T_Expr -> T_Expr
sem_Expr_SemFun String
nt_ ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ ) ( Expr -> T_Expr
sem_Expr Expr
body_ )

-- semantic domain
newtype T_Expr  = T_Expr {
                         T_Expr -> Identity T_Expr_s26
attach_T_Expr :: Identity (T_Expr_s26 )
                         }
newtype T_Expr_s26  = C_Expr_s26 {
                                 T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 :: (T_Expr_v25 )
                                 }
data T_Expr_s27  = C_Expr_s27
type T_Expr_v25  = (T_Expr_vIn25 ) -> (T_Expr_vOut25 )
data T_Expr_vIn25  = T_Expr_vIn25 (Bool) (Options) (String)
data T_Expr_vOut25  = T_Expr_vOut25 (PP_Doc)
{-# NOINLINE sem_Expr_Let #-}
sem_Expr_Let :: T_Decls  -> T_Expr  -> T_Expr 
sem_Expr_Let :: T_Decls -> T_Expr -> T_Expr
sem_Expr_Let T_Decls
arg_decls_ T_Expr
arg_body_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _declsX23 :: T_Decls_s23
_declsX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_decls_))
         _bodyX26 :: T_Expr_s26
_bodyX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_body_))
         (T_Decls_vOut22 [PP_Doc]
_declsIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_declsX23 (Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_declsOisDeclOfLet Bool
_declsOnested Options
_declsOoptions String
_declsOoutputfile)
         (T_Expr_vOut25 PP_Doc
_bodyIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_bodyX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_bodyOnested Options
_bodyOoptions String
_bodyOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> [PP_Doc] -> PP_Doc
rule170 PP_Doc
_bodyIpp [PP_Doc]
_declsIpps
         _declsOisDeclOfLet :: Bool
_declsOisDeclOfLet = () -> Bool
rule171  ()
         _declsOnested :: Bool
_declsOnested = Bool -> Bool
rule172 Bool
_lhsInested
         _declsOoptions :: Options
_declsOoptions = Options -> Options
rule173 Options
_lhsIoptions
         _declsOoutputfile :: String
_declsOoutputfile = String -> String
rule174 String
_lhsIoutputfile
         _bodyOnested :: Bool
_bodyOnested = Bool -> Bool
rule175 Bool
_lhsInested
         _bodyOoptions :: Options
_bodyOoptions = Options -> Options
rule176 Options
_lhsIoptions
         _bodyOoutputfile :: String
_bodyOoutputfile = String -> String
rule177 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule170 #-}
   {-# LINE 150 "src-ag/PrintCleanCode.ag" #-}
   rule170 = \ ((_bodyIpp) :: PP_Doc) ((_declsIpps) :: PP_Docs) ->
                               {-# LINE 150 "src-ag/PrintCleanCode.ag" #-}
                               pp_parens (    "let" >#< (vlist _declsIpps)
                                         >-< "in " >#< _bodyIpp
                                         )
                               {-# LINE 1640 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule171 #-}
   {-# LINE 441 "src-ag/PrintCleanCode.ag" #-}
   rule171 = \  (_ :: ()) ->
                            {-# LINE 441 "src-ag/PrintCleanCode.ag" #-}
                            True
                            {-# LINE 1646 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule172 #-}
   rule172 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule173 #-}
   rule173 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule174 #-}
   rule174 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule175 #-}
   rule175 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule176 #-}
   rule176 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule177 #-}
   rule177 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_Case #-}
sem_Expr_Case :: T_Expr  -> T_CaseAlts  -> T_Expr 
sem_Expr_Case :: T_Expr -> T_CaseAlts -> T_Expr
sem_Expr_Case T_Expr
arg_expr_ T_CaseAlts
arg_alts_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
         _altsX5 :: T_CaseAlts_s5
_altsX5 = Identity T_CaseAlts_s5 -> T_CaseAlts_s5
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CaseAlts -> Identity T_CaseAlts_s5
attach_T_CaseAlts (T_CaseAlts
arg_alts_))
         (T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_exprOnested Options
_exprOoptions String
_exprOoutputfile)
         (T_CaseAlts_vOut4 [PP_Doc]
_altsIpps) = T_CaseAlts_s5 -> T_CaseAlts_v4
inv_CaseAlts_s5 T_CaseAlts_s5
_altsX5 (Bool -> Options -> String -> T_CaseAlts_vIn4
T_CaseAlts_vIn4 Bool
_altsOnested Options
_altsOoptions String
_altsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc -> PP_Doc
rule178 [PP_Doc]
_altsIpps PP_Doc
_exprIpp
         _exprOnested :: Bool
_exprOnested = Bool -> Bool
rule179 Bool
_lhsInested
         _exprOoptions :: Options
_exprOoptions = Options -> Options
rule180 Options
_lhsIoptions
         _exprOoutputfile :: String
_exprOoutputfile = String -> String
rule181 String
_lhsIoutputfile
         _altsOnested :: Bool
_altsOnested = Bool -> Bool
rule182 Bool
_lhsInested
         _altsOoptions :: Options
_altsOoptions = Options -> Options
rule183 Options
_lhsIoptions
         _altsOoutputfile :: String
_altsOoutputfile = String -> String
rule184 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule178 #-}
   {-# LINE 153 "src-ag/PrintCleanCode.ag" #-}
   rule178 = \ ((_altsIpps) :: PP_Docs) ((_exprIpp) :: PP_Doc) ->
                               {-# LINE 153 "src-ag/PrintCleanCode.ag" #-}
                               pp_parens (    "case" >#< pp_parens _exprIpp >#< "of"
                                         >-< (vlist _altsIpps)
                                         )
                               {-# LINE 1694 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule179 #-}
   rule179 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule180 #-}
   rule180 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule181 #-}
   rule181 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule182 #-}
   rule182 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule183 #-}
   rule183 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule184 #-}
   rule184 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_Do #-}
sem_Expr_Do :: T_Decls  -> T_Expr  -> T_Expr 
sem_Expr_Do :: T_Decls -> T_Expr -> T_Expr
sem_Expr_Do T_Decls
arg_stmts_ T_Expr
arg_body_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _stmtsX23 :: T_Decls_s23
_stmtsX23 = Identity T_Decls_s23 -> T_Decls_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Decls -> Identity T_Decls_s23
attach_T_Decls (T_Decls
arg_stmts_))
         _bodyX26 :: T_Expr_s26
_bodyX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_body_))
         (T_Decls_vOut22 [PP_Doc]
_stmtsIpps) = T_Decls_s23 -> T_Decls_v22
inv_Decls_s23 T_Decls_s23
_stmtsX23 (Bool -> Bool -> Options -> String -> T_Decls_vIn22
T_Decls_vIn22 Bool
_stmtsOisDeclOfLet Bool
_stmtsOnested Options
_stmtsOoptions String
_stmtsOoutputfile)
         (T_Expr_vOut25 PP_Doc
_bodyIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_bodyX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_bodyOnested Options
_bodyOoptions String
_bodyOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> [PP_Doc] -> PP_Doc
rule185 PP_Doc
_bodyIpp [PP_Doc]
_stmtsIpps
         _stmtsOisDeclOfLet :: Bool
_stmtsOisDeclOfLet = () -> Bool
rule186  ()
         _stmtsOnested :: Bool
_stmtsOnested = Bool -> Bool
rule187 Bool
_lhsInested
         _stmtsOoptions :: Options
_stmtsOoptions = Options -> Options
rule188 Options
_lhsIoptions
         _stmtsOoutputfile :: String
_stmtsOoutputfile = String -> String
rule189 String
_lhsIoutputfile
         _bodyOnested :: Bool
_bodyOnested = Bool -> Bool
rule190 Bool
_lhsInested
         _bodyOoptions :: Options
_bodyOoptions = Options -> Options
rule191 Options
_lhsIoptions
         _bodyOoutputfile :: String
_bodyOoutputfile = String -> String
rule192 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule185 #-}
   {-# LINE 156 "src-ag/PrintCleanCode.ag" #-}
   rule185 = \ ((_bodyIpp) :: PP_Doc) ((_stmtsIpps) :: PP_Docs) ->
                               {-# LINE 156 "src-ag/PrintCleanCode.ag" #-}
                               pp_parens ( "do" >#< (   vlist _stmtsIpps
                                                    >-< ("return" >#< _bodyIpp))
                                         )
                               {-# LINE 1743 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule186 #-}
   {-# LINE 443 "src-ag/PrintCleanCode.ag" #-}
   rule186 = \  (_ :: ()) ->
                            {-# LINE 443 "src-ag/PrintCleanCode.ag" #-}
                            False
                            {-# LINE 1749 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule187 #-}
   rule187 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule188 #-}
   rule188 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule189 #-}
   rule189 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule190 #-}
   rule190 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule191 #-}
   rule191 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule192 #-}
   rule192 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_Lambda #-}
sem_Expr_Lambda :: T_Exprs  -> T_Expr  -> T_Expr 
sem_Expr_Lambda :: T_Exprs -> T_Expr -> T_Expr
sem_Expr_Lambda T_Exprs
arg_args_ T_Expr
arg_body_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
         _bodyX26 :: T_Expr_s26
_bodyX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_body_))
         (T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Bool -> Options -> String -> T_Exprs_vIn28
T_Exprs_vIn28 Bool
_argsOnested Options
_argsOoptions String
_argsOoutputfile)
         (T_Expr_vOut25 PP_Doc
_bodyIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_bodyX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_bodyOnested Options
_bodyOoptions String
_bodyOoutputfile)
         _strictParams :: [PP_Doc]
_strictParams = [PP_Doc] -> Options -> [PP_Doc]
rule193 [PP_Doc]
_argsIpps Options
_lhsIoptions
         _addBang :: PP_Doc -> PP_Doc
_addBang = Options -> PP_Doc -> PP_Doc
rule194 Options
_lhsIoptions
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = (PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> [PP_Doc] -> PP_Doc
rule195 PP_Doc -> PP_Doc
_addBang [PP_Doc]
_argsIpps PP_Doc
_bodyIpp [PP_Doc]
_strictParams
         _argsOnested :: Bool
_argsOnested = Bool -> Bool
rule196 Bool
_lhsInested
         _argsOoptions :: Options
_argsOoptions = Options -> Options
rule197 Options
_lhsIoptions
         _argsOoutputfile :: String
_argsOoutputfile = String -> String
rule198 String
_lhsIoutputfile
         _bodyOnested :: Bool
_bodyOnested = Bool -> Bool
rule199 Bool
_lhsInested
         _bodyOoptions :: Options
_bodyOoptions = Options -> Options
rule200 Options
_lhsIoptions
         _bodyOoutputfile :: String
_bodyOoutputfile = String -> String
rule201 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule193 #-}
   {-# LINE 159 "src-ag/PrintCleanCode.ag" #-}
   rule193 = \ ((_argsIpps) :: PP_Docs) ((_lhsIoptions) :: Options) ->
                                    {-# LINE 159 "src-ag/PrintCleanCode.ag" #-}
                                    if strictSems _lhsIoptions
                                    then _argsIpps
                                    else []
                                    {-# LINE 1799 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule194 #-}
   {-# LINE 162 "src-ag/PrintCleanCode.ag" #-}
   rule194 = \ ((_lhsIoptions) :: Options) ->
                               {-# LINE 162 "src-ag/PrintCleanCode.ag" #-}
                               if bangpats _lhsIoptions
                               then \p -> pp_parens ("!" >|< p)
                               else id
                               {-# LINE 1807 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule195 #-}
   {-# LINE 165 "src-ag/PrintCleanCode.ag" #-}
   rule195 = \ _addBang ((_argsIpps) :: PP_Docs) ((_bodyIpp) :: PP_Doc) _strictParams ->
                               {-# LINE 165 "src-ag/PrintCleanCode.ag" #-}
                               pp_parens (    "\\" >#< (vlist (map _addBang     _argsIpps)) >#< "->"
                                         >-< indent 4 (_strictParams     `ppMultiSeqV` _bodyIpp)
                                         )
                               {-# LINE 1815 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule196 #-}
   rule196 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule197 #-}
   rule197 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule198 #-}
   rule198 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule199 #-}
   rule199 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule200 #-}
   rule200 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule201 #-}
   rule201 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_TupleExpr #-}
sem_Expr_TupleExpr :: T_Exprs  -> T_Expr 
sem_Expr_TupleExpr :: T_Exprs -> T_Expr
sem_Expr_TupleExpr T_Exprs
arg_exprs_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprsX29 :: T_Exprs_s29
_exprsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_exprs_))
         (T_Exprs_vOut28 [PP_Doc]
_exprsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_exprsX29 (Bool -> Options -> String -> T_Exprs_vIn28
T_Exprs_vIn28 Bool
_exprsOnested Options
_exprsOoptions String
_exprsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> Bool -> PP_Doc
rule202 [PP_Doc]
_exprsIpps Bool
_lhsInested
         _exprsOnested :: Bool
_exprsOnested = Bool -> Bool
rule203 Bool
_lhsInested
         _exprsOoptions :: Options
_exprsOoptions = Options -> Options
rule204 Options
_lhsIoptions
         _exprsOoutputfile :: String
_exprsOoutputfile = String -> String
rule205 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule202 #-}
   {-# LINE 168 "src-ag/PrintCleanCode.ag" #-}
   rule202 = \ ((_exprsIpps) :: PP_Docs) ((_lhsInested) :: Bool) ->
                               {-# LINE 168 "src-ag/PrintCleanCode.ag" #-}
                               ppTuple _lhsInested _exprsIpps
                               {-# LINE 1856 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule203 #-}
   rule203 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule204 #-}
   rule204 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule205 #-}
   rule205 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_UnboxedTupleExpr #-}
sem_Expr_UnboxedTupleExpr :: T_Exprs  -> T_Expr 
sem_Expr_UnboxedTupleExpr :: T_Exprs -> T_Expr
sem_Expr_UnboxedTupleExpr T_Exprs
arg_exprs_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprsX29 :: T_Exprs_s29
_exprsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_exprs_))
         (T_Exprs_vOut28 [PP_Doc]
_exprsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_exprsX29 (Bool -> Options -> String -> T_Exprs_vIn28
T_Exprs_vIn28 Bool
_exprsOnested Options
_exprsOoptions String
_exprsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> Bool -> PP_Doc
rule206 [PP_Doc]
_exprsIpps Bool
_lhsInested
         _exprsOnested :: Bool
_exprsOnested = Bool -> Bool
rule207 Bool
_lhsInested
         _exprsOoptions :: Options
_exprsOoptions = Options -> Options
rule208 Options
_lhsIoptions
         _exprsOoutputfile :: String
_exprsOoutputfile = String -> String
rule209 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule206 #-}
   {-# LINE 169 "src-ag/PrintCleanCode.ag" #-}
   rule206 = \ ((_exprsIpps) :: PP_Docs) ((_lhsInested) :: Bool) ->
                                      {-# LINE 169 "src-ag/PrintCleanCode.ag" #-}
                                      ppUnboxedTuple _lhsInested _exprsIpps
                                      {-# LINE 1888 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule207 #-}
   rule207 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule208 #-}
   rule208 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule209 #-}
   rule209 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_App #-}
sem_Expr_App :: (String) -> T_Exprs  -> T_Expr 
sem_Expr_App :: String -> T_Exprs -> T_Expr
sem_Expr_App !String
arg_name_ T_Exprs
arg_args_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
         (T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Bool -> Options -> String -> T_Exprs_vIn28
T_Exprs_vIn28 Bool
_argsOnested Options
_argsOoptions String
_argsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> String -> PP_Doc
rule210 [PP_Doc]
_argsIpps String
arg_name_
         _argsOnested :: Bool
_argsOnested = Bool -> Bool
rule211 Bool
_lhsInested
         _argsOoptions :: Options
_argsOoptions = Options -> Options
rule212 Options
_lhsIoptions
         _argsOoutputfile :: String
_argsOoutputfile = String -> String
rule213 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule210 #-}
   {-# LINE 170 "src-ag/PrintCleanCode.ag" #-}
   rule210 = \ ((_argsIpps) :: PP_Docs) name_ ->
                               {-# LINE 170 "src-ag/PrintCleanCode.ag" #-}
                               pp_parens $ name_ >#< hv_sp _argsIpps
                               {-# LINE 1920 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule211 #-}
   rule211 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule212 #-}
   rule212 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule213 #-}
   rule213 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_SimpleExpr #-}
sem_Expr_SimpleExpr :: (String) -> T_Expr 
sem_Expr_SimpleExpr :: String -> T_Expr
sem_Expr_SimpleExpr !String
arg_txt_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = String -> PP_Doc
rule214 String
arg_txt_
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule214 #-}
   {-# LINE 171 "src-ag/PrintCleanCode.ag" #-}
   rule214 = \ txt_ ->
                               {-# LINE 171 "src-ag/PrintCleanCode.ag" #-}
                               text txt_
                               {-# LINE 1947 "src-generated/PrintCleanCode.hs" #-}
{-# NOINLINE sem_Expr_TextExpr #-}
sem_Expr_TextExpr :: ([String]) -> T_Expr 
sem_Expr_TextExpr :: [String] -> T_Expr
sem_Expr_TextExpr ![String]
arg_lns_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [String] -> PP_Doc
rule215 [String]
arg_lns_
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule215 #-}
   {-# LINE 172 "src-ag/PrintCleanCode.ag" #-}
   rule215 = \ lns_ ->
                               {-# LINE 172 "src-ag/PrintCleanCode.ag" #-}
                               vlist (map text lns_)
                               {-# LINE 1965 "src-generated/PrintCleanCode.hs" #-}
{-# NOINLINE sem_Expr_Trace #-}
sem_Expr_Trace :: (String) -> T_Expr  -> T_Expr 
sem_Expr_Trace :: String -> T_Expr -> T_Expr
sem_Expr_Trace !String
arg_txt_ T_Expr
arg_expr_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
         (T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_exprOnested Options
_exprOoptions String
_exprOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> PP_Doc
rule216 PP_Doc
_exprIpp String
arg_txt_
         _exprOnested :: Bool
_exprOnested = Bool -> Bool
rule217 Bool
_lhsInested
         _exprOoptions :: Options
_exprOoptions = Options -> Options
rule218 Options
_lhsIoptions
         _exprOoutputfile :: String
_exprOoutputfile = String -> String
rule219 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule216 #-}
   {-# LINE 173 "src-ag/PrintCleanCode.ag" #-}
   rule216 = \ ((_exprIpp) :: PP_Doc) txt_ ->
                               {-# LINE 173 "src-ag/PrintCleanCode.ag" #-}
                               "trace" >#< (   pp_parens ("\"" >|< text txt_ >|< "\"")
                                           >-< pp_parens _exprIpp
                                           )
                               {-# LINE 1990 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule217 #-}
   rule217 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule218 #-}
   rule218 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule219 #-}
   rule219 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_PragmaExpr #-}
sem_Expr_PragmaExpr :: (Bool) -> (Bool) -> (String) -> T_Expr  -> T_Expr 
sem_Expr_PragmaExpr :: Bool -> Bool -> String -> T_Expr -> T_Expr
sem_Expr_PragmaExpr !Bool
arg_onLeftSide_ !Bool
arg_onNewLine_ !String
arg_txt_ T_Expr
arg_expr_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
         (T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_exprOnested Options
_exprOoptions String
_exprOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> Bool -> Bool -> String -> PP_Doc
rule220 PP_Doc
_exprIpp Bool
arg_onLeftSide_ Bool
arg_onNewLine_ String
arg_txt_
         _exprOnested :: Bool
_exprOnested = Bool -> Bool
rule221 Bool
_lhsInested
         _exprOoptions :: Options
_exprOoptions = Options -> Options
rule222 Options
_lhsIoptions
         _exprOoutputfile :: String
_exprOoutputfile = String -> String
rule223 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule220 #-}
   {-# LINE 176 "src-ag/PrintCleanCode.ag" #-}
   rule220 = \ ((_exprIpp) :: PP_Doc) onLeftSide_ onNewLine_ txt_ ->
                               {-# LINE 176 "src-ag/PrintCleanCode.ag" #-}
                               let pragmaDoc = "/*#" >#< txt_ >#< "#*/"
                                   op = if onNewLine_
                                        then (>-<)
                                        else (>#<)
                                   leftOp x y = if onLeftSide_
                                                then x `op` y
                                                else y
                                   rightOp x y = if onLeftSide_
                                                 then x
                                                 else x `op` y
                               in pp_parens (pragmaDoc `leftOp` _exprIpp `rightOp` pragmaDoc)
                               {-# LINE 2032 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule221 #-}
   rule221 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule222 #-}
   rule222 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule223 #-}
   rule223 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_LineExpr #-}
sem_Expr_LineExpr :: T_Expr  -> T_Expr 
sem_Expr_LineExpr :: T_Expr -> T_Expr
sem_Expr_LineExpr T_Expr
arg_expr_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
         (T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_exprOnested Options
_exprOoptions String
_exprOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> PP_Doc
rule224 PP_Doc
_exprIpp String
_lhsIoutputfile
         _exprOnested :: Bool
_exprOnested = Bool -> Bool
rule225 Bool
_lhsInested
         _exprOoptions :: Options
_exprOoptions = Options -> Options
rule226 Options
_lhsIoptions
         _exprOoutputfile :: String
_exprOoutputfile = String -> String
rule227 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule224 #-}
   {-# LINE 187 "src-ag/PrintCleanCode.ag" #-}
   rule224 = \ ((_exprIpp) :: PP_Doc) ((_lhsIoutputfile) :: String) ->
                               {-# LINE 187 "src-ag/PrintCleanCode.ag" #-}
                               _exprIpp >-< "/*# LINE" >#< ppWithLineNr (\n -> pp $ show $ n + 1) >#< show _lhsIoutputfile >#< "#*/"
                                        >-< ""
                               {-# LINE 2065 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule225 #-}
   rule225 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule226 #-}
   rule226 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule227 #-}
   rule227 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_TypedExpr #-}
sem_Expr_TypedExpr :: T_Expr  -> T_Type  -> T_Expr 
sem_Expr_TypedExpr :: T_Expr -> T_Type -> T_Expr
sem_Expr_TypedExpr T_Expr
arg_expr_ T_Type
arg_tp_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
         _tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
         (T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_exprOnested Options
_exprOoptions String
_exprOoutputfile)
         (T_Type_vOut49 Type
_tpIcopy PP_Doc
_tpIpp Int
_tpIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_tpOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule228 PP_Doc
_exprIpp PP_Doc
_tpIpp
         _exprOnested :: Bool
_exprOnested = Bool -> Bool
rule229 Bool
_lhsInested
         _exprOoptions :: Options
_exprOoptions = Options -> Options
rule230 Options
_lhsIoptions
         _exprOoutputfile :: String
_exprOoutputfile = String -> String
rule231 String
_lhsIoutputfile
         _tpOnested :: Bool
_tpOnested = Bool -> Bool
rule232 Bool
_lhsInested
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule228 #-}
   {-# LINE 189 "src-ag/PrintCleanCode.ag" #-}
   rule228 = \ ((_exprIpp) :: PP_Doc) ((_tpIpp) :: PP_Doc) ->
                               {-# LINE 189 "src-ag/PrintCleanCode.ag" #-}
                               pp_parens (_exprIpp >#< "::" >#< _tpIpp)
                               {-# LINE 2100 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule229 #-}
   rule229 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule230 #-}
   rule230 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule231 #-}
   rule231 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule232 #-}
   rule232 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Expr_ResultExpr #-}
sem_Expr_ResultExpr :: (String) -> T_Expr  -> T_Expr 
sem_Expr_ResultExpr :: String -> T_Expr -> T_Expr
sem_Expr_ResultExpr !String
arg_nt_ T_Expr
arg_expr_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
         (T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_exprOnested Options
_exprOoptions String
_exprOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> Options -> String -> PP_Doc
rule233 PP_Doc
_exprIpp Options
_lhsIoptions String
arg_nt_
         _exprOnested :: Bool
_exprOnested = Bool -> Bool
rule234 Bool
_lhsInested
         _exprOoptions :: Options
_exprOoptions = Options -> Options
rule235 Options
_lhsIoptions
         _exprOoutputfile :: String
_exprOoutputfile = String -> String
rule236 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule233 #-}
   {-# LINE 190 "src-ag/PrintCleanCode.ag" #-}
   rule233 = \ ((_exprIpp) :: PP_Doc) ((_lhsIoptions) :: Options) nt_ ->
                               {-# LINE 190 "src-ag/PrintCleanCode.ag" #-}
                               if breadthFirst _lhsIoptions
                               then "final" >#<
                                    pp_parens (nt_ >|< "_Syn" >#< pp_parens _exprIpp)
                               else _exprIpp
                               {-# LINE 2138 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule234 #-}
   rule234 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule235 #-}
   rule235 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule236 #-}
   rule236 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_InvokeExpr #-}
sem_Expr_InvokeExpr :: (String) -> T_Expr  -> T_Exprs  -> T_Expr 
sem_Expr_InvokeExpr :: String -> T_Expr -> T_Exprs -> T_Expr
sem_Expr_InvokeExpr !String
arg_nt_ T_Expr
arg_expr_ T_Exprs
arg_args_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
         _argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
         (T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_exprOnested Options
_exprOoptions String
_exprOoutputfile)
         (T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Bool -> Options -> String -> T_Exprs_vIn28
T_Exprs_vIn28 Bool
_argsOnested Options
_argsOoptions String
_argsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc -> Options -> String -> PP_Doc
rule237 [PP_Doc]
_argsIpps PP_Doc
_exprIpp Options
_lhsIoptions String
arg_nt_
         _exprOnested :: Bool
_exprOnested = Bool -> Bool
rule238 Bool
_lhsInested
         _exprOoptions :: Options
_exprOoptions = Options -> Options
rule239 Options
_lhsIoptions
         _exprOoutputfile :: String
_exprOoutputfile = String -> String
rule240 String
_lhsIoutputfile
         _argsOnested :: Bool
_argsOnested = Bool -> Bool
rule241 Bool
_lhsInested
         _argsOoptions :: Options
_argsOoptions = Options -> Options
rule242 Options
_lhsIoptions
         _argsOoutputfile :: String
_argsOoutputfile = String -> String
rule243 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule237 #-}
   {-# LINE 194 "src-ag/PrintCleanCode.ag" #-}
   rule237 = \ ((_argsIpps) :: PP_Docs) ((_exprIpp) :: PP_Doc) ((_lhsIoptions) :: Options) nt_ ->
                               {-# LINE 194 "src-ag/PrintCleanCode.ag" #-}
                               if breadthFirst _lhsIoptions
                               then "invoke" >#< pp_parens _exprIpp >#< pp_parens (
                                     nt_ >|< "_Inh" >#< pp_parens (ppTuple False _argsIpps))
                               else _exprIpp >#< hv_sp _argsIpps
                               {-# LINE 2178 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule238 #-}
   rule238 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule239 #-}
   rule239 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule240 #-}
   rule240 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule241 #-}
   rule241 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule242 #-}
   rule242 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule243 #-}
   rule243 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_ResumeExpr #-}
sem_Expr_ResumeExpr :: (String) -> T_Expr  -> T_Lhs  -> T_Expr  -> T_Expr 
sem_Expr_ResumeExpr :: String -> T_Expr -> T_Lhs -> T_Expr -> T_Expr
sem_Expr_ResumeExpr !String
arg_nt_ T_Expr
arg_expr_ T_Lhs
arg_left_ T_Expr
arg_rhs_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _exprX26 :: T_Expr_s26
_exprX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_expr_))
         _leftX32 :: T_Lhs_s32
_leftX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_left_))
         _rhsX26 :: T_Expr_s26
_rhsX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_rhs_))
         (T_Expr_vOut25 PP_Doc
_exprIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_exprX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_exprOnested Options
_exprOoptions String
_exprOoutputfile)
         (T_Lhs_vOut31 PP_Doc
_leftIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_leftX32 (Bool -> Bool -> Options -> String -> T_Lhs_vIn31
T_Lhs_vIn31 Bool
_leftOisDeclOfLet Bool
_leftOnested Options
_leftOoptions String
_leftOoutputfile)
         (T_Expr_vOut25 PP_Doc
_rhsIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_rhsX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_rhsOnested Options
_rhsOoptions String
_rhsOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> Options -> PP_Doc -> String -> PP_Doc
rule244 PP_Doc
_exprIpp PP_Doc
_leftIpp Options
_lhsIoptions PP_Doc
_rhsIpp String
arg_nt_
         _leftOisDeclOfLet :: Bool
_leftOisDeclOfLet = () -> Bool
rule245  ()
         _exprOnested :: Bool
_exprOnested = Bool -> Bool
rule246 Bool
_lhsInested
         _exprOoptions :: Options
_exprOoptions = Options -> Options
rule247 Options
_lhsIoptions
         _exprOoutputfile :: String
_exprOoutputfile = String -> String
rule248 String
_lhsIoutputfile
         _leftOnested :: Bool
_leftOnested = Bool -> Bool
rule249 Bool
_lhsInested
         _leftOoptions :: Options
_leftOoptions = Options -> Options
rule250 Options
_lhsIoptions
         _leftOoutputfile :: String
_leftOoutputfile = String -> String
rule251 String
_lhsIoutputfile
         _rhsOnested :: Bool
_rhsOnested = Bool -> Bool
rule252 Bool
_lhsInested
         _rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule253 Options
_lhsIoptions
         _rhsOoutputfile :: String
_rhsOoutputfile = String -> String
rule254 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule244 #-}
   {-# LINE 198 "src-ag/PrintCleanCode.ag" #-}
   rule244 = \ ((_exprIpp) :: PP_Doc) ((_leftIpp) :: PP_Doc) ((_lhsIoptions) :: Options) ((_rhsIpp) :: PP_Doc) nt_ ->
                               {-# LINE 198 "src-ag/PrintCleanCode.ag" #-}
                               if breadthFirst _lhsIoptions
                               then pp_parens ("resume" >#< pp_parens _exprIpp
                                              >-< indent 2 (pp_parens ( "\\" >|<
                                                    pp_parens ("~" >|< pp_parens (nt_ >|< "_Syn" >#< "_inh_arg"))
                                                      >#< "->"
                                              >-< indent 2 ( "let" >#< _leftIpp >#< "= _inh_arg"
                                              >-< indent 2 ("in" >#< _rhsIpp)
                                              ))))
                               else pp_parens ( "case" >#< pp_parens _exprIpp >#< "of"
                                              >-< ("{" >#< _leftIpp >#< "->")
                                              >-< indent 4 (_rhsIpp >#< "}")
                                              )
                               {-# LINE 2241 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule245 #-}
   {-# LINE 445 "src-ag/PrintCleanCode.ag" #-}
   rule245 = \  (_ :: ()) ->
                           {-# LINE 445 "src-ag/PrintCleanCode.ag" #-}
                           False
                           {-# LINE 2247 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule246 #-}
   rule246 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule247 #-}
   rule247 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule248 #-}
   rule248 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule249 #-}
   rule249 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule250 #-}
   rule250 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule251 #-}
   rule251 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule252 #-}
   rule252 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule253 #-}
   rule253 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule254 #-}
   rule254 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Expr_SemFun #-}
sem_Expr_SemFun :: (String) -> T_Exprs  -> T_Expr  -> T_Expr 
sem_Expr_SemFun :: String -> T_Exprs -> T_Expr -> T_Expr
sem_Expr_SemFun !String
arg_nt_ T_Exprs
arg_args_ T_Expr
arg_body_ = Identity T_Expr_s26 -> T_Expr
T_Expr (T_Expr_s26 -> Identity T_Expr_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expr_s26
st26) where
   {-# NOINLINE st26 #-}
   !st26 :: T_Expr_s26
st26 = let
      v25 :: T_Expr_v25 
      v25 :: T_Expr_v25
v25 = \ !(T_Expr_vIn25 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
         _bodyX26 :: T_Expr_s26
_bodyX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_body_))
         (T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Bool -> Options -> String -> T_Exprs_vIn28
T_Exprs_vIn28 Bool
_argsOnested Options
_argsOoptions String
_argsOoutputfile)
         (T_Expr_vOut25 PP_Doc
_bodyIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_bodyX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_bodyOnested Options
_bodyOoptions String
_bodyOoutputfile)
         _strictParams :: [PP_Doc]
_strictParams = [PP_Doc] -> Options -> [PP_Doc]
rule255 [PP_Doc]
_argsIpps Options
_lhsIoptions
         _addBang :: PP_Doc -> PP_Doc
_addBang = Options -> PP_Doc -> PP_Doc
rule256 Options
_lhsIoptions
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = (PP_Doc -> PP_Doc)
-> [PP_Doc] -> PP_Doc -> Options -> [PP_Doc] -> String -> PP_Doc
rule257 PP_Doc -> PP_Doc
_addBang [PP_Doc]
_argsIpps PP_Doc
_bodyIpp Options
_lhsIoptions [PP_Doc]
_strictParams String
arg_nt_
         _argsOnested :: Bool
_argsOnested = Bool -> Bool
rule258 Bool
_lhsInested
         _argsOoptions :: Options
_argsOoptions = Options -> Options
rule259 Options
_lhsIoptions
         _argsOoutputfile :: String
_argsOoutputfile = String -> String
rule260 String
_lhsIoutputfile
         _bodyOnested :: Bool
_bodyOnested = Bool -> Bool
rule261 Bool
_lhsInested
         _bodyOoptions :: Options
_bodyOoptions = Options -> Options
rule262 Options
_lhsIoptions
         _bodyOoutputfile :: String
_bodyOoutputfile = String -> String
rule263 String
_lhsIoutputfile
         !__result_ :: T_Expr_vOut25
__result_ = PP_Doc -> T_Expr_vOut25
T_Expr_vOut25 PP_Doc
_lhsOpp
         in T_Expr_vOut25
__result_ )
     in T_Expr_v25 -> T_Expr_s26
C_Expr_s26 T_Expr_v25
v25
   {-# INLINE rule255 #-}
   {-# LINE 210 "src-ag/PrintCleanCode.ag" #-}
   rule255 = \ ((_argsIpps) :: PP_Docs) ((_lhsIoptions) :: Options) ->
                                    {-# LINE 210 "src-ag/PrintCleanCode.ag" #-}
                                    if strictSems _lhsIoptions
                                    then _argsIpps
                                    else []
                                    {-# LINE 2306 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule256 #-}
   {-# LINE 213 "src-ag/PrintCleanCode.ag" #-}
   rule256 = \ ((_lhsIoptions) :: Options) ->
                               {-# LINE 213 "src-ag/PrintCleanCode.ag" #-}
                               if bangpats _lhsIoptions
                               then \p -> pp_parens ("!" >|< p)
                               else id
                               {-# LINE 2314 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule257 #-}
   {-# LINE 216 "src-ag/PrintCleanCode.ag" #-}
   rule257 = \ _addBang ((_argsIpps) :: PP_Docs) ((_bodyIpp) :: PP_Doc) ((_lhsIoptions) :: Options) _strictParams nt_ ->
                               {-# LINE 216 "src-ag/PrintCleanCode.ag" #-}
                               if breadthFirst _lhsIoptions
                               then "Child" >#< pp_parens ( "\\" >|<
                                        pp_parens (nt_ >|< "_Inh" >#<
                                          ppTuple False (map _addBang     _argsIpps)) >#< "->"
                                    >-< indent 2 (_strictParams     `ppMultiSeqV` _bodyIpp))
                               else if null _argsIpps
                                    then _bodyIpp
                                    else pp_parens (    "\\" >#< (vlist (map _addBang     _argsIpps)) >#< "->"
                                                   >-< indent 4 (_strictParams     `ppMultiSeqV` _bodyIpp)
                                                   )
                               {-# LINE 2329 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule258 #-}
   rule258 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule259 #-}
   rule259 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule260 #-}
   rule260 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule261 #-}
   rule261 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule262 #-}
   rule262 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule263 #-}
   rule263 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile

-- Exprs -------------------------------------------------------
-- wrapper
data Inh_Exprs  = Inh_Exprs { Inh_Exprs -> Bool
nested_Inh_Exprs :: !(Bool), Inh_Exprs -> Options
options_Inh_Exprs :: !(Options), Inh_Exprs -> String
outputfile_Inh_Exprs :: !(String) }
data Syn_Exprs  = Syn_Exprs { Syn_Exprs -> [PP_Doc]
pps_Syn_Exprs :: !(PP_Docs) }
{-# INLINABLE wrap_Exprs #-}
wrap_Exprs :: T_Exprs  -> Inh_Exprs  -> (Syn_Exprs )
wrap_Exprs :: T_Exprs -> Inh_Exprs -> Syn_Exprs
wrap_Exprs !(T_Exprs Identity T_Exprs_s29
act) !(Inh_Exprs Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) =
   Identity Syn_Exprs -> Syn_Exprs
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Exprs_s29
sem <- Identity T_Exprs_s29
act
        let arg28 :: T_Exprs_vIn28
arg28 = Bool -> Options -> String -> T_Exprs_vIn28
T_Exprs_vIn28 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile
        !(T_Exprs_vOut28 [PP_Doc]
_lhsOpps) <- T_Exprs_vOut28 -> Identity T_Exprs_vOut28
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
sem T_Exprs_vIn28
arg28)
        Syn_Exprs -> Identity Syn_Exprs
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_Exprs
Syn_Exprs [PP_Doc]
_lhsOpps)
   )

-- cata
{-# NOINLINE sem_Exprs #-}
sem_Exprs :: Exprs  -> T_Exprs 
sem_Exprs :: Exprs -> T_Exprs
sem_Exprs Exprs
list = (T_Expr -> T_Exprs -> T_Exprs) -> T_Exprs -> [T_Expr] -> T_Exprs
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Expr -> T_Exprs -> T_Exprs
sem_Exprs_Cons T_Exprs
sem_Exprs_Nil ((Expr -> T_Expr) -> Exprs -> [T_Expr]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Expr -> T_Expr
sem_Expr Exprs
list)

-- semantic domain
newtype T_Exprs  = T_Exprs {
                           T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs :: Identity (T_Exprs_s29 )
                           }
newtype T_Exprs_s29  = C_Exprs_s29 {
                                   T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 :: (T_Exprs_v28 )
                                   }
data T_Exprs_s30  = C_Exprs_s30
type T_Exprs_v28  = (T_Exprs_vIn28 ) -> (T_Exprs_vOut28 )
data T_Exprs_vIn28  = T_Exprs_vIn28 (Bool) (Options) (String)
data T_Exprs_vOut28  = T_Exprs_vOut28 (PP_Docs)
{-# NOINLINE sem_Exprs_Cons #-}
sem_Exprs_Cons :: T_Expr  -> T_Exprs  -> T_Exprs 
sem_Exprs_Cons :: T_Expr -> T_Exprs -> T_Exprs
sem_Exprs_Cons T_Expr
arg_hd_ T_Exprs
arg_tl_ = Identity T_Exprs_s29 -> T_Exprs
T_Exprs (T_Exprs_s29 -> Identity T_Exprs_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Exprs_s29
st29) where
   {-# NOINLINE st29 #-}
   !st29 :: T_Exprs_s29
st29 = let
      v28 :: T_Exprs_v28 
      v28 :: T_Exprs_v28
v28 = \ !(T_Exprs_vIn28 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _hdX26 :: T_Expr_s26
_hdX26 = Identity T_Expr_s26 -> T_Expr_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expr -> Identity T_Expr_s26
attach_T_Expr (T_Expr
arg_hd_))
         _tlX29 :: T_Exprs_s29
_tlX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_tl_))
         (T_Expr_vOut25 PP_Doc
_hdIpp) = T_Expr_s26 -> T_Expr_v25
inv_Expr_s26 T_Expr_s26
_hdX26 (Bool -> Options -> String -> T_Expr_vIn25
T_Expr_vIn25 Bool
_hdOnested Options
_hdOoptions String
_hdOoutputfile)
         (T_Exprs_vOut28 [PP_Doc]
_tlIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_tlX29 (Bool -> Options -> String -> T_Exprs_vIn28
T_Exprs_vIn28 Bool
_tlOnested Options
_tlOoptions String
_tlOoutputfile)
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule264 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
         _hdOnested :: Bool
_hdOnested = Bool -> Bool
rule265 Bool
_lhsInested
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule266 Options
_lhsIoptions
         _hdOoutputfile :: String
_hdOoutputfile = String -> String
rule267 String
_lhsIoutputfile
         _tlOnested :: Bool
_tlOnested = Bool -> Bool
rule268 Bool
_lhsInested
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule269 Options
_lhsIoptions
         _tlOoutputfile :: String
_tlOoutputfile = String -> String
rule270 String
_lhsIoutputfile
         !__result_ :: T_Exprs_vOut28
__result_ = [PP_Doc] -> T_Exprs_vOut28
T_Exprs_vOut28 [PP_Doc]
_lhsOpps
         in T_Exprs_vOut28
__result_ )
     in T_Exprs_v28 -> T_Exprs_s29
C_Exprs_s29 T_Exprs_v28
v28
   {-# INLINE rule264 #-}
   {-# LINE 68 "src-ag/PrintCleanCode.ag" #-}
   rule264 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
                     {-# LINE 68 "src-ag/PrintCleanCode.ag" #-}
                     _hdIpp : _tlIpps
                     {-# LINE 2406 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule265 #-}
   rule265 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule266 #-}
   rule266 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule267 #-}
   rule267 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
   {-# INLINE rule268 #-}
   rule268 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule269 #-}
   rule269 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule270 #-}
   rule270 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Exprs_Nil #-}
sem_Exprs_Nil ::  T_Exprs 
sem_Exprs_Nil :: T_Exprs
sem_Exprs_Nil  = Identity T_Exprs_s29 -> T_Exprs
T_Exprs (T_Exprs_s29 -> Identity T_Exprs_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Exprs_s29
st29) where
   {-# NOINLINE st29 #-}
   !st29 :: T_Exprs_s29
st29 = let
      v28 :: T_Exprs_v28 
      v28 :: T_Exprs_v28
v28 = \ !(T_Exprs_vIn28 Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule271  ()
         !__result_ :: T_Exprs_vOut28
__result_ = [PP_Doc] -> T_Exprs_vOut28
T_Exprs_vOut28 [PP_Doc]
_lhsOpps
         in T_Exprs_vOut28
__result_ )
     in T_Exprs_v28 -> T_Exprs_s29
C_Exprs_s29 T_Exprs_v28
v28
   {-# INLINE rule271 #-}
   {-# LINE 69 "src-ag/PrintCleanCode.ag" #-}
   rule271 = \  (_ :: ()) ->
                     {-# LINE 69 "src-ag/PrintCleanCode.ag" #-}
                     []
                     {-# LINE 2442 "src-generated/PrintCleanCode.hs" #-}

-- Lhs ---------------------------------------------------------
-- wrapper
data Inh_Lhs  = Inh_Lhs { Inh_Lhs -> Bool
isDeclOfLet_Inh_Lhs :: !(Bool), Inh_Lhs -> Bool
nested_Inh_Lhs :: !(Bool), Inh_Lhs -> Options
options_Inh_Lhs :: !(Options), Inh_Lhs -> String
outputfile_Inh_Lhs :: !(String) }
data Syn_Lhs  = Syn_Lhs { Syn_Lhs -> PP_Doc
pp_Syn_Lhs :: !(PP_Doc) }
{-# INLINABLE wrap_Lhs #-}
wrap_Lhs :: T_Lhs  -> Inh_Lhs  -> (Syn_Lhs )
wrap_Lhs :: T_Lhs -> Inh_Lhs -> Syn_Lhs
wrap_Lhs !(T_Lhs Identity T_Lhs_s32
act) !(Inh_Lhs Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) =
   Identity Syn_Lhs -> Syn_Lhs
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Lhs_s32
sem <- Identity T_Lhs_s32
act
        let arg31 :: T_Lhs_vIn31
arg31 = Bool -> Bool -> Options -> String -> T_Lhs_vIn31
T_Lhs_vIn31 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile
        !(T_Lhs_vOut31 PP_Doc
_lhsOpp) <- T_Lhs_vOut31 -> Identity T_Lhs_vOut31
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
sem T_Lhs_vIn31
arg31)
        Syn_Lhs -> Identity Syn_Lhs
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Lhs
Syn_Lhs PP_Doc
_lhsOpp)
   )

-- cata
{-# NOINLINE sem_Lhs #-}
sem_Lhs :: Lhs  -> T_Lhs 
sem_Lhs :: Lhs -> T_Lhs
sem_Lhs ( Pattern3 Pattern
pat3_ ) = T_Pattern -> T_Lhs
sem_Lhs_Pattern3 ( Pattern -> T_Pattern
sem_Pattern Pattern
pat3_ )
sem_Lhs ( Pattern3SM Pattern
pat3_ ) = T_Pattern -> T_Lhs
sem_Lhs_Pattern3SM ( Pattern -> T_Pattern
sem_Pattern Pattern
pat3_ )
sem_Lhs ( TupleLhs ![String]
comps_ ) = [String] -> T_Lhs
sem_Lhs_TupleLhs [String]
comps_
sem_Lhs ( UnboxedTupleLhs ![String]
comps_ ) = [String] -> T_Lhs
sem_Lhs_UnboxedTupleLhs [String]
comps_
sem_Lhs ( Fun !String
name_ Exprs
args_ ) = String -> T_Exprs -> T_Lhs
sem_Lhs_Fun String
name_ ( Exprs -> T_Exprs
sem_Exprs Exprs
args_ )
sem_Lhs ( Unwrap !String
name_ Lhs
sub_ ) = String -> T_Lhs -> T_Lhs
sem_Lhs_Unwrap String
name_ ( Lhs -> T_Lhs
sem_Lhs Lhs
sub_ )

-- semantic domain
newtype T_Lhs  = T_Lhs {
                       T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs :: Identity (T_Lhs_s32 )
                       }
newtype T_Lhs_s32  = C_Lhs_s32 {
                               T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 :: (T_Lhs_v31 )
                               }
data T_Lhs_s33  = C_Lhs_s33
type T_Lhs_v31  = (T_Lhs_vIn31 ) -> (T_Lhs_vOut31 )
data T_Lhs_vIn31  = T_Lhs_vIn31 (Bool) (Bool) (Options) (String)
data T_Lhs_vOut31  = T_Lhs_vOut31 (PP_Doc)
{-# NOINLINE sem_Lhs_Pattern3 #-}
sem_Lhs_Pattern3 :: T_Pattern  -> T_Lhs 
sem_Lhs_Pattern3 :: T_Pattern -> T_Lhs
sem_Lhs_Pattern3 T_Pattern
arg_pat3_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
   {-# NOINLINE st32 #-}
   !st32 :: T_Lhs_s32
st32 = let
      v31 :: T_Lhs_v31 
      v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _pat3X41 :: T_Pattern_s41
_pat3X41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pat3_))
         (T_Pattern_vOut40 Pattern
_pat3Icopy Bool
_pat3IisUnderscore PP_Doc
_pat3Ipp PP_Doc
_pat3Ipp' [PP_Doc]
_pat3IstrictVars) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_pat3X41 (Bool -> Bool -> Options -> T_Pattern_vIn40
T_Pattern_vIn40 Bool
_pat3ObelowIrrefutable Bool
_pat3OisDeclOfLet Options
_pat3Ooptions)
         _addStrictGuard :: PP_Doc -> PP_Doc
_addStrictGuard = Bool -> Options -> PP_Doc -> PP_Doc -> PP_Doc
rule272 Bool
_hasStrictVars Options
_lhsIoptions PP_Doc
_strictGuard
         _strictGuard :: PP_Doc
_strictGuard = [PP_Doc] -> PP_Doc
rule273 [PP_Doc]
_pat3IstrictVars
         _hasStrictVars :: Bool
_hasStrictVars = [PP_Doc] -> Bool
rule274 [PP_Doc]
_pat3IstrictVars
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = (PP_Doc -> PP_Doc) -> PP_Doc -> PP_Doc
forall t. (PP_Doc -> t) -> PP_Doc -> t
rule275 PP_Doc -> PP_Doc
_addStrictGuard PP_Doc
_pat3Ipp
         _pat3ObelowIrrefutable :: Bool
_pat3ObelowIrrefutable = () -> Bool
rule276  ()
         _pat3OisDeclOfLet :: Bool
_pat3OisDeclOfLet = Bool -> Bool
rule277 Bool
_lhsIisDeclOfLet
         _pat3Ooptions :: Options
_pat3Ooptions = Options -> Options
rule278 Options
_lhsIoptions
         !__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
         in T_Lhs_vOut31
__result_ )
     in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
   {-# INLINE rule272 #-}
   {-# LINE 248 "src-ag/PrintCleanCode.ag" #-}
   rule272 = \ _hasStrictVars ((_lhsIoptions) :: Options) _strictGuard ->
                             {-# LINE 248 "src-ag/PrintCleanCode.ag" #-}
                             if strictCases _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id
                             {-# LINE 2504 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule273 #-}
   {-# LINE 250 "src-ag/PrintCleanCode.ag" #-}
   rule273 = \ ((_pat3IstrictVars) :: [PP_Doc]) ->
                          {-# LINE 250 "src-ag/PrintCleanCode.ag" #-}
                          _pat3IstrictVars `ppMultiSeqH` (pp "True")
                          {-# LINE 2510 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule274 #-}
   {-# LINE 251 "src-ag/PrintCleanCode.ag" #-}
   rule274 = \ ((_pat3IstrictVars) :: [PP_Doc]) ->
                            {-# LINE 251 "src-ag/PrintCleanCode.ag" #-}
                            not (null _pat3IstrictVars)
                            {-# LINE 2516 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule275 #-}
   {-# LINE 268 "src-ag/PrintCleanCode.ag" #-}
   rule275 = \ _addStrictGuard ((_pat3Ipp) :: PP_Doc) ->
                               {-# LINE 268 "src-ag/PrintCleanCode.ag" #-}
                               _addStrictGuard     _pat3Ipp
                               {-# LINE 2522 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule276 #-}
   {-# LINE 406 "src-ag/PrintCleanCode.ag" #-}
   rule276 = \  (_ :: ()) ->
                                {-# LINE 406 "src-ag/PrintCleanCode.ag" #-}
                                False
                                {-# LINE 2528 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule277 #-}
   rule277 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule278 #-}
   rule278 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# NOINLINE sem_Lhs_Pattern3SM #-}
sem_Lhs_Pattern3SM :: T_Pattern  -> T_Lhs 
sem_Lhs_Pattern3SM :: T_Pattern -> T_Lhs
sem_Lhs_Pattern3SM T_Pattern
arg_pat3_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
   {-# NOINLINE st32 #-}
   !st32 :: T_Lhs_s32
st32 = let
      v31 :: T_Lhs_v31 
      v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _pat3X41 :: T_Pattern_s41
_pat3X41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pat3_))
         (T_Pattern_vOut40 Pattern
_pat3Icopy Bool
_pat3IisUnderscore PP_Doc
_pat3Ipp PP_Doc
_pat3Ipp' [PP_Doc]
_pat3IstrictVars) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_pat3X41 (Bool -> Bool -> Options -> T_Pattern_vIn40
T_Pattern_vIn40 Bool
_pat3ObelowIrrefutable Bool
_pat3OisDeclOfLet Options
_pat3Ooptions)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule279 PP_Doc
_pat3Ipp'
         _pat3ObelowIrrefutable :: Bool
_pat3ObelowIrrefutable = () -> Bool
rule280  ()
         _pat3OisDeclOfLet :: Bool
_pat3OisDeclOfLet = Bool -> Bool
rule281 Bool
_lhsIisDeclOfLet
         _pat3Ooptions :: Options
_pat3Ooptions = Options -> Options
rule282 Options
_lhsIoptions
         !__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
         in T_Lhs_vOut31
__result_ )
     in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
   {-# INLINE rule279 #-}
   {-# LINE 269 "src-ag/PrintCleanCode.ag" #-}
   rule279 = \ ((_pat3Ipp') :: PP_Doc) ->
                               {-# LINE 269 "src-ag/PrintCleanCode.ag" #-}
                               _pat3Ipp'
                               {-# LINE 2557 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule280 #-}
   {-# LINE 406 "src-ag/PrintCleanCode.ag" #-}
   rule280 = \  (_ :: ()) ->
                                {-# LINE 406 "src-ag/PrintCleanCode.ag" #-}
                                False
                                {-# LINE 2563 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule281 #-}
   rule281 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule282 #-}
   rule282 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# NOINLINE sem_Lhs_TupleLhs #-}
sem_Lhs_TupleLhs :: ([String]) -> T_Lhs 
sem_Lhs_TupleLhs :: [String] -> T_Lhs
sem_Lhs_TupleLhs ![String]
arg_comps_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
   {-# NOINLINE st32 #-}
   !st32 :: T_Lhs_s32
st32 = let
      v31 :: T_Lhs_v31 
      v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _addStrictGuard :: PP_Doc -> PP_Doc
_addStrictGuard = Bool -> Options -> PP_Doc -> PP_Doc -> PP_Doc
rule283 Bool
_hasStrictVars Options
_lhsIoptions PP_Doc
_strictGuard
         _strictGuard :: PP_Doc
_strictGuard = Bool -> Options -> [String] -> PP_Doc
rule284 Bool
_lhsIisDeclOfLet Options
_lhsIoptions [String]
arg_comps_
         _hasStrictVars :: Bool
_hasStrictVars = [String] -> Bool
forall a. [a] -> Bool
rule285 [String]
arg_comps_
         _addBang :: PP_Doc -> PP_Doc
_addBang = Options -> PP_Doc -> PP_Doc
rule286 Options
_lhsIoptions
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = (PP_Doc -> PP_Doc)
-> (PP_Doc -> PP_Doc) -> Bool -> [String] -> PP_Doc
forall t.
(PP_Doc -> PP_Doc) -> (PP_Doc -> t) -> Bool -> [String] -> t
rule287 PP_Doc -> PP_Doc
_addBang PP_Doc -> PP_Doc
_addStrictGuard Bool
_lhsInested [String]
arg_comps_
         !__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
         in T_Lhs_vOut31
__result_ )
     in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
   {-# INLINE rule283 #-}
   {-# LINE 248 "src-ag/PrintCleanCode.ag" #-}
   rule283 = \ _hasStrictVars ((_lhsIoptions) :: Options) _strictGuard ->
                             {-# LINE 248 "src-ag/PrintCleanCode.ag" #-}
                             if strictCases _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id
                             {-# LINE 2591 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule284 #-}
   {-# LINE 253 "src-ag/PrintCleanCode.ag" #-}
   rule284 = \ ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) comps_ ->
                          {-# LINE 253 "src-ag/PrintCleanCode.ag" #-}
                          if stricterCases _lhsIoptions && not _lhsIisDeclOfLet
                          then map text comps_ `ppMultiSeqH` (pp "True")
                          else pp "True"
                          {-# LINE 2599 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule285 #-}
   {-# LINE 256 "src-ag/PrintCleanCode.ag" #-}
   rule285 = \ comps_ ->
                            {-# LINE 256 "src-ag/PrintCleanCode.ag" #-}
                            not (null comps_)
                            {-# LINE 2605 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule286 #-}
   {-# LINE 264 "src-ag/PrintCleanCode.ag" #-}
   rule286 = \ ((_lhsIoptions) :: Options) ->
                      {-# LINE 264 "src-ag/PrintCleanCode.ag" #-}
                      if bangpats _lhsIoptions
                               then \p -> "!" >|< p
                               else id
                      {-# LINE 2613 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule287 #-}
   {-# LINE 270 "src-ag/PrintCleanCode.ag" #-}
   rule287 = \ _addBang _addStrictGuard ((_lhsInested) :: Bool) comps_ ->
                               {-# LINE 270 "src-ag/PrintCleanCode.ag" #-}
                               _addStrictGuard     $ ppTuple _lhsInested (map (_addBang     . text) comps_)
                               {-# LINE 2619 "src-generated/PrintCleanCode.hs" #-}
{-# NOINLINE sem_Lhs_UnboxedTupleLhs #-}
sem_Lhs_UnboxedTupleLhs :: ([String]) -> T_Lhs 
sem_Lhs_UnboxedTupleLhs :: [String] -> T_Lhs
sem_Lhs_UnboxedTupleLhs ![String]
arg_comps_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
   {-# NOINLINE st32 #-}
   !st32 :: T_Lhs_s32
st32 = let
      v31 :: T_Lhs_v31 
      v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _addStrictGuard :: PP_Doc -> PP_Doc
_addStrictGuard = Bool -> Options -> PP_Doc -> PP_Doc -> PP_Doc
rule288 Bool
_hasStrictVars Options
_lhsIoptions PP_Doc
_strictGuard
         _strictGuard :: PP_Doc
_strictGuard = Bool -> Options -> [String] -> PP_Doc
rule289 Bool
_lhsIisDeclOfLet Options
_lhsIoptions [String]
arg_comps_
         _hasStrictVars :: Bool
_hasStrictVars = [String] -> Bool
forall a. [a] -> Bool
rule290 [String]
arg_comps_
         _addBang :: PP_Doc -> PP_Doc
_addBang = Options -> PP_Doc -> PP_Doc
rule291 Options
_lhsIoptions
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = (PP_Doc -> PP_Doc)
-> (PP_Doc -> PP_Doc) -> Bool -> [String] -> PP_Doc
forall t.
(PP_Doc -> PP_Doc) -> (PP_Doc -> t) -> Bool -> [String] -> t
rule292 PP_Doc -> PP_Doc
_addBang PP_Doc -> PP_Doc
_addStrictGuard Bool
_lhsInested [String]
arg_comps_
         !__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
         in T_Lhs_vOut31
__result_ )
     in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
   {-# INLINE rule288 #-}
   {-# LINE 248 "src-ag/PrintCleanCode.ag" #-}
   rule288 = \ _hasStrictVars ((_lhsIoptions) :: Options) _strictGuard ->
                             {-# LINE 248 "src-ag/PrintCleanCode.ag" #-}
                             if strictCases _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id
                             {-# LINE 2641 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule289 #-}
   {-# LINE 253 "src-ag/PrintCleanCode.ag" #-}
   rule289 = \ ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) comps_ ->
                          {-# LINE 253 "src-ag/PrintCleanCode.ag" #-}
                          if stricterCases _lhsIoptions && not _lhsIisDeclOfLet
                          then map text comps_ `ppMultiSeqH` (pp "True")
                          else pp "True"
                          {-# LINE 2649 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule290 #-}
   {-# LINE 256 "src-ag/PrintCleanCode.ag" #-}
   rule290 = \ comps_ ->
                            {-# LINE 256 "src-ag/PrintCleanCode.ag" #-}
                            not (null comps_)
                            {-# LINE 2655 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule291 #-}
   {-# LINE 264 "src-ag/PrintCleanCode.ag" #-}
   rule291 = \ ((_lhsIoptions) :: Options) ->
                      {-# LINE 264 "src-ag/PrintCleanCode.ag" #-}
                      if bangpats _lhsIoptions
                               then \p -> "!" >|< p
                               else id
                      {-# LINE 2663 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule292 #-}
   {-# LINE 271 "src-ag/PrintCleanCode.ag" #-}
   rule292 = \ _addBang _addStrictGuard ((_lhsInested) :: Bool) comps_ ->
                                      {-# LINE 271 "src-ag/PrintCleanCode.ag" #-}
                                      _addStrictGuard     $ ppUnboxedTuple _lhsInested (map (_addBang     . text) comps_)
                                      {-# LINE 2669 "src-generated/PrintCleanCode.hs" #-}
{-# NOINLINE sem_Lhs_Fun #-}
sem_Lhs_Fun :: (String) -> T_Exprs  -> T_Lhs 
sem_Lhs_Fun :: String -> T_Exprs -> T_Lhs
sem_Lhs_Fun !String
arg_name_ T_Exprs
arg_args_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
   {-# NOINLINE st32 #-}
   !st32 :: T_Lhs_s32
st32 = let
      v31 :: T_Lhs_v31 
      v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _argsX29 :: T_Exprs_s29
_argsX29 = Identity T_Exprs_s29 -> T_Exprs_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Exprs -> Identity T_Exprs_s29
attach_T_Exprs (T_Exprs
arg_args_))
         (T_Exprs_vOut28 [PP_Doc]
_argsIpps) = T_Exprs_s29 -> T_Exprs_v28
inv_Exprs_s29 T_Exprs_s29
_argsX29 (Bool -> Options -> String -> T_Exprs_vIn28
T_Exprs_vIn28 Bool
_argsOnested Options
_argsOoptions String
_argsOoutputfile)
         _addStrictGuard :: PP_Doc -> PP_Doc
_addStrictGuard = Bool -> Options -> PP_Doc -> PP_Doc -> PP_Doc
rule293 Bool
_hasStrictVars Options
_lhsIoptions PP_Doc
_strictGuard
         _hasStrictVars :: Bool
_hasStrictVars = [PP_Doc] -> Bool
rule294 [PP_Doc]
_argsIpps
         _strictGuard :: PP_Doc
_strictGuard = [PP_Doc] -> PP_Doc
rule295 [PP_Doc]
_argsIpps
         _addBang :: PP_Doc -> PP_Doc
_addBang = Options -> PP_Doc -> PP_Doc
rule296 Options
_lhsIoptions
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = (PP_Doc -> PP_Doc)
-> (PP_Doc -> PP_Doc) -> [PP_Doc] -> String -> PP_Doc
forall t.
(PP_Doc -> PP_Doc) -> (PP_Doc -> t) -> [PP_Doc] -> String -> t
rule297 PP_Doc -> PP_Doc
_addBang PP_Doc -> PP_Doc
_addStrictGuard [PP_Doc]
_argsIpps String
arg_name_
         _argsOnested :: Bool
_argsOnested = Bool -> Bool
rule298 Bool
_lhsInested
         _argsOoptions :: Options
_argsOoptions = Options -> Options
rule299 Options
_lhsIoptions
         _argsOoutputfile :: String
_argsOoutputfile = String -> String
rule300 String
_lhsIoutputfile
         !__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
         in T_Lhs_vOut31
__result_ )
     in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
   {-# INLINE rule293 #-}
   {-# LINE 259 "src-ag/PrintCleanCode.ag" #-}
   rule293 = \ _hasStrictVars ((_lhsIoptions) :: Options) _strictGuard ->
                             {-# LINE 259 "src-ag/PrintCleanCode.ag" #-}
                             if strictSems _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id
                             {-# LINE 2696 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule294 #-}
   {-# LINE 260 "src-ag/PrintCleanCode.ag" #-}
   rule294 = \ ((_argsIpps) :: PP_Docs) ->
                             {-# LINE 260 "src-ag/PrintCleanCode.ag" #-}
                             not (null _argsIpps)
                             {-# LINE 2702 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule295 #-}
   {-# LINE 261 "src-ag/PrintCleanCode.ag" #-}
   rule295 = \ ((_argsIpps) :: PP_Docs) ->
                             {-# LINE 261 "src-ag/PrintCleanCode.ag" #-}
                             _argsIpps `ppMultiSeqH` (pp "True")
                             {-# LINE 2708 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule296 #-}
   {-# LINE 264 "src-ag/PrintCleanCode.ag" #-}
   rule296 = \ ((_lhsIoptions) :: Options) ->
                      {-# LINE 264 "src-ag/PrintCleanCode.ag" #-}
                      if bangpats _lhsIoptions
                               then \p -> "!" >|< p
                               else id
                      {-# LINE 2716 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule297 #-}
   {-# LINE 272 "src-ag/PrintCleanCode.ag" #-}
   rule297 = \ _addBang _addStrictGuard ((_argsIpps) :: PP_Docs) name_ ->
                               {-# LINE 272 "src-ag/PrintCleanCode.ag" #-}
                               _addStrictGuard     (name_ >#< hv_sp (map _addBang     _argsIpps))
                               {-# LINE 2722 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule298 #-}
   rule298 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule299 #-}
   rule299 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule300 #-}
   rule300 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile
{-# NOINLINE sem_Lhs_Unwrap #-}
sem_Lhs_Unwrap :: (String) -> T_Lhs  -> T_Lhs 
sem_Lhs_Unwrap :: String -> T_Lhs -> T_Lhs
sem_Lhs_Unwrap !String
arg_name_ T_Lhs
arg_sub_ = Identity T_Lhs_s32 -> T_Lhs
T_Lhs (T_Lhs_s32 -> Identity T_Lhs_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Lhs_s32
st32) where
   {-# NOINLINE st32 #-}
   !st32 :: T_Lhs_s32
st32 = let
      v31 :: T_Lhs_v31 
      v31 :: T_Lhs_v31
v31 = \ !(T_Lhs_vIn31 Bool
_lhsIisDeclOfLet Bool
_lhsInested Options
_lhsIoptions String
_lhsIoutputfile) -> ( let
         _subX32 :: T_Lhs_s32
_subX32 = Identity T_Lhs_s32 -> T_Lhs_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Lhs -> Identity T_Lhs_s32
attach_T_Lhs (T_Lhs
arg_sub_))
         (T_Lhs_vOut31 PP_Doc
_subIpp) = T_Lhs_s32 -> T_Lhs_v31
inv_Lhs_s32 T_Lhs_s32
_subX32 (Bool -> Bool -> Options -> String -> T_Lhs_vIn31
T_Lhs_vIn31 Bool
_subOisDeclOfLet Bool
_subOnested Options
_subOoptions String
_subOoutputfile)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> PP_Doc
rule301 PP_Doc
_subIpp String
arg_name_
         _subOisDeclOfLet :: Bool
_subOisDeclOfLet = Bool -> Bool
rule302 Bool
_lhsIisDeclOfLet
         _subOnested :: Bool
_subOnested = Bool -> Bool
rule303 Bool
_lhsInested
         _subOoptions :: Options
_subOoptions = Options -> Options
rule304 Options
_lhsIoptions
         _subOoutputfile :: String
_subOoutputfile = String -> String
rule305 String
_lhsIoutputfile
         !__result_ :: T_Lhs_vOut31
__result_ = PP_Doc -> T_Lhs_vOut31
T_Lhs_vOut31 PP_Doc
_lhsOpp
         in T_Lhs_vOut31
__result_ )
     in T_Lhs_v31 -> T_Lhs_s32
C_Lhs_s32 T_Lhs_v31
v31
   {-# INLINE rule301 #-}
   {-# LINE 273 "src-ag/PrintCleanCode.ag" #-}
   rule301 = \ ((_subIpp) :: PP_Doc) name_ ->
                               {-# LINE 273 "src-ag/PrintCleanCode.ag" #-}
                               pp_parens (name_ >#< _subIpp)
                               {-# LINE 2755 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule302 #-}
   rule302 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule303 #-}
   rule303 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule304 #-}
   rule304 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule305 #-}
   rule305 = \ ((_lhsIoutputfile) :: String) ->
     _lhsIoutputfile

-- NamedType ---------------------------------------------------
-- wrapper
data Inh_NamedType  = Inh_NamedType { Inh_NamedType -> Bool
nested_Inh_NamedType :: !(Bool) }
data Syn_NamedType  = Syn_NamedType { Syn_NamedType -> PP_Doc
pp_Syn_NamedType :: !(PP_Doc), Syn_NamedType -> PP_Doc
ppa_Syn_NamedType :: !(PP_Doc) }
{-# INLINABLE wrap_NamedType #-}
wrap_NamedType :: T_NamedType  -> Inh_NamedType  -> (Syn_NamedType )
wrap_NamedType :: T_NamedType -> Inh_NamedType -> Syn_NamedType
wrap_NamedType !(T_NamedType Identity T_NamedType_s35
act) !(Inh_NamedType Bool
_lhsInested) =
   Identity Syn_NamedType -> Syn_NamedType
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_NamedType_s35
sem <- Identity T_NamedType_s35
act
        let arg34 :: T_NamedType_vIn34
arg34 = Bool -> T_NamedType_vIn34
T_NamedType_vIn34 Bool
_lhsInested
        !(T_NamedType_vOut34 PP_Doc
_lhsOpp PP_Doc
_lhsOppa) <- T_NamedType_vOut34 -> Identity T_NamedType_vOut34
forall (m :: * -> *) a. Monad m => a -> m a
return (T_NamedType_s35 -> T_NamedType_v34
inv_NamedType_s35 T_NamedType_s35
sem T_NamedType_vIn34
arg34)
        Syn_NamedType -> Identity Syn_NamedType
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> PP_Doc -> Syn_NamedType
Syn_NamedType PP_Doc
_lhsOpp PP_Doc
_lhsOppa)
   )

-- cata
{-# INLINE sem_NamedType #-}
sem_NamedType :: NamedType  -> T_NamedType 
sem_NamedType :: NamedType -> T_NamedType
sem_NamedType ( Named !Bool
strict_ !String
name_ Type
tp_ ) = Bool -> String -> T_Type -> T_NamedType
sem_NamedType_Named Bool
strict_ String
name_ ( Type -> T_Type
sem_Type Type
tp_ )

-- semantic domain
newtype T_NamedType  = T_NamedType {
                                   T_NamedType -> Identity T_NamedType_s35
attach_T_NamedType :: Identity (T_NamedType_s35 )
                                   }
newtype T_NamedType_s35  = C_NamedType_s35 {
                                           T_NamedType_s35 -> T_NamedType_v34
inv_NamedType_s35 :: (T_NamedType_v34 )
                                           }
data T_NamedType_s36  = C_NamedType_s36
type T_NamedType_v34  = (T_NamedType_vIn34 ) -> (T_NamedType_vOut34 )
data T_NamedType_vIn34  = T_NamedType_vIn34 (Bool)
data T_NamedType_vOut34  = T_NamedType_vOut34 (PP_Doc) (PP_Doc)
{-# NOINLINE sem_NamedType_Named #-}
sem_NamedType_Named :: (Bool) -> (String) -> T_Type  -> T_NamedType 
sem_NamedType_Named :: Bool -> String -> T_Type -> T_NamedType
sem_NamedType_Named !Bool
arg_strict_ !String
arg_name_ T_Type
arg_tp_ = Identity T_NamedType_s35 -> T_NamedType
T_NamedType (T_NamedType_s35 -> Identity T_NamedType_s35
forall (m :: * -> *) a. Monad m => a -> m a
return T_NamedType_s35
st35) where
   {-# NOINLINE st35 #-}
   !st35 :: T_NamedType_s35
st35 = let
      v34 :: T_NamedType_v34 
      v34 :: T_NamedType_v34
v34 = \ !(T_NamedType_vIn34 Bool
_lhsInested) -> ( let
         _tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
         (T_Type_vOut49 Type
_tpIcopy PP_Doc
_tpIpp Int
_tpIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_tpOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> Bool -> PP_Doc
rule306 PP_Doc
_tpIpp Bool
arg_strict_
         _lhsOppa :: PP_Doc
         _lhsOppa :: PP_Doc
_lhsOppa = String -> PP_Doc
rule307 String
arg_name_
         _tpOnested :: Bool
_tpOnested = Bool -> Bool
rule308 Bool
_lhsInested
         !__result_ :: T_NamedType_vOut34
__result_ = PP_Doc -> PP_Doc -> T_NamedType_vOut34
T_NamedType_vOut34 PP_Doc
_lhsOpp PP_Doc
_lhsOppa
         in T_NamedType_vOut34
__result_ )
     in T_NamedType_v34 -> T_NamedType_s35
C_NamedType_s35 T_NamedType_v34
v34
   {-# INLINE rule306 #-}
   {-# LINE 240 "src-ag/PrintCleanCode.ag" #-}
   rule306 = \ ((_tpIpp) :: PP_Doc) strict_ ->
                               {-# LINE 240 "src-ag/PrintCleanCode.ag" #-}
                               if strict_
                                 then "!" >|< pp_parens _tpIpp
                                 else _tpIpp
                               {-# LINE 2823 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule307 #-}
   {-# LINE 244 "src-ag/PrintCleanCode.ag" #-}
   rule307 = \ name_ ->
                               {-# LINE 244 "src-ag/PrintCleanCode.ag" #-}
                               pp name_
                               {-# LINE 2829 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule308 #-}
   rule308 = \ ((_lhsInested) :: Bool) ->
     _lhsInested

-- NamedTypes --------------------------------------------------
-- wrapper
data Inh_NamedTypes  = Inh_NamedTypes { Inh_NamedTypes -> Bool
nested_Inh_NamedTypes :: !(Bool) }
data Syn_NamedTypes  = Syn_NamedTypes { Syn_NamedTypes -> [PP_Doc]
ppas_Syn_NamedTypes :: !(PP_Docs), Syn_NamedTypes -> [PP_Doc]
pps_Syn_NamedTypes :: !(PP_Docs) }
{-# INLINABLE wrap_NamedTypes #-}
wrap_NamedTypes :: T_NamedTypes  -> Inh_NamedTypes  -> (Syn_NamedTypes )
wrap_NamedTypes :: T_NamedTypes -> Inh_NamedTypes -> Syn_NamedTypes
wrap_NamedTypes !(T_NamedTypes Identity T_NamedTypes_s38
act) !(Inh_NamedTypes Bool
_lhsInested) =
   Identity Syn_NamedTypes -> Syn_NamedTypes
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_NamedTypes_s38
sem <- Identity T_NamedTypes_s38
act
        let arg37 :: T_NamedTypes_vIn37
arg37 = Bool -> T_NamedTypes_vIn37
T_NamedTypes_vIn37 Bool
_lhsInested
        !(T_NamedTypes_vOut37 [PP_Doc]
_lhsOppas [PP_Doc]
_lhsOpps) <- T_NamedTypes_vOut37 -> Identity T_NamedTypes_vOut37
forall (m :: * -> *) a. Monad m => a -> m a
return (T_NamedTypes_s38 -> T_NamedTypes_v37
inv_NamedTypes_s38 T_NamedTypes_s38
sem T_NamedTypes_vIn37
arg37)
        Syn_NamedTypes -> Identity Syn_NamedTypes
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> [PP_Doc] -> Syn_NamedTypes
Syn_NamedTypes [PP_Doc]
_lhsOppas [PP_Doc]
_lhsOpps)
   )

-- cata
{-# NOINLINE sem_NamedTypes #-}
sem_NamedTypes :: NamedTypes  -> T_NamedTypes 
sem_NamedTypes :: NamedTypes -> T_NamedTypes
sem_NamedTypes NamedTypes
list = (T_NamedType -> T_NamedTypes -> T_NamedTypes)
-> T_NamedTypes -> [T_NamedType] -> T_NamedTypes
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_NamedType -> T_NamedTypes -> T_NamedTypes
sem_NamedTypes_Cons T_NamedTypes
sem_NamedTypes_Nil ((NamedType -> T_NamedType) -> NamedTypes -> [T_NamedType]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map NamedType -> T_NamedType
sem_NamedType NamedTypes
list)

-- semantic domain
newtype T_NamedTypes  = T_NamedTypes {
                                     T_NamedTypes -> Identity T_NamedTypes_s38
attach_T_NamedTypes :: Identity (T_NamedTypes_s38 )
                                     }
newtype T_NamedTypes_s38  = C_NamedTypes_s38 {
                                             T_NamedTypes_s38 -> T_NamedTypes_v37
inv_NamedTypes_s38 :: (T_NamedTypes_v37 )
                                             }
data T_NamedTypes_s39  = C_NamedTypes_s39
type T_NamedTypes_v37  = (T_NamedTypes_vIn37 ) -> (T_NamedTypes_vOut37 )
data T_NamedTypes_vIn37  = T_NamedTypes_vIn37 (Bool)
data T_NamedTypes_vOut37  = T_NamedTypes_vOut37 (PP_Docs) (PP_Docs)
{-# NOINLINE sem_NamedTypes_Cons #-}
sem_NamedTypes_Cons :: T_NamedType  -> T_NamedTypes  -> T_NamedTypes 
sem_NamedTypes_Cons :: T_NamedType -> T_NamedTypes -> T_NamedTypes
sem_NamedTypes_Cons T_NamedType
arg_hd_ T_NamedTypes
arg_tl_ = Identity T_NamedTypes_s38 -> T_NamedTypes
T_NamedTypes (T_NamedTypes_s38 -> Identity T_NamedTypes_s38
forall (m :: * -> *) a. Monad m => a -> m a
return T_NamedTypes_s38
st38) where
   {-# NOINLINE st38 #-}
   !st38 :: T_NamedTypes_s38
st38 = let
      v37 :: T_NamedTypes_v37 
      v37 :: T_NamedTypes_v37
v37 = \ !(T_NamedTypes_vIn37 Bool
_lhsInested) -> ( let
         _hdX35 :: T_NamedType_s35
_hdX35 = Identity T_NamedType_s35 -> T_NamedType_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NamedType -> Identity T_NamedType_s35
attach_T_NamedType (T_NamedType
arg_hd_))
         _tlX38 :: T_NamedTypes_s38
_tlX38 = Identity T_NamedTypes_s38 -> T_NamedTypes_s38
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NamedTypes -> Identity T_NamedTypes_s38
attach_T_NamedTypes (T_NamedTypes
arg_tl_))
         (T_NamedType_vOut34 PP_Doc
_hdIpp PP_Doc
_hdIppa) = T_NamedType_s35 -> T_NamedType_v34
inv_NamedType_s35 T_NamedType_s35
_hdX35 (Bool -> T_NamedType_vIn34
T_NamedType_vIn34 Bool
_hdOnested)
         (T_NamedTypes_vOut37 [PP_Doc]
_tlIppas [PP_Doc]
_tlIpps) = T_NamedTypes_s38 -> T_NamedTypes_v37
inv_NamedTypes_s38 T_NamedTypes_s38
_tlX38 (Bool -> T_NamedTypes_vIn37
T_NamedTypes_vIn37 Bool
_tlOnested)
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule309 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
         _lhsOppas :: PP_Docs
         _lhsOppas :: [PP_Doc]
_lhsOppas = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule310 PP_Doc
_hdIppa [PP_Doc]
_tlIppas
         _hdOnested :: Bool
_hdOnested = Bool -> Bool
rule311 Bool
_lhsInested
         _tlOnested :: Bool
_tlOnested = Bool -> Bool
rule312 Bool
_lhsInested
         !__result_ :: T_NamedTypes_vOut37
__result_ = [PP_Doc] -> [PP_Doc] -> T_NamedTypes_vOut37
T_NamedTypes_vOut37 [PP_Doc]
_lhsOppas [PP_Doc]
_lhsOpps
         in T_NamedTypes_vOut37
__result_ )
     in T_NamedTypes_v37 -> T_NamedTypes_s38
C_NamedTypes_s38 T_NamedTypes_v37
v37
   {-# INLINE rule309 #-}
   {-# LINE 86 "src-ag/PrintCleanCode.ag" #-}
   rule309 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
                      {-# LINE 86 "src-ag/PrintCleanCode.ag" #-}
                      _hdIpp : _tlIpps
                      {-# LINE 2889 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule310 #-}
   {-# LINE 87 "src-ag/PrintCleanCode.ag" #-}
   rule310 = \ ((_hdIppa) :: PP_Doc) ((_tlIppas) :: PP_Docs) ->
                      {-# LINE 87 "src-ag/PrintCleanCode.ag" #-}
                      _hdIppa : _tlIppas
                      {-# LINE 2895 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule311 #-}
   rule311 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule312 #-}
   rule312 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_NamedTypes_Nil #-}
sem_NamedTypes_Nil ::  T_NamedTypes 
sem_NamedTypes_Nil :: T_NamedTypes
sem_NamedTypes_Nil  = Identity T_NamedTypes_s38 -> T_NamedTypes
T_NamedTypes (T_NamedTypes_s38 -> Identity T_NamedTypes_s38
forall (m :: * -> *) a. Monad m => a -> m a
return T_NamedTypes_s38
st38) where
   {-# NOINLINE st38 #-}
   !st38 :: T_NamedTypes_s38
st38 = let
      v37 :: T_NamedTypes_v37 
      v37 :: T_NamedTypes_v37
v37 = \ !(T_NamedTypes_vIn37 Bool
_lhsInested) -> ( let
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule313  ()
         _lhsOppas :: PP_Docs
         _lhsOppas :: [PP_Doc]
_lhsOppas = () -> [PP_Doc]
forall a. () -> [a]
rule314  ()
         !__result_ :: T_NamedTypes_vOut37
__result_ = [PP_Doc] -> [PP_Doc] -> T_NamedTypes_vOut37
T_NamedTypes_vOut37 [PP_Doc]
_lhsOppas [PP_Doc]
_lhsOpps
         in T_NamedTypes_vOut37
__result_ )
     in T_NamedTypes_v37 -> T_NamedTypes_s38
C_NamedTypes_s38 T_NamedTypes_v37
v37
   {-# INLINE rule313 #-}
   {-# LINE 88 "src-ag/PrintCleanCode.ag" #-}
   rule313 = \  (_ :: ()) ->
                      {-# LINE 88 "src-ag/PrintCleanCode.ag" #-}
                      []
                      {-# LINE 2921 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule314 #-}
   {-# LINE 89 "src-ag/PrintCleanCode.ag" #-}
   rule314 = \  (_ :: ()) ->
                      {-# LINE 89 "src-ag/PrintCleanCode.ag" #-}
                      []
                      {-# LINE 2927 "src-generated/PrintCleanCode.hs" #-}

-- Pattern -----------------------------------------------------
-- wrapper
data Inh_Pattern  = Inh_Pattern { Inh_Pattern -> Bool
belowIrrefutable_Inh_Pattern :: !(Bool), Inh_Pattern -> Bool
isDeclOfLet_Inh_Pattern :: !(Bool), Inh_Pattern -> Options
options_Inh_Pattern :: !(Options) }
data Syn_Pattern  = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: !(Pattern), Syn_Pattern -> Bool
isUnderscore_Syn_Pattern :: !(Bool), Syn_Pattern -> PP_Doc
pp_Syn_Pattern :: !(PP_Doc), Syn_Pattern -> PP_Doc
pp'_Syn_Pattern :: !(PP_Doc), Syn_Pattern -> [PP_Doc]
strictVars_Syn_Pattern :: !([PP_Doc]) }
{-# 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_s41
act) !(Inh_Pattern Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions) =
   Identity Syn_Pattern -> Syn_Pattern
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Pattern_s41
sem <- Identity T_Pattern_s41
act
        let arg40 :: T_Pattern_vIn40
arg40 = Bool -> Bool -> Options -> T_Pattern_vIn40
T_Pattern_vIn40 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions
        !(T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp PP_Doc
_lhsOpp' [PP_Doc]
_lhsOstrictVars) <- T_Pattern_vOut40 -> Identity T_Pattern_vOut40
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
sem T_Pattern_vIn40
arg40)
        Syn_Pattern -> Identity Syn_Pattern
forall (m :: * -> *) a. Monad m => a -> m a
return (Pattern -> Bool -> PP_Doc -> PP_Doc -> [PP_Doc] -> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp PP_Doc
_lhsOpp' [PP_Doc]
_lhsOstrictVars)
   )

-- 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_s41
attach_T_Pattern :: Identity (T_Pattern_s41 )
                               }
newtype T_Pattern_s41  = C_Pattern_s41 {
                                       T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 :: (T_Pattern_v40 )
                                       }
data T_Pattern_s42  = C_Pattern_s42
type T_Pattern_v40  = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )
data T_Pattern_vIn40  = T_Pattern_vIn40 (Bool) (Bool) (Options)
data T_Pattern_vOut40  = T_Pattern_vOut40 (Pattern) (Bool) (PP_Doc) (PP_Doc) ([PP_Doc])
{-# 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_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   !st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ !(T_Pattern_vIn40 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions) -> ( let
         _patsX44 :: T_Patterns_s44
_patsX44 = Identity T_Patterns_s44 -> T_Patterns_s44
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut43 Patterns
_patsIcopy [PP_Doc]
_patsIpps [PP_Doc]
_patsIpps' [PP_Doc]
_patsIstrictVars) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (Bool -> Bool -> Options -> T_Patterns_vIn43
T_Patterns_vIn43 Bool
_patsObelowIrrefutable Bool
_patsOisDeclOfLet Options
_patsOoptions)
         _addBang :: PP_Doc -> PP_Doc
_addBang = Bool -> Bool -> Options -> PP_Doc -> PP_Doc
rule315 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = (PP_Doc -> PP_Doc) -> [PP_Doc] -> Identifier -> PP_Doc
forall t. (PP_Doc -> t) -> [PP_Doc] -> Identifier -> t
rule316 PP_Doc -> PP_Doc
_addBang [PP_Doc]
_patsIpps Identifier
arg_name_
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule317  ()
         _lhsOpp' :: PP_Doc
         _lhsOpp' :: PP_Doc
_lhsOpp' = [PP_Doc] -> Identifier -> PP_Doc
rule318 [PP_Doc]
_patsIpps' Identifier
arg_name_
         _lhsOstrictVars :: [PP_Doc]
         _lhsOstrictVars :: [PP_Doc]
_lhsOstrictVars = [PP_Doc] -> [PP_Doc]
rule319 [PP_Doc]
_patsIstrictVars
         _copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule320 Patterns
_patsIcopy Identifier
arg_name_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule321 Pattern
_copy
         _patsObelowIrrefutable :: Bool
_patsObelowIrrefutable = Bool -> Bool
rule322 Bool
_lhsIbelowIrrefutable
         _patsOisDeclOfLet :: Bool
_patsOisDeclOfLet = Bool -> Bool
rule323 Bool
_lhsIisDeclOfLet
         _patsOoptions :: Options
_patsOoptions = Options -> Options
rule324 Options
_lhsIoptions
         !__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> PP_Doc -> [PP_Doc] -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp PP_Doc
_lhsOpp' [PP_Doc]
_lhsOstrictVars
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule315 #-}
   {-# LINE 378 "src-ag/PrintCleanCode.ag" #-}
   rule315 = \ ((_lhsIbelowIrrefutable) :: Bool) ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) ->
                      {-# LINE 378 "src-ag/PrintCleanCode.ag" #-}
                      if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable
                      then \p -> "!" >|< p
                      else id
                      {-# LINE 2997 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule316 #-}
   {-# LINE 383 "src-ag/PrintCleanCode.ag" #-}
   rule316 = \ _addBang ((_patsIpps) :: [PP_Doc]) name_ ->
                           {-# LINE 383 "src-ag/PrintCleanCode.ag" #-}
                           _addBang     $ pp_parens $ name_ >#< hv_sp _patsIpps
                           {-# LINE 3003 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule317 #-}
   {-# LINE 394 "src-ag/PrintCleanCode.ag" #-}
   rule317 = \  (_ :: ()) ->
                                    {-# LINE 394 "src-ag/PrintCleanCode.ag" #-}
                                    False
                                    {-# LINE 3009 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule318 #-}
   {-# LINE 417 "src-ag/PrintCleanCode.ag" #-}
   rule318 = \ ((_patsIpps') :: [PP_Doc]) name_ ->
                            {-# LINE 417 "src-ag/PrintCleanCode.ag" #-}
                            pp_parens $ name_ >#< hv_sp (map pp_parens _patsIpps')
                            {-# LINE 3015 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule319 #-}
   rule319 = \ ((_patsIstrictVars) :: [PP_Doc]) ->
     _patsIstrictVars
   {-# INLINE rule320 #-}
   rule320 = \ ((_patsIcopy) :: Patterns) name_ ->
     Constr name_ _patsIcopy
   {-# INLINE rule321 #-}
   rule321 = \ _copy ->
     _copy
   {-# INLINE rule322 #-}
   rule322 = \ ((_lhsIbelowIrrefutable) :: Bool) ->
     _lhsIbelowIrrefutable
   {-# INLINE rule323 #-}
   rule323 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule324 #-}
   rule324 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# 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_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   !st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ !(T_Pattern_vIn40 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions) -> ( let
         _patsX44 :: T_Patterns_s44
_patsX44 = Identity T_Patterns_s44 -> T_Patterns_s44
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut43 Patterns
_patsIcopy [PP_Doc]
_patsIpps [PP_Doc]
_patsIpps' [PP_Doc]
_patsIstrictVars) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (Bool -> Bool -> Options -> T_Patterns_vIn43
T_Patterns_vIn43 Bool
_patsObelowIrrefutable Bool
_patsOisDeclOfLet Options
_patsOoptions)
         _addBang :: PP_Doc -> PP_Doc
_addBang = Bool -> Bool -> Options -> PP_Doc -> PP_Doc
rule325 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = (PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc
forall t. (PP_Doc -> t) -> [PP_Doc] -> t
rule326 PP_Doc -> PP_Doc
_addBang [PP_Doc]
_patsIpps
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule327  ()
         _lhsOpp' :: PP_Doc
         _lhsOpp' :: PP_Doc
_lhsOpp' = [PP_Doc] -> PP_Doc
rule328 [PP_Doc]
_patsIpps'
         _lhsOstrictVars :: [PP_Doc]
         _lhsOstrictVars :: [PP_Doc]
_lhsOstrictVars = [PP_Doc] -> [PP_Doc]
rule329 [PP_Doc]
_patsIstrictVars
         _copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule330 Patterns
_patsIcopy Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule331 Pattern
_copy
         _patsObelowIrrefutable :: Bool
_patsObelowIrrefutable = Bool -> Bool
rule332 Bool
_lhsIbelowIrrefutable
         _patsOisDeclOfLet :: Bool
_patsOisDeclOfLet = Bool -> Bool
rule333 Bool
_lhsIisDeclOfLet
         _patsOoptions :: Options
_patsOoptions = Options -> Options
rule334 Options
_lhsIoptions
         !__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> PP_Doc -> [PP_Doc] -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp PP_Doc
_lhsOpp' [PP_Doc]
_lhsOstrictVars
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule325 #-}
   {-# LINE 378 "src-ag/PrintCleanCode.ag" #-}
   rule325 = \ ((_lhsIbelowIrrefutable) :: Bool) ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) ->
                      {-# LINE 378 "src-ag/PrintCleanCode.ag" #-}
                      if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable
                      then \p -> "!" >|< p
                      else id
                      {-# LINE 3068 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule326 #-}
   {-# LINE 384 "src-ag/PrintCleanCode.ag" #-}
   rule326 = \ _addBang ((_patsIpps) :: [PP_Doc]) ->
                           {-# LINE 384 "src-ag/PrintCleanCode.ag" #-}
                           _addBang     $ pp_block "(" ")" "," _patsIpps
                           {-# LINE 3074 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule327 #-}
   {-# LINE 395 "src-ag/PrintCleanCode.ag" #-}
   rule327 = \  (_ :: ()) ->
                                    {-# LINE 395 "src-ag/PrintCleanCode.ag" #-}
                                    False
                                    {-# LINE 3080 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule328 #-}
   {-# LINE 418 "src-ag/PrintCleanCode.ag" #-}
   rule328 = \ ((_patsIpps') :: [PP_Doc]) ->
                            {-# LINE 418 "src-ag/PrintCleanCode.ag" #-}
                            pp_block "(" ")" "," _patsIpps'
                            {-# LINE 3086 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule329 #-}
   rule329 = \ ((_patsIstrictVars) :: [PP_Doc]) ->
     _patsIstrictVars
   {-# INLINE rule330 #-}
   rule330 = \ ((_patsIcopy) :: Patterns) pos_ ->
     Product pos_ _patsIcopy
   {-# INLINE rule331 #-}
   rule331 = \ _copy ->
     _copy
   {-# INLINE rule332 #-}
   rule332 = \ ((_lhsIbelowIrrefutable) :: Bool) ->
     _lhsIbelowIrrefutable
   {-# INLINE rule333 #-}
   rule333 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule334 #-}
   rule334 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# 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_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   !st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ !(T_Pattern_vIn40 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions) -> ( let
         _patX41 :: T_Pattern_s41
_patX41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut40 Pattern
_patIcopy Bool
_patIisUnderscore PP_Doc
_patIpp PP_Doc
_patIpp' [PP_Doc]
_patIstrictVars) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (Bool -> Bool -> Options -> T_Pattern_vIn40
T_Pattern_vIn40 Bool
_patObelowIrrefutable Bool
_patOisDeclOfLet Options
_patOoptions)
         _strictVar :: [PP_Doc]
_strictVar = Bool -> Options -> PP_Doc -> [PP_Doc]
forall a. Bool -> Options -> a -> [a]
rule335 Bool
_lhsIisDeclOfLet Options
_lhsIoptions PP_Doc
_ppVar
         _strictPatVars :: [PP_Doc]
_strictPatVars = Bool -> Options -> [PP_Doc] -> [PP_Doc]
rule336 Bool
_lhsIisDeclOfLet Options
_lhsIoptions [PP_Doc]
_patIstrictVars
         _lhsOstrictVars :: [PP_Doc]
         _lhsOstrictVars :: [PP_Doc]
_lhsOstrictVars = [PP_Doc] -> [PP_Doc] -> [PP_Doc]
forall a. [a] -> [a] -> [a]
rule337 [PP_Doc]
_strictPatVars [PP_Doc]
_strictVar
         _addBang :: PP_Doc -> PP_Doc
_addBang = Bool -> Bool -> Options -> PP_Doc -> PP_Doc
rule338 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions
         _ppVar :: PP_Doc
_ppVar = Options -> Identifier -> Identifier -> PP_Doc
rule339 Options
_lhsIoptions Identifier
arg_attr_ Identifier
arg_field_
         _ppVarBang :: PP_Doc
_ppVarBang = (PP_Doc -> PP_Doc) -> PP_Doc -> PP_Doc
forall t t. (t -> t) -> t -> t
rule340 PP_Doc -> PP_Doc
_addBang PP_Doc
_ppVar
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = Bool -> PP_Doc -> PP_Doc -> PP_Doc
rule341 Bool
_patIisUnderscore PP_Doc
_patIpp PP_Doc
_ppVarBang
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule342  ()
         _lhsOpp' :: PP_Doc
         _lhsOpp' :: PP_Doc
_lhsOpp' = Options -> PP_Doc -> Identifier -> Identifier -> PP_Doc
rule343 Options
_lhsIoptions PP_Doc
_patIpp' Identifier
arg_attr_ Identifier
arg_field_
         _copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule344 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule345 Pattern
_copy
         _patObelowIrrefutable :: Bool
_patObelowIrrefutable = Bool -> Bool
rule346 Bool
_lhsIbelowIrrefutable
         _patOisDeclOfLet :: Bool
_patOisDeclOfLet = Bool -> Bool
rule347 Bool
_lhsIisDeclOfLet
         _patOoptions :: Options
_patOoptions = Options -> Options
rule348 Options
_lhsIoptions
         !__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> PP_Doc -> [PP_Doc] -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp PP_Doc
_lhsOpp' [PP_Doc]
_lhsOstrictVars
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule335 #-}
   {-# LINE 356 "src-ag/PrintCleanCode.ag" #-}
   rule335 = \ ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) _ppVar ->
            {-# LINE 356 "src-ag/PrintCleanCode.ag" #-}
            if strictCases _lhsIoptions && not _lhsIisDeclOfLet
            then [_ppVar    ]
            else []
            {-# LINE 3143 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule336 #-}
   {-# LINE 360 "src-ag/PrintCleanCode.ag" #-}
   rule336 = \ ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) ((_patIstrictVars) :: [PP_Doc]) ->
            {-# LINE 360 "src-ag/PrintCleanCode.ag" #-}
            if stricterCases _lhsIoptions && not _lhsIisDeclOfLet
            then _patIstrictVars
            else []
            {-# LINE 3151 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule337 #-}
   {-# LINE 364 "src-ag/PrintCleanCode.ag" #-}
   rule337 = \ _strictPatVars _strictVar ->
            {-# LINE 364 "src-ag/PrintCleanCode.ag" #-}
            _strictVar     ++ _strictPatVars
            {-# LINE 3157 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule338 #-}
   {-# LINE 378 "src-ag/PrintCleanCode.ag" #-}
   rule338 = \ ((_lhsIbelowIrrefutable) :: Bool) ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) ->
                      {-# LINE 378 "src-ag/PrintCleanCode.ag" #-}
                      if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable
                      then \p -> "!" >|< p
                      else id
                      {-# LINE 3165 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule339 #-}
   {-# LINE 385 "src-ag/PrintCleanCode.ag" #-}
   rule339 = \ ((_lhsIoptions) :: Options) attr_ field_ ->
                           {-# LINE 385 "src-ag/PrintCleanCode.ag" #-}
                           pp (attrname _lhsIoptions False field_ attr_)
                           {-# LINE 3171 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule340 #-}
   {-# LINE 386 "src-ag/PrintCleanCode.ag" #-}
   rule340 = \ _addBang _ppVar ->
                              {-# LINE 386 "src-ag/PrintCleanCode.ag" #-}
                              _addBang     $ _ppVar
                              {-# LINE 3177 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule341 #-}
   {-# LINE 387 "src-ag/PrintCleanCode.ag" #-}
   rule341 = \ ((_patIisUnderscore) :: Bool) ((_patIpp) :: PP_Doc) _ppVarBang ->
                           {-# LINE 387 "src-ag/PrintCleanCode.ag" #-}
                           if _patIisUnderscore
                            then _ppVarBang
                            else _ppVarBang     >|< "@" >|< _patIpp
                           {-# LINE 3185 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule342 #-}
   {-# LINE 396 "src-ag/PrintCleanCode.ag" #-}
   rule342 = \  (_ :: ()) ->
                                    {-# LINE 396 "src-ag/PrintCleanCode.ag" #-}
                                    False
                                    {-# LINE 3191 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule343 #-}
   {-# LINE 419 "src-ag/PrintCleanCode.ag" #-}
   rule343 = \ ((_lhsIoptions) :: Options) ((_patIpp') :: PP_Doc) attr_ field_ ->
                            {-# LINE 419 "src-ag/PrintCleanCode.ag" #-}
                            let attribute | field_ == _LOC || field_ == nullIdent = locname' attr_
                                          | otherwise                             = attrname _lhsIoptions False field_ attr_
                            in attribute >|< "@" >|< _patIpp'
                            {-# LINE 3199 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule344 #-}
   rule344 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
     Alias field_ attr_ _patIcopy
   {-# INLINE rule345 #-}
   rule345 = \ _copy ->
     _copy
   {-# INLINE rule346 #-}
   rule346 = \ ((_lhsIbelowIrrefutable) :: Bool) ->
     _lhsIbelowIrrefutable
   {-# INLINE rule347 #-}
   rule347 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule348 #-}
   rule348 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# 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_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   !st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ !(T_Pattern_vIn40 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions) -> ( let
         _patX41 :: T_Pattern_s41
_patX41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut40 Pattern
_patIcopy Bool
_patIisUnderscore PP_Doc
_patIpp PP_Doc
_patIpp' [PP_Doc]
_patIstrictVars) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (Bool -> Bool -> Options -> T_Pattern_vIn40
T_Pattern_vIn40 Bool
_patObelowIrrefutable Bool
_patOisDeclOfLet Options
_patOoptions)
         _lhsOstrictVars :: [PP_Doc]
         _lhsOstrictVars :: [PP_Doc]
_lhsOstrictVars = () -> [PP_Doc]
forall a. () -> [a]
rule349  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule350 PP_Doc
_patIpp
         _patObelowIrrefutable :: Bool
_patObelowIrrefutable = () -> Bool
rule351  ()
         _lhsOpp' :: PP_Doc
         _lhsOpp' :: PP_Doc
_lhsOpp' = PP_Doc -> PP_Doc
rule352 PP_Doc
_patIpp
         _copy :: Pattern
_copy = Pattern -> Pattern
rule353 Pattern
_patIcopy
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule354 Pattern
_copy
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = Bool -> Bool
rule355 Bool
_patIisUnderscore
         _patOisDeclOfLet :: Bool
_patOisDeclOfLet = Bool -> Bool
rule356 Bool
_lhsIisDeclOfLet
         _patOoptions :: Options
_patOoptions = Options -> Options
rule357 Options
_lhsIoptions
         !__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> PP_Doc -> [PP_Doc] -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp PP_Doc
_lhsOpp' [PP_Doc]
_lhsOstrictVars
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule349 #-}
   {-# LINE 366 "src-ag/PrintCleanCode.ag" #-}
   rule349 = \  (_ :: ()) ->
                         {-# LINE 366 "src-ag/PrintCleanCode.ag" #-}
                         []
                         {-# LINE 3246 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule350 #-}
   {-# LINE 390 "src-ag/PrintCleanCode.ag" #-}
   rule350 = \ ((_patIpp) :: PP_Doc) ->
                           {-# LINE 390 "src-ag/PrintCleanCode.ag" #-}
                           text "~" >|< pp_parens _patIpp
                           {-# LINE 3252 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule351 #-}
   {-# LINE 402 "src-ag/PrintCleanCode.ag" #-}
   rule351 = \  (_ :: ()) ->
                               {-# LINE 402 "src-ag/PrintCleanCode.ag" #-}
                               True
                               {-# LINE 3258 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule352 #-}
   {-# LINE 422 "src-ag/PrintCleanCode.ag" #-}
   rule352 = \ ((_patIpp) :: PP_Doc) ->
                            {-# LINE 422 "src-ag/PrintCleanCode.ag" #-}
                            text "~" >|< pp_parens _patIpp
                            {-# LINE 3264 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule353 #-}
   rule353 = \ ((_patIcopy) :: Pattern) ->
     Irrefutable _patIcopy
   {-# INLINE rule354 #-}
   rule354 = \ _copy ->
     _copy
   {-# INLINE rule355 #-}
   rule355 = \ ((_patIisUnderscore) :: Bool) ->
     _patIisUnderscore
   {-# INLINE rule356 #-}
   rule356 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule357 #-}
   rule357 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# 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_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   !st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ !(T_Pattern_vIn40 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions) -> ( let
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule358  ()
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule359  ()
         _lhsOpp' :: PP_Doc
         _lhsOpp' :: PP_Doc
_lhsOpp' = () -> PP_Doc
rule360  ()
         _lhsOstrictVars :: [PP_Doc]
         _lhsOstrictVars :: [PP_Doc]
_lhsOstrictVars = () -> [PP_Doc]
forall a. () -> [a]
rule361  ()
         _copy :: Pattern
_copy = Pos -> Pattern
rule362 Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule363 Pattern
_copy
         !__result_ :: T_Pattern_vOut40
__result_ = Pattern -> Bool -> PP_Doc -> PP_Doc -> [PP_Doc] -> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOpp PP_Doc
_lhsOpp' [PP_Doc]
_lhsOstrictVars
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule358 #-}
   {-# LINE 391 "src-ag/PrintCleanCode.ag" #-}
   rule358 = \  (_ :: ()) ->
                           {-# LINE 391 "src-ag/PrintCleanCode.ag" #-}
                           text "_"
                           {-# LINE 3306 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule359 #-}
   {-# LINE 397 "src-ag/PrintCleanCode.ag" #-}
   rule359 = \  (_ :: ()) ->
                                    {-# LINE 397 "src-ag/PrintCleanCode.ag" #-}
                                    True
                                    {-# LINE 3312 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule360 #-}
   {-# LINE 423 "src-ag/PrintCleanCode.ag" #-}
   rule360 = \  (_ :: ()) ->
                            {-# LINE 423 "src-ag/PrintCleanCode.ag" #-}
                            text "_"
                            {-# LINE 3318 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule361 #-}
   rule361 = \  (_ :: ()) ->
     []
   {-# INLINE rule362 #-}
   rule362 = \ pos_ ->
     Underscore pos_
   {-# INLINE rule363 #-}
   rule363 = \ _copy ->
     _copy

-- Patterns ----------------------------------------------------
-- wrapper
data Inh_Patterns  = Inh_Patterns { Inh_Patterns -> Bool
belowIrrefutable_Inh_Patterns :: !(Bool), Inh_Patterns -> Bool
isDeclOfLet_Inh_Patterns :: !(Bool), Inh_Patterns -> Options
options_Inh_Patterns :: !(Options) }
data Syn_Patterns  = Syn_Patterns { Syn_Patterns -> Patterns
copy_Syn_Patterns :: !(Patterns), Syn_Patterns -> [PP_Doc]
pps_Syn_Patterns :: !([PP_Doc]), Syn_Patterns -> [PP_Doc]
pps'_Syn_Patterns :: !([PP_Doc]), Syn_Patterns -> [PP_Doc]
strictVars_Syn_Patterns :: !([PP_Doc]) }
{-# 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_s44
act) !(Inh_Patterns Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions) =
   Identity Syn_Patterns -> Syn_Patterns
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Patterns_s44
sem <- Identity T_Patterns_s44
act
        let arg43 :: T_Patterns_vIn43
arg43 = Bool -> Bool -> Options -> T_Patterns_vIn43
T_Patterns_vIn43 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions
        !(T_Patterns_vOut43 Patterns
_lhsOcopy [PP_Doc]
_lhsOpps [PP_Doc]
_lhsOpps' [PP_Doc]
_lhsOstrictVars) <- T_Patterns_vOut43 -> Identity T_Patterns_vOut43
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
sem T_Patterns_vIn43
arg43)
        Syn_Patterns -> Identity Syn_Patterns
forall (m :: * -> *) a. Monad m => a -> m a
return (Patterns -> [PP_Doc] -> [PP_Doc] -> [PP_Doc] -> Syn_Patterns
Syn_Patterns Patterns
_lhsOcopy [PP_Doc]
_lhsOpps [PP_Doc]
_lhsOpps' [PP_Doc]
_lhsOstrictVars)
   )

-- cata
{-# NOINLINE sem_Patterns #-}
sem_Patterns :: Patterns  -> T_Patterns 
sem_Patterns :: Patterns -> T_Patterns
sem_Patterns Patterns
list = (T_Pattern -> T_Patterns -> T_Patterns)
-> T_Patterns -> [T_Pattern] -> T_Patterns
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 ((Pattern -> T_Pattern) -> Patterns -> [T_Pattern]
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_s44
attach_T_Patterns :: Identity (T_Patterns_s44 )
                                 }
newtype T_Patterns_s44  = C_Patterns_s44 {
                                         T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 :: (T_Patterns_v43 )
                                         }
data T_Patterns_s45  = C_Patterns_s45
type T_Patterns_v43  = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )
data T_Patterns_vIn43  = T_Patterns_vIn43 (Bool) (Bool) (Options)
data T_Patterns_vOut43  = T_Patterns_vOut43 (Patterns) ([PP_Doc]) ([PP_Doc]) ([PP_Doc])
{-# 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_s44 -> T_Patterns
T_Patterns (T_Patterns_s44 -> Identity T_Patterns_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s44
st44) where
   {-# NOINLINE st44 #-}
   !st44 :: T_Patterns_s44
st44 = let
      v43 :: T_Patterns_v43 
      v43 :: T_Patterns_v43
v43 = \ !(T_Patterns_vIn43 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions) -> ( let
         _hdX41 :: T_Pattern_s41
_hdX41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_hd_))
         _tlX44 :: T_Patterns_s44
_tlX44 = Identity T_Patterns_s44 -> T_Patterns_s44
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns (T_Patterns
arg_tl_))
         (T_Pattern_vOut40 Pattern
_hdIcopy Bool
_hdIisUnderscore PP_Doc
_hdIpp PP_Doc
_hdIpp' [PP_Doc]
_hdIstrictVars) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_hdX41 (Bool -> Bool -> Options -> T_Pattern_vIn40
T_Pattern_vIn40 Bool
_hdObelowIrrefutable Bool
_hdOisDeclOfLet Options
_hdOoptions)
         (T_Patterns_vOut43 Patterns
_tlIcopy [PP_Doc]
_tlIpps [PP_Doc]
_tlIpps' [PP_Doc]
_tlIstrictVars) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_tlX44 (Bool -> Bool -> Options -> T_Patterns_vIn43
T_Patterns_vIn43 Bool
_tlObelowIrrefutable Bool
_tlOisDeclOfLet Options
_tlOoptions)
         _lhsOpps :: [PP_Doc]
         _lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule364 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
         _lhsOpps' :: [PP_Doc]
         _lhsOpps' :: [PP_Doc]
_lhsOpps' = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule365 PP_Doc
_hdIpp' [PP_Doc]
_tlIpps'
         _lhsOstrictVars :: [PP_Doc]
         _lhsOstrictVars :: [PP_Doc]
_lhsOstrictVars = [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule366 [PP_Doc]
_hdIstrictVars [PP_Doc]
_tlIstrictVars
         _copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule367 Pattern
_hdIcopy Patterns
_tlIcopy
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule368 Patterns
_copy
         _hdObelowIrrefutable :: Bool
_hdObelowIrrefutable = Bool -> Bool
rule369 Bool
_lhsIbelowIrrefutable
         _hdOisDeclOfLet :: Bool
_hdOisDeclOfLet = Bool -> Bool
rule370 Bool
_lhsIisDeclOfLet
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule371 Options
_lhsIoptions
         _tlObelowIrrefutable :: Bool
_tlObelowIrrefutable = Bool -> Bool
rule372 Bool
_lhsIbelowIrrefutable
         _tlOisDeclOfLet :: Bool
_tlOisDeclOfLet = Bool -> Bool
rule373 Bool
_lhsIisDeclOfLet
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule374 Options
_lhsIoptions
         !__result_ :: T_Patterns_vOut43
__result_ = Patterns -> [PP_Doc] -> [PP_Doc] -> [PP_Doc] -> T_Patterns_vOut43
T_Patterns_vOut43 Patterns
_lhsOcopy [PP_Doc]
_lhsOpps [PP_Doc]
_lhsOpps' [PP_Doc]
_lhsOstrictVars
         in T_Patterns_vOut43
__result_ )
     in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
   {-# INLINE rule364 #-}
   {-# LINE 373 "src-ag/PrintCleanCode.ag" #-}
   rule364 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: [PP_Doc]) ->
                     {-# LINE 373 "src-ag/PrintCleanCode.ag" #-}
                     _hdIpp : _tlIpps
                     {-# LINE 3393 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule365 #-}
   {-# LINE 413 "src-ag/PrintCleanCode.ag" #-}
   rule365 = \ ((_hdIpp') :: PP_Doc) ((_tlIpps') :: [PP_Doc]) ->
                      {-# LINE 413 "src-ag/PrintCleanCode.ag" #-}
                      _hdIpp' : _tlIpps'
                      {-# LINE 3399 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule366 #-}
   rule366 = \ ((_hdIstrictVars) :: [PP_Doc]) ((_tlIstrictVars) :: [PP_Doc]) ->
     _hdIstrictVars ++ _tlIstrictVars
   {-# INLINE rule367 #-}
   rule367 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->
     (:) _hdIcopy _tlIcopy
   {-# INLINE rule368 #-}
   rule368 = \ _copy ->
     _copy
   {-# INLINE rule369 #-}
   rule369 = \ ((_lhsIbelowIrrefutable) :: Bool) ->
     _lhsIbelowIrrefutable
   {-# INLINE rule370 #-}
   rule370 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule371 #-}
   rule371 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule372 #-}
   rule372 = \ ((_lhsIbelowIrrefutable) :: Bool) ->
     _lhsIbelowIrrefutable
   {-# INLINE rule373 #-}
   rule373 = \ ((_lhsIisDeclOfLet) :: Bool) ->
     _lhsIisDeclOfLet
   {-# INLINE rule374 #-}
   rule374 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# NOINLINE sem_Patterns_Nil #-}
sem_Patterns_Nil ::  T_Patterns 
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil  = Identity T_Patterns_s44 -> T_Patterns
T_Patterns (T_Patterns_s44 -> Identity T_Patterns_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s44
st44) where
   {-# NOINLINE st44 #-}
   !st44 :: T_Patterns_s44
st44 = let
      v43 :: T_Patterns_v43 
      v43 :: T_Patterns_v43
v43 = \ !(T_Patterns_vIn43 Bool
_lhsIbelowIrrefutable Bool
_lhsIisDeclOfLet Options
_lhsIoptions) -> ( let
         _lhsOpps :: [PP_Doc]
         _lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule375  ()
         _lhsOpps' :: [PP_Doc]
         _lhsOpps' :: [PP_Doc]
_lhsOpps' = () -> [PP_Doc]
forall a. () -> [a]
rule376  ()
         _lhsOstrictVars :: [PP_Doc]
         _lhsOstrictVars :: [PP_Doc]
_lhsOstrictVars = () -> [PP_Doc]
forall a. () -> [a]
rule377  ()
         _copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule378  ()
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule379 Patterns
forall a. [a]
_copy
         !__result_ :: T_Patterns_vOut43
__result_ = Patterns -> [PP_Doc] -> [PP_Doc] -> [PP_Doc] -> T_Patterns_vOut43
T_Patterns_vOut43 Patterns
_lhsOcopy [PP_Doc]
_lhsOpps [PP_Doc]
_lhsOpps' [PP_Doc]
_lhsOstrictVars
         in T_Patterns_vOut43
__result_ )
     in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
   {-# INLINE rule375 #-}
   {-# LINE 374 "src-ag/PrintCleanCode.ag" #-}
   rule375 = \  (_ :: ()) ->
                     {-# LINE 374 "src-ag/PrintCleanCode.ag" #-}
                     []
                     {-# LINE 3451 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule376 #-}
   {-# LINE 414 "src-ag/PrintCleanCode.ag" #-}
   rule376 = \  (_ :: ()) ->
                      {-# LINE 414 "src-ag/PrintCleanCode.ag" #-}
                      []
                      {-# LINE 3457 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule377 #-}
   rule377 = \  (_ :: ()) ->
     []
   {-# INLINE rule378 #-}
   rule378 = \  (_ :: ()) ->
     []
   {-# INLINE rule379 #-}
   rule379 = \ _copy ->
     _copy

-- Program -----------------------------------------------------
-- wrapper
data Inh_Program  = Inh_Program { Inh_Program -> PP_Doc
importBlocks_Inh_Program :: !(PP_Doc), Inh_Program -> PP_Doc
mainBlocksDoc_Inh_Program :: !(PP_Doc), Inh_Program -> String
mainFile_Inh_Program :: !(String), Inh_Program -> String
mainName_Inh_Program :: !(String), Inh_Program -> String -> String -> String -> Bool -> String
moduleHeader_Inh_Program :: !(String -> String -> String -> Bool -> String), Inh_Program -> Options
options_Inh_Program :: !(Options), Inh_Program -> String
optionsLine_Inh_Program :: !(String), Inh_Program -> String
pragmaBlocks_Inh_Program :: !(String), Inh_Program -> Map BlockInfo PP_Doc
textBlockMap_Inh_Program :: !(Map BlockInfo PP_Doc), Inh_Program -> PP_Doc
textBlocks_Inh_Program :: !(PP_Doc) }
data Syn_Program  = Syn_Program { Syn_Program -> IO ()
genIO_Syn_Program :: !(IO ()), Syn_Program -> [PP_Doc]
output_Syn_Program :: !(PP_Docs) }
{-# INLINABLE wrap_Program #-}
wrap_Program :: T_Program  -> Inh_Program  -> (Syn_Program )
wrap_Program :: T_Program -> Inh_Program -> Syn_Program
wrap_Program !(T_Program Identity T_Program_s47
act) !(Inh_Program PP_Doc
_lhsIimportBlocks PP_Doc
_lhsImainBlocksDoc String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) =
   Identity Syn_Program -> Syn_Program
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Program_s47
sem <- Identity T_Program_s47
act
        let arg46 :: T_Program_vIn46
arg46 = PP_Doc
-> PP_Doc
-> String
-> String
-> (String -> String -> String -> Bool -> String)
-> Options
-> String
-> String
-> Map BlockInfo PP_Doc
-> PP_Doc
-> T_Program_vIn46
T_Program_vIn46 PP_Doc
_lhsIimportBlocks PP_Doc
_lhsImainBlocksDoc String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks
        !(T_Program_vOut46 IO ()
_lhsOgenIO [PP_Doc]
_lhsOoutput) <- T_Program_vOut46 -> Identity T_Program_vOut46
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Program_s47 -> T_Program_v46
inv_Program_s47 T_Program_s47
sem T_Program_vIn46
arg46)
        Syn_Program -> Identity Syn_Program
forall (m :: * -> *) a. Monad m => a -> m a
return (IO () -> [PP_Doc] -> Syn_Program
Syn_Program IO ()
_lhsOgenIO [PP_Doc]
_lhsOoutput)
   )

-- cata
{-# INLINE sem_Program #-}
sem_Program :: Program  -> T_Program 
sem_Program :: Program -> T_Program
sem_Program ( Program Chunks
chunks_ !Bool
ordered_ ) = T_Chunks -> Bool -> T_Program
sem_Program_Program ( Chunks -> T_Chunks
sem_Chunks Chunks
chunks_ ) Bool
ordered_

-- semantic domain
newtype T_Program  = T_Program {
                               T_Program -> Identity T_Program_s47
attach_T_Program :: Identity (T_Program_s47 )
                               }
newtype T_Program_s47  = C_Program_s47 {
                                       T_Program_s47 -> T_Program_v46
inv_Program_s47 :: (T_Program_v46 )
                                       }
data T_Program_s48  = C_Program_s48
type T_Program_v46  = (T_Program_vIn46 ) -> (T_Program_vOut46 )
data T_Program_vIn46  = T_Program_vIn46 (PP_Doc) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (String) (Map BlockInfo PP_Doc) (PP_Doc)
data T_Program_vOut46  = T_Program_vOut46 (IO ()) (PP_Docs)
{-# NOINLINE sem_Program_Program #-}
sem_Program_Program :: T_Chunks  -> (Bool) -> T_Program 
sem_Program_Program :: T_Chunks -> Bool -> T_Program
sem_Program_Program T_Chunks
arg_chunks_ !Bool
arg_ordered_ = Identity T_Program_s47 -> T_Program
T_Program (T_Program_s47 -> Identity T_Program_s47
forall (m :: * -> *) a. Monad m => a -> m a
return T_Program_s47
st47) where
   {-# NOINLINE st47 #-}
   !st47 :: T_Program_s47
st47 = let
      v46 :: T_Program_v46 
      v46 :: T_Program_v46
v46 = \ !(T_Program_vIn46 PP_Doc
_lhsIimportBlocks PP_Doc
_lhsImainBlocksDoc String
_lhsImainFile String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader Options
_lhsIoptions String
_lhsIoptionsLine String
_lhsIpragmaBlocks Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) -> ( let
         _chunksX11 :: T_Chunks_s11
_chunksX11 = Identity T_Chunks_s11 -> T_Chunks_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Chunks -> Identity T_Chunks_s11
attach_T_Chunks (T_Chunks
arg_chunks_))
         (T_Chunks_vOut10 [[PP_Doc]]
_chunksIappendCommon [[PP_Doc]]
_chunksIappendMain IO ()
_chunksIgenSems [String]
_chunksIimports [PP_Doc]
_chunksIpps) = T_Chunks_s11 -> T_Chunks_v10
inv_Chunks_s11 T_Chunks_s11
_chunksX11 (PP_Doc
-> Bool
-> String
-> String
-> (String -> String -> String -> Bool -> String)
-> Bool
-> Options
-> String
-> String
-> Map BlockInfo PP_Doc
-> PP_Doc
-> T_Chunks_vIn10
T_Chunks_vIn10 PP_Doc
_chunksOimportBlocks Bool
_chunksOisDeclOfLet String
_chunksOmainFile String
_chunksOmainName String -> String -> String -> Bool -> String
_chunksOmoduleHeader Bool
_chunksOnested Options
_chunksOoptions String
_chunksOoptionsLine String
_chunksOpragmaBlocks Map BlockInfo PP_Doc
_chunksOtextBlockMap PP_Doc
_chunksOtextBlocks)
         _options :: Options
_options = Options -> Bool -> Options
rule380 Options
_lhsIoptions Bool
arg_ordered_
         _chunksOnested :: Bool
_chunksOnested = Options -> Bool
rule381 Options
_lhsIoptions
         _lhsOoutput :: PP_Docs
         _lhsOoutput :: [PP_Doc]
_lhsOoutput = [PP_Doc] -> [PP_Doc]
rule382 [PP_Doc]
_chunksIpps
         _chunksOisDeclOfLet :: Bool
_chunksOisDeclOfLet = () -> Bool
rule383  ()
         _mainModuleFile :: String
_mainModuleFile = String -> String
rule384 String
_lhsImainFile
         _genMainModule :: IO ()
_genMainModule = [[PP_Doc]]
-> [String]
-> PP_Doc
-> String
-> (String -> String -> String -> Bool -> String)
-> String
-> String
-> String
-> IO ()
rule385 [[PP_Doc]]
_chunksIappendMain [String]
_chunksIimports PP_Doc
_lhsImainBlocksDoc String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader String
_lhsIoptionsLine String
_lhsIpragmaBlocks String
_mainModuleFile
         _commonFile :: String
_commonFile = String -> String
rule386 String
_lhsImainFile
         _genCommonModule :: IO ()
_genCommonModule = [[PP_Doc]]
-> String
-> PP_Doc
-> String
-> (String -> String -> String -> Bool -> String)
-> String
-> String
-> PP_Doc
-> IO ()
rule387 [[PP_Doc]]
_chunksIappendCommon String
_commonFile PP_Doc
_lhsIimportBlocks String
_lhsImainName String -> String -> String -> Bool -> String
_lhsImoduleHeader String
_lhsIoptionsLine String
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks
         _lhsOgenIO :: IO ()
         _lhsOgenIO :: IO ()
_lhsOgenIO = IO () -> IO () -> IO () -> IO ()
forall a a. IO () -> IO a -> IO a -> IO ()
rule388 IO ()
_chunksIgenSems IO ()
_genCommonModule IO ()
_genMainModule
         _chunksOimportBlocks :: PP_Doc
_chunksOimportBlocks = PP_Doc -> PP_Doc
rule389 PP_Doc
_lhsIimportBlocks
         _chunksOmainFile :: String
_chunksOmainFile = String -> String
rule390 String
_lhsImainFile
         _chunksOmainName :: String
_chunksOmainName = String -> String
rule391 String
_lhsImainName
         _chunksOmoduleHeader :: String -> String -> String -> Bool -> String
_chunksOmoduleHeader = (String -> String -> String -> Bool -> String)
-> String -> String -> String -> Bool -> String
rule392 String -> String -> String -> Bool -> String
_lhsImoduleHeader
         _chunksOoptions :: Options
_chunksOoptions = Options -> Options
forall a. a -> a
rule393 Options
_options
         _chunksOoptionsLine :: String
_chunksOoptionsLine = String -> String
rule394 String
_lhsIoptionsLine
         _chunksOpragmaBlocks :: String
_chunksOpragmaBlocks = String -> String
rule395 String
_lhsIpragmaBlocks
         _chunksOtextBlockMap :: Map BlockInfo PP_Doc
_chunksOtextBlockMap = Map BlockInfo PP_Doc -> Map BlockInfo PP_Doc
rule396 Map BlockInfo PP_Doc
_lhsItextBlockMap
         _chunksOtextBlocks :: PP_Doc
_chunksOtextBlocks = PP_Doc -> PP_Doc
rule397 PP_Doc
_lhsItextBlocks
         !__result_ :: T_Program_vOut46
__result_ = IO () -> [PP_Doc] -> T_Program_vOut46
T_Program_vOut46 IO ()
_lhsOgenIO [PP_Doc]
_lhsOoutput
         in T_Program_vOut46
__result_ )
     in T_Program_v46 -> T_Program_s47
C_Program_s47 T_Program_v46
v46
   {-# INLINE rule380 #-}
   {-# LINE 62 "src-ag/PrintCleanCode.ag" #-}
   rule380 = \ ((_lhsIoptions) :: Options) ordered_ ->
                  {-# LINE 62 "src-ag/PrintCleanCode.ag" #-}
                  _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && ordered_ }
                  {-# LINE 3535 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule381 #-}
   {-# LINE 65 "src-ag/PrintCleanCode.ag" #-}
   rule381 = \ ((_lhsIoptions) :: Options) ->
                              {-# LINE 65 "src-ag/PrintCleanCode.ag" #-}
                              nest _lhsIoptions
                              {-# LINE 3541 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule382 #-}
   {-# LINE 101 "src-ag/PrintCleanCode.ag" #-}
   rule382 = \ ((_chunksIpps) :: PP_Docs) ->
                               {-# LINE 101 "src-ag/PrintCleanCode.ag" #-}
                               _chunksIpps
                               {-# LINE 3547 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule383 #-}
   {-# LINE 437 "src-ag/PrintCleanCode.ag" #-}
   rule383 = \  (_ :: ()) ->
                             {-# LINE 437 "src-ag/PrintCleanCode.ag" #-}
                             False
                             {-# LINE 3553 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule384 #-}
   {-# LINE 471 "src-ag/PrintCleanCode.ag" #-}
   rule384 = \ ((_lhsImainFile) :: String) ->
                             {-# LINE 471 "src-ag/PrintCleanCode.ag" #-}
                             _lhsImainFile
                             {-# LINE 3559 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule385 #-}
   {-# LINE 473 "src-ag/PrintCleanCode.ag" #-}
   rule385 = \ ((_chunksIappendMain) :: [[PP_Doc]]) ((_chunksIimports) :: [String]) ((_lhsImainBlocksDoc) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptionsLine) :: String) ((_lhsIpragmaBlocks) :: String) _mainModuleFile ->
            {-# LINE 473 "src-ag/PrintCleanCode.ag" #-}
            writeModule _mainModuleFile
              ( [ pp $ _lhsIpragmaBlocks
                , pp $ _lhsIoptionsLine
                , pp $ _lhsImoduleHeader _lhsImainName "" "" False
                , pp $ ("import " ++ _lhsImainName ++ "_common\n")
                ]
                ++ map pp _chunksIimports
                ++ map vlist _chunksIappendMain
                ++ [_lhsImainBlocksDoc]
              )
            {-# LINE 3574 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule386 #-}
   {-# LINE 484 "src-ag/PrintCleanCode.ag" #-}
   rule386 = \ ((_lhsImainFile) :: String) ->
                         {-# LINE 484 "src-ag/PrintCleanCode.ag" #-}
                         replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")
                         {-# LINE 3580 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule387 #-}
   {-# LINE 486 "src-ag/PrintCleanCode.ag" #-}
   rule387 = \ ((_chunksIappendCommon) :: [[PP_Doc]]) _commonFile ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptionsLine) :: String) ((_lhsIpragmaBlocks) :: String) ((_lhsItextBlocks) :: PP_Doc) ->
            {-# LINE 486 "src-ag/PrintCleanCode.ag" #-}
            writeModule _commonFile
                ( [ pp $ _lhsIpragmaBlocks
                  , pp $ _lhsIoptionsLine
                  , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True
                  , _lhsIimportBlocks
                  , _lhsItextBlocks
                  ]
                  ++ map vlist _chunksIappendCommon
                )
            {-# LINE 3594 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule388 #-}
   {-# LINE 496 "src-ag/PrintCleanCode.ag" #-}
   rule388 = \ ((_chunksIgenSems) :: IO ()) _genCommonModule _genMainModule ->
                    {-# LINE 496 "src-ag/PrintCleanCode.ag" #-}
                    do _genMainModule
                       _genCommonModule
                       _chunksIgenSems
                    {-# LINE 3602 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule389 #-}
   rule389 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
     _lhsIimportBlocks
   {-# INLINE rule390 #-}
   rule390 = \ ((_lhsImainFile) :: String) ->
     _lhsImainFile
   {-# INLINE rule391 #-}
   rule391 = \ ((_lhsImainName) :: String) ->
     _lhsImainName
   {-# INLINE rule392 #-}
   rule392 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     _lhsImoduleHeader
   {-# INLINE rule393 #-}
   rule393 = \ _options ->
     _options
   {-# INLINE rule394 #-}
   rule394 = \ ((_lhsIoptionsLine) :: String) ->
     _lhsIoptionsLine
   {-# INLINE rule395 #-}
   rule395 = \ ((_lhsIpragmaBlocks) :: String) ->
     _lhsIpragmaBlocks
   {-# INLINE rule396 #-}
   rule396 = \ ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ->
     _lhsItextBlockMap
   {-# INLINE rule397 #-}
   rule397 = \ ((_lhsItextBlocks) :: PP_Doc) ->
     _lhsItextBlocks

-- Type --------------------------------------------------------
-- wrapper
data Inh_Type  = Inh_Type { Inh_Type -> Bool
nested_Inh_Type :: !(Bool) }
data Syn_Type  = Syn_Type { Syn_Type -> Type
copy_Syn_Type :: !(Type), Syn_Type -> PP_Doc
pp_Syn_Type :: !(PP_Doc), Syn_Type -> Int
prec_Syn_Type :: !(Int) }
{-# INLINABLE wrap_Type #-}
wrap_Type :: T_Type  -> Inh_Type  -> (Syn_Type )
wrap_Type :: T_Type -> Inh_Type -> Syn_Type
wrap_Type !(T_Type Identity T_Type_s50
act) !(Inh_Type Bool
_lhsInested) =
   Identity Syn_Type -> Syn_Type
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Type_s50
sem <- Identity T_Type_s50
act
        let arg49 :: T_Type_vIn49
arg49 = Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_lhsInested
        !(T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec) <- T_Type_vOut49 -> Identity T_Type_vOut49
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
sem T_Type_vIn49
arg49)
        Syn_Type -> Identity Syn_Type
forall (m :: * -> *) a. Monad m => a -> m a
return (Type -> PP_Doc -> Int -> Syn_Type
Syn_Type Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec)
   )

-- cata
{-# NOINLINE sem_Type #-}
sem_Type :: Type  -> T_Type 
sem_Type :: Type -> T_Type
sem_Type ( Arr Type
left_ Type
right_ ) = T_Type -> T_Type -> T_Type
sem_Type_Arr ( Type -> T_Type
sem_Type Type
left_ ) ( Type -> T_Type
sem_Type Type
right_ )
sem_Type ( CtxApp ![(String, [String])]
left_ Type
right_ ) = [(String, [String])] -> T_Type -> T_Type
sem_Type_CtxApp [(String, [String])]
left_ ( Type -> T_Type
sem_Type Type
right_ )
sem_Type ( QuantApp !String
left_ Type
right_ ) = String -> T_Type -> T_Type
sem_Type_QuantApp String
left_ ( Type -> T_Type
sem_Type Type
right_ )
sem_Type ( TypeApp Type
func_ Types
args_ ) = T_Type -> T_Types -> T_Type
sem_Type_TypeApp ( Type -> T_Type
sem_Type Type
func_ ) ( Types -> T_Types
sem_Types Types
args_ )
sem_Type ( TupleType Types
tps_ ) = T_Types -> T_Type
sem_Type_TupleType ( Types -> T_Types
sem_Types Types
tps_ )
sem_Type ( UnboxedTupleType Types
tps_ ) = T_Types -> T_Type
sem_Type_UnboxedTupleType ( Types -> T_Types
sem_Types Types
tps_ )
sem_Type ( List Type
tp_ ) = T_Type -> T_Type
sem_Type_List ( Type -> T_Type
sem_Type Type
tp_ )
sem_Type ( SimpleType !String
txt_ ) = String -> T_Type
sem_Type_SimpleType String
txt_
sem_Type ( NontermType !String
name_ ![String]
params_ !Bool
deforested_ ) = String -> [String] -> Bool -> T_Type
sem_Type_NontermType String
name_ [String]
params_ Bool
deforested_
sem_Type ( TMaybe Type
tp_ ) = T_Type -> T_Type
sem_Type_TMaybe ( Type -> T_Type
sem_Type Type
tp_ )
sem_Type ( TEither Type
left_ Type
right_ ) = T_Type -> T_Type -> T_Type
sem_Type_TEither ( Type -> T_Type
sem_Type Type
left_ ) ( Type -> T_Type
sem_Type Type
right_ )
sem_Type ( TMap Type
key_ Type
value_ ) = T_Type -> T_Type -> T_Type
sem_Type_TMap ( Type -> T_Type
sem_Type Type
key_ ) ( Type -> T_Type
sem_Type Type
value_ )
sem_Type ( TIntMap Type
value_ ) = T_Type -> T_Type
sem_Type_TIntMap ( Type -> T_Type
sem_Type Type
value_ )
sem_Type ( TSet Type
tp_ ) = T_Type -> T_Type
sem_Type_TSet ( Type -> T_Type
sem_Type Type
tp_ )
sem_Type ( Type
TIntSet  ) = T_Type
sem_Type_TIntSet 

-- semantic domain
newtype T_Type  = T_Type {
                         T_Type -> Identity T_Type_s50
attach_T_Type :: Identity (T_Type_s50 )
                         }
newtype T_Type_s50  = C_Type_s50 {
                                 T_Type_s50 -> T_Type_v49
inv_Type_s50 :: (T_Type_v49 )
                                 }
data T_Type_s51  = C_Type_s51
type T_Type_v49  = (T_Type_vIn49 ) -> (T_Type_vOut49 )
data T_Type_vIn49  = T_Type_vIn49 (Bool)
data T_Type_vOut49  = T_Type_vOut49 (Type) (PP_Doc) (Int)
{-# NOINLINE sem_Type_Arr #-}
sem_Type_Arr :: T_Type  -> T_Type  -> T_Type 
sem_Type_Arr :: T_Type -> T_Type -> T_Type
sem_Type_Arr T_Type
arg_left_ T_Type
arg_right_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _leftX50 :: T_Type_s50
_leftX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_left_))
         _rightX50 :: T_Type_s50
_rightX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_right_))
         (T_Type_vOut49 Type
_leftIcopy PP_Doc
_leftIpp Int
_leftIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_leftX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_leftOnested)
         (T_Type_vOut49 Type
_rightIcopy PP_Doc
_rightIpp Int
_rightIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_rightX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_rightOnested)
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule398  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> Type -> PP_Doc
rule399 PP_Doc
_l PP_Doc
_r Type
_rightIcopy
         _l :: PP_Doc
_l = PP_Doc -> Int -> PP_Doc
rule400 PP_Doc
_leftIpp Int
_leftIprec
         _r :: PP_Doc
_r = PP_Doc -> Int -> PP_Doc
rule401 PP_Doc
_rightIpp Int
_rightIprec
         _copy :: Type
_copy = Type -> Type -> Type
rule402 Type
_leftIcopy Type
_rightIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule403 Type
_copy
         _leftOnested :: Bool
_leftOnested = Bool -> Bool
rule404 Bool
_lhsInested
         _rightOnested :: Bool
_rightOnested = Bool -> Bool
rule405 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule398 #-}
   {-# LINE 276 "src-ag/PrintCleanCode.ag" #-}
   rule398 = \  (_ :: ()) ->
                               {-# LINE 276 "src-ag/PrintCleanCode.ag" #-}
                               2
                               {-# LINE 3705 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule399 #-}
   {-# LINE 277 "src-ag/PrintCleanCode.ag" #-}
   rule399 = \ _l _r ((_rightIcopy) :: Type) ->
                               {-# LINE 277 "src-ag/PrintCleanCode.ag" #-}
                               case _rightIcopy of
                                 Arr{} -> _l     >-< _r
                                 _     -> _l     >#< "->" >-< _r
                               {-# LINE 3713 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule400 #-}
   {-# LINE 280 "src-ag/PrintCleanCode.ag" #-}
   rule400 = \ ((_leftIpp) :: PP_Doc) ((_leftIprec) :: Int) ->
                               {-# LINE 280 "src-ag/PrintCleanCode.ag" #-}
                               if _leftIprec  <= 2 then pp_parens _leftIpp  else _leftIpp
                               {-# LINE 3719 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule401 #-}
   {-# LINE 281 "src-ag/PrintCleanCode.ag" #-}
   rule401 = \ ((_rightIpp) :: PP_Doc) ((_rightIprec) :: Int) ->
                               {-# LINE 281 "src-ag/PrintCleanCode.ag" #-}
                               if _rightIprec <  2 then pp_parens _rightIpp else _rightIpp
                               {-# LINE 3725 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule402 #-}
   rule402 = \ ((_leftIcopy) :: Type) ((_rightIcopy) :: Type) ->
     Arr _leftIcopy _rightIcopy
   {-# INLINE rule403 #-}
   rule403 = \ _copy ->
     _copy
   {-# INLINE rule404 #-}
   rule404 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule405 #-}
   rule405 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_CtxApp #-}
sem_Type_CtxApp :: ([(String, [String])]) -> T_Type  -> T_Type 
sem_Type_CtxApp :: [(String, [String])] -> T_Type -> T_Type
sem_Type_CtxApp ![(String, [String])]
arg_left_ T_Type
arg_right_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _rightX50 :: T_Type_s50
_rightX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_right_))
         (T_Type_vOut49 Type
_rightIcopy PP_Doc
_rightIpp Int
_rightIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_rightX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_rightOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> [(String, [String])] -> PP_Doc
rule406 PP_Doc
_rightIpp [(String, [String])]
arg_left_
         _copy :: Type
_copy = Type -> [(String, [String])] -> Type
rule407 Type
_rightIcopy [(String, [String])]
arg_left_
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule408 Type
_copy
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = Int -> Int
rule409 Int
_rightIprec
         _rightOnested :: Bool
_rightOnested = Bool -> Bool
rule410 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule406 #-}
   {-# LINE 287 "src-ag/PrintCleanCode.ag" #-}
   rule406 = \ ((_rightIpp) :: PP_Doc) left_ ->
                 {-# LINE 287 "src-ag/PrintCleanCode.ag" #-}
                 _rightIpp >#< " | " >#< (pp_block "" "" "&" $ map (\(n,ns) -> hv_sp $ map pp (n:ns)) left_)
                 {-# LINE 3763 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule407 #-}
   rule407 = \ ((_rightIcopy) :: Type) left_ ->
     CtxApp left_ _rightIcopy
   {-# INLINE rule408 #-}
   rule408 = \ _copy ->
     _copy
   {-# INLINE rule409 #-}
   rule409 = \ ((_rightIprec) :: Int) ->
     _rightIprec
   {-# INLINE rule410 #-}
   rule410 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_QuantApp #-}
sem_Type_QuantApp :: (String) -> T_Type  -> T_Type 
sem_Type_QuantApp :: String -> T_Type -> T_Type
sem_Type_QuantApp !String
arg_left_ T_Type
arg_right_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _rightX50 :: T_Type_s50
_rightX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_right_))
         (T_Type_vOut49 Type
_rightIcopy PP_Doc
_rightIpp Int
_rightIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_rightX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_rightOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> PP_Doc
rule411 PP_Doc
_rightIpp String
arg_left_
         _copy :: Type
_copy = Type -> String -> Type
rule412 Type
_rightIcopy String
arg_left_
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule413 Type
_copy
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = Int -> Int
rule414 Int
_rightIprec
         _rightOnested :: Bool
_rightOnested = Bool -> Bool
rule415 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule411 #-}
   {-# LINE 289 "src-ag/PrintCleanCode.ag" #-}
   rule411 = \ ((_rightIpp) :: PP_Doc) left_ ->
                 {-# LINE 289 "src-ag/PrintCleanCode.ag" #-}
                 left_ >#< _rightIpp
                 {-# LINE 3801 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule412 #-}
   rule412 = \ ((_rightIcopy) :: Type) left_ ->
     QuantApp left_ _rightIcopy
   {-# INLINE rule413 #-}
   rule413 = \ _copy ->
     _copy
   {-# INLINE rule414 #-}
   rule414 = \ ((_rightIprec) :: Int) ->
     _rightIprec
   {-# INLINE rule415 #-}
   rule415 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_TypeApp #-}
sem_Type_TypeApp :: T_Type  -> T_Types  -> T_Type 
sem_Type_TypeApp :: T_Type -> T_Types -> T_Type
sem_Type_TypeApp T_Type
arg_func_ T_Types
arg_args_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _funcX50 :: T_Type_s50
_funcX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_func_))
         _argsX53 :: T_Types_s53
_argsX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_args_))
         (T_Type_vOut49 Type
_funcIcopy PP_Doc
_funcIpp Int
_funcIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_funcX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_funcOnested)
         (T_Types_vOut52 Types
_argsIcopy [PP_Doc]
_argsIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_argsX53 (Bool -> T_Types_vIn52
T_Types_vIn52 Bool
_argsOnested)
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc -> PP_Doc
rule416 [PP_Doc]
_argsIpps PP_Doc
_funcIpp
         _copy :: Type
_copy = Types -> Type -> Type
rule417 Types
_argsIcopy Type
_funcIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule418 Type
_copy
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = Int -> Int
rule419 Int
_funcIprec
         _funcOnested :: Bool
_funcOnested = Bool -> Bool
rule420 Bool
_lhsInested
         _argsOnested :: Bool
_argsOnested = Bool -> Bool
rule421 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule416 #-}
   {-# LINE 284 "src-ag/PrintCleanCode.ag" #-}
   rule416 = \ ((_argsIpps) :: PP_Docs) ((_funcIpp) :: PP_Doc) ->
                 {-# LINE 284 "src-ag/PrintCleanCode.ag" #-}
                 pp "(" >#< hv_sp (_funcIpp : _argsIpps) >#< pp ")"
                 {-# LINE 3842 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule417 #-}
   rule417 = \ ((_argsIcopy) :: Types) ((_funcIcopy) :: Type) ->
     TypeApp _funcIcopy _argsIcopy
   {-# INLINE rule418 #-}
   rule418 = \ _copy ->
     _copy
   {-# INLINE rule419 #-}
   rule419 = \ ((_funcIprec) :: Int) ->
     _funcIprec
   {-# INLINE rule420 #-}
   rule420 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule421 #-}
   rule421 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_TupleType #-}
sem_Type_TupleType :: T_Types  -> T_Type 
sem_Type_TupleType :: T_Types -> T_Type
sem_Type_TupleType T_Types
arg_tps_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _tpsX53 :: T_Types_s53
_tpsX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_tps_))
         (T_Types_vOut52 Types
_tpsIcopy [PP_Doc]
_tpsIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_tpsX53 (Bool -> T_Types_vIn52
T_Types_vIn52 Bool
_tpsOnested)
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule422  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = Bool -> [PP_Doc] -> PP_Doc
rule423 Bool
_lhsInested [PP_Doc]
_tpsIpps
         _copy :: Type
_copy = Types -> Type
rule424 Types
_tpsIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule425 Type
_copy
         _tpsOnested :: Bool
_tpsOnested = Bool -> Bool
rule426 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule422 #-}
   {-# LINE 291 "src-ag/PrintCleanCode.ag" #-}
   rule422 = \  (_ :: ()) ->
                               {-# LINE 291 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 3883 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule423 #-}
   {-# LINE 292 "src-ag/PrintCleanCode.ag" #-}
   rule423 = \ ((_lhsInested) :: Bool) ((_tpsIpps) :: PP_Docs) ->
                               {-# LINE 292 "src-ag/PrintCleanCode.ag" #-}
                               ppTuple _lhsInested _tpsIpps
                               {-# LINE 3889 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule424 #-}
   rule424 = \ ((_tpsIcopy) :: Types) ->
     TupleType _tpsIcopy
   {-# INLINE rule425 #-}
   rule425 = \ _copy ->
     _copy
   {-# INLINE rule426 #-}
   rule426 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_UnboxedTupleType #-}
sem_Type_UnboxedTupleType :: T_Types  -> T_Type 
sem_Type_UnboxedTupleType :: T_Types -> T_Type
sem_Type_UnboxedTupleType T_Types
arg_tps_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _tpsX53 :: T_Types_s53
_tpsX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_tps_))
         (T_Types_vOut52 Types
_tpsIcopy [PP_Doc]
_tpsIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_tpsX53 (Bool -> T_Types_vIn52
T_Types_vIn52 Bool
_tpsOnested)
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule427  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = Bool -> [PP_Doc] -> PP_Doc
rule428 Bool
_lhsInested [PP_Doc]
_tpsIpps
         _copy :: Type
_copy = Types -> Type
rule429 Types
_tpsIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule430 Type
_copy
         _tpsOnested :: Bool
_tpsOnested = Bool -> Bool
rule431 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule427 #-}
   {-# LINE 294 "src-ag/PrintCleanCode.ag" #-}
   rule427 = \  (_ :: ()) ->
                                      {-# LINE 294 "src-ag/PrintCleanCode.ag" #-}
                                      5
                                      {-# LINE 3924 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule428 #-}
   {-# LINE 295 "src-ag/PrintCleanCode.ag" #-}
   rule428 = \ ((_lhsInested) :: Bool) ((_tpsIpps) :: PP_Docs) ->
                                      {-# LINE 295 "src-ag/PrintCleanCode.ag" #-}
                                      ppUnboxedTuple _lhsInested _tpsIpps
                                      {-# LINE 3930 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule429 #-}
   rule429 = \ ((_tpsIcopy) :: Types) ->
     UnboxedTupleType _tpsIcopy
   {-# INLINE rule430 #-}
   rule430 = \ _copy ->
     _copy
   {-# INLINE rule431 #-}
   rule431 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_List #-}
sem_Type_List :: T_Type  -> T_Type 
sem_Type_List :: T_Type -> T_Type
sem_Type_List T_Type
arg_tp_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
         (T_Type_vOut49 Type
_tpIcopy PP_Doc
_tpIpp Int
_tpIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_tpOnested)
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule432  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule433 PP_Doc
_tpIpp
         _copy :: Type
_copy = Type -> Type
rule434 Type
_tpIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule435 Type
_copy
         _tpOnested :: Bool
_tpOnested = Bool -> Bool
rule436 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule432 #-}
   {-# LINE 297 "src-ag/PrintCleanCode.ag" #-}
   rule432 = \  (_ :: ()) ->
                               {-# LINE 297 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 3965 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule433 #-}
   {-# LINE 298 "src-ag/PrintCleanCode.ag" #-}
   rule433 = \ ((_tpIpp) :: PP_Doc) ->
                               {-# LINE 298 "src-ag/PrintCleanCode.ag" #-}
                               "[" >|< _tpIpp >|< "]"
                               {-# LINE 3971 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule434 #-}
   rule434 = \ ((_tpIcopy) :: Type) ->
     List _tpIcopy
   {-# INLINE rule435 #-}
   rule435 = \ _copy ->
     _copy
   {-# INLINE rule436 #-}
   rule436 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_SimpleType #-}
sem_Type_SimpleType :: (String) -> T_Type 
sem_Type_SimpleType :: String -> T_Type
sem_Type_SimpleType !String
arg_txt_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule437  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = String -> PP_Doc
rule438 String
arg_txt_
         _copy :: Type
_copy = String -> Type
rule439 String
arg_txt_
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule440 Type
_copy
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule437 #-}
   {-# LINE 300 "src-ag/PrintCleanCode.ag" #-}
   rule437 = \  (_ :: ()) ->
                               {-# LINE 300 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 4003 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule438 #-}
   {-# LINE 301 "src-ag/PrintCleanCode.ag" #-}
   rule438 = \ txt_ ->
                               {-# LINE 301 "src-ag/PrintCleanCode.ag" #-}
                               if reallySimple txt_ then text txt_ else pp_parens (text txt_)
                               {-# LINE 4009 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule439 #-}
   rule439 = \ txt_ ->
     SimpleType txt_
   {-# INLINE rule440 #-}
   rule440 = \ _copy ->
     _copy
{-# NOINLINE sem_Type_NontermType #-}
sem_Type_NontermType :: (String) -> ([String]) -> (Bool) -> T_Type 
sem_Type_NontermType :: String -> [String] -> Bool -> T_Type
sem_Type_NontermType !String
arg_name_ ![String]
arg_params_ !Bool
arg_deforested_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule441  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> String -> [String] -> PP_Doc
rule442 PP_Doc
_prefix String
arg_name_ [String]
arg_params_
         _prefix :: PP_Doc
_prefix = Bool -> PP_Doc
rule443 Bool
arg_deforested_
         _copy :: Type
_copy = Bool -> String -> [String] -> Type
rule444 Bool
arg_deforested_ String
arg_name_ [String]
arg_params_
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule445 Type
_copy
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule441 #-}
   {-# LINE 303 "src-ag/PrintCleanCode.ag" #-}
   rule441 = \  (_ :: ()) ->
                               {-# LINE 303 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 4039 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule442 #-}
   {-# LINE 304 "src-ag/PrintCleanCode.ag" #-}
   rule442 = \ _prefix name_ params_ ->
                               {-# LINE 304 "src-ag/PrintCleanCode.ag" #-}
                               _prefix     >|< text name_ >#< hv_sp params_
                               {-# LINE 4045 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule443 #-}
   {-# LINE 305 "src-ag/PrintCleanCode.ag" #-}
   rule443 = \ deforested_ ->
                                {-# LINE 305 "src-ag/PrintCleanCode.ag" #-}
                                if deforested_
                                then text "T_"
                                else empty
                                {-# LINE 4053 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule444 #-}
   rule444 = \ deforested_ name_ params_ ->
     NontermType name_ params_ deforested_
   {-# INLINE rule445 #-}
   rule445 = \ _copy ->
     _copy
{-# NOINLINE sem_Type_TMaybe #-}
sem_Type_TMaybe :: T_Type  -> T_Type 
sem_Type_TMaybe :: T_Type -> T_Type
sem_Type_TMaybe T_Type
arg_tp_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
         (T_Type_vOut49 Type
_tpIcopy PP_Doc
_tpIpp Int
_tpIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_tpOnested)
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule446  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule447 PP_Doc
_tpIpp
         _copy :: Type
_copy = Type -> Type
rule448 Type
_tpIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule449 Type
_copy
         _tpOnested :: Bool
_tpOnested = Bool -> Bool
rule450 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule446 #-}
   {-# LINE 308 "src-ag/PrintCleanCode.ag" #-}
   rule446 = \  (_ :: ()) ->
                               {-# LINE 308 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 4085 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule447 #-}
   {-# LINE 309 "src-ag/PrintCleanCode.ag" #-}
   rule447 = \ ((_tpIpp) :: PP_Doc) ->
                               {-# LINE 309 "src-ag/PrintCleanCode.ag" #-}
                               text "Maybe" >#< pp_parens _tpIpp
                               {-# LINE 4091 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule448 #-}
   rule448 = \ ((_tpIcopy) :: Type) ->
     TMaybe _tpIcopy
   {-# INLINE rule449 #-}
   rule449 = \ _copy ->
     _copy
   {-# INLINE rule450 #-}
   rule450 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_TEither #-}
sem_Type_TEither :: T_Type  -> T_Type  -> T_Type 
sem_Type_TEither :: T_Type -> T_Type -> T_Type
sem_Type_TEither T_Type
arg_left_ T_Type
arg_right_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _leftX50 :: T_Type_s50
_leftX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_left_))
         _rightX50 :: T_Type_s50
_rightX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_right_))
         (T_Type_vOut49 Type
_leftIcopy PP_Doc
_leftIpp Int
_leftIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_leftX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_leftOnested)
         (T_Type_vOut49 Type
_rightIcopy PP_Doc
_rightIpp Int
_rightIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_rightX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_rightOnested)
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule451  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule452 PP_Doc
_leftIpp PP_Doc
_rightIpp
         _copy :: Type
_copy = Type -> Type -> Type
rule453 Type
_leftIcopy Type
_rightIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule454 Type
_copy
         _leftOnested :: Bool
_leftOnested = Bool -> Bool
rule455 Bool
_lhsInested
         _rightOnested :: Bool
_rightOnested = Bool -> Bool
rule456 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule451 #-}
   {-# LINE 310 "src-ag/PrintCleanCode.ag" #-}
   rule451 = \  (_ :: ()) ->
                               {-# LINE 310 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 4129 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule452 #-}
   {-# LINE 311 "src-ag/PrintCleanCode.ag" #-}
   rule452 = \ ((_leftIpp) :: PP_Doc) ((_rightIpp) :: PP_Doc) ->
                               {-# LINE 311 "src-ag/PrintCleanCode.ag" #-}
                               text "Either" >#< pp_parens _leftIpp >#< pp_parens _rightIpp
                               {-# LINE 4135 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule453 #-}
   rule453 = \ ((_leftIcopy) :: Type) ((_rightIcopy) :: Type) ->
     TEither _leftIcopy _rightIcopy
   {-# INLINE rule454 #-}
   rule454 = \ _copy ->
     _copy
   {-# INLINE rule455 #-}
   rule455 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule456 #-}
   rule456 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_TMap #-}
sem_Type_TMap :: T_Type  -> T_Type  -> T_Type 
sem_Type_TMap :: T_Type -> T_Type -> T_Type
sem_Type_TMap T_Type
arg_key_ T_Type
arg_value_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _keyX50 :: T_Type_s50
_keyX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_key_))
         _valueX50 :: T_Type_s50
_valueX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_value_))
         (T_Type_vOut49 Type
_keyIcopy PP_Doc
_keyIpp Int
_keyIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_keyX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_keyOnested)
         (T_Type_vOut49 Type
_valueIcopy PP_Doc
_valueIpp Int
_valueIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_valueX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_valueOnested)
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule457  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule458 PP_Doc
_keyIpp PP_Doc
_valueIpp
         _copy :: Type
_copy = Type -> Type -> Type
rule459 Type
_keyIcopy Type
_valueIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule460 Type
_copy
         _keyOnested :: Bool
_keyOnested = Bool -> Bool
rule461 Bool
_lhsInested
         _valueOnested :: Bool
_valueOnested = Bool -> Bool
rule462 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule457 #-}
   {-# LINE 312 "src-ag/PrintCleanCode.ag" #-}
   rule457 = \  (_ :: ()) ->
                               {-# LINE 312 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 4176 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule458 #-}
   {-# LINE 313 "src-ag/PrintCleanCode.ag" #-}
   rule458 = \ ((_keyIpp) :: PP_Doc) ((_valueIpp) :: PP_Doc) ->
                               {-# LINE 313 "src-ag/PrintCleanCode.ag" #-}
                               text "'Data.Map'.Map" >#< pp_parens _keyIpp >#< pp_parens _valueIpp
                               {-# LINE 4182 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule459 #-}
   rule459 = \ ((_keyIcopy) :: Type) ((_valueIcopy) :: Type) ->
     TMap _keyIcopy _valueIcopy
   {-# INLINE rule460 #-}
   rule460 = \ _copy ->
     _copy
   {-# INLINE rule461 #-}
   rule461 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule462 #-}
   rule462 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_TIntMap #-}
sem_Type_TIntMap :: T_Type  -> T_Type 
sem_Type_TIntMap :: T_Type -> T_Type
sem_Type_TIntMap T_Type
arg_value_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _valueX50 :: T_Type_s50
_valueX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_value_))
         (T_Type_vOut49 Type
_valueIcopy PP_Doc
_valueIpp Int
_valueIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_valueX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_valueOnested)
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule463  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule464 PP_Doc
_valueIpp
         _copy :: Type
_copy = Type -> Type
rule465 Type
_valueIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule466 Type
_copy
         _valueOnested :: Bool
_valueOnested = Bool -> Bool
rule467 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule463 #-}
   {-# LINE 314 "src-ag/PrintCleanCode.ag" #-}
   rule463 = \  (_ :: ()) ->
                               {-# LINE 314 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 4220 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule464 #-}
   {-# LINE 315 "src-ag/PrintCleanCode.ag" #-}
   rule464 = \ ((_valueIpp) :: PP_Doc) ->
                               {-# LINE 315 "src-ag/PrintCleanCode.ag" #-}
                               text "'Data.IntMap'.IntMap" >#< pp_parens _valueIpp
                               {-# LINE 4226 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule465 #-}
   rule465 = \ ((_valueIcopy) :: Type) ->
     TIntMap _valueIcopy
   {-# INLINE rule466 #-}
   rule466 = \ _copy ->
     _copy
   {-# INLINE rule467 #-}
   rule467 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_TSet #-}
sem_Type_TSet :: T_Type  -> T_Type 
sem_Type_TSet :: T_Type -> T_Type
sem_Type_TSet T_Type
arg_tp_ = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _tpX50 :: T_Type_s50
_tpX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_tp_))
         (T_Type_vOut49 Type
_tpIcopy PP_Doc
_tpIpp Int
_tpIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_tpX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_tpOnested)
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule468  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule469 PP_Doc
_tpIpp
         _copy :: Type
_copy = Type -> Type
rule470 Type
_tpIcopy
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule471 Type
_copy
         _tpOnested :: Bool
_tpOnested = Bool -> Bool
rule472 Bool
_lhsInested
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule468 #-}
   {-# LINE 316 "src-ag/PrintCleanCode.ag" #-}
   rule468 = \  (_ :: ()) ->
                               {-# LINE 316 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 4261 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule469 #-}
   {-# LINE 317 "src-ag/PrintCleanCode.ag" #-}
   rule469 = \ ((_tpIpp) :: PP_Doc) ->
                               {-# LINE 317 "src-ag/PrintCleanCode.ag" #-}
                               text "'Data.Set'.Set" >#< pp_parens _tpIpp
                               {-# LINE 4267 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule470 #-}
   rule470 = \ ((_tpIcopy) :: Type) ->
     TSet _tpIcopy
   {-# INLINE rule471 #-}
   rule471 = \ _copy ->
     _copy
   {-# INLINE rule472 #-}
   rule472 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Type_TIntSet #-}
sem_Type_TIntSet ::  T_Type 
sem_Type_TIntSet :: T_Type
sem_Type_TIntSet  = Identity T_Type_s50 -> T_Type
T_Type (T_Type_s50 -> Identity T_Type_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_Type_s50
st50) where
   {-# NOINLINE st50 #-}
   !st50 :: T_Type_s50
st50 = let
      v49 :: T_Type_v49 
      v49 :: T_Type_v49
v49 = \ !(T_Type_vIn49 Bool
_lhsInested) -> ( let
         _lhsOprec :: Int
         _lhsOprec :: Int
_lhsOprec = () -> Int
rule473  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule474  ()
         _copy :: Type
_copy = () -> Type
rule475  ()
         _lhsOcopy :: Type
         _lhsOcopy :: Type
_lhsOcopy = Type -> Type
forall a. a -> a
rule476 Type
_copy
         !__result_ :: T_Type_vOut49
__result_ = Type -> PP_Doc -> Int -> T_Type_vOut49
T_Type_vOut49 Type
_lhsOcopy PP_Doc
_lhsOpp Int
_lhsOprec
         in T_Type_vOut49
__result_ )
     in T_Type_v49 -> T_Type_s50
C_Type_s50 T_Type_v49
v49
   {-# INLINE rule473 #-}
   {-# LINE 318 "src-ag/PrintCleanCode.ag" #-}
   rule473 = \  (_ :: ()) ->
                               {-# LINE 318 "src-ag/PrintCleanCode.ag" #-}
                               5
                               {-# LINE 4299 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule474 #-}
   {-# LINE 319 "src-ag/PrintCleanCode.ag" #-}
   rule474 = \  (_ :: ()) ->
                               {-# LINE 319 "src-ag/PrintCleanCode.ag" #-}
                               text "'Data.IntSet'.IntSet"
                               {-# LINE 4305 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule475 #-}
   rule475 = \  (_ :: ()) ->
     TIntSet
   {-# INLINE rule476 #-}
   rule476 = \ _copy ->
     _copy

-- Types -------------------------------------------------------
-- wrapper
data Inh_Types  = Inh_Types { Inh_Types -> Bool
nested_Inh_Types :: !(Bool) }
data Syn_Types  = Syn_Types { Syn_Types -> Types
copy_Syn_Types :: !(Types), Syn_Types -> [PP_Doc]
pps_Syn_Types :: !(PP_Docs) }
{-# INLINABLE wrap_Types #-}
wrap_Types :: T_Types  -> Inh_Types  -> (Syn_Types )
wrap_Types :: T_Types -> Inh_Types -> Syn_Types
wrap_Types !(T_Types Identity T_Types_s53
act) !(Inh_Types Bool
_lhsInested) =
   Identity Syn_Types -> Syn_Types
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do !T_Types_s53
sem <- Identity T_Types_s53
act
        let arg52 :: T_Types_vIn52
arg52 = Bool -> T_Types_vIn52
T_Types_vIn52 Bool
_lhsInested
        !(T_Types_vOut52 Types
_lhsOcopy [PP_Doc]
_lhsOpps) <- T_Types_vOut52 -> Identity T_Types_vOut52
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
sem T_Types_vIn52
arg52)
        Syn_Types -> Identity Syn_Types
forall (m :: * -> *) a. Monad m => a -> m a
return (Types -> [PP_Doc] -> Syn_Types
Syn_Types Types
_lhsOcopy [PP_Doc]
_lhsOpps)
   )

-- cata
{-# NOINLINE sem_Types #-}
sem_Types :: Types  -> T_Types 
sem_Types :: Types -> T_Types
sem_Types Types
list = (T_Type -> T_Types -> T_Types) -> T_Types -> [T_Type] -> T_Types
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Type -> T_Types -> T_Types
sem_Types_Cons T_Types
sem_Types_Nil ((Type -> T_Type) -> Types -> [T_Type]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Type -> T_Type
sem_Type Types
list)

-- semantic domain
newtype T_Types  = T_Types {
                           T_Types -> Identity T_Types_s53
attach_T_Types :: Identity (T_Types_s53 )
                           }
newtype T_Types_s53  = C_Types_s53 {
                                   T_Types_s53 -> T_Types_v52
inv_Types_s53 :: (T_Types_v52 )
                                   }
data T_Types_s54  = C_Types_s54
type T_Types_v52  = (T_Types_vIn52 ) -> (T_Types_vOut52 )
data T_Types_vIn52  = T_Types_vIn52 (Bool)
data T_Types_vOut52  = T_Types_vOut52 (Types) (PP_Docs)
{-# NOINLINE sem_Types_Cons #-}
sem_Types_Cons :: T_Type  -> T_Types  -> T_Types 
sem_Types_Cons :: T_Type -> T_Types -> T_Types
sem_Types_Cons T_Type
arg_hd_ T_Types
arg_tl_ = Identity T_Types_s53 -> T_Types
T_Types (T_Types_s53 -> Identity T_Types_s53
forall (m :: * -> *) a. Monad m => a -> m a
return T_Types_s53
st53) where
   {-# NOINLINE st53 #-}
   !st53 :: T_Types_s53
st53 = let
      v52 :: T_Types_v52 
      v52 :: T_Types_v52
v52 = \ !(T_Types_vIn52 Bool
_lhsInested) -> ( let
         _hdX50 :: T_Type_s50
_hdX50 = Identity T_Type_s50 -> T_Type_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Type -> Identity T_Type_s50
attach_T_Type (T_Type
arg_hd_))
         _tlX53 :: T_Types_s53
_tlX53 = Identity T_Types_s53 -> T_Types_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Types -> Identity T_Types_s53
attach_T_Types (T_Types
arg_tl_))
         (T_Type_vOut49 Type
_hdIcopy PP_Doc
_hdIpp Int
_hdIprec) = T_Type_s50 -> T_Type_v49
inv_Type_s50 T_Type_s50
_hdX50 (Bool -> T_Type_vIn49
T_Type_vIn49 Bool
_hdOnested)
         (T_Types_vOut52 Types
_tlIcopy [PP_Doc]
_tlIpps) = T_Types_s53 -> T_Types_v52
inv_Types_s53 T_Types_s53
_tlX53 (Bool -> T_Types_vIn52
T_Types_vIn52 Bool
_tlOnested)
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule477 PP_Doc
_hdIpp [PP_Doc]
_tlIpps
         _copy :: Types
_copy = Type -> Types -> Types
rule478 Type
_hdIcopy Types
_tlIcopy
         _lhsOcopy :: Types
         _lhsOcopy :: Types
_lhsOcopy = Types -> Types
forall a. a -> a
rule479 Types
_copy
         _hdOnested :: Bool
_hdOnested = Bool -> Bool
rule480 Bool
_lhsInested
         _tlOnested :: Bool
_tlOnested = Bool -> Bool
rule481 Bool
_lhsInested
         !__result_ :: T_Types_vOut52
__result_ = Types -> [PP_Doc] -> T_Types_vOut52
T_Types_vOut52 Types
_lhsOcopy [PP_Doc]
_lhsOpps
         in T_Types_vOut52
__result_ )
     in T_Types_v52 -> T_Types_s53
C_Types_s53 T_Types_v52
v52
   {-# INLINE rule477 #-}
   {-# LINE 82 "src-ag/PrintCleanCode.ag" #-}
   rule477 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->
                     {-# LINE 82 "src-ag/PrintCleanCode.ag" #-}
                     _hdIpp : _tlIpps
                     {-# LINE 4369 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule478 #-}
   rule478 = \ ((_hdIcopy) :: Type) ((_tlIcopy) :: Types) ->
     (:) _hdIcopy _tlIcopy
   {-# INLINE rule479 #-}
   rule479 = \ _copy ->
     _copy
   {-# INLINE rule480 #-}
   rule480 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
   {-# INLINE rule481 #-}
   rule481 = \ ((_lhsInested) :: Bool) ->
     _lhsInested
{-# NOINLINE sem_Types_Nil #-}
sem_Types_Nil ::  T_Types 
sem_Types_Nil :: T_Types
sem_Types_Nil  = Identity T_Types_s53 -> T_Types
T_Types (T_Types_s53 -> Identity T_Types_s53
forall (m :: * -> *) a. Monad m => a -> m a
return T_Types_s53
st53) where
   {-# NOINLINE st53 #-}
   !st53 :: T_Types_s53
st53 = let
      v52 :: T_Types_v52 
      v52 :: T_Types_v52
v52 = \ !(T_Types_vIn52 Bool
_lhsInested) -> ( let
         _lhsOpps :: PP_Docs
         _lhsOpps :: [PP_Doc]
_lhsOpps = () -> [PP_Doc]
forall a. () -> [a]
rule482  ()
         _copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule483  ()
         _lhsOcopy :: Types
         _lhsOcopy :: Types
_lhsOcopy = Types -> Types
forall a. a -> a
rule484 Types
forall a. [a]
_copy
         !__result_ :: T_Types_vOut52
__result_ = Types -> [PP_Doc] -> T_Types_vOut52
T_Types_vOut52 Types
_lhsOcopy [PP_Doc]
_lhsOpps
         in T_Types_vOut52
__result_ )
     in T_Types_v52 -> T_Types_s53
C_Types_s53 T_Types_v52
v52
   {-# INLINE rule482 #-}
   {-# LINE 83 "src-ag/PrintCleanCode.ag" #-}
   rule482 = \  (_ :: ()) ->
                     {-# LINE 83 "src-ag/PrintCleanCode.ag" #-}
                     []
                     {-# LINE 4402 "src-generated/PrintCleanCode.hs" #-}
   {-# INLINE rule483 #-}
   rule483 = \  (_ :: ()) ->
     []
   {-# INLINE rule484 #-}
   rule484 = \ _copy ->
     _copy