packages feed

hssqlppp 0.1.0 → 0.2.0

raw patch · 68 files changed

+48690/−56516 lines, 68 files

Files

+ Database/HsSqlPpp/Ast/Catalog.lhs view
@@ -0,0 +1,63 @@+Copyright 2009 Jake Wheat++This is the public api to the catalog data type, it just forwards+the public part of CatalogInternal, which is the module used by+the type checking code.++> {- | This module contains the database catalog data types and helper functions.+>+>  The catalog data type serves the following purposes:+>+>  * Contains all the catalog information needed to type check against+>     an existing database.+>+>  * A copy of the catalog information from a default template1+>    database is included - 'defaultTemplate1Catalog'.+>+>  * It is used internally to keep track of updates to the catalog+>     whilst running an annotation process (e.g. so that a select can+>     type check against a create table given in the same source). It+>     is also used to track other identifier types, such as attribute+>     references in select expressions, and argument and variable+>     types inside create function statements.+>+>  You can see what kind of stuff is contained in the Catalog type+>  by looking at the 'CatalogUpdate' type.+>+> -}++> module Database.HsSqlPpp.Ast.Catalog+>     (+>      -- * Data types+>      Catalog+>      -- ** Updates+>     ,CatalogUpdate(..)+>     ,ppCatUpdate+>      -- ** bits and pieces+>     ,CastContext(..)+>     ,CompositeFlavour(..)+>     ,CompositeDef+>     ,FunctionPrototype+>     ,DomainDefinition+>     ,FunFlav(..)+>      -- * 'Catalog' values+>     ,emptyCatalog+>     ,defaultCatalog+>     ,defaultTemplate1Catalog+>      -- * 'Catalog' comparison+>     ,CatalogDiff(..)+>     ,compareCatalogs+>     ,ppCatDiff+>      -- * Functions+>     ,readCatalogFromDatabase+>     ,updateCatalog+>     ,deconstructCatalog+>      -- * operator utils+>     ,OperatorType(..)+>     ,getOperatorType+>     ,isOperatorName+>     ) where++> import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal+> import Database.HsSqlPpp.AstInternals.Catalog.CatalogReader+> import Database.HsSqlPpp.AstInternals.Catalog.DefaultTemplate1Catalog
− Database/HsSqlPpp/Ast/Environment.lhs
@@ -1,60 +0,0 @@-Copyright 2009 Jake Wheat--This is the public api to the environment data type, it just forwards-the public part of EnvironmentInternal, which is the module used by-the type checking code.--> {- | This module contains the database catalog data types and helper functions.->->  The environment data type (which should really be called catalog)->  serves the following purposes:->->  * Contains all the catalog information needed to type check against->     an existing database.->->  * A copy of the catalog information from a default template1->    database is included - 'defaultTemplate1Environment'.->->  * It is used internally to keep track of updates to the catalog->     whilst running an annotation process (e.g. so that a select can->     type check against a create table given in the same source). It->     is also used to track other identifier types, such as attribute->     references in select expressions, and argument and variable->     types inside create function statements.->->  You can see what kind of stuff is contained in the Environment type->  by looking at the 'EnvironmentUpdate' type.->-> -}--> module Database.HsSqlPpp.Ast.Environment->     (->      -- * Data types->      Environment->      -- ** Updates->     ,EnvironmentUpdate(..)->     ,ppEnvUpdate->      -- ** bits and pieces->     ,CastContext(..)->     ,CompositeFlavour(..)->     ,CompositeDef->     ,FunctionPrototype->     ,DomainDefinition->     ,FunFlav(..)->      -- * 'Environment' values->     ,emptyEnvironment->     ,defaultEnvironment->     ,defaultTemplate1Environment->      -- * Functions->     ,readEnvironmentFromDatabase->     ,updateEnvironment->     ,deconstructEnvironment->      -- * operator utils->     ,OperatorType(..)->     ,getOperatorType->     ,isOperatorName->     ) where--> import Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal-> import Database.HsSqlPpp.AstInternals.Environment.EnvironmentReader-> import Database.HsSqlPpp.AstInternals.Environment.DefaultTemplate1Environment
Database/HsSqlPpp/Ast/SqlTypes.lhs view
@@ -17,6 +17,8 @@ >      -- these give you the canonical names >     ,typeSmallInt,typeBigInt,typeInt,typeNumeric,typeFloat4 >     ,typeFloat8,typeVarChar,typeChar,typeBool+>     ,canonicalizeTypeName+>     ,canonicalizeTypes >      -- * Type errors >     ,TypeError (..) >     ) where
Database/HsSqlPpp/Ast/TypeChecker.lhs view
@@ -31,7 +31,7 @@ >      -- * Annotated tree utils >     ,getTopLevelTypes >     ,getTopLevelInfos->     ,getTopLevelEnvUpdates+>     ,getTopLevelCatUpdates >     ,getTypeErrors >     ,getStatementAnnotations >     ) where
Database/HsSqlPpp/AstInternals/AstAnnotation.lhs view
@@ -3,7 +3,7 @@ The annotation data types and utilities for working with them.  Annotations are used to store source positions, types, errors,-warnings, environment deltas, information, and other stuff a client might+warnings, catalog deltas, information, and other stuff a client might want to use when looking at an ast. Internal annotations which are used in the type-checking/ annotation process use the attribute grammar code and aren't exposed.@@ -19,7 +19,7 @@ >     --,stripAnnotations >     ,getTopLevelTypes >     ,getTopLevelInfos->     ,getTopLevelEnvUpdates+>     ,getTopLevelCatUpdates >     ,getTypeAnnotation >     ,getTypeErrors >     ,stripAnnotations@@ -34,11 +34,10 @@ >     ) where  > import Data.Generics-> import Data.Maybe > import Control.Arrow  > import Database.HsSqlPpp.AstInternals.TypeType-> import Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal+> import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal  > -- | Annotation type - one of these is attached to most of the > -- data types used in the ast.@@ -50,7 +49,9 @@ >                        | TypeAnnotation Type >                        | TypeErrorA TypeError >                        | StatementTypeA StatementType->                        | EnvUpdates [EnvironmentUpdate]+>                        | CatUpdates [CatalogUpdate]+>                        | FunctionPrototypeA FunctionPrototype+>                        | InferredType Type >                          deriving (Eq, Show,Typeable,Data)  Use syb to pull annotation values from an ast.@@ -113,9 +114,9 @@ >                                 _ -> getSIAnnotation xs > getSIAnnotation []  = [Nothing] -> getEuAnnotation :: Annotation -> [[EnvironmentUpdate]]+> getEuAnnotation :: Annotation -> [[CatalogUpdate]] > getEuAnnotation (x:xs) = case x of->                                 EnvUpdates t -> t:getEuAnnotation xs+>                                 CatUpdates t -> t:getEuAnnotation xs >                                 _ -> getEuAnnotation xs > getEuAnnotation [] = [] @@ -125,14 +126,12 @@ > getTopLevelInfos :: Data a => [a] -> [Maybe StatementType] > getTopLevelInfos = getTopLevelXs getSIAnnotation -> getTopLevelEnvUpdates ::  Data a => [a] -> [[EnvironmentUpdate]]-> getTopLevelEnvUpdates = getTopLevelXs getEuAnnotation+> getTopLevelCatUpdates ::  Data a => [a] -> [[CatalogUpdate]]+> getTopLevelCatUpdates = getTopLevelXs getEuAnnotation  > data StatementType = StatementType [Type] [(String,Type)] >                      deriving (Eq,Show,Typeable,Data) -todo:-add environment deltas to statementtype (??)  question: if a node has no source position e.g. the all in select all or select
Database/HsSqlPpp/AstInternals/AstInternal.ag view
@@ -116,20 +116,20 @@ import Data.Maybe import Data.List import Debug.Trace-import Control.Monad.Error-import Control.Arrow+--import Control.Monad.Error import Data.Either import Control.Applicative import Data.Generics import Data.Char+import Control.Monad.State  import Database.HsSqlPpp.AstInternals.TypeType import Database.HsSqlPpp.AstInternals.TypeChecking.TypeConversion import Database.HsSqlPpp.AstInternals.TypeChecking.ErrorUtils import Database.HsSqlPpp.AstInternals.AstAnnotation-import Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal-import Database.HsSqlPpp.AstInternals.Environment.LocalIdentifierBindings-import Database.HsSqlPpp.AstInternals.Environment.DefaultTemplate1Environment+import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal+import Database.HsSqlPpp.AstInternals.TypeChecking.LocalIdentifierBindings+--import Database.HsSqlPpp.AstInternals.Catalog.DefaultTemplate1Catalog import Database.HsSqlPpp.Utils import Data.Generics.PlateData @@ -687,9 +687,9 @@ --   more straightforward if you parse the files then concatenate the --   statementlists together before type checking rather than using --   this function-typeCheckMany :: Environment -> [StatementList] -> [StatementList]-typeCheckMany env sts =-    annInt env sts []+typeCheckMany :: Catalog -> [StatementList] -> [StatementList]+typeCheckMany cat sts =+    annInt cat sts []     where       annInt e (s:ss) ress =           let (e1,res) = typeCheck e s@@ -700,15 +700,15 @@ -- | Takes an ast, checks against catalog passed, and adds --   annotations, including types, type errors, and statement info. --   Returns the updated catalog as well as the annotated ast.-typeCheck :: Environment -> StatementList -> (Environment,StatementList)-typeCheck env sts =+typeCheck :: Catalog -> StatementList -> (Catalog,StatementList)+typeCheck cat sts =     let t = sem_Root (Root (fixupImplicitJoins sts))-        ta = wrap_Root t Inh_Root {env_Inh_Root = env+        ta = wrap_Root t Inh_Root {cat_Inh_Root = cat                                   ,lib_Inh_Root = emptyBindings}         tl = annotatedTree_Syn_Root ta-        env1 = producedEnv_Syn_Root ta+        cat1 = producedCat_Syn_Root ta    in case tl of-         Root r -> (env1,r)+         Root r -> (cat1,r)  -- | Unfinished version of type check which can type check an -- individual statement with ? or positional arg placeholders in@@ -716,8 +716,8 @@ -- delete. For use in type checking embedded parameterized -- statements. Does all typechecking and annotation that the regular -- typecheck does.-typeCheckPS :: Environment -> Statement -> Either String Statement-typeCheckPS env st =+typeCheckPS :: Catalog -> Statement -> Either String Statement+typeCheckPS cat st =     case st of       SelectStatement _ _ -> tc       Insert _ _ _ _ _ -> tc@@ -726,10 +726,10 @@       _ -> Left "requires select, update, insert or delete statement"     where       tc = let t = sem_Root (Root (fixupImplicitJoins [st]))-               ta = wrap_Root t Inh_Root {env_Inh_Root = env+               ta = wrap_Root t Inh_Root {cat_Inh_Root = cat                                          ,lib_Inh_Root = emptyBindings}                tl = annotatedTree_Syn_Root ta-               env1 = producedEnv_Syn_Root ta+               cat1 = producedCat_Syn_Root ta            in case tl of                 Root [st1] -> Right st1                 _ -> error "impossible happened in typeCheckPS!"@@ -737,11 +737,11 @@  -- | Testing utility, mainly used to check an expression for type errors -- or to get its type.-typeCheckExpression :: Environment -> Expression -> Expression-typeCheckExpression env ex =+typeCheckExpression :: Catalog -> Expression -> Expression+typeCheckExpression cat ex =     let t = sem_ExpressionRoot (ExpressionRoot (fixupImplicitJoins ex))         rt = (annotatedTree_Syn_ExpressionRoot-              (wrap_ExpressionRoot t Inh_ExpressionRoot {env_Inh_ExpressionRoot = env+              (wrap_ExpressionRoot t Inh_ExpressionRoot {cat_Inh_ExpressionRoot = cat                                                         ,lib_Inh_ExpressionRoot = emptyBindings}))     in case rt of          ExpressionRoot e -> e@@ -764,6 +764,7 @@       convTrefs (tr:tr1:trs) = JoinedTref [] tr Unnatural Cross (convTrefs (tr1:trs)) Nothing NoAlias       convTrefs (tr:[]) = tr       convTrefs _ = error "failed doing implicit join fixup hack"+ }  {-
Database/HsSqlPpp/AstInternals/AstInternal.hs view
@@ -1,15988 +1,16222 @@  --- UUAGC 0.9.11 (AstInternal.ag)-module Database.HsSqlPpp.AstInternals.AstInternal(-    -- {-# LANGUAGE DeriveDataTypeable,RankNTypes,ScopedTypeVariables #-}-    -- {-# OPTIONS_HADDOCK hide  #-}-    --from the ag files:-    --ast nodes-    Statement (..)-   ,SelectExpression (..)-   ,FnBody (..)-   ,SetClause (..)-   ,TableRef (..)-   ,TableAlias(..)-   ,JoinExpression (..)-   ,JoinType (..)-   ,SelectList (..)-   ,SelectItem (..)-   ,CopySource (..)-   ,AttributeDef (..)-   ,RowConstraint (..)-   ,AlterTableAction(..)-   ,Constraint (..)-   ,TypeAttributeDef (..)-   ,ParamDef (..)-   ,VarDef (..)-   ,RaiseType (..)-   ,CombineType (..)-   ,Volatility (..)-   ,Language (..)-   ,TypeName (..)-   ,DropType (..)-   ,Cascade (..)-   ,Direction (..)-   ,Distinct (..)-   ,Natural (..)-   ,IfExists (..)-   ,RestartIdentity (..)-   ,Expression (..)-   ,FrameClause(..)-   ,InList (..)-   ,LiftFlavour(..)-   ,TriggerWhen(..)-   ,TriggerEvent(..)-   ,TriggerFire(..)-   ,StatementList-   ,ExpressionListStatementListPairList-   ,ExpressionListStatementListPair-   ,ExpressionList-   ,StringList-   ,ParamDefList-   ,AttributeDefList-   ,ConstraintList-   ,TypeAttributeDefList-   ,TypeNameList-   ,StringTypeNameListPair-   ,StringTypeNameListPairList-   ,ExpressionStatementListPairList-   ,SetClauseList-   ,CaseExpressionListExpressionPairList-   ,MaybeExpression-   ,TableRefList-   ,ExpressionListList-   ,SelectItemList-   ,OnExpr-   ,RowConstraintList-   ,VarDefList-   ,ExpressionStatementListPair-   ,CaseExpressionListExpressionPair-   ,CaseExpressionList-   ,ExpressionDirectionPair-   ,ExpressionDirectionPairList-   ,MaybeBoolExpression-   ,MaybeSelectList-   ,SetValue(..)-   -- typechecking-   ,typeCheck-   ,typeCheckPS-   ,typeCheckExpression-) where--import Data.Maybe-import Data.List-import Debug.Trace-import Control.Monad.Error-import Control.Arrow-import Data.Either-import Control.Applicative-import Data.Generics-import Data.Char--import Database.HsSqlPpp.AstInternals.TypeType-import Database.HsSqlPpp.AstInternals.TypeChecking.TypeConversion-import Database.HsSqlPpp.AstInternals.TypeChecking.ErrorUtils-import Database.HsSqlPpp.AstInternals.AstAnnotation-import Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal-import Database.HsSqlPpp.AstInternals.Environment.LocalIdentifierBindings-import Database.HsSqlPpp.AstInternals.Environment.DefaultTemplate1Environment-import Database.HsSqlPpp.Utils-import Data.Generics.PlateData---{-# LINE 683 "AstInternal.ag" #-}--{---- | Type check multiple asts, allowing type checking references in---   later files to definitions in earlier files. This is probably---   more straightforward if you parse the files then concatenate the---   statementlists together before type checking rather than using---   this function-typeCheckMany :: Environment -> [StatementList] -> [StatementList]-typeCheckMany env sts =-    annInt env sts []-    where-      annInt e (s:ss) ress =-          let (e1,res) = typeCheck e s-          in annInt e1 ss (res:ress)-      annInt _ [] ress = reverse ress--}---- | Takes an ast, checks against catalog passed, and adds---   annotations, including types, type errors, and statement info.---   Returns the updated catalog as well as the annotated ast.-typeCheck :: Environment -> StatementList -> (Environment,StatementList)-typeCheck env sts =-    let t = sem_Root (Root (fixupImplicitJoins sts))-        ta = wrap_Root t Inh_Root {env_Inh_Root = env-                                  ,lib_Inh_Root = emptyBindings}-        tl = annotatedTree_Syn_Root ta-        env1 = producedEnv_Syn_Root ta-   in case tl of-         Root r -> (env1,r)---- | Unfinished version of type check which can type check an--- individual statement with ? or positional arg placeholders in--- it. Will error if the statement isn't select, update, insert or--- delete. For use in type checking embedded parameterized--- statements. Does all typechecking and annotation that the regular--- typecheck does.-typeCheckPS :: Environment -> Statement -> Either String Statement-typeCheckPS env st =-    case st of-      SelectStatement _ _ -> tc-      Insert _ _ _ _ _ -> tc-      Update _ _ _ _ _ -> tc-      Delete _ _ _ _ -> tc-      _ -> Left "requires select, update, insert or delete statement"-    where-      tc = let t = sem_Root (Root (fixupImplicitJoins [st]))-               ta = wrap_Root t Inh_Root {env_Inh_Root = env-                                         ,lib_Inh_Root = emptyBindings}-               tl = annotatedTree_Syn_Root ta-               env1 = producedEnv_Syn_Root ta-           in case tl of-                Root [st1] -> Right st1-                _ -> error "impossible happened in typeCheckPS!"----- | Testing utility, mainly used to check an expression for type errors--- or to get its type.-typeCheckExpression :: Environment -> Expression -> Expression-typeCheckExpression env ex =-    let t = sem_ExpressionRoot (ExpressionRoot (fixupImplicitJoins ex))-        rt = (annotatedTree_Syn_ExpressionRoot-              (wrap_ExpressionRoot t Inh_ExpressionRoot {env_Inh_ExpressionRoot = env-                                                        ,lib_Inh_ExpressionRoot = emptyBindings}))-    in case rt of-         ExpressionRoot e -> e--{--bit of a hack, to avoid rewriting the tableref type checking to be-able to do implicit joins, we just convert them in to the equivalent-explicit join--}--fixupImplicitJoins :: Data a => a -> a-fixupImplicitJoins =-    transformBi $ \x ->-            case x of-              -- alter asts to change implicit joins into explicit joins-              Select an dis sl trs@(_:_:_) whr grp hav ord lim off-                  -> Select an dis sl [convTrefs trs] whr grp hav ord lim off-              x1 -> x1-    where-      convTrefs (tr:tr1:trs) = JoinedTref [] tr Unnatural Cross (convTrefs (tr1:trs)) Nothing NoAlias-      convTrefs (tr:[]) = tr-      convTrefs _ = error "failed doing implicit join fixup hack"-{-# LINE 189 "AstInternal.hs" #-}--{-# LINE 81 "./TypeChecking/Misc.ag" #-}--{--================================================================================--= couple of small utils--I think this should be alright, an identifier referenced in an-expression can only have zero or one dot in it.--}--splitIdentifier :: String -> (String,String)-splitIdentifier s = let (a,b) = span (/= '.') s-                    in if b == ""-                         then ("", a)-                         else (a,tail b)--{--helper to make adding annotations a bit easier--}--annTypesAndErrors :: Data a => a -> Type -> [TypeError]-                  -> Maybe [AnnotationElement] -> a-annTypesAndErrors item nt errs add =-    updateAnnotation modifier item-    where-      modifier = (([TypeAnnotation nt] ++ fromMaybe [] add ++-       map TypeErrorA errs) ++)--{-# LINE 220 "AstInternal.hs" #-}--{-# LINE 78 "./TypeChecking/Expressions.ag" #-}--{---small shim in front of findCallMatch in the type conversion code, to-handle some special cases.--Some of the special cases will no longer be needed when variadic-support is added.--between, greatest and least are treated as syntactic sugar so we-delegate the function lookups to the <=/>= operators.--the row comparison should be more general than this, since it supports-any operator satisfying some properties---TODO: move all of this into find call match. Don't know why it's separate--}-typeCheckFunCall :: Environment -> String -> [Type] -> Either [TypeError] Type-typeCheckFunCall env fnName' argsType =-    {-trace ("typecheckfncall " ++ fnName' ++ show argsType) $-}-    dependsOnRTpe argsType $-      case fnName of-              "count" -> -- not quite sure how this is suppose to work,-                         -- the counts in the pg catalog accept either-                         -- no args, or one arg of type any, but you can call-                         -- count with multiple arguments?-                         return typeBigInt-              "!between" -> do-                    f1 <- lookupFn ">=" [argsType !! 0, argsType !! 1]-                    f2 <- lookupFn "<=" [argsType !! 0, argsType !! 2]-                    lookupFn "!and" [f1,f2]-              --"coalesce" -> resolveResultSetType env argsType-              "greatest" -> do-                    t <- lookupFn fnName argsType -- t <- resolveResultSetType env argsType-                    lookupFn ">=" [t,t]-                    return t-              "least" -> do-                    t <- lookupFn fnName argsType -- resolveResultSetType env argsType-                    lookupFn "<=" [t,t]-                    return t-              "!rowctor" -> return $ AnonymousRecordType argsType-                    -- special case the row comparison ops-                    -- this needs to be fixed: we want to match-                    -- any implicit casts to functions on composite types-                    -- first, then we can use the anonymous record type on-                    -- any composite-              _ | fnName `elem` ["=", "<>", "<=", ">=", "<", ">"]-                         && length argsType == 2-                         && all isCompositeOrSetOfCompositeType argsType-                         && compositesCompatible env (head argsType) (head $ tail argsType) -> Right typeBool-              --checked for all special cases, so run general case now-              s -> lookupFn s argsType-    where-      lookupFn :: String -> [Type] -> Either [TypeError] Type-      lookupFn s1 args = do-        (_,_,r,_) <- findCallMatch env-                             (if s1 == "u-" then "-" else s1) args-        return r-      checkRowTypesMatch (AnonymousRecordType t1s) (AnonymousRecordType t2s) = do-        when (length t1s /= length t2s) $ Left [ValuesListsMustBeSameLength]-        let errs = map (resolveResultSetType env . (\(a,b) -> [a,b])) $-                     zip t1s t2s-        liftErrors $ concat $ lefts errs-        return typeBool-      checkRowTypesMatch x y  =-        error $ "internal error: checkRowTypesMatch called with " ++-                show x ++ "," ++ show y-      fnName = map toLower fnName'-{-# LINE 292 "AstInternal.hs" #-}--{-# LINE 141 "./TypeChecking/SelectStatement.ag" #-}---typeCheckValuesExpr :: Environment -> [[Type]] -> Either [TypeError] Type-typeCheckValuesExpr env rowsTs =-        let colNames = zipWith (++)-                           (repeat "column")-                           (map show [1..length $ head rowsTs])-        in unionRelTypes env rowsTs colNames---typeCheckCombineSelect :: Environment -> Type -> Type -> Either [TypeError] Type-typeCheckCombineSelect env v1 v2 = do-    u1 <- unwrapSetOfComposite v1-    let colNames = map fst u1-    u2 <- unwrapSetOfComposite v2-    let colTypes1 = map snd u1-    let colTypes2 = map snd u2-    unionRelTypes env [colTypes1,colTypes2] colNames--unionRelTypes :: Environment -> [[Type]] -> [String] -> Either [TypeError] Type-unionRelTypes env rowsTs colNames =-  let lengths = map length rowsTs-  in case () of-             _ | null rowsTs ->-                   Left [NoRowsGivenForValues]-               | not (all (==head lengths) lengths) ->-                   Left [ValuesListsMustBeSameLength]-               | otherwise ->-                   --i don't think this propagates all the errors, just the first set-                   mapM (resolveResultSetType env) (transpose rowsTs) >>=-                     (return . SetOfType . CompositeType . zip colNames)--{-# LINE 327 "AstInternal.hs" #-}--{-# LINE 180 "./TypeChecking/SelectStatement.ag" #-}--getPlaceholders :: Data a => a -> [Expression]-getPlaceholders st =-    filter isPlaceholder $ everything (++) (mkQ [] ga) st-    where-      ga :: Expression -> [Expression]-      ga s = [s]-      isPlaceholder e = case e of-                          PositionalArg _ _ -> True-                          Placeholder _ -> True-                          _ -> False-{-# LINE 341 "AstInternal.hs" #-}--{-# LINE 200 "./TypeChecking/TableRefs.ag" #-}--{--convert a function call into a [String,[(string,type)]] list for use-in a tableref context-first consideration is the alias: if there is an alias in the select,-e.g. select * from generate_series(1,2) x;  (alias is x)-we use that, otherwise we use the name of the function-second consideration is the attributes coming out, roughly speaking-we have to convert an arbitrary type to a relation type-if we have a relation valued function, we don't need to do anything-if we have a setof non composite, we lift the single type to an-attribute, using the function name for the attribute name-if we have a non setof, we lift the single type to an attribute and-then relation, using the function name for the attribute name-need to check to see what should happen with arrayof---}-funIdens :: Environment -> String -> Expression -> Either [TypeError] (String,[(String,Type)])-funIdens env alias fnVal = do-   errorWhen (case fnVal of-                FunCall _ _ _ -> False-                _ -> True)-             [ContextError "FunCall"]-   let (FunCall _ fnName _) = fnVal-       correlationName = if alias /= ""-                           then alias-                           else fnName-   attrs <- do-     case getTypeAnnotation fnVal of-       SetOfType (NamedCompositeType t) -> envCompositePublicAttrs env [] t-       SetOfType x -> return [(correlationName,x)]-       y -> return [(correlationName,y)]-   return (correlationName, attrs)--getAlias :: String -> TableAlias -> String-getAlias def alias =-  case alias of-    NoAlias -> def-    TableAlias t -> t-    FullAlias t _ -> t--{-# LINE 385 "AstInternal.hs" #-}--{-# LINE 92 "./TypeChecking/SelectLists.ag" #-}--expandStar :: LocalIdentifierBindings-           -> String-           -> Type-           -> [(String,Type)]-           -> [(String,Type)]-expandStar env colName colType types =-    fromRight types $ do-    let (correlationName,iden) = splitIdentifier colName-    newCols <- if iden == "*"-                 then libExpandStar env correlationName-                 else return [(iden, colType)]-    return $ newCols ++ types--fixStar :: Expression -> Expression-fixStar =-    everywhere (mkT fixStar')-    where-      fixStar' :: Annotation -> Annotation-      fixStar' a =-          if TypeAnnotation TypeCheckFailed `elem` a-              && any (\an ->-                       case an of-                         TypeErrorA (UnrecognisedIdentifier x) |-                           let (_,iden) = splitIdentifier x-                           in iden == "*" -> True-                         _ -> False) a-             then filter (\an -> case an of-                                   TypeAnnotation TypeCheckFailed -> False-                                   TypeErrorA (UnrecognisedIdentifier _) -> False-                                   _ -> True) a-             else a-{-# LINE 420 "AstInternal.hs" #-}--{-# LINE 136 "./TypeChecking/Dml.ag" #-}--getRowTypes :: [Type] -> [Type]-getRowTypes [AnonymousRecordType ts] = ts-getRowTypes ts = ts-{-# LINE 427 "AstInternal.hs" #-}--{-# LINE 174 "./TypeChecking/Dml.ag" #-}-----small shortcut to help produce better errors?-checkRelationExists :: Environment -> String -> Either [TypeError] ()-checkRelationExists env tbl =-    envCompositeDef env relationComposites tbl >>-    return ()----used by both insert and update-checkColumnConsistency :: Environment ->  String -> [String] -> [(String,Type)]-                       -> Either [TypeError] [(String,Type)]-checkColumnConsistency env tbl cols' insNameTypePairs = do-  ttcols <- lowerize <$> envCompositePublicAttrs env [] tbl-  let cols = if null cols'-               then map fst ttcols-               else map (map toLower) cols'-  errorWhen (length insNameTypePairs /= length cols) [WrongNumberOfColumns]-  let nonMatchingColumns = cols \\ map fst ttcols-  errorWhen (not $ null nonMatchingColumns) $-       map UnrecognisedIdentifier nonMatchingColumns-  let targetNameTypePairs = map (\l -> (l,fromJust $ lookup l ttcols)) cols-        --check the types of the insdata match the column targets-        --name datatype columntype-      typeTriples = map (\((a,b),c) -> (a,b,c)) $-                    zip targetNameTypePairs $-                    map snd insNameTypePairs-      errs :: [TypeError]-      errs = concat $ lefts $-             map (\(_,b,c) -> checkAssignmentValid env c b) typeTriples-  liftErrors errs-  return targetNameTypePairs-  where-    lowerize = map (\(a,b) -> (map toLower a,b))--{-# LINE 464 "AstInternal.hs" #-}--{-# LINE 40 "./TypeChecking/CreateTable.ag" #-}--defaultSystemColumns :: [(String,Type)]-defaultSystemColumns = [("tableoid", ScalarType "oid")-                       ,("cmax", ScalarType "cid")-                       ,("xmax", ScalarType "xid")-                       ,("cmin", ScalarType "cid")-                       ,("xmin", ScalarType "xid")-                       ,("ctid", ScalarType "tid")]-{-# LINE 475 "AstInternal.hs" #-}--- AlterTableAction ---------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative AddConstraint:-         child ann            : {Annotation}-         child con            : Constraint -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative AlterColumnDefault:-         child ann            : {Annotation}-         child nm             : {String}-         child def            : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data AlterTableAction  = AddConstraint (Annotation) (Constraint) -                       | AlterColumnDefault (Annotation) (String) (Expression) -                       deriving ( Data,Eq,Show,Typeable)--- cata-sem_AlterTableAction :: AlterTableAction  ->-                        T_AlterTableAction -sem_AlterTableAction (AddConstraint _ann _con )  =-    (sem_AlterTableAction_AddConstraint _ann (sem_Constraint _con ) )-sem_AlterTableAction (AlterColumnDefault _ann _nm _def )  =-    (sem_AlterTableAction_AlterColumnDefault _ann _nm (sem_Expression _def ) )--- semantic domain-type T_AlterTableAction  = Environment ->-                           LocalIdentifierBindings ->-                           ( AlterTableAction,AlterTableAction)-data Inh_AlterTableAction  = Inh_AlterTableAction {env_Inh_AlterTableAction :: Environment,lib_Inh_AlterTableAction :: LocalIdentifierBindings}-data Syn_AlterTableAction  = Syn_AlterTableAction {annotatedTree_Syn_AlterTableAction :: AlterTableAction,originalTree_Syn_AlterTableAction :: AlterTableAction}-wrap_AlterTableAction :: T_AlterTableAction  ->-                         Inh_AlterTableAction  ->-                         Syn_AlterTableAction -wrap_AlterTableAction sem (Inh_AlterTableAction _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_AlterTableAction _lhsOannotatedTree _lhsOoriginalTree ))-sem_AlterTableAction_AddConstraint :: Annotation ->-                                      T_Constraint  ->-                                      T_AlterTableAction -sem_AlterTableAction_AddConstraint ann_ con_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: AlterTableAction-              _lhsOoriginalTree :: AlterTableAction-              _conOenv :: Environment-              _conOlib :: LocalIdentifierBindings-              _conIannotatedTree :: Constraint-              _conIoriginalTree :: Constraint-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  AddConstraint ann_ _conIannotatedTree-                  {-# LINE 539 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  AddConstraint ann_ _conIoriginalTree-                  {-# LINE 544 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 549 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 554 "AstInternal.hs" #-}-              -- copy rule (down)-              _conOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 559 "AstInternal.hs" #-}-              -- copy rule (down)-              _conOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 564 "AstInternal.hs" #-}-              ( _conIannotatedTree,_conIoriginalTree) =-                  (con_ _conOenv _conOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_AlterTableAction_AlterColumnDefault :: Annotation ->-                                           String ->-                                           T_Expression  ->-                                           T_AlterTableAction -sem_AlterTableAction_AlterColumnDefault ann_ nm_ def_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: AlterTableAction-              _lhsOoriginalTree :: AlterTableAction-              _defOenv :: Environment-              _defOlib :: LocalIdentifierBindings-              _defIannotatedTree :: Expression-              _defIliftedColumnName :: String-              _defIoriginalTree :: Expression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  AlterColumnDefault ann_ nm_ _defIannotatedTree-                  {-# LINE 586 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  AlterColumnDefault ann_ nm_ _defIoriginalTree-                  {-# LINE 591 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 596 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 601 "AstInternal.hs" #-}-              -- copy rule (down)-              _defOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 606 "AstInternal.hs" #-}-              -- copy rule (down)-              _defOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 611 "AstInternal.hs" #-}-              ( _defIannotatedTree,_defIliftedColumnName,_defIoriginalTree) =-                  (def_ _defOenv _defOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- AttributeDef -------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         attrName             : String-         namedType            : Type-         originalTree         : SELF -   alternatives:-      alternative AttributeDef:-         child ann            : {Annotation}-         child name           : {String}-         child typ            : TypeName -         child def            : MaybeExpression -         child cons           : RowConstraintList -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data AttributeDef  = AttributeDef (Annotation) (String) (TypeName) (MaybeExpression) (RowConstraintList) -                   deriving ( Data,Eq,Show,Typeable)--- cata-sem_AttributeDef :: AttributeDef  ->-                    T_AttributeDef -sem_AttributeDef (AttributeDef _ann _name _typ _def _cons )  =-    (sem_AttributeDef_AttributeDef _ann _name (sem_TypeName _typ ) (sem_MaybeExpression _def ) (sem_RowConstraintList _cons ) )--- semantic domain-type T_AttributeDef  = Environment ->-                       LocalIdentifierBindings ->-                       ( AttributeDef,String,Type,AttributeDef)-data Inh_AttributeDef  = Inh_AttributeDef {env_Inh_AttributeDef :: Environment,lib_Inh_AttributeDef :: LocalIdentifierBindings}-data Syn_AttributeDef  = Syn_AttributeDef {annotatedTree_Syn_AttributeDef :: AttributeDef,attrName_Syn_AttributeDef :: String,namedType_Syn_AttributeDef :: Type,originalTree_Syn_AttributeDef :: AttributeDef}-wrap_AttributeDef :: T_AttributeDef  ->-                     Inh_AttributeDef  ->-                     Syn_AttributeDef -wrap_AttributeDef sem (Inh_AttributeDef _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_AttributeDef _lhsOannotatedTree _lhsOattrName _lhsOnamedType _lhsOoriginalTree ))-sem_AttributeDef_AttributeDef :: Annotation ->-                                 String ->-                                 T_TypeName  ->-                                 T_MaybeExpression  ->-                                 T_RowConstraintList  ->-                                 T_AttributeDef -sem_AttributeDef_AttributeDef ann_ name_ typ_ def_ cons_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOattrName :: String-              _lhsOnamedType :: Type-              _consOlib :: LocalIdentifierBindings-              _lhsOannotatedTree :: AttributeDef-              _lhsOoriginalTree :: AttributeDef-              _typOenv :: Environment-              _typOlib :: LocalIdentifierBindings-              _defOenv :: Environment-              _defOlib :: LocalIdentifierBindings-              _consOenv :: Environment-              _typIannotatedTree :: TypeName-              _typInamedType :: Type-              _typIoriginalTree :: TypeName-              _defIannotatedTree :: MaybeExpression-              _defIoriginalTree :: MaybeExpression-              _consIannotatedTree :: RowConstraintList-              _consIoriginalTree :: RowConstraintList-              -- "./TypeChecking/CreateTable.ag"(line 79, column 9)-              _lhsOattrName =-                  {-# LINE 79 "./TypeChecking/CreateTable.ag" #-}-                  map toLower name_-                  {-# LINE 687 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 80, column 9)-              _lhsOnamedType =-                  {-# LINE 80 "./TypeChecking/CreateTable.ag" #-}-                  _typInamedType-                  {-# LINE 692 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 95, column 9)-              _consOlib =-                  {-# LINE 95 "./TypeChecking/CreateTable.ag" #-}-                  case updateBindings _lhsIlib _lhsIenv-                           [LibStackIDs [("", [(name_, _typInamedType)])]] of-                    Left x -> error $ show x-                    Right e -> e-                  {-# LINE 700 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  AttributeDef ann_ name_ _typIannotatedTree _defIannotatedTree _consIannotatedTree-                  {-# LINE 705 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  AttributeDef ann_ name_ _typIoriginalTree _defIoriginalTree _consIoriginalTree-                  {-# LINE 710 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 715 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 720 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 725 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 730 "AstInternal.hs" #-}-              -- copy rule (down)-              _defOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 735 "AstInternal.hs" #-}-              -- copy rule (down)-              _defOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 740 "AstInternal.hs" #-}-              -- copy rule (down)-              _consOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 745 "AstInternal.hs" #-}-              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =-                  (typ_ _typOenv _typOlib )-              ( _defIannotatedTree,_defIoriginalTree) =-                  (def_ _defOenv _defOlib )-              ( _consIannotatedTree,_consIoriginalTree) =-                  (cons_ _consOenv _consOlib )-          in  ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType,_lhsOoriginalTree)))--- AttributeDefList ---------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         attrs                : [(String, Type)]-         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : AttributeDef -         child tl             : AttributeDefList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type AttributeDefList  = [(AttributeDef)]--- cata-sem_AttributeDefList :: AttributeDefList  ->-                        T_AttributeDefList -sem_AttributeDefList list  =-    (Prelude.foldr sem_AttributeDefList_Cons sem_AttributeDefList_Nil (Prelude.map sem_AttributeDef list) )--- semantic domain-type T_AttributeDefList  = Environment ->-                           LocalIdentifierBindings ->-                           ( AttributeDefList,([(String, Type)]),AttributeDefList)-data Inh_AttributeDefList  = Inh_AttributeDefList {env_Inh_AttributeDefList :: Environment,lib_Inh_AttributeDefList :: LocalIdentifierBindings}-data Syn_AttributeDefList  = Syn_AttributeDefList {annotatedTree_Syn_AttributeDefList :: AttributeDefList,attrs_Syn_AttributeDefList :: [(String, Type)],originalTree_Syn_AttributeDefList :: AttributeDefList}-wrap_AttributeDefList :: T_AttributeDefList  ->-                         Inh_AttributeDefList  ->-                         Syn_AttributeDefList -wrap_AttributeDefList sem (Inh_AttributeDefList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_AttributeDefList _lhsOannotatedTree _lhsOattrs _lhsOoriginalTree ))-sem_AttributeDefList_Cons :: T_AttributeDef  ->-                             T_AttributeDefList  ->-                             T_AttributeDefList -sem_AttributeDefList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOattrs :: ([(String, Type)])-              _lhsOannotatedTree :: AttributeDefList-              _lhsOoriginalTree :: AttributeDefList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: AttributeDef-              _hdIattrName :: String-              _hdInamedType :: Type-              _hdIoriginalTree :: AttributeDef-              _tlIannotatedTree :: AttributeDefList-              _tlIattrs :: ([(String, Type)])-              _tlIoriginalTree :: AttributeDefList-              -- "./TypeChecking/CreateTable.ag"(line 85, column 12)-              _lhsOattrs =-                  {-# LINE 85 "./TypeChecking/CreateTable.ag" #-}-                  (_hdIattrName, _hdInamedType) : _tlIattrs-                  {-# LINE 818 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 823 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 828 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 833 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 838 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 843 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 848 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 853 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 858 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIattrName,_hdInamedType,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIattrs,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree)))-sem_AttributeDefList_Nil :: T_AttributeDefList -sem_AttributeDefList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOattrs :: ([(String, Type)])-              _lhsOannotatedTree :: AttributeDefList-              _lhsOoriginalTree :: AttributeDefList-              -- "./TypeChecking/CreateTable.ag"(line 86, column 11)-              _lhsOattrs =-                  {-# LINE 86 "./TypeChecking/CreateTable.ag" #-}-                  []-                  {-# LINE 875 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 880 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 885 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 890 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 895 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree)))--- Cascade ------------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Cascade:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Restrict:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data Cascade  = Cascade -              | Restrict -              deriving ( Data,Eq,Show,Typeable)--- cata-sem_Cascade :: Cascade  ->-               T_Cascade -sem_Cascade (Cascade )  =-    (sem_Cascade_Cascade )-sem_Cascade (Restrict )  =-    (sem_Cascade_Restrict )--- semantic domain-type T_Cascade  = Environment ->-                  LocalIdentifierBindings ->-                  ( Cascade,Cascade)-data Inh_Cascade  = Inh_Cascade {env_Inh_Cascade :: Environment,lib_Inh_Cascade :: LocalIdentifierBindings}-data Syn_Cascade  = Syn_Cascade {annotatedTree_Syn_Cascade :: Cascade,originalTree_Syn_Cascade :: Cascade}-wrap_Cascade :: T_Cascade  ->-                Inh_Cascade  ->-                Syn_Cascade -wrap_Cascade sem (Inh_Cascade _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_Cascade _lhsOannotatedTree _lhsOoriginalTree ))-sem_Cascade_Cascade :: T_Cascade -sem_Cascade_Cascade  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Cascade-              _lhsOoriginalTree :: Cascade-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Cascade-                  {-# LINE 949 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Cascade-                  {-# LINE 954 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 959 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 964 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Cascade_Restrict :: T_Cascade -sem_Cascade_Restrict  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Cascade-              _lhsOoriginalTree :: Cascade-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Restrict-                  {-# LINE 976 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Restrict-                  {-# LINE 981 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 986 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 991 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- CaseExpressionList -------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : Expression -         child tl             : CaseExpressionList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type CaseExpressionList  = [(Expression)]--- cata-sem_CaseExpressionList :: CaseExpressionList  ->-                          T_CaseExpressionList -sem_CaseExpressionList list  =-    (Prelude.foldr sem_CaseExpressionList_Cons sem_CaseExpressionList_Nil (Prelude.map sem_Expression list) )--- semantic domain-type T_CaseExpressionList  = Environment ->-                             LocalIdentifierBindings ->-                             ( CaseExpressionList,CaseExpressionList)-data Inh_CaseExpressionList  = Inh_CaseExpressionList {env_Inh_CaseExpressionList :: Environment,lib_Inh_CaseExpressionList :: LocalIdentifierBindings}-data Syn_CaseExpressionList  = Syn_CaseExpressionList {annotatedTree_Syn_CaseExpressionList :: CaseExpressionList,originalTree_Syn_CaseExpressionList :: CaseExpressionList}-wrap_CaseExpressionList :: T_CaseExpressionList  ->-                           Inh_CaseExpressionList  ->-                           Syn_CaseExpressionList -wrap_CaseExpressionList sem (Inh_CaseExpressionList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_CaseExpressionList _lhsOannotatedTree _lhsOoriginalTree ))-sem_CaseExpressionList_Cons :: T_Expression  ->-                               T_CaseExpressionList  ->-                               T_CaseExpressionList -sem_CaseExpressionList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CaseExpressionList-              _lhsOoriginalTree :: CaseExpressionList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: Expression-              _hdIliftedColumnName :: String-              _hdIoriginalTree :: Expression-              _tlIannotatedTree :: CaseExpressionList-              _tlIoriginalTree :: CaseExpressionList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 1054 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 1059 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1064 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1069 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1074 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1079 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1084 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1089 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIliftedColumnName,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_CaseExpressionList_Nil :: T_CaseExpressionList -sem_CaseExpressionList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CaseExpressionList-              _lhsOoriginalTree :: CaseExpressionList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 1105 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 1110 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1115 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1120 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- CaseExpressionListExpressionPair -----------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Tuple:-         child x1             : CaseExpressionList -         child x2             : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type CaseExpressionListExpressionPair  = ( (CaseExpressionList),(Expression))--- cata-sem_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair  ->-                                        T_CaseExpressionListExpressionPair -sem_CaseExpressionListExpressionPair ( x1,x2)  =-    (sem_CaseExpressionListExpressionPair_Tuple (sem_CaseExpressionList x1 ) (sem_Expression x2 ) )--- semantic domain-type T_CaseExpressionListExpressionPair  = Environment ->-                                           LocalIdentifierBindings ->-                                           ( CaseExpressionListExpressionPair,CaseExpressionListExpressionPair)-data Inh_CaseExpressionListExpressionPair  = Inh_CaseExpressionListExpressionPair {env_Inh_CaseExpressionListExpressionPair :: Environment,lib_Inh_CaseExpressionListExpressionPair :: LocalIdentifierBindings}-data Syn_CaseExpressionListExpressionPair  = Syn_CaseExpressionListExpressionPair {annotatedTree_Syn_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair,originalTree_Syn_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair}-wrap_CaseExpressionListExpressionPair :: T_CaseExpressionListExpressionPair  ->-                                         Inh_CaseExpressionListExpressionPair  ->-                                         Syn_CaseExpressionListExpressionPair -wrap_CaseExpressionListExpressionPair sem (Inh_CaseExpressionListExpressionPair _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_CaseExpressionListExpressionPair _lhsOannotatedTree _lhsOoriginalTree ))-sem_CaseExpressionListExpressionPair_Tuple :: T_CaseExpressionList  ->-                                              T_Expression  ->-                                              T_CaseExpressionListExpressionPair -sem_CaseExpressionListExpressionPair_Tuple x1_ x2_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CaseExpressionListExpressionPair-              _lhsOoriginalTree :: CaseExpressionListExpressionPair-              _x1Oenv :: Environment-              _x1Olib :: LocalIdentifierBindings-              _x2Oenv :: Environment-              _x2Olib :: LocalIdentifierBindings-              _x1IannotatedTree :: CaseExpressionList-              _x1IoriginalTree :: CaseExpressionList-              _x2IannotatedTree :: Expression-              _x2IliftedColumnName :: String-              _x2IoriginalTree :: Expression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (_x1IannotatedTree,_x2IannotatedTree)-                  {-# LINE 1179 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (_x1IoriginalTree,_x2IoriginalTree)-                  {-# LINE 1184 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1189 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1194 "AstInternal.hs" #-}-              -- copy rule (down)-              _x1Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1199 "AstInternal.hs" #-}-              -- copy rule (down)-              _x1Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1204 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1209 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1214 "AstInternal.hs" #-}-              ( _x1IannotatedTree,_x1IoriginalTree) =-                  (x1_ _x1Oenv _x1Olib )-              ( _x2IannotatedTree,_x2IliftedColumnName,_x2IoriginalTree) =-                  (x2_ _x2Oenv _x2Olib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- CaseExpressionListExpressionPairList -------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : CaseExpressionListExpressionPair -         child tl             : CaseExpressionListExpressionPairList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type CaseExpressionListExpressionPairList  = [(CaseExpressionListExpressionPair)]--- cata-sem_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList  ->-                                            T_CaseExpressionListExpressionPairList -sem_CaseExpressionListExpressionPairList list  =-    (Prelude.foldr sem_CaseExpressionListExpressionPairList_Cons sem_CaseExpressionListExpressionPairList_Nil (Prelude.map sem_CaseExpressionListExpressionPair list) )--- semantic domain-type T_CaseExpressionListExpressionPairList  = Environment ->-                                               LocalIdentifierBindings ->-                                               ( CaseExpressionListExpressionPairList,CaseExpressionListExpressionPairList)-data Inh_CaseExpressionListExpressionPairList  = Inh_CaseExpressionListExpressionPairList {env_Inh_CaseExpressionListExpressionPairList :: Environment,lib_Inh_CaseExpressionListExpressionPairList :: LocalIdentifierBindings}-data Syn_CaseExpressionListExpressionPairList  = Syn_CaseExpressionListExpressionPairList {annotatedTree_Syn_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList,originalTree_Syn_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList}-wrap_CaseExpressionListExpressionPairList :: T_CaseExpressionListExpressionPairList  ->-                                             Inh_CaseExpressionListExpressionPairList  ->-                                             Syn_CaseExpressionListExpressionPairList -wrap_CaseExpressionListExpressionPairList sem (Inh_CaseExpressionListExpressionPairList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_CaseExpressionListExpressionPairList _lhsOannotatedTree _lhsOoriginalTree ))-sem_CaseExpressionListExpressionPairList_Cons :: T_CaseExpressionListExpressionPair  ->-                                                 T_CaseExpressionListExpressionPairList  ->-                                                 T_CaseExpressionListExpressionPairList -sem_CaseExpressionListExpressionPairList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CaseExpressionListExpressionPairList-              _lhsOoriginalTree :: CaseExpressionListExpressionPairList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: CaseExpressionListExpressionPair-              _hdIoriginalTree :: CaseExpressionListExpressionPair-              _tlIannotatedTree :: CaseExpressionListExpressionPairList-              _tlIoriginalTree :: CaseExpressionListExpressionPairList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 1280 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 1285 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1290 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1295 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1300 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1305 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1310 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1315 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_CaseExpressionListExpressionPairList_Nil :: T_CaseExpressionListExpressionPairList -sem_CaseExpressionListExpressionPairList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CaseExpressionListExpressionPairList-              _lhsOoriginalTree :: CaseExpressionListExpressionPairList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 1331 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 1336 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1341 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1346 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- CombineType --------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Except:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Intersect:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Union:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative UnionAll:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data CombineType  = Except -                  | Intersect -                  | Union -                  | UnionAll -                  deriving ( Data,Eq,Show,Typeable)--- cata-sem_CombineType :: CombineType  ->-                   T_CombineType -sem_CombineType (Except )  =-    (sem_CombineType_Except )-sem_CombineType (Intersect )  =-    (sem_CombineType_Intersect )-sem_CombineType (Union )  =-    (sem_CombineType_Union )-sem_CombineType (UnionAll )  =-    (sem_CombineType_UnionAll )--- semantic domain-type T_CombineType  = Environment ->-                      LocalIdentifierBindings ->-                      ( CombineType,CombineType)-data Inh_CombineType  = Inh_CombineType {env_Inh_CombineType :: Environment,lib_Inh_CombineType :: LocalIdentifierBindings}-data Syn_CombineType  = Syn_CombineType {annotatedTree_Syn_CombineType :: CombineType,originalTree_Syn_CombineType :: CombineType}-wrap_CombineType :: T_CombineType  ->-                    Inh_CombineType  ->-                    Syn_CombineType -wrap_CombineType sem (Inh_CombineType _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_CombineType _lhsOannotatedTree _lhsOoriginalTree ))-sem_CombineType_Except :: T_CombineType -sem_CombineType_Except  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CombineType-              _lhsOoriginalTree :: CombineType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Except-                  {-# LINE 1414 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Except-                  {-# LINE 1419 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1424 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1429 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_CombineType_Intersect :: T_CombineType -sem_CombineType_Intersect  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CombineType-              _lhsOoriginalTree :: CombineType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Intersect-                  {-# LINE 1441 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Intersect-                  {-# LINE 1446 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1451 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1456 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_CombineType_Union :: T_CombineType -sem_CombineType_Union  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CombineType-              _lhsOoriginalTree :: CombineType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Union-                  {-# LINE 1468 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Union-                  {-# LINE 1473 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1478 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1483 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_CombineType_UnionAll :: T_CombineType -sem_CombineType_UnionAll  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CombineType-              _lhsOoriginalTree :: CombineType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  UnionAll-                  {-# LINE 1495 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  UnionAll-                  {-# LINE 1500 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1505 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1510 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- Constraint ---------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative CheckConstraint:-         child ann            : {Annotation}-         child name           : {String}-         child expression     : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative PrimaryKeyConstraint:-         child ann            : {Annotation}-         child name           : {String}-         child stringList     : StringList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative ReferenceConstraint:-         child ann            : {Annotation}-         child name           : {String}-         child atts           : StringList -         child table          : {String}-         child tableAtts      : StringList -         child onUpdate       : Cascade -         child onDelete       : Cascade -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative UniqueConstraint:-         child ann            : {Annotation}-         child name           : {String}-         child stringList     : StringList -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data Constraint  = CheckConstraint (Annotation) (String) (Expression) -                 | PrimaryKeyConstraint (Annotation) (String) (StringList) -                 | ReferenceConstraint (Annotation) (String) (StringList) (String) (StringList) (Cascade) (Cascade) -                 | UniqueConstraint (Annotation) (String) (StringList) -                 deriving ( Data,Eq,Show,Typeable)--- cata-sem_Constraint :: Constraint  ->-                  T_Constraint -sem_Constraint (CheckConstraint _ann _name _expression )  =-    (sem_Constraint_CheckConstraint _ann _name (sem_Expression _expression ) )-sem_Constraint (PrimaryKeyConstraint _ann _name _stringList )  =-    (sem_Constraint_PrimaryKeyConstraint _ann _name (sem_StringList _stringList ) )-sem_Constraint (ReferenceConstraint _ann _name _atts _table _tableAtts _onUpdate _onDelete )  =-    (sem_Constraint_ReferenceConstraint _ann _name (sem_StringList _atts ) _table (sem_StringList _tableAtts ) (sem_Cascade _onUpdate ) (sem_Cascade _onDelete ) )-sem_Constraint (UniqueConstraint _ann _name _stringList )  =-    (sem_Constraint_UniqueConstraint _ann _name (sem_StringList _stringList ) )--- semantic domain-type T_Constraint  = Environment ->-                     LocalIdentifierBindings ->-                     ( Constraint,Constraint)-data Inh_Constraint  = Inh_Constraint {env_Inh_Constraint :: Environment,lib_Inh_Constraint :: LocalIdentifierBindings}-data Syn_Constraint  = Syn_Constraint {annotatedTree_Syn_Constraint :: Constraint,originalTree_Syn_Constraint :: Constraint}-wrap_Constraint :: T_Constraint  ->-                   Inh_Constraint  ->-                   Syn_Constraint -wrap_Constraint sem (Inh_Constraint _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_Constraint _lhsOannotatedTree _lhsOoriginalTree ))-sem_Constraint_CheckConstraint :: Annotation ->-                                  String ->-                                  T_Expression  ->-                                  T_Constraint -sem_Constraint_CheckConstraint ann_ name_ expression_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Constraint-              _lhsOoriginalTree :: Constraint-              _expressionOenv :: Environment-              _expressionOlib :: LocalIdentifierBindings-              _expressionIannotatedTree :: Expression-              _expressionIliftedColumnName :: String-              _expressionIoriginalTree :: Expression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CheckConstraint ann_ name_ _expressionIannotatedTree-                  {-# LINE 1602 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CheckConstraint ann_ name_ _expressionIoriginalTree-                  {-# LINE 1607 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1612 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1617 "AstInternal.hs" #-}-              -- copy rule (down)-              _expressionOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1622 "AstInternal.hs" #-}-              -- copy rule (down)-              _expressionOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1627 "AstInternal.hs" #-}-              ( _expressionIannotatedTree,_expressionIliftedColumnName,_expressionIoriginalTree) =-                  (expression_ _expressionOenv _expressionOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Constraint_PrimaryKeyConstraint :: Annotation ->-                                       String ->-                                       T_StringList  ->-                                       T_Constraint -sem_Constraint_PrimaryKeyConstraint ann_ name_ stringList_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Constraint-              _lhsOoriginalTree :: Constraint-              _stringListOenv :: Environment-              _stringListOlib :: LocalIdentifierBindings-              _stringListIannotatedTree :: StringList-              _stringListIoriginalTree :: StringList-              _stringListIstrings :: ([String])-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  PrimaryKeyConstraint ann_ name_ _stringListIannotatedTree-                  {-# LINE 1649 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  PrimaryKeyConstraint ann_ name_ _stringListIoriginalTree-                  {-# LINE 1654 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1659 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1664 "AstInternal.hs" #-}-              -- copy rule (down)-              _stringListOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1669 "AstInternal.hs" #-}-              -- copy rule (down)-              _stringListOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1674 "AstInternal.hs" #-}-              ( _stringListIannotatedTree,_stringListIoriginalTree,_stringListIstrings) =-                  (stringList_ _stringListOenv _stringListOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Constraint_ReferenceConstraint :: Annotation ->-                                      String ->-                                      T_StringList  ->-                                      String ->-                                      T_StringList  ->-                                      T_Cascade  ->-                                      T_Cascade  ->-                                      T_Constraint -sem_Constraint_ReferenceConstraint ann_ name_ atts_ table_ tableAtts_ onUpdate_ onDelete_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Constraint-              _lhsOoriginalTree :: Constraint-              _attsOenv :: Environment-              _attsOlib :: LocalIdentifierBindings-              _tableAttsOenv :: Environment-              _tableAttsOlib :: LocalIdentifierBindings-              _onUpdateOenv :: Environment-              _onUpdateOlib :: LocalIdentifierBindings-              _onDeleteOenv :: Environment-              _onDeleteOlib :: LocalIdentifierBindings-              _attsIannotatedTree :: StringList-              _attsIoriginalTree :: StringList-              _attsIstrings :: ([String])-              _tableAttsIannotatedTree :: StringList-              _tableAttsIoriginalTree :: StringList-              _tableAttsIstrings :: ([String])-              _onUpdateIannotatedTree :: Cascade-              _onUpdateIoriginalTree :: Cascade-              _onDeleteIannotatedTree :: Cascade-              _onDeleteIoriginalTree :: Cascade-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ReferenceConstraint ann_ name_ _attsIannotatedTree table_ _tableAttsIannotatedTree _onUpdateIannotatedTree _onDeleteIannotatedTree-                  {-# LINE 1713 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ReferenceConstraint ann_ name_ _attsIoriginalTree table_ _tableAttsIoriginalTree _onUpdateIoriginalTree _onDeleteIoriginalTree-                  {-# LINE 1718 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1723 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1728 "AstInternal.hs" #-}-              -- copy rule (down)-              _attsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1733 "AstInternal.hs" #-}-              -- copy rule (down)-              _attsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1738 "AstInternal.hs" #-}-              -- copy rule (down)-              _tableAttsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1743 "AstInternal.hs" #-}-              -- copy rule (down)-              _tableAttsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1748 "AstInternal.hs" #-}-              -- copy rule (down)-              _onUpdateOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1753 "AstInternal.hs" #-}-              -- copy rule (down)-              _onUpdateOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1758 "AstInternal.hs" #-}-              -- copy rule (down)-              _onDeleteOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1763 "AstInternal.hs" #-}-              -- copy rule (down)-              _onDeleteOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1768 "AstInternal.hs" #-}-              ( _attsIannotatedTree,_attsIoriginalTree,_attsIstrings) =-                  (atts_ _attsOenv _attsOlib )-              ( _tableAttsIannotatedTree,_tableAttsIoriginalTree,_tableAttsIstrings) =-                  (tableAtts_ _tableAttsOenv _tableAttsOlib )-              ( _onUpdateIannotatedTree,_onUpdateIoriginalTree) =-                  (onUpdate_ _onUpdateOenv _onUpdateOlib )-              ( _onDeleteIannotatedTree,_onDeleteIoriginalTree) =-                  (onDelete_ _onDeleteOenv _onDeleteOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Constraint_UniqueConstraint :: Annotation ->-                                   String ->-                                   T_StringList  ->-                                   T_Constraint -sem_Constraint_UniqueConstraint ann_ name_ stringList_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Constraint-              _lhsOoriginalTree :: Constraint-              _stringListOenv :: Environment-              _stringListOlib :: LocalIdentifierBindings-              _stringListIannotatedTree :: StringList-              _stringListIoriginalTree :: StringList-              _stringListIstrings :: ([String])-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  UniqueConstraint ann_ name_ _stringListIannotatedTree-                  {-# LINE 1796 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  UniqueConstraint ann_ name_ _stringListIoriginalTree-                  {-# LINE 1801 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1806 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1811 "AstInternal.hs" #-}-              -- copy rule (down)-              _stringListOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1816 "AstInternal.hs" #-}-              -- copy rule (down)-              _stringListOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1821 "AstInternal.hs" #-}-              ( _stringListIannotatedTree,_stringListIoriginalTree,_stringListIstrings) =-                  (stringList_ _stringListOenv _stringListOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- ConstraintList -----------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : Constraint -         child tl             : ConstraintList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ConstraintList  = [(Constraint)]--- cata-sem_ConstraintList :: ConstraintList  ->-                      T_ConstraintList -sem_ConstraintList list  =-    (Prelude.foldr sem_ConstraintList_Cons sem_ConstraintList_Nil (Prelude.map sem_Constraint list) )--- semantic domain-type T_ConstraintList  = Environment ->-                         LocalIdentifierBindings ->-                         ( ConstraintList,ConstraintList)-data Inh_ConstraintList  = Inh_ConstraintList {env_Inh_ConstraintList :: Environment,lib_Inh_ConstraintList :: LocalIdentifierBindings}-data Syn_ConstraintList  = Syn_ConstraintList {annotatedTree_Syn_ConstraintList :: ConstraintList,originalTree_Syn_ConstraintList :: ConstraintList}-wrap_ConstraintList :: T_ConstraintList  ->-                       Inh_ConstraintList  ->-                       Syn_ConstraintList -wrap_ConstraintList sem (Inh_ConstraintList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ConstraintList _lhsOannotatedTree _lhsOoriginalTree ))-sem_ConstraintList_Cons :: T_Constraint  ->-                           T_ConstraintList  ->-                           T_ConstraintList -sem_ConstraintList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ConstraintList-              _lhsOoriginalTree :: ConstraintList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: Constraint-              _hdIoriginalTree :: Constraint-              _tlIannotatedTree :: ConstraintList-              _tlIoriginalTree :: ConstraintList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 1885 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 1890 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1895 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1900 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1905 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1910 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 1915 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 1920 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_ConstraintList_Nil :: T_ConstraintList -sem_ConstraintList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ConstraintList-              _lhsOoriginalTree :: ConstraintList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 1936 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 1941 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 1946 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 1951 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- CopySource ---------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative CopyFilename:-         child string         : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Stdin:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data CopySource  = CopyFilename (String) -                 | Stdin -                 deriving ( Data,Eq,Show,Typeable)--- cata-sem_CopySource :: CopySource  ->-                  T_CopySource -sem_CopySource (CopyFilename _string )  =-    (sem_CopySource_CopyFilename _string )-sem_CopySource (Stdin )  =-    (sem_CopySource_Stdin )--- semantic domain-type T_CopySource  = Environment ->-                     LocalIdentifierBindings ->-                     ( CopySource,CopySource)-data Inh_CopySource  = Inh_CopySource {env_Inh_CopySource :: Environment,lib_Inh_CopySource :: LocalIdentifierBindings}-data Syn_CopySource  = Syn_CopySource {annotatedTree_Syn_CopySource :: CopySource,originalTree_Syn_CopySource :: CopySource}-wrap_CopySource :: T_CopySource  ->-                   Inh_CopySource  ->-                   Syn_CopySource -wrap_CopySource sem (Inh_CopySource _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_CopySource _lhsOannotatedTree _lhsOoriginalTree ))-sem_CopySource_CopyFilename :: String ->-                               T_CopySource -sem_CopySource_CopyFilename string_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CopySource-              _lhsOoriginalTree :: CopySource-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CopyFilename string_-                  {-# LINE 2007 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CopyFilename string_-                  {-# LINE 2012 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2017 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2022 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_CopySource_Stdin :: T_CopySource -sem_CopySource_Stdin  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: CopySource-              _lhsOoriginalTree :: CopySource-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Stdin-                  {-# LINE 2034 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Stdin-                  {-# LINE 2039 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2044 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2049 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- Direction ----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Asc:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Desc:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data Direction  = Asc -                | Desc -                deriving ( Data,Eq,Show,Typeable)--- cata-sem_Direction :: Direction  ->-                 T_Direction -sem_Direction (Asc )  =-    (sem_Direction_Asc )-sem_Direction (Desc )  =-    (sem_Direction_Desc )--- semantic domain-type T_Direction  = Environment ->-                    LocalIdentifierBindings ->-                    ( Direction,Direction)-data Inh_Direction  = Inh_Direction {env_Inh_Direction :: Environment,lib_Inh_Direction :: LocalIdentifierBindings}-data Syn_Direction  = Syn_Direction {annotatedTree_Syn_Direction :: Direction,originalTree_Syn_Direction :: Direction}-wrap_Direction :: T_Direction  ->-                  Inh_Direction  ->-                  Syn_Direction -wrap_Direction sem (Inh_Direction _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_Direction _lhsOannotatedTree _lhsOoriginalTree ))-sem_Direction_Asc :: T_Direction -sem_Direction_Asc  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Direction-              _lhsOoriginalTree :: Direction-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Asc-                  {-# LINE 2103 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Asc-                  {-# LINE 2108 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2113 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2118 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Direction_Desc :: T_Direction -sem_Direction_Desc  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Direction-              _lhsOoriginalTree :: Direction-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Desc-                  {-# LINE 2130 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Desc-                  {-# LINE 2135 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2140 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2145 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- Distinct -----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Distinct:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Dupes:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data Distinct  = Distinct -               | Dupes -               deriving ( Data,Eq,Show,Typeable)--- cata-sem_Distinct :: Distinct  ->-                T_Distinct -sem_Distinct (Distinct )  =-    (sem_Distinct_Distinct )-sem_Distinct (Dupes )  =-    (sem_Distinct_Dupes )--- semantic domain-type T_Distinct  = Environment ->-                   LocalIdentifierBindings ->-                   ( Distinct,Distinct)-data Inh_Distinct  = Inh_Distinct {env_Inh_Distinct :: Environment,lib_Inh_Distinct :: LocalIdentifierBindings}-data Syn_Distinct  = Syn_Distinct {annotatedTree_Syn_Distinct :: Distinct,originalTree_Syn_Distinct :: Distinct}-wrap_Distinct :: T_Distinct  ->-                 Inh_Distinct  ->-                 Syn_Distinct -wrap_Distinct sem (Inh_Distinct _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_Distinct _lhsOannotatedTree _lhsOoriginalTree ))-sem_Distinct_Distinct :: T_Distinct -sem_Distinct_Distinct  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Distinct-              _lhsOoriginalTree :: Distinct-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Distinct-                  {-# LINE 2199 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Distinct-                  {-# LINE 2204 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2209 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2214 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Distinct_Dupes :: T_Distinct -sem_Distinct_Dupes  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Distinct-              _lhsOoriginalTree :: Distinct-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Dupes-                  {-# LINE 2226 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Dupes-                  {-# LINE 2231 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2236 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2241 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- DropType -----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Domain:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Table:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Type:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative View:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data DropType  = Domain -               | Table -               | Type -               | View -               deriving ( Data,Eq,Show,Typeable)--- cata-sem_DropType :: DropType  ->-                T_DropType -sem_DropType (Domain )  =-    (sem_DropType_Domain )-sem_DropType (Table )  =-    (sem_DropType_Table )-sem_DropType (Type )  =-    (sem_DropType_Type )-sem_DropType (View )  =-    (sem_DropType_View )--- semantic domain-type T_DropType  = Environment ->-                   LocalIdentifierBindings ->-                   ( DropType,DropType)-data Inh_DropType  = Inh_DropType {env_Inh_DropType :: Environment,lib_Inh_DropType :: LocalIdentifierBindings}-data Syn_DropType  = Syn_DropType {annotatedTree_Syn_DropType :: DropType,originalTree_Syn_DropType :: DropType}-wrap_DropType :: T_DropType  ->-                 Inh_DropType  ->-                 Syn_DropType -wrap_DropType sem (Inh_DropType _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_DropType _lhsOannotatedTree _lhsOoriginalTree ))-sem_DropType_Domain :: T_DropType -sem_DropType_Domain  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: DropType-              _lhsOoriginalTree :: DropType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Domain-                  {-# LINE 2309 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Domain-                  {-# LINE 2314 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2319 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2324 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_DropType_Table :: T_DropType -sem_DropType_Table  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: DropType-              _lhsOoriginalTree :: DropType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Table-                  {-# LINE 2336 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Table-                  {-# LINE 2341 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2346 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2351 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_DropType_Type :: T_DropType -sem_DropType_Type  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: DropType-              _lhsOoriginalTree :: DropType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Type-                  {-# LINE 2363 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Type-                  {-# LINE 2368 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2373 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2378 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_DropType_View :: T_DropType -sem_DropType_View  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: DropType-              _lhsOoriginalTree :: DropType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  View-                  {-# LINE 2390 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  View-                  {-# LINE 2395 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 2400 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2405 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- Expression ---------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         liftedColumnName     : String-         originalTree         : SELF -   alternatives:-      alternative BooleanLit:-         child ann            : {Annotation}-         child b              : {Bool}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative Case:-         child ann            : {Annotation}-         child cases          : CaseExpressionListExpressionPairList -         child els            : MaybeExpression -         visit 0:-            local whenTypes   : _-            local thenTypes   : _-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative CaseSimple:-         child ann            : {Annotation}-         child value          : Expression -         child cases          : CaseExpressionListExpressionPairList -         child els            : MaybeExpression -         visit 0:-            local whenTypes   : _-            local thenTypes   : _-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative Cast:-         child ann            : {Annotation}-         child expr           : Expression -         child tn             : TypeName -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative Exists:-         child ann            : {Annotation}-         child sel            : SelectExpression -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative FloatLit:-         child ann            : {Annotation}-         child d              : {Double}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative FunCall:-         child ann            : {Annotation}-         child funName        : {String}-         child args           : ExpressionList -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative Identifier:-         child ann            : {Annotation}-         child i              : {String}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative InPredicate:-         child ann            : {Annotation}-         child expr           : Expression -         child i              : {Bool}-         child list           : InList -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative IntegerLit:-         child ann            : {Annotation}-         child i              : {Integer}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative LiftOperator:-         child ann            : {Annotation}-         child oper           : {String}-         child flav           : LiftFlavour -         child args           : ExpressionList -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative NullLit:-         child ann            : {Annotation}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative Placeholder:-         child ann            : {Annotation}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative PositionalArg:-         child ann            : {Annotation}-         child p              : {Integer}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative ScalarSubQuery:-         child ann            : {Annotation}-         child sel            : SelectExpression -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative StringLit:-         child ann            : {Annotation}-         child quote          : {String}-         child value          : {String}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative WindowFn:-         child ann            : {Annotation}-         child fn             : Expression -         child partitionBy    : ExpressionList -         child orderBy        : ExpressionList -         child dir            : Direction -         child frm            : FrameClause -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _--}-data Expression  = BooleanLit (Annotation) (Bool) -                 | Case (Annotation) (CaseExpressionListExpressionPairList) (MaybeExpression) -                 | CaseSimple (Annotation) (Expression) (CaseExpressionListExpressionPairList) (MaybeExpression) -                 | Cast (Annotation) (Expression) (TypeName) -                 | Exists (Annotation) (SelectExpression) -                 | FloatLit (Annotation) (Double) -                 | FunCall (Annotation) (String) (ExpressionList) -                 | Identifier (Annotation) (String) -                 | InPredicate (Annotation) (Expression) (Bool) (InList) -                 | IntegerLit (Annotation) (Integer) -                 | LiftOperator (Annotation) (String) (LiftFlavour) (ExpressionList) -                 | NullLit (Annotation) -                 | Placeholder (Annotation) -                 | PositionalArg (Annotation) (Integer) -                 | ScalarSubQuery (Annotation) (SelectExpression) -                 | StringLit (Annotation) (String) (String) -                 | WindowFn (Annotation) (Expression) (ExpressionList) (ExpressionList) (Direction) (FrameClause) -                 deriving ( Data,Eq,Show,Typeable)--- cata-sem_Expression :: Expression  ->-                  T_Expression -sem_Expression (BooleanLit _ann _b )  =-    (sem_Expression_BooleanLit _ann _b )-sem_Expression (Case _ann _cases _els )  =-    (sem_Expression_Case _ann (sem_CaseExpressionListExpressionPairList _cases ) (sem_MaybeExpression _els ) )-sem_Expression (CaseSimple _ann _value _cases _els )  =-    (sem_Expression_CaseSimple _ann (sem_Expression _value ) (sem_CaseExpressionListExpressionPairList _cases ) (sem_MaybeExpression _els ) )-sem_Expression (Cast _ann _expr _tn )  =-    (sem_Expression_Cast _ann (sem_Expression _expr ) (sem_TypeName _tn ) )-sem_Expression (Exists _ann _sel )  =-    (sem_Expression_Exists _ann (sem_SelectExpression _sel ) )-sem_Expression (FloatLit _ann _d )  =-    (sem_Expression_FloatLit _ann _d )-sem_Expression (FunCall _ann _funName _args )  =-    (sem_Expression_FunCall _ann _funName (sem_ExpressionList _args ) )-sem_Expression (Identifier _ann _i )  =-    (sem_Expression_Identifier _ann _i )-sem_Expression (InPredicate _ann _expr _i _list )  =-    (sem_Expression_InPredicate _ann (sem_Expression _expr ) _i (sem_InList _list ) )-sem_Expression (IntegerLit _ann _i )  =-    (sem_Expression_IntegerLit _ann _i )-sem_Expression (LiftOperator _ann _oper _flav _args )  =-    (sem_Expression_LiftOperator _ann _oper (sem_LiftFlavour _flav ) (sem_ExpressionList _args ) )-sem_Expression (NullLit _ann )  =-    (sem_Expression_NullLit _ann )-sem_Expression (Placeholder _ann )  =-    (sem_Expression_Placeholder _ann )-sem_Expression (PositionalArg _ann _p )  =-    (sem_Expression_PositionalArg _ann _p )-sem_Expression (ScalarSubQuery _ann _sel )  =-    (sem_Expression_ScalarSubQuery _ann (sem_SelectExpression _sel ) )-sem_Expression (StringLit _ann _quote _value )  =-    (sem_Expression_StringLit _ann _quote _value )-sem_Expression (WindowFn _ann _fn _partitionBy _orderBy _dir _frm )  =-    (sem_Expression_WindowFn _ann (sem_Expression _fn ) (sem_ExpressionList _partitionBy ) (sem_ExpressionList _orderBy ) (sem_Direction _dir ) (sem_FrameClause _frm ) )--- semantic domain-type T_Expression  = Environment ->-                     LocalIdentifierBindings ->-                     ( Expression,String,Expression)-data Inh_Expression  = Inh_Expression {env_Inh_Expression :: Environment,lib_Inh_Expression :: LocalIdentifierBindings}-data Syn_Expression  = Syn_Expression {annotatedTree_Syn_Expression :: Expression,liftedColumnName_Syn_Expression :: String,originalTree_Syn_Expression :: Expression}-wrap_Expression :: T_Expression  ->-                   Inh_Expression  ->-                   Syn_Expression -wrap_Expression sem (Inh_Expression _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_Expression _lhsOannotatedTree _lhsOliftedColumnName _lhsOoriginalTree ))-sem_Expression_BooleanLit :: Annotation ->-                             Bool ->-                             T_Expression -sem_Expression_BooleanLit ann_ b_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 2655 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 29, column 19)-              _tpe =-                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}-                  Right typeBool-                  {-# LINE 2660 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 41, column 9)-              _backTree =-                  {-# LINE 41 "./TypeChecking/Expressions.ag" #-}-                  BooleanLit ann_ b_-                  {-# LINE 2665 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 2670 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  BooleanLit ann_ b_-                  {-# LINE 2675 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  BooleanLit ann_ b_-                  {-# LINE 2680 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2685 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_Case :: Annotation ->-                       T_CaseExpressionListExpressionPairList  ->-                       T_MaybeExpression  ->-                       T_Expression -sem_Expression_Case ann_ cases_ els_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              _casesOenv :: Environment-              _casesOlib :: LocalIdentifierBindings-              _elsOenv :: Environment-              _elsOlib :: LocalIdentifierBindings-              _casesIannotatedTree :: CaseExpressionListExpressionPairList-              _casesIoriginalTree :: CaseExpressionListExpressionPairList-              _elsIannotatedTree :: MaybeExpression-              _elsIoriginalTree :: MaybeExpression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 2712 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 196, column 9)-              _whenTypes =-                  {-# LINE 196 "./TypeChecking/Expressions.ag" #-}-                  map getTypeAnnotation $ concatMap fst $-                  _casesIannotatedTree-                  {-# LINE 2718 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 198, column 9)-              _thenTypes =-                  {-# LINE 198 "./TypeChecking/Expressions.ag" #-}-                  map getTypeAnnotation $-                      (map snd $ _casesIannotatedTree) ++-                        maybeToList _elsIannotatedTree-                  {-# LINE 2725 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 204, column 9)-              _tpe =-                  {-# LINE 204 "./TypeChecking/Expressions.ag" #-}-                  dependsOnRTpe _whenTypes     $ do-                  errorWhen (any (/= typeBool) _whenTypes    ) $-                            [WrongTypes typeBool _whenTypes    ]-                  dependsOnRTpe _thenTypes     $-                    resolveResultSetType _lhsIenv _thenTypes-                  {-# LINE 2734 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 210, column 9)-              _backTree =-                  {-# LINE 210 "./TypeChecking/Expressions.ag" #-}-                  Case ann_ _casesIannotatedTree _elsIannotatedTree-                  {-# LINE 2739 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 2744 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Case ann_ _casesIannotatedTree _elsIannotatedTree-                  {-# LINE 2749 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Case ann_ _casesIoriginalTree _elsIoriginalTree-                  {-# LINE 2754 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2759 "AstInternal.hs" #-}-              -- copy rule (down)-              _casesOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 2764 "AstInternal.hs" #-}-              -- copy rule (down)-              _casesOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 2769 "AstInternal.hs" #-}-              -- copy rule (down)-              _elsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 2774 "AstInternal.hs" #-}-              -- copy rule (down)-              _elsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 2779 "AstInternal.hs" #-}-              ( _casesIannotatedTree,_casesIoriginalTree) =-                  (cases_ _casesOenv _casesOlib )-              ( _elsIannotatedTree,_elsIoriginalTree) =-                  (els_ _elsOenv _elsOlib )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_CaseSimple :: Annotation ->-                             T_Expression  ->-                             T_CaseExpressionListExpressionPairList  ->-                             T_MaybeExpression  ->-                             T_Expression -sem_Expression_CaseSimple ann_ value_ cases_ els_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOoriginalTree :: Expression-              _lhsOliftedColumnName :: String-              _valueOenv :: Environment-              _valueOlib :: LocalIdentifierBindings-              _casesOenv :: Environment-              _casesOlib :: LocalIdentifierBindings-              _elsOenv :: Environment-              _elsOlib :: LocalIdentifierBindings-              _valueIannotatedTree :: Expression-              _valueIliftedColumnName :: String-              _valueIoriginalTree :: Expression-              _casesIannotatedTree :: CaseExpressionListExpressionPairList-              _casesIoriginalTree :: CaseExpressionListExpressionPairList-              _elsIannotatedTree :: MaybeExpression-              _elsIoriginalTree :: MaybeExpression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 2816 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 196, column 9)-              _whenTypes =-                  {-# LINE 196 "./TypeChecking/Expressions.ag" #-}-                  map getTypeAnnotation $ concatMap fst $-                  _casesIannotatedTree-                  {-# LINE 2822 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 198, column 9)-              _thenTypes =-                  {-# LINE 198 "./TypeChecking/Expressions.ag" #-}-                  map getTypeAnnotation $-                      (map snd $ _casesIannotatedTree) ++-                        maybeToList _elsIannotatedTree-                  {-# LINE 2829 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 215, column 9)-              _tpe =-                  {-# LINE 215 "./TypeChecking/Expressions.ag" #-}-                  dependsOnRTpe _whenTypes     $ do-                  let valueType = getTypeAnnotation _valueIannotatedTree-                  checkWhenTypes <--                      resolveResultSetType _lhsIenv (valueType : _whenTypes    )-                  dependsOnRTpe _thenTypes     $-                    resolveResultSetType _lhsIenv _thenTypes-                  {-# LINE 2839 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 222, column 9)-              _backTree =-                  {-# LINE 222 "./TypeChecking/Expressions.ag" #-}-                  CaseSimple ann_-                             _valueIannotatedTree-                             _casesIannotatedTree-                             _elsIannotatedTree-                  {-# LINE 2847 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CaseSimple ann_ _valueIannotatedTree _casesIannotatedTree _elsIannotatedTree-                  {-# LINE 2852 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CaseSimple ann_ _valueIoriginalTree _casesIoriginalTree _elsIoriginalTree-                  {-# LINE 2857 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2862 "AstInternal.hs" #-}-              -- copy rule (up)-              _lhsOliftedColumnName =-                  {-# LINE 161 "./TypeChecking/SelectLists.ag" #-}-                  _valueIliftedColumnName-                  {-# LINE 2867 "AstInternal.hs" #-}-              -- copy rule (down)-              _valueOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 2872 "AstInternal.hs" #-}-              -- copy rule (down)-              _valueOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 2877 "AstInternal.hs" #-}-              -- copy rule (down)-              _casesOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 2882 "AstInternal.hs" #-}-              -- copy rule (down)-              _casesOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 2887 "AstInternal.hs" #-}-              -- copy rule (down)-              _elsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 2892 "AstInternal.hs" #-}-              -- copy rule (down)-              _elsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 2897 "AstInternal.hs" #-}-              ( _valueIannotatedTree,_valueIliftedColumnName,_valueIoriginalTree) =-                  (value_ _valueOenv _valueOlib )-              ( _casesIannotatedTree,_casesIoriginalTree) =-                  (cases_ _casesOenv _casesOlib )-              ( _elsIannotatedTree,_elsIoriginalTree) =-                  (els_ _elsOenv _elsOlib )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_Cast :: Annotation ->-                       T_Expression  ->-                       T_TypeName  ->-                       T_Expression -sem_Expression_Cast ann_ expr_ tn_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _tnOenv :: Environment-              _tnOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _exprIoriginalTree :: Expression-              _tnIannotatedTree :: TypeName-              _tnInamedType :: Type-              _tnIoriginalTree :: TypeName-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 2932 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 54, column 12)-              _tpe =-                  {-# LINE 54 "./TypeChecking/Expressions.ag" #-}-                  Right $ _tnInamedType-                  {-# LINE 2937 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 55, column 12)-              _backTree =-                  {-# LINE 55 "./TypeChecking/Expressions.ag" #-}-                  Cast ann_ _exprIannotatedTree _tnIannotatedTree-                  {-# LINE 2942 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 169, column 10)-              _lhsOliftedColumnName =-                  {-# LINE 169 "./TypeChecking/SelectLists.ag" #-}-                  case _tnIannotatedTree of-                    SimpleTypeName _ tn -> tn-                    _ -> ""-                  {-# LINE 2949 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Cast ann_ _exprIannotatedTree _tnIannotatedTree-                  {-# LINE 2954 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Cast ann_ _exprIoriginalTree _tnIoriginalTree-                  {-# LINE 2959 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 2964 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 2969 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 2974 "AstInternal.hs" #-}-              -- copy rule (down)-              _tnOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 2979 "AstInternal.hs" #-}-              -- copy rule (down)-              _tnOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 2984 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-              ( _tnIannotatedTree,_tnInamedType,_tnIoriginalTree) =-                  (tn_ _tnOenv _tnOlib )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_Exists :: Annotation ->-                         T_SelectExpression  ->-                         T_Expression -sem_Expression_Exists ann_ sel_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              _selOenv :: Environment-              _selOlib :: LocalIdentifierBindings-              _selIannotatedTree :: SelectExpression-              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _selIoriginalTree :: SelectExpression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3011 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 253, column 9)-              _tpe =-                  {-# LINE 253 "./TypeChecking/Expressions.ag" #-}-                  Right typeBool-                  {-# LINE 3016 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 254, column 9)-              _backTree =-                  {-# LINE 254 "./TypeChecking/Expressions.ag" #-}-                  Exists ann_ _selIannotatedTree-                  {-# LINE 3021 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 3026 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Exists ann_ _selIannotatedTree-                  {-# LINE 3031 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Exists ann_ _selIoriginalTree-                  {-# LINE 3036 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3041 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3046 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3051 "AstInternal.hs" #-}-              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =-                  (sel_ _selOenv _selOlib )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_FloatLit :: Annotation ->-                           Double ->-                           T_Expression -sem_Expression_FloatLit ann_ d_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3071 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 28, column 17)-              _tpe =-                  {-# LINE 28 "./TypeChecking/Expressions.ag" #-}-                  Right typeNumeric-                  {-# LINE 3076 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 39, column 9)-              _backTree =-                  {-# LINE 39 "./TypeChecking/Expressions.ag" #-}-                  FloatLit ann_ d_-                  {-# LINE 3081 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 3086 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  FloatLit ann_ d_-                  {-# LINE 3091 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  FloatLit ann_ d_-                  {-# LINE 3096 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3101 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_FunCall :: Annotation ->-                          String ->-                          T_ExpressionList  ->-                          T_Expression -sem_Expression_FunCall ann_ funName_ args_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              _argsOenv :: Environment-              _argsOlib :: LocalIdentifierBindings-              _argsIannotatedTree :: ExpressionList-              _argsIoriginalTree :: ExpressionList-              _argsItypeList :: ([Type])-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3125 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 62, column 9)-              _tpe =-                  {-# LINE 62 "./TypeChecking/Expressions.ag" #-}-                  dependsOnRTpe _argsItypeList $-                    typeCheckFunCall-                      _lhsIenv-                      funName_-                      _argsItypeList-                  {-# LINE 3134 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 67, column 9)-              _backTree =-                  {-# LINE 67 "./TypeChecking/Expressions.ag" #-}-                  FunCall ann_ funName_ _argsIannotatedTree-                  {-# LINE 3139 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 165, column 13)-              _lhsOliftedColumnName =-                  {-# LINE 165 "./TypeChecking/SelectLists.ag" #-}-                  if isOperatorName funName_-                     then ""-                     else funName_-                  {-# LINE 3146 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  FunCall ann_ funName_ _argsIannotatedTree-                  {-# LINE 3151 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  FunCall ann_ funName_ _argsIoriginalTree-                  {-# LINE 3156 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3161 "AstInternal.hs" #-}-              -- copy rule (down)-              _argsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3166 "AstInternal.hs" #-}-              -- copy rule (down)-              _argsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3171 "AstInternal.hs" #-}-              ( _argsIannotatedTree,_argsIoriginalTree,_argsItypeList) =-                  (args_ _argsOenv _argsOlib )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_Identifier :: Annotation ->-                             String ->-                             T_Expression -sem_Expression_Identifier ann_ i_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3191 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 235, column 9)-              _tpe =-                  {-# LINE 235 "./TypeChecking/Expressions.ag" #-}-                  libLookupID _lhsIlib i_-                  {-# LINE 3196 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 236, column 9)-              _backTree =-                  {-# LINE 236 "./TypeChecking/Expressions.ag" #-}-                  Identifier ann_ i_-                  {-# LINE 3201 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 164, column 16)-              _lhsOliftedColumnName =-                  {-# LINE 164 "./TypeChecking/SelectLists.ag" #-}-                  i_-                  {-# LINE 3206 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Identifier ann_ i_-                  {-# LINE 3211 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Identifier ann_ i_-                  {-# LINE 3216 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3221 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_InPredicate :: Annotation ->-                              T_Expression  ->-                              Bool ->-                              T_InList  ->-                              T_Expression -sem_Expression_InPredicate ann_ expr_ i_ list_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOoriginalTree :: Expression-              _lhsOliftedColumnName :: String-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _listOenv :: Environment-              _listOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _exprIoriginalTree :: Expression-              _listIannotatedTree :: InList-              _listIlistType :: (Either [TypeError] Type)-              _listIoriginalTree :: InList-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3251 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 283, column 9)-              _tpe =-                  {-# LINE 283 "./TypeChecking/Expressions.ag" #-}-                  do-                  lt <- _listIlistType-                  ty <- resolveResultSetType-                            _lhsIenv-                            [getTypeAnnotation _exprIannotatedTree, lt]-                  return typeBool-                  {-# LINE 3261 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 289, column 9)-              _backTree =-                  {-# LINE 289 "./TypeChecking/Expressions.ag" #-}-                  InPredicate ann_-                              _exprIannotatedTree-                              i_-                              _listIannotatedTree-                  {-# LINE 3269 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  InPredicate ann_ _exprIannotatedTree i_ _listIannotatedTree-                  {-# LINE 3274 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  InPredicate ann_ _exprIoriginalTree i_ _listIoriginalTree-                  {-# LINE 3279 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3284 "AstInternal.hs" #-}-              -- copy rule (up)-              _lhsOliftedColumnName =-                  {-# LINE 161 "./TypeChecking/SelectLists.ag" #-}-                  _exprIliftedColumnName-                  {-# LINE 3289 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3294 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3299 "AstInternal.hs" #-}-              -- copy rule (down)-              _listOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3304 "AstInternal.hs" #-}-              -- copy rule (down)-              _listOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3309 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-              ( _listIannotatedTree,_listIlistType,_listIoriginalTree) =-                  (list_ _listOenv _listOlib )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_IntegerLit :: Annotation ->-                             Integer ->-                             T_Expression -sem_Expression_IntegerLit ann_ i_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3331 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 26, column 19)-              _tpe =-                  {-# LINE 26 "./TypeChecking/Expressions.ag" #-}-                  Right typeInt-                  {-# LINE 3336 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 35, column 9)-              _backTree =-                  {-# LINE 35 "./TypeChecking/Expressions.ag" #-}-                  IntegerLit ann_ i_-                  {-# LINE 3341 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 3346 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  IntegerLit ann_ i_-                  {-# LINE 3351 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  IntegerLit ann_ i_-                  {-# LINE 3356 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3361 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_LiftOperator :: Annotation ->-                               String ->-                               T_LiftFlavour  ->-                               T_ExpressionList  ->-                               T_Expression -sem_Expression_LiftOperator ann_ oper_ flav_ args_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              _flavOenv :: Environment-              _flavOlib :: LocalIdentifierBindings-              _argsOenv :: Environment-              _argsOlib :: LocalIdentifierBindings-              _flavIannotatedTree :: LiftFlavour-              _flavIoriginalTree :: LiftFlavour-              _argsIannotatedTree :: ExpressionList-              _argsIoriginalTree :: ExpressionList-              _argsItypeList :: ([Type])-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3390 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 161, column 9)-              _tpe =-                  {-# LINE 161 "./TypeChecking/Expressions.ag" #-}-                  dependsOnRTpe _argsItypeList $ do-                  let args = _argsIannotatedTree-                  errorWhen (length args /= 2)-                            [AnyAllError $ "must have two args, got " ++ show args]-                  let [a,b] = args-                      aType = getTypeAnnotation a-                      bType = getTypeAnnotation b-                  dependsOnRTpe [aType,bType] $ do-                  errorWhen (not $ isArrayType bType)-                            [AnyAllError $ "second arg must be array, got " ++ show args]-                  elemType <- unwrapArray $ bType-                  resType <- typeCheckFunCall-                                     _lhsIenv-                                     oper_-                                     [aType,elemType]-                  errorWhen (resType /= typeBool)-                            [AnyAllError $ "operator must have bool return, got " ++ show resType]-                  return resType-                  {-# LINE 3412 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 179, column 9)-              _backTree =-                  {-# LINE 179 "./TypeChecking/Expressions.ag" #-}-                  LiftOperator ann_ oper_ _flavIannotatedTree _argsIannotatedTree-                  {-# LINE 3417 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 3422 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  LiftOperator ann_ oper_ _flavIannotatedTree _argsIannotatedTree-                  {-# LINE 3427 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  LiftOperator ann_ oper_ _flavIoriginalTree _argsIoriginalTree-                  {-# LINE 3432 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3437 "AstInternal.hs" #-}-              -- copy rule (down)-              _flavOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3442 "AstInternal.hs" #-}-              -- copy rule (down)-              _flavOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3447 "AstInternal.hs" #-}-              -- copy rule (down)-              _argsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3452 "AstInternal.hs" #-}-              -- copy rule (down)-              _argsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3457 "AstInternal.hs" #-}-              ( _flavIannotatedTree,_flavIoriginalTree) =-                  (flav_ _flavOenv _flavOlib )-              ( _argsIannotatedTree,_argsIoriginalTree,_argsItypeList) =-                  (args_ _argsOenv _argsOlib )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_NullLit :: Annotation ->-                          T_Expression -sem_Expression_NullLit ann_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3478 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 31, column 16)-              _tpe =-                  {-# LINE 31 "./TypeChecking/Expressions.ag" #-}-                  Right UnknownType-                  {-# LINE 3483 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 43, column 9)-              _backTree =-                  {-# LINE 43 "./TypeChecking/Expressions.ag" #-}-                  NullLit ann_-                  {-# LINE 3488 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 3493 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  NullLit ann_-                  {-# LINE 3498 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  NullLit ann_-                  {-# LINE 3503 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3508 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_Placeholder :: Annotation ->-                              T_Expression -sem_Expression_Placeholder ann_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3525 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 247, column 9)-              _tpe =-                  {-# LINE 247 "./TypeChecking/Expressions.ag" #-}-                  Right UnknownType-                  {-# LINE 3530 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 248, column 9)-              _backTree =-                  {-# LINE 248 "./TypeChecking/Expressions.ag" #-}-                  Placeholder ann_-                  {-# LINE 3535 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 3540 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Placeholder ann_-                  {-# LINE 3545 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Placeholder ann_-                  {-# LINE 3550 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3555 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_PositionalArg :: Annotation ->-                                Integer ->-                                T_Expression -sem_Expression_PositionalArg ann_ p_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3573 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 241, column 9)-              _tpe =-                  {-# LINE 241 "./TypeChecking/Expressions.ag" #-}-                  libLookupID _lhsIlib ('$':show p_)-                  {-# LINE 3578 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 242, column 9)-              _backTree =-                  {-# LINE 242 "./TypeChecking/Expressions.ag" #-}-                  PositionalArg ann_ p_-                  {-# LINE 3583 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 3588 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  PositionalArg ann_ p_-                  {-# LINE 3593 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  PositionalArg ann_ p_-                  {-# LINE 3598 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3603 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_ScalarSubQuery :: Annotation ->-                                 T_SelectExpression  ->-                                 T_Expression -sem_Expression_ScalarSubQuery ann_ sel_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              _selOenv :: Environment-              _selOlib :: LocalIdentifierBindings-              _selIannotatedTree :: SelectExpression-              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _selIoriginalTree :: SelectExpression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3626 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 265, column 9)-              _tpe =-                  {-# LINE 265 "./TypeChecking/Expressions.ag" #-}-                  do-                  let selType = getTypeAnnotation _selIannotatedTree-                  dependsOnRTpe [selType] $ do-                  f <- map snd <$> unwrapSetOfComposite selType-                  case length f of-                    0 -> Left [InternalError "no columns in scalar subquery?"]-                    1 -> Right $ head f-                    _ -> Right $ AnonymousRecordType f-                  {-# LINE 3638 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 275, column 9)-              _backTree =-                  {-# LINE 275 "./TypeChecking/Expressions.ag" #-}-                  ScalarSubQuery ann_ _selIannotatedTree-                  {-# LINE 3643 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 3648 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ScalarSubQuery ann_ _selIannotatedTree-                  {-# LINE 3653 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ScalarSubQuery ann_ _selIoriginalTree-                  {-# LINE 3658 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3663 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3668 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3673 "AstInternal.hs" #-}-              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =-                  (sel_ _selOenv _selOlib )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_StringLit :: Annotation ->-                            String ->-                            String ->-                            T_Expression -sem_Expression_StringLit ann_ quote_ value_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOliftedColumnName :: String-              _lhsOoriginalTree :: Expression-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3694 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 27, column 18)-              _tpe =-                  {-# LINE 27 "./TypeChecking/Expressions.ag" #-}-                  Right UnknownType-                  {-# LINE 3699 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 37, column 9)-              _backTree =-                  {-# LINE 37 "./TypeChecking/Expressions.ag" #-}-                  StringLit ann_ quote_ value_-                  {-# LINE 3704 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)-              _lhsOliftedColumnName =-                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}-                  ""-                  {-# LINE 3709 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  StringLit ann_ quote_ value_-                  {-# LINE 3714 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  StringLit ann_ quote_ value_-                  {-# LINE 3719 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3724 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))-sem_Expression_WindowFn :: Annotation ->-                           T_Expression  ->-                           T_ExpressionList  ->-                           T_ExpressionList  ->-                           T_Direction  ->-                           T_FrameClause  ->-                           T_Expression -sem_Expression_WindowFn ann_ fn_ partitionBy_ orderBy_ dir_ frm_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Expression-              _lhsOoriginalTree :: Expression-              _lhsOliftedColumnName :: String-              _fnOenv :: Environment-              _fnOlib :: LocalIdentifierBindings-              _partitionByOenv :: Environment-              _partitionByOlib :: LocalIdentifierBindings-              _orderByOenv :: Environment-              _orderByOlib :: LocalIdentifierBindings-              _dirOenv :: Environment-              _dirOlib :: LocalIdentifierBindings-              _frmOenv :: Environment-              _frmOlib :: LocalIdentifierBindings-              _fnIannotatedTree :: Expression-              _fnIliftedColumnName :: String-              _fnIoriginalTree :: Expression-              _partitionByIannotatedTree :: ExpressionList-              _partitionByIoriginalTree :: ExpressionList-              _partitionByItypeList :: ([Type])-              _orderByIannotatedTree :: ExpressionList-              _orderByIoriginalTree :: ExpressionList-              _orderByItypeList :: ([Type])-              _dirIannotatedTree :: Direction-              _dirIoriginalTree :: Direction-              _frmIannotatedTree :: FrameClause-              _frmIoriginalTree :: FrameClause-              -- "./TypeChecking/Expressions.ag"(line 14, column 9)-              _lhsOannotatedTree =-                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 3769 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 71, column 9)-              _tpe =-                  {-# LINE 71 "./TypeChecking/Expressions.ag" #-}-                  Right (getTypeAnnotation _fnIannotatedTree)-                  {-# LINE 3774 "AstInternal.hs" #-}-              -- "./TypeChecking/Expressions.ag"(line 72, column 9)-              _backTree =-                  {-# LINE 72 "./TypeChecking/Expressions.ag" #-}-                  WindowFn ann_-                           _fnIannotatedTree-                           _partitionByIannotatedTree-                           _orderByIannotatedTree-                           _dirIannotatedTree-                           _frmIannotatedTree-                  {-# LINE 3784 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  WindowFn ann_ _fnIannotatedTree _partitionByIannotatedTree _orderByIannotatedTree _dirIannotatedTree _frmIannotatedTree-                  {-# LINE 3789 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  WindowFn ann_ _fnIoriginalTree _partitionByIoriginalTree _orderByIoriginalTree _dirIoriginalTree _frmIoriginalTree-                  {-# LINE 3794 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3799 "AstInternal.hs" #-}-              -- copy rule (up)-              _lhsOliftedColumnName =-                  {-# LINE 161 "./TypeChecking/SelectLists.ag" #-}-                  _fnIliftedColumnName-                  {-# LINE 3804 "AstInternal.hs" #-}-              -- copy rule (down)-              _fnOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3809 "AstInternal.hs" #-}-              -- copy rule (down)-              _fnOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3814 "AstInternal.hs" #-}-              -- copy rule (down)-              _partitionByOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3819 "AstInternal.hs" #-}-              -- copy rule (down)-              _partitionByOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3824 "AstInternal.hs" #-}-              -- copy rule (down)-              _orderByOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3829 "AstInternal.hs" #-}-              -- copy rule (down)-              _orderByOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3834 "AstInternal.hs" #-}-              -- copy rule (down)-              _dirOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3839 "AstInternal.hs" #-}-              -- copy rule (down)-              _dirOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3844 "AstInternal.hs" #-}-              -- copy rule (down)-              _frmOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3849 "AstInternal.hs" #-}-              -- copy rule (down)-              _frmOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3854 "AstInternal.hs" #-}-              ( _fnIannotatedTree,_fnIliftedColumnName,_fnIoriginalTree) =-                  (fn_ _fnOenv _fnOlib )-              ( _partitionByIannotatedTree,_partitionByIoriginalTree,_partitionByItypeList) =-                  (partitionBy_ _partitionByOenv _partitionByOlib )-              ( _orderByIannotatedTree,_orderByIoriginalTree,_orderByItypeList) =-                  (orderBy_ _orderByOenv _orderByOlib )-              ( _dirIannotatedTree,_dirIoriginalTree) =-                  (dir_ _dirOenv _dirOlib )-              ( _frmIannotatedTree,_frmIoriginalTree) =-                  (frm_ _frmOenv _frmOlib )-          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))--- ExpressionDirectionPair --------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Tuple:-         child x1             : Expression -         child x2             : Direction -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ExpressionDirectionPair  = ( (Expression),(Direction))--- cata-sem_ExpressionDirectionPair :: ExpressionDirectionPair  ->-                               T_ExpressionDirectionPair -sem_ExpressionDirectionPair ( x1,x2)  =-    (sem_ExpressionDirectionPair_Tuple (sem_Expression x1 ) (sem_Direction x2 ) )--- semantic domain-type T_ExpressionDirectionPair  = Environment ->-                                  LocalIdentifierBindings ->-                                  ( ExpressionDirectionPair,ExpressionDirectionPair)-data Inh_ExpressionDirectionPair  = Inh_ExpressionDirectionPair {env_Inh_ExpressionDirectionPair :: Environment,lib_Inh_ExpressionDirectionPair :: LocalIdentifierBindings}-data Syn_ExpressionDirectionPair  = Syn_ExpressionDirectionPair {annotatedTree_Syn_ExpressionDirectionPair :: ExpressionDirectionPair,originalTree_Syn_ExpressionDirectionPair :: ExpressionDirectionPair}-wrap_ExpressionDirectionPair :: T_ExpressionDirectionPair  ->-                                Inh_ExpressionDirectionPair  ->-                                Syn_ExpressionDirectionPair -wrap_ExpressionDirectionPair sem (Inh_ExpressionDirectionPair _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ExpressionDirectionPair _lhsOannotatedTree _lhsOoriginalTree ))-sem_ExpressionDirectionPair_Tuple :: T_Expression  ->-                                     T_Direction  ->-                                     T_ExpressionDirectionPair -sem_ExpressionDirectionPair_Tuple x1_ x2_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ExpressionDirectionPair-              _lhsOoriginalTree :: ExpressionDirectionPair-              _x1Oenv :: Environment-              _x1Olib :: LocalIdentifierBindings-              _x2Oenv :: Environment-              _x2Olib :: LocalIdentifierBindings-              _x1IannotatedTree :: Expression-              _x1IliftedColumnName :: String-              _x1IoriginalTree :: Expression-              _x2IannotatedTree :: Direction-              _x2IoriginalTree :: Direction-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (_x1IannotatedTree,_x2IannotatedTree)-                  {-# LINE 3923 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (_x1IoriginalTree,_x2IoriginalTree)-                  {-# LINE 3928 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 3933 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 3938 "AstInternal.hs" #-}-              -- copy rule (down)-              _x1Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3943 "AstInternal.hs" #-}-              -- copy rule (down)-              _x1Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3948 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 3953 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 3958 "AstInternal.hs" #-}-              ( _x1IannotatedTree,_x1IliftedColumnName,_x1IoriginalTree) =-                  (x1_ _x1Oenv _x1Olib )-              ( _x2IannotatedTree,_x2IoriginalTree) =-                  (x2_ _x2Oenv _x2Olib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- ExpressionDirectionPairList ----------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : ExpressionDirectionPair -         child tl             : ExpressionDirectionPairList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ExpressionDirectionPairList  = [(ExpressionDirectionPair)]--- cata-sem_ExpressionDirectionPairList :: ExpressionDirectionPairList  ->-                                   T_ExpressionDirectionPairList -sem_ExpressionDirectionPairList list  =-    (Prelude.foldr sem_ExpressionDirectionPairList_Cons sem_ExpressionDirectionPairList_Nil (Prelude.map sem_ExpressionDirectionPair list) )--- semantic domain-type T_ExpressionDirectionPairList  = Environment ->-                                      LocalIdentifierBindings ->-                                      ( ExpressionDirectionPairList,ExpressionDirectionPairList)-data Inh_ExpressionDirectionPairList  = Inh_ExpressionDirectionPairList {env_Inh_ExpressionDirectionPairList :: Environment,lib_Inh_ExpressionDirectionPairList :: LocalIdentifierBindings}-data Syn_ExpressionDirectionPairList  = Syn_ExpressionDirectionPairList {annotatedTree_Syn_ExpressionDirectionPairList :: ExpressionDirectionPairList,originalTree_Syn_ExpressionDirectionPairList :: ExpressionDirectionPairList}-wrap_ExpressionDirectionPairList :: T_ExpressionDirectionPairList  ->-                                    Inh_ExpressionDirectionPairList  ->-                                    Syn_ExpressionDirectionPairList -wrap_ExpressionDirectionPairList sem (Inh_ExpressionDirectionPairList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ExpressionDirectionPairList _lhsOannotatedTree _lhsOoriginalTree ))-sem_ExpressionDirectionPairList_Cons :: T_ExpressionDirectionPair  ->-                                        T_ExpressionDirectionPairList  ->-                                        T_ExpressionDirectionPairList -sem_ExpressionDirectionPairList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ExpressionDirectionPairList-              _lhsOoriginalTree :: ExpressionDirectionPairList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: ExpressionDirectionPair-              _hdIoriginalTree :: ExpressionDirectionPair-              _tlIannotatedTree :: ExpressionDirectionPairList-              _tlIoriginalTree :: ExpressionDirectionPairList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 4024 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 4029 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4034 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4039 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4044 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4049 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4054 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4059 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_ExpressionDirectionPairList_Nil :: T_ExpressionDirectionPairList -sem_ExpressionDirectionPairList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ExpressionDirectionPairList-              _lhsOoriginalTree :: ExpressionDirectionPairList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4075 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4080 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4085 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4090 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- ExpressionList -----------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -         typeList             : [Type]-   alternatives:-      alternative Cons:-         child hd             : Expression -         child tl             : ExpressionList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ExpressionList  = [(Expression)]--- cata-sem_ExpressionList :: ExpressionList  ->-                      T_ExpressionList -sem_ExpressionList list  =-    (Prelude.foldr sem_ExpressionList_Cons sem_ExpressionList_Nil (Prelude.map sem_Expression list) )--- semantic domain-type T_ExpressionList  = Environment ->-                         LocalIdentifierBindings ->-                         ( ExpressionList,ExpressionList,([Type]))-data Inh_ExpressionList  = Inh_ExpressionList {env_Inh_ExpressionList :: Environment,lib_Inh_ExpressionList :: LocalIdentifierBindings}-data Syn_ExpressionList  = Syn_ExpressionList {annotatedTree_Syn_ExpressionList :: ExpressionList,originalTree_Syn_ExpressionList :: ExpressionList,typeList_Syn_ExpressionList :: [Type]}-wrap_ExpressionList :: T_ExpressionList  ->-                       Inh_ExpressionList  ->-                       Syn_ExpressionList -wrap_ExpressionList sem (Inh_ExpressionList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeList) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ExpressionList _lhsOannotatedTree _lhsOoriginalTree _lhsOtypeList ))-sem_ExpressionList_Cons :: T_Expression  ->-                           T_ExpressionList  ->-                           T_ExpressionList -sem_ExpressionList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOtypeList :: ([Type])-              _lhsOannotatedTree :: ExpressionList-              _lhsOoriginalTree :: ExpressionList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: Expression-              _hdIliftedColumnName :: String-              _hdIoriginalTree :: Expression-              _tlIannotatedTree :: ExpressionList-              _tlIoriginalTree :: ExpressionList-              _tlItypeList :: ([Type])-              -- "./TypeChecking/Misc.ag"(line 52, column 12)-              _lhsOtypeList =-                  {-# LINE 52 "./TypeChecking/Misc.ag" #-}-                  getTypeAnnotation _hdIannotatedTree : _tlItypeList-                  {-# LINE 4156 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 4161 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 4166 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4171 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4176 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4181 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4186 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4191 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4196 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIliftedColumnName,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree,_tlItypeList) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeList)))-sem_ExpressionList_Nil :: T_ExpressionList -sem_ExpressionList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOtypeList :: ([Type])-              _lhsOannotatedTree :: ExpressionList-              _lhsOoriginalTree :: ExpressionList-              -- "./TypeChecking/Misc.ag"(line 53, column 11)-              _lhsOtypeList =-                  {-# LINE 53 "./TypeChecking/Misc.ag" #-}-                  []-                  {-# LINE 4213 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4218 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4223 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4228 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4233 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeList)))--- ExpressionListList -------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -         typeListList         : [[Type]]-   alternatives:-      alternative Cons:-         child hd             : ExpressionList -         child tl             : ExpressionListList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ExpressionListList  = [(ExpressionList)]--- cata-sem_ExpressionListList :: ExpressionListList  ->-                          T_ExpressionListList -sem_ExpressionListList list  =-    (Prelude.foldr sem_ExpressionListList_Cons sem_ExpressionListList_Nil (Prelude.map sem_ExpressionList list) )--- semantic domain-type T_ExpressionListList  = Environment ->-                             LocalIdentifierBindings ->-                             ( ExpressionListList,ExpressionListList,([[Type]]))-data Inh_ExpressionListList  = Inh_ExpressionListList {env_Inh_ExpressionListList :: Environment,lib_Inh_ExpressionListList :: LocalIdentifierBindings}-data Syn_ExpressionListList  = Syn_ExpressionListList {annotatedTree_Syn_ExpressionListList :: ExpressionListList,originalTree_Syn_ExpressionListList :: ExpressionListList,typeListList_Syn_ExpressionListList :: [[Type]]}-wrap_ExpressionListList :: T_ExpressionListList  ->-                           Inh_ExpressionListList  ->-                           Syn_ExpressionListList -wrap_ExpressionListList sem (Inh_ExpressionListList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeListList) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ExpressionListList _lhsOannotatedTree _lhsOoriginalTree _lhsOtypeListList ))-sem_ExpressionListList_Cons :: T_ExpressionList  ->-                               T_ExpressionListList  ->-                               T_ExpressionListList -sem_ExpressionListList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOtypeListList :: ([[Type]])-              _lhsOannotatedTree :: ExpressionListList-              _lhsOoriginalTree :: ExpressionListList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: ExpressionList-              _hdIoriginalTree :: ExpressionList-              _hdItypeList :: ([Type])-              _tlIannotatedTree :: ExpressionListList-              _tlIoriginalTree :: ExpressionListList-              _tlItypeListList :: ([[Type]])-              -- "./TypeChecking/Misc.ag"(line 59, column 12)-              _lhsOtypeListList =-                  {-# LINE 59 "./TypeChecking/Misc.ag" #-}-                  _hdItypeList : _tlItypeListList-                  {-# LINE 4299 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 4304 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 4309 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4314 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4319 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4324 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4329 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4334 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4339 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIoriginalTree,_hdItypeList) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree,_tlItypeListList) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeListList)))-sem_ExpressionListList_Nil :: T_ExpressionListList -sem_ExpressionListList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOtypeListList :: ([[Type]])-              _lhsOannotatedTree :: ExpressionListList-              _lhsOoriginalTree :: ExpressionListList-              -- "./TypeChecking/Misc.ag"(line 60, column 11)-              _lhsOtypeListList =-                  {-# LINE 60 "./TypeChecking/Misc.ag" #-}-                  []-                  {-# LINE 4356 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4361 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4366 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4371 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4376 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeListList)))--- ExpressionListStatementListPair ------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Tuple:-         child x1             : ExpressionList -         child x2             : StatementList -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ExpressionListStatementListPair  = ( (ExpressionList),(StatementList))--- cata-sem_ExpressionListStatementListPair :: ExpressionListStatementListPair  ->-                                       T_ExpressionListStatementListPair -sem_ExpressionListStatementListPair ( x1,x2)  =-    (sem_ExpressionListStatementListPair_Tuple (sem_ExpressionList x1 ) (sem_StatementList x2 ) )--- semantic domain-type T_ExpressionListStatementListPair  = Environment ->-                                          LocalIdentifierBindings ->-                                          ( ExpressionListStatementListPair,ExpressionListStatementListPair)-data Inh_ExpressionListStatementListPair  = Inh_ExpressionListStatementListPair {env_Inh_ExpressionListStatementListPair :: Environment,lib_Inh_ExpressionListStatementListPair :: LocalIdentifierBindings}-data Syn_ExpressionListStatementListPair  = Syn_ExpressionListStatementListPair {annotatedTree_Syn_ExpressionListStatementListPair :: ExpressionListStatementListPair,originalTree_Syn_ExpressionListStatementListPair :: ExpressionListStatementListPair}-wrap_ExpressionListStatementListPair :: T_ExpressionListStatementListPair  ->-                                        Inh_ExpressionListStatementListPair  ->-                                        Syn_ExpressionListStatementListPair -wrap_ExpressionListStatementListPair sem (Inh_ExpressionListStatementListPair _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ExpressionListStatementListPair _lhsOannotatedTree _lhsOoriginalTree ))-sem_ExpressionListStatementListPair_Tuple :: T_ExpressionList  ->-                                             T_StatementList  ->-                                             T_ExpressionListStatementListPair -sem_ExpressionListStatementListPair_Tuple x1_ x2_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _x2OenvUpdates :: ([EnvironmentUpdate])-              _x2OlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: ExpressionListStatementListPair-              _lhsOoriginalTree :: ExpressionListStatementListPair-              _x1Oenv :: Environment-              _x1Olib :: LocalIdentifierBindings-              _x2Oenv :: Environment-              _x2Olib :: LocalIdentifierBindings-              _x1IannotatedTree :: ExpressionList-              _x1IoriginalTree :: ExpressionList-              _x1ItypeList :: ([Type])-              _x2IannotatedTree :: StatementList-              _x2IoriginalTree :: StatementList-              _x2IproducedEnv :: Environment-              _x2IproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 94, column 9)-              _x2OenvUpdates =-                  {-# LINE 94 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 4439 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 95, column 9)-              _x2OlibUpdates =-                  {-# LINE 95 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 4444 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (_x1IannotatedTree,_x2IannotatedTree)-                  {-# LINE 4449 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (_x1IoriginalTree,_x2IoriginalTree)-                  {-# LINE 4454 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4459 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4464 "AstInternal.hs" #-}-              -- copy rule (down)-              _x1Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4469 "AstInternal.hs" #-}-              -- copy rule (down)-              _x1Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4474 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4479 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4484 "AstInternal.hs" #-}-              ( _x1IannotatedTree,_x1IoriginalTree,_x1ItypeList) =-                  (x1_ _x1Oenv _x1Olib )-              ( _x2IannotatedTree,_x2IoriginalTree,_x2IproducedEnv,_x2IproducedLib) =-                  (x2_ _x2Oenv _x2OenvUpdates _x2Olib _x2OlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- ExpressionListStatementListPairList --------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : ExpressionListStatementListPair -         child tl             : ExpressionListStatementListPairList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ExpressionListStatementListPairList  = [(ExpressionListStatementListPair)]--- cata-sem_ExpressionListStatementListPairList :: ExpressionListStatementListPairList  ->-                                           T_ExpressionListStatementListPairList -sem_ExpressionListStatementListPairList list  =-    (Prelude.foldr sem_ExpressionListStatementListPairList_Cons sem_ExpressionListStatementListPairList_Nil (Prelude.map sem_ExpressionListStatementListPair list) )--- semantic domain-type T_ExpressionListStatementListPairList  = Environment ->-                                              LocalIdentifierBindings ->-                                              ( ExpressionListStatementListPairList,ExpressionListStatementListPairList)-data Inh_ExpressionListStatementListPairList  = Inh_ExpressionListStatementListPairList {env_Inh_ExpressionListStatementListPairList :: Environment,lib_Inh_ExpressionListStatementListPairList :: LocalIdentifierBindings}-data Syn_ExpressionListStatementListPairList  = Syn_ExpressionListStatementListPairList {annotatedTree_Syn_ExpressionListStatementListPairList :: ExpressionListStatementListPairList,originalTree_Syn_ExpressionListStatementListPairList :: ExpressionListStatementListPairList}-wrap_ExpressionListStatementListPairList :: T_ExpressionListStatementListPairList  ->-                                            Inh_ExpressionListStatementListPairList  ->-                                            Syn_ExpressionListStatementListPairList -wrap_ExpressionListStatementListPairList sem (Inh_ExpressionListStatementListPairList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ExpressionListStatementListPairList _lhsOannotatedTree _lhsOoriginalTree ))-sem_ExpressionListStatementListPairList_Cons :: T_ExpressionListStatementListPair  ->-                                                T_ExpressionListStatementListPairList  ->-                                                T_ExpressionListStatementListPairList -sem_ExpressionListStatementListPairList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ExpressionListStatementListPairList-              _lhsOoriginalTree :: ExpressionListStatementListPairList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: ExpressionListStatementListPair-              _hdIoriginalTree :: ExpressionListStatementListPair-              _tlIannotatedTree :: ExpressionListStatementListPairList-              _tlIoriginalTree :: ExpressionListStatementListPairList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 4550 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 4555 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4560 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4565 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4570 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4575 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4580 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4585 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_ExpressionListStatementListPairList_Nil :: T_ExpressionListStatementListPairList -sem_ExpressionListStatementListPairList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ExpressionListStatementListPairList-              _lhsOoriginalTree :: ExpressionListStatementListPairList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4601 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4606 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4611 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4616 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- ExpressionRoot -----------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative ExpressionRoot:-         child expr           : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data ExpressionRoot  = ExpressionRoot (Expression) -                     deriving ( Show)--- cata-sem_ExpressionRoot :: ExpressionRoot  ->-                      T_ExpressionRoot -sem_ExpressionRoot (ExpressionRoot _expr )  =-    (sem_ExpressionRoot_ExpressionRoot (sem_Expression _expr ) )--- semantic domain-type T_ExpressionRoot  = Environment ->-                         LocalIdentifierBindings ->-                         ( ExpressionRoot,ExpressionRoot)-data Inh_ExpressionRoot  = Inh_ExpressionRoot {env_Inh_ExpressionRoot :: Environment,lib_Inh_ExpressionRoot :: LocalIdentifierBindings}-data Syn_ExpressionRoot  = Syn_ExpressionRoot {annotatedTree_Syn_ExpressionRoot :: ExpressionRoot,originalTree_Syn_ExpressionRoot :: ExpressionRoot}-wrap_ExpressionRoot :: T_ExpressionRoot  ->-                       Inh_ExpressionRoot  ->-                       Syn_ExpressionRoot -wrap_ExpressionRoot sem (Inh_ExpressionRoot _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ExpressionRoot _lhsOannotatedTree _lhsOoriginalTree ))-sem_ExpressionRoot_ExpressionRoot :: T_Expression  ->-                                     T_ExpressionRoot -sem_ExpressionRoot_ExpressionRoot expr_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ExpressionRoot-              _lhsOoriginalTree :: ExpressionRoot-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _exprIoriginalTree :: Expression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ExpressionRoot _exprIannotatedTree-                  {-# LINE 4670 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ExpressionRoot _exprIoriginalTree-                  {-# LINE 4675 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4680 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4685 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4690 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4695 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- ExpressionStatementListPair ----------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Tuple:-         child x1             : Expression -         child x2             : StatementList -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ExpressionStatementListPair  = ( (Expression),(StatementList))--- cata-sem_ExpressionStatementListPair :: ExpressionStatementListPair  ->-                                   T_ExpressionStatementListPair -sem_ExpressionStatementListPair ( x1,x2)  =-    (sem_ExpressionStatementListPair_Tuple (sem_Expression x1 ) (sem_StatementList x2 ) )--- semantic domain-type T_ExpressionStatementListPair  = Environment ->-                                      LocalIdentifierBindings ->-                                      ( ExpressionStatementListPair,ExpressionStatementListPair)-data Inh_ExpressionStatementListPair  = Inh_ExpressionStatementListPair {env_Inh_ExpressionStatementListPair :: Environment,lib_Inh_ExpressionStatementListPair :: LocalIdentifierBindings}-data Syn_ExpressionStatementListPair  = Syn_ExpressionStatementListPair {annotatedTree_Syn_ExpressionStatementListPair :: ExpressionStatementListPair,originalTree_Syn_ExpressionStatementListPair :: ExpressionStatementListPair}-wrap_ExpressionStatementListPair :: T_ExpressionStatementListPair  ->-                                    Inh_ExpressionStatementListPair  ->-                                    Syn_ExpressionStatementListPair -wrap_ExpressionStatementListPair sem (Inh_ExpressionStatementListPair _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ExpressionStatementListPair _lhsOannotatedTree _lhsOoriginalTree ))-sem_ExpressionStatementListPair_Tuple :: T_Expression  ->-                                         T_StatementList  ->-                                         T_ExpressionStatementListPair -sem_ExpressionStatementListPair_Tuple x1_ x2_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _x2OenvUpdates :: ([EnvironmentUpdate])-              _x2OlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: ExpressionStatementListPair-              _lhsOoriginalTree :: ExpressionStatementListPair-              _x1Oenv :: Environment-              _x1Olib :: LocalIdentifierBindings-              _x2Oenv :: Environment-              _x2Olib :: LocalIdentifierBindings-              _x1IannotatedTree :: Expression-              _x1IliftedColumnName :: String-              _x1IoriginalTree :: Expression-              _x2IannotatedTree :: StatementList-              _x2IoriginalTree :: StatementList-              _x2IproducedEnv :: Environment-              _x2IproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 98, column 9)-              _x2OenvUpdates =-                  {-# LINE 98 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 4760 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 99, column 9)-              _x2OlibUpdates =-                  {-# LINE 99 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 4765 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (_x1IannotatedTree,_x2IannotatedTree)-                  {-# LINE 4770 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (_x1IoriginalTree,_x2IoriginalTree)-                  {-# LINE 4775 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4780 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4785 "AstInternal.hs" #-}-              -- copy rule (down)-              _x1Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4790 "AstInternal.hs" #-}-              -- copy rule (down)-              _x1Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4795 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4800 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4805 "AstInternal.hs" #-}-              ( _x1IannotatedTree,_x1IliftedColumnName,_x1IoriginalTree) =-                  (x1_ _x1Oenv _x1Olib )-              ( _x2IannotatedTree,_x2IoriginalTree,_x2IproducedEnv,_x2IproducedLib) =-                  (x2_ _x2Oenv _x2OenvUpdates _x2Olib _x2OlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- ExpressionStatementListPairList ------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : ExpressionStatementListPair -         child tl             : ExpressionStatementListPairList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ExpressionStatementListPairList  = [(ExpressionStatementListPair)]--- cata-sem_ExpressionStatementListPairList :: ExpressionStatementListPairList  ->-                                       T_ExpressionStatementListPairList -sem_ExpressionStatementListPairList list  =-    (Prelude.foldr sem_ExpressionStatementListPairList_Cons sem_ExpressionStatementListPairList_Nil (Prelude.map sem_ExpressionStatementListPair list) )--- semantic domain-type T_ExpressionStatementListPairList  = Environment ->-                                          LocalIdentifierBindings ->-                                          ( ExpressionStatementListPairList,ExpressionStatementListPairList)-data Inh_ExpressionStatementListPairList  = Inh_ExpressionStatementListPairList {env_Inh_ExpressionStatementListPairList :: Environment,lib_Inh_ExpressionStatementListPairList :: LocalIdentifierBindings}-data Syn_ExpressionStatementListPairList  = Syn_ExpressionStatementListPairList {annotatedTree_Syn_ExpressionStatementListPairList :: ExpressionStatementListPairList,originalTree_Syn_ExpressionStatementListPairList :: ExpressionStatementListPairList}-wrap_ExpressionStatementListPairList :: T_ExpressionStatementListPairList  ->-                                        Inh_ExpressionStatementListPairList  ->-                                        Syn_ExpressionStatementListPairList -wrap_ExpressionStatementListPairList sem (Inh_ExpressionStatementListPairList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ExpressionStatementListPairList _lhsOannotatedTree _lhsOoriginalTree ))-sem_ExpressionStatementListPairList_Cons :: T_ExpressionStatementListPair  ->-                                            T_ExpressionStatementListPairList  ->-                                            T_ExpressionStatementListPairList -sem_ExpressionStatementListPairList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ExpressionStatementListPairList-              _lhsOoriginalTree :: ExpressionStatementListPairList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: ExpressionStatementListPair-              _hdIoriginalTree :: ExpressionStatementListPair-              _tlIannotatedTree :: ExpressionStatementListPairList-              _tlIoriginalTree :: ExpressionStatementListPairList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 4871 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 4876 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4881 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4886 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4891 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4896 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 4901 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 4906 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_ExpressionStatementListPairList_Nil :: T_ExpressionStatementListPairList -sem_ExpressionStatementListPairList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: ExpressionStatementListPairList-              _lhsOoriginalTree :: ExpressionStatementListPairList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4922 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 4927 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 4932 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 4937 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- FnBody -------------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative PlpgsqlFnBody:-         child ann            : {Annotation}-         child vars           : VarDefList -         child sts            : StatementList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative SqlFnBody:-         child ann            : {Annotation}-         child sts            : StatementList -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data FnBody  = PlpgsqlFnBody (Annotation) (VarDefList) (StatementList) -             | SqlFnBody (Annotation) (StatementList) -             deriving ( Data,Eq,Show,Typeable)--- cata-sem_FnBody :: FnBody  ->-              T_FnBody -sem_FnBody (PlpgsqlFnBody _ann _vars _sts )  =-    (sem_FnBody_PlpgsqlFnBody _ann (sem_VarDefList _vars ) (sem_StatementList _sts ) )-sem_FnBody (SqlFnBody _ann _sts )  =-    (sem_FnBody_SqlFnBody _ann (sem_StatementList _sts ) )--- semantic domain-type T_FnBody  = Environment ->-                 LocalIdentifierBindings ->-                 ( FnBody,FnBody)-data Inh_FnBody  = Inh_FnBody {env_Inh_FnBody :: Environment,lib_Inh_FnBody :: LocalIdentifierBindings}-data Syn_FnBody  = Syn_FnBody {annotatedTree_Syn_FnBody :: FnBody,originalTree_Syn_FnBody :: FnBody}-wrap_FnBody :: T_FnBody  ->-               Inh_FnBody  ->-               Syn_FnBody -wrap_FnBody sem (Inh_FnBody _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_FnBody _lhsOannotatedTree _lhsOoriginalTree ))-sem_FnBody_PlpgsqlFnBody :: Annotation ->-                            T_VarDefList  ->-                            T_StatementList  ->-                            T_FnBody -sem_FnBody_PlpgsqlFnBody ann_ vars_ sts_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _stsOenvUpdates :: ([EnvironmentUpdate])-              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _stsOlib :: LocalIdentifierBindings-              _lhsOannotatedTree :: FnBody-              _lhsOoriginalTree :: FnBody-              _varsOenv :: Environment-              _varsOlib :: LocalIdentifierBindings-              _stsOenv :: Environment-              _varsIannotatedTree :: VarDefList-              _varsIdefs :: ([(String,Type)])-              _varsIoriginalTree :: VarDefList-              _stsIannotatedTree :: StatementList-              _stsIoriginalTree :: StatementList-              _stsIproducedEnv :: Environment-              _stsIproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 102, column 9)-              _stsOenvUpdates =-                  {-# LINE 102 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 5012 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 103, column 9)-              _stsOlibUpdates =-                  {-# LINE 103 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 5017 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 121, column 9)-              _stsOlib =-                  {-# LINE 121 "./TypeChecking/CreateFunction.ag" #-}-                  fromRight _lhsIlib $-                  updateBindings _lhsIlib _lhsIenv-                                 [LibStackIDs [("", _varsIdefs)]]-                  {-# LINE 5024 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  PlpgsqlFnBody ann_ _varsIannotatedTree _stsIannotatedTree-                  {-# LINE 5029 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  PlpgsqlFnBody ann_ _varsIoriginalTree _stsIoriginalTree-                  {-# LINE 5034 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5039 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5044 "AstInternal.hs" #-}-              -- copy rule (down)-              _varsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 5049 "AstInternal.hs" #-}-              -- copy rule (down)-              _varsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 5054 "AstInternal.hs" #-}-              -- copy rule (down)-              _stsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 5059 "AstInternal.hs" #-}-              ( _varsIannotatedTree,_varsIdefs,_varsIoriginalTree) =-                  (vars_ _varsOenv _varsOlib )-              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedEnv,_stsIproducedLib) =-                  (sts_ _stsOenv _stsOenvUpdates _stsOlib _stsOlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_FnBody_SqlFnBody :: Annotation ->-                        T_StatementList  ->-                        T_FnBody -sem_FnBody_SqlFnBody ann_ sts_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _stsOenvUpdates :: ([EnvironmentUpdate])-              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: FnBody-              _lhsOoriginalTree :: FnBody-              _stsOenv :: Environment-              _stsOlib :: LocalIdentifierBindings-              _stsIannotatedTree :: StatementList-              _stsIoriginalTree :: StatementList-              _stsIproducedEnv :: Environment-              _stsIproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 102, column 9)-              _stsOenvUpdates =-                  {-# LINE 102 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 5085 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 103, column 9)-              _stsOlibUpdates =-                  {-# LINE 103 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 5090 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SqlFnBody ann_ _stsIannotatedTree-                  {-# LINE 5095 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SqlFnBody ann_ _stsIoriginalTree-                  {-# LINE 5100 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5105 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5110 "AstInternal.hs" #-}-              -- copy rule (down)-              _stsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 5115 "AstInternal.hs" #-}-              -- copy rule (down)-              _stsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 5120 "AstInternal.hs" #-}-              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedEnv,_stsIproducedLib) =-                  (sts_ _stsOenv _stsOenvUpdates _stsOlib _stsOlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- FrameClause --------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative FrameRowsUnboundedPreceding:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative FrameUnboundedFull:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative FrameUnboundedPreceding:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data FrameClause  = FrameRowsUnboundedPreceding -                  | FrameUnboundedFull -                  | FrameUnboundedPreceding -                  deriving ( Data,Eq,Show,Typeable)--- cata-sem_FrameClause :: FrameClause  ->-                   T_FrameClause -sem_FrameClause (FrameRowsUnboundedPreceding )  =-    (sem_FrameClause_FrameRowsUnboundedPreceding )-sem_FrameClause (FrameUnboundedFull )  =-    (sem_FrameClause_FrameUnboundedFull )-sem_FrameClause (FrameUnboundedPreceding )  =-    (sem_FrameClause_FrameUnboundedPreceding )--- semantic domain-type T_FrameClause  = Environment ->-                      LocalIdentifierBindings ->-                      ( FrameClause,FrameClause)-data Inh_FrameClause  = Inh_FrameClause {env_Inh_FrameClause :: Environment,lib_Inh_FrameClause :: LocalIdentifierBindings}-data Syn_FrameClause  = Syn_FrameClause {annotatedTree_Syn_FrameClause :: FrameClause,originalTree_Syn_FrameClause :: FrameClause}-wrap_FrameClause :: T_FrameClause  ->-                    Inh_FrameClause  ->-                    Syn_FrameClause -wrap_FrameClause sem (Inh_FrameClause _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_FrameClause _lhsOannotatedTree _lhsOoriginalTree ))-sem_FrameClause_FrameRowsUnboundedPreceding :: T_FrameClause -sem_FrameClause_FrameRowsUnboundedPreceding  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: FrameClause-              _lhsOoriginalTree :: FrameClause-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  FrameRowsUnboundedPreceding-                  {-# LINE 5183 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  FrameRowsUnboundedPreceding-                  {-# LINE 5188 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5193 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5198 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_FrameClause_FrameUnboundedFull :: T_FrameClause -sem_FrameClause_FrameUnboundedFull  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: FrameClause-              _lhsOoriginalTree :: FrameClause-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  FrameUnboundedFull-                  {-# LINE 5210 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  FrameUnboundedFull-                  {-# LINE 5215 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5220 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5225 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_FrameClause_FrameUnboundedPreceding :: T_FrameClause -sem_FrameClause_FrameUnboundedPreceding  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: FrameClause-              _lhsOoriginalTree :: FrameClause-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  FrameUnboundedPreceding-                  {-# LINE 5237 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  FrameUnboundedPreceding-                  {-# LINE 5242 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5247 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5252 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- IfExists -----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative IfExists:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Require:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data IfExists  = IfExists -               | Require -               deriving ( Data,Eq,Show,Typeable)--- cata-sem_IfExists :: IfExists  ->-                T_IfExists -sem_IfExists (IfExists )  =-    (sem_IfExists_IfExists )-sem_IfExists (Require )  =-    (sem_IfExists_Require )--- semantic domain-type T_IfExists  = Environment ->-                   LocalIdentifierBindings ->-                   ( IfExists,IfExists)-data Inh_IfExists  = Inh_IfExists {env_Inh_IfExists :: Environment,lib_Inh_IfExists :: LocalIdentifierBindings}-data Syn_IfExists  = Syn_IfExists {annotatedTree_Syn_IfExists :: IfExists,originalTree_Syn_IfExists :: IfExists}-wrap_IfExists :: T_IfExists  ->-                 Inh_IfExists  ->-                 Syn_IfExists -wrap_IfExists sem (Inh_IfExists _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_IfExists _lhsOannotatedTree _lhsOoriginalTree ))-sem_IfExists_IfExists :: T_IfExists -sem_IfExists_IfExists  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: IfExists-              _lhsOoriginalTree :: IfExists-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  IfExists-                  {-# LINE 5306 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  IfExists-                  {-# LINE 5311 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5316 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5321 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_IfExists_Require :: T_IfExists -sem_IfExists_Require  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: IfExists-              _lhsOoriginalTree :: IfExists-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Require-                  {-# LINE 5333 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Require-                  {-# LINE 5338 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5343 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5348 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- InList -------------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         listType             : Either [TypeError] Type-         originalTree         : SELF -   alternatives:-      alternative InList:-         child ann            : {Annotation}-         child exprs          : ExpressionList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative InSelect:-         child ann            : {Annotation}-         child sel            : SelectExpression -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data InList  = InList (Annotation) (ExpressionList) -             | InSelect (Annotation) (SelectExpression) -             deriving ( Data,Eq,Show,Typeable)--- cata-sem_InList :: InList  ->-              T_InList -sem_InList (InList _ann _exprs )  =-    (sem_InList_InList _ann (sem_ExpressionList _exprs ) )-sem_InList (InSelect _ann _sel )  =-    (sem_InList_InSelect _ann (sem_SelectExpression _sel ) )--- semantic domain-type T_InList  = Environment ->-                 LocalIdentifierBindings ->-                 ( InList,(Either [TypeError] Type),InList)-data Inh_InList  = Inh_InList {env_Inh_InList :: Environment,lib_Inh_InList :: LocalIdentifierBindings}-data Syn_InList  = Syn_InList {annotatedTree_Syn_InList :: InList,listType_Syn_InList :: Either [TypeError] Type,originalTree_Syn_InList :: InList}-wrap_InList :: T_InList  ->-               Inh_InList  ->-               Syn_InList -wrap_InList sem (Inh_InList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_InList _lhsOannotatedTree _lhsOlistType _lhsOoriginalTree ))-sem_InList_InList :: Annotation ->-                     T_ExpressionList  ->-                     T_InList -sem_InList_InList ann_ exprs_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOlistType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: InList-              _lhsOoriginalTree :: InList-              _exprsOenv :: Environment-              _exprsOlib :: LocalIdentifierBindings-              _exprsIannotatedTree :: ExpressionList-              _exprsIoriginalTree :: ExpressionList-              _exprsItypeList :: ([Type])-              -- "./TypeChecking/Expressions.ag"(line 299, column 9)-              _lhsOlistType =-                  {-# LINE 299 "./TypeChecking/Expressions.ag" #-}-                  resolveResultSetType _lhsIenv _exprsItypeList-                  {-# LINE 5415 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  InList ann_ _exprsIannotatedTree-                  {-# LINE 5420 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  InList ann_ _exprsIoriginalTree-                  {-# LINE 5425 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5430 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5435 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 5440 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 5445 "AstInternal.hs" #-}-              ( _exprsIannotatedTree,_exprsIoriginalTree,_exprsItypeList) =-                  (exprs_ _exprsOenv _exprsOlib )-          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))-sem_InList_InSelect :: Annotation ->-                       T_SelectExpression  ->-                       T_InList -sem_InList_InSelect ann_ sel_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOlistType :: (Either [TypeError] Type)-              _lhsOannotatedTree :: InList-              _lhsOoriginalTree :: InList-              _selOenv :: Environment-              _selOlib :: LocalIdentifierBindings-              _selIannotatedTree :: SelectExpression-              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _selIoriginalTree :: SelectExpression-              -- "./TypeChecking/Expressions.ag"(line 301, column 9)-              _lhsOlistType =-                  {-# LINE 301 "./TypeChecking/Expressions.ag" #-}-                  do-                  attrs <- map snd <$> (unwrapSetOfComposite $-                                        getTypeAnnotation _selIannotatedTree)-                  typ <- case length attrs of-                            0 -> Left [InternalError-                                       "got subquery with no columns? in inselect"]-                            1 -> Right $ head attrs-                            _ -> Right $ AnonymousRecordType attrs-                  dependsOnRTpe attrs $ Right typ-                  {-# LINE 5475 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  InSelect ann_ _selIannotatedTree-                  {-# LINE 5480 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  InSelect ann_ _selIoriginalTree-                  {-# LINE 5485 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5490 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5495 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 5500 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 5505 "AstInternal.hs" #-}-              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =-                  (sel_ _selOenv _selOlib )-          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))--- JoinExpression -----------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative JoinOn:-         child ann            : {Annotation}-         child expression     : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative JoinUsing:-         child ann            : {Annotation}-         child stringList     : StringList -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data JoinExpression  = JoinOn (Annotation) (Expression) -                     | JoinUsing (Annotation) (StringList) -                     deriving ( Data,Eq,Show,Typeable)--- cata-sem_JoinExpression :: JoinExpression  ->-                      T_JoinExpression -sem_JoinExpression (JoinOn _ann _expression )  =-    (sem_JoinExpression_JoinOn _ann (sem_Expression _expression ) )-sem_JoinExpression (JoinUsing _ann _stringList )  =-    (sem_JoinExpression_JoinUsing _ann (sem_StringList _stringList ) )--- semantic domain-type T_JoinExpression  = Environment ->-                         LocalIdentifierBindings ->-                         ( JoinExpression,JoinExpression)-data Inh_JoinExpression  = Inh_JoinExpression {env_Inh_JoinExpression :: Environment,lib_Inh_JoinExpression :: LocalIdentifierBindings}-data Syn_JoinExpression  = Syn_JoinExpression {annotatedTree_Syn_JoinExpression :: JoinExpression,originalTree_Syn_JoinExpression :: JoinExpression}-wrap_JoinExpression :: T_JoinExpression  ->-                       Inh_JoinExpression  ->-                       Syn_JoinExpression -wrap_JoinExpression sem (Inh_JoinExpression _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_JoinExpression _lhsOannotatedTree _lhsOoriginalTree ))-sem_JoinExpression_JoinOn :: Annotation ->-                             T_Expression  ->-                             T_JoinExpression -sem_JoinExpression_JoinOn ann_ expression_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: JoinExpression-              _lhsOoriginalTree :: JoinExpression-              _expressionOenv :: Environment-              _expressionOlib :: LocalIdentifierBindings-              _expressionIannotatedTree :: Expression-              _expressionIliftedColumnName :: String-              _expressionIoriginalTree :: Expression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  JoinOn ann_ _expressionIannotatedTree-                  {-# LINE 5572 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  JoinOn ann_ _expressionIoriginalTree-                  {-# LINE 5577 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5582 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5587 "AstInternal.hs" #-}-              -- copy rule (down)-              _expressionOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 5592 "AstInternal.hs" #-}-              -- copy rule (down)-              _expressionOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 5597 "AstInternal.hs" #-}-              ( _expressionIannotatedTree,_expressionIliftedColumnName,_expressionIoriginalTree) =-                  (expression_ _expressionOenv _expressionOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_JoinExpression_JoinUsing :: Annotation ->-                                T_StringList  ->-                                T_JoinExpression -sem_JoinExpression_JoinUsing ann_ stringList_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: JoinExpression-              _lhsOoriginalTree :: JoinExpression-              _stringListOenv :: Environment-              _stringListOlib :: LocalIdentifierBindings-              _stringListIannotatedTree :: StringList-              _stringListIoriginalTree :: StringList-              _stringListIstrings :: ([String])-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  JoinUsing ann_ _stringListIannotatedTree-                  {-# LINE 5618 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  JoinUsing ann_ _stringListIoriginalTree-                  {-# LINE 5623 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5628 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5633 "AstInternal.hs" #-}-              -- copy rule (down)-              _stringListOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 5638 "AstInternal.hs" #-}-              -- copy rule (down)-              _stringListOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 5643 "AstInternal.hs" #-}-              ( _stringListIannotatedTree,_stringListIoriginalTree,_stringListIstrings) =-                  (stringList_ _stringListOenv _stringListOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- JoinType -----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Cross:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative FullOuter:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Inner:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative LeftOuter:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative RightOuter:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data JoinType  = Cross -               | FullOuter -               | Inner -               | LeftOuter -               | RightOuter -               deriving ( Data,Eq,Show,Typeable)--- cata-sem_JoinType :: JoinType  ->-                T_JoinType -sem_JoinType (Cross )  =-    (sem_JoinType_Cross )-sem_JoinType (FullOuter )  =-    (sem_JoinType_FullOuter )-sem_JoinType (Inner )  =-    (sem_JoinType_Inner )-sem_JoinType (LeftOuter )  =-    (sem_JoinType_LeftOuter )-sem_JoinType (RightOuter )  =-    (sem_JoinType_RightOuter )--- semantic domain-type T_JoinType  = Environment ->-                   LocalIdentifierBindings ->-                   ( JoinType,JoinType)-data Inh_JoinType  = Inh_JoinType {env_Inh_JoinType :: Environment,lib_Inh_JoinType :: LocalIdentifierBindings}-data Syn_JoinType  = Syn_JoinType {annotatedTree_Syn_JoinType :: JoinType,originalTree_Syn_JoinType :: JoinType}-wrap_JoinType :: T_JoinType  ->-                 Inh_JoinType  ->-                 Syn_JoinType -wrap_JoinType sem (Inh_JoinType _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_JoinType _lhsOannotatedTree _lhsOoriginalTree ))-sem_JoinType_Cross :: T_JoinType -sem_JoinType_Cross  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: JoinType-              _lhsOoriginalTree :: JoinType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Cross-                  {-# LINE 5720 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Cross-                  {-# LINE 5725 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5730 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5735 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_JoinType_FullOuter :: T_JoinType -sem_JoinType_FullOuter  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: JoinType-              _lhsOoriginalTree :: JoinType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  FullOuter-                  {-# LINE 5747 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  FullOuter-                  {-# LINE 5752 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5757 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5762 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_JoinType_Inner :: T_JoinType -sem_JoinType_Inner  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: JoinType-              _lhsOoriginalTree :: JoinType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Inner-                  {-# LINE 5774 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Inner-                  {-# LINE 5779 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5784 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5789 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_JoinType_LeftOuter :: T_JoinType -sem_JoinType_LeftOuter  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: JoinType-              _lhsOoriginalTree :: JoinType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  LeftOuter-                  {-# LINE 5801 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  LeftOuter-                  {-# LINE 5806 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5811 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5816 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_JoinType_RightOuter :: T_JoinType -sem_JoinType_RightOuter  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: JoinType-              _lhsOoriginalTree :: JoinType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RightOuter-                  {-# LINE 5828 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RightOuter-                  {-# LINE 5833 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5838 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5843 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- Language -----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Plpgsql:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Sql:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data Language  = Plpgsql -               | Sql -               deriving ( Data,Eq,Show,Typeable)--- cata-sem_Language :: Language  ->-                T_Language -sem_Language (Plpgsql )  =-    (sem_Language_Plpgsql )-sem_Language (Sql )  =-    (sem_Language_Sql )--- semantic domain-type T_Language  = Environment ->-                   LocalIdentifierBindings ->-                   ( Language,Language)-data Inh_Language  = Inh_Language {env_Inh_Language :: Environment,lib_Inh_Language :: LocalIdentifierBindings}-data Syn_Language  = Syn_Language {annotatedTree_Syn_Language :: Language,originalTree_Syn_Language :: Language}-wrap_Language :: T_Language  ->-                 Inh_Language  ->-                 Syn_Language -wrap_Language sem (Inh_Language _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_Language _lhsOannotatedTree _lhsOoriginalTree ))-sem_Language_Plpgsql :: T_Language -sem_Language_Plpgsql  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Language-              _lhsOoriginalTree :: Language-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Plpgsql-                  {-# LINE 5897 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Plpgsql-                  {-# LINE 5902 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5907 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5912 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Language_Sql :: T_Language -sem_Language_Sql  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Language-              _lhsOoriginalTree :: Language-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Sql-                  {-# LINE 5924 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Sql-                  {-# LINE 5929 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 5934 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 5939 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- LiftFlavour --------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative LiftAll:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative LiftAny:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data LiftFlavour  = LiftAll -                  | LiftAny -                  deriving ( Data,Eq,Show,Typeable)--- cata-sem_LiftFlavour :: LiftFlavour  ->-                   T_LiftFlavour -sem_LiftFlavour (LiftAll )  =-    (sem_LiftFlavour_LiftAll )-sem_LiftFlavour (LiftAny )  =-    (sem_LiftFlavour_LiftAny )--- semantic domain-type T_LiftFlavour  = Environment ->-                      LocalIdentifierBindings ->-                      ( LiftFlavour,LiftFlavour)-data Inh_LiftFlavour  = Inh_LiftFlavour {env_Inh_LiftFlavour :: Environment,lib_Inh_LiftFlavour :: LocalIdentifierBindings}-data Syn_LiftFlavour  = Syn_LiftFlavour {annotatedTree_Syn_LiftFlavour :: LiftFlavour,originalTree_Syn_LiftFlavour :: LiftFlavour}-wrap_LiftFlavour :: T_LiftFlavour  ->-                    Inh_LiftFlavour  ->-                    Syn_LiftFlavour -wrap_LiftFlavour sem (Inh_LiftFlavour _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_LiftFlavour _lhsOannotatedTree _lhsOoriginalTree ))-sem_LiftFlavour_LiftAll :: T_LiftFlavour -sem_LiftFlavour_LiftAll  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: LiftFlavour-              _lhsOoriginalTree :: LiftFlavour-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  LiftAll-                  {-# LINE 5993 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  LiftAll-                  {-# LINE 5998 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6003 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6008 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_LiftFlavour_LiftAny :: T_LiftFlavour -sem_LiftFlavour_LiftAny  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: LiftFlavour-              _lhsOoriginalTree :: LiftFlavour-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  LiftAny-                  {-# LINE 6020 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  LiftAny-                  {-# LINE 6025 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6030 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6035 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- MaybeBoolExpression ------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Just:-         child just           : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nothing:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type MaybeBoolExpression  = (Maybe (Expression))--- cata-sem_MaybeBoolExpression :: MaybeBoolExpression  ->-                           T_MaybeBoolExpression -sem_MaybeBoolExpression (Prelude.Just x )  =-    (sem_MaybeBoolExpression_Just (sem_Expression x ) )-sem_MaybeBoolExpression Prelude.Nothing  =-    sem_MaybeBoolExpression_Nothing--- semantic domain-type T_MaybeBoolExpression  = Environment ->-                              LocalIdentifierBindings ->-                              ( MaybeBoolExpression,MaybeBoolExpression)-data Inh_MaybeBoolExpression  = Inh_MaybeBoolExpression {env_Inh_MaybeBoolExpression :: Environment,lib_Inh_MaybeBoolExpression :: LocalIdentifierBindings}-data Syn_MaybeBoolExpression  = Syn_MaybeBoolExpression {annotatedTree_Syn_MaybeBoolExpression :: MaybeBoolExpression,originalTree_Syn_MaybeBoolExpression :: MaybeBoolExpression}-wrap_MaybeBoolExpression :: T_MaybeBoolExpression  ->-                            Inh_MaybeBoolExpression  ->-                            Syn_MaybeBoolExpression -wrap_MaybeBoolExpression sem (Inh_MaybeBoolExpression _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_MaybeBoolExpression _lhsOannotatedTree _lhsOoriginalTree ))-sem_MaybeBoolExpression_Just :: T_Expression  ->-                                T_MaybeBoolExpression -sem_MaybeBoolExpression_Just just_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: MaybeBoolExpression-              _lhsOoriginalTree :: MaybeBoolExpression-              _justOenv :: Environment-              _justOlib :: LocalIdentifierBindings-              _justIannotatedTree :: Expression-              _justIliftedColumnName :: String-              _justIoriginalTree :: Expression-              -- "./TypeChecking/Misc.ag"(line 74, column 9)-              _lhsOannotatedTree =-                  {-# LINE 74 "./TypeChecking/Misc.ag" #-}-                  if getTypeAnnotation _justIannotatedTree `notElem` [typeBool, TypeCheckFailed]-                    then Just $ updateAnnotation ((TypeErrorA ExpressionMustBeBool) :)-                                  _justIannotatedTree-                    else Just $ _justIannotatedTree-                  {-# LINE 6097 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Just _justIannotatedTree-                  {-# LINE 6102 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Just _justIoriginalTree-                  {-# LINE 6107 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6112 "AstInternal.hs" #-}-              -- copy rule (down)-              _justOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 6117 "AstInternal.hs" #-}-              -- copy rule (down)-              _justOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 6122 "AstInternal.hs" #-}-              ( _justIannotatedTree,_justIliftedColumnName,_justIoriginalTree) =-                  (just_ _justOenv _justOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_MaybeBoolExpression_Nothing :: T_MaybeBoolExpression -sem_MaybeBoolExpression_Nothing  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: MaybeBoolExpression-              _lhsOoriginalTree :: MaybeBoolExpression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Nothing-                  {-# LINE 6136 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Nothing-                  {-# LINE 6141 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6146 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6151 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- MaybeExpression ----------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Just:-         child just           : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nothing:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type MaybeExpression  = (Maybe (Expression))--- cata-sem_MaybeExpression :: MaybeExpression  ->-                       T_MaybeExpression -sem_MaybeExpression (Prelude.Just x )  =-    (sem_MaybeExpression_Just (sem_Expression x ) )-sem_MaybeExpression Prelude.Nothing  =-    sem_MaybeExpression_Nothing--- semantic domain-type T_MaybeExpression  = Environment ->-                          LocalIdentifierBindings ->-                          ( MaybeExpression,MaybeExpression)-data Inh_MaybeExpression  = Inh_MaybeExpression {env_Inh_MaybeExpression :: Environment,lib_Inh_MaybeExpression :: LocalIdentifierBindings}-data Syn_MaybeExpression  = Syn_MaybeExpression {annotatedTree_Syn_MaybeExpression :: MaybeExpression,originalTree_Syn_MaybeExpression :: MaybeExpression}-wrap_MaybeExpression :: T_MaybeExpression  ->-                        Inh_MaybeExpression  ->-                        Syn_MaybeExpression -wrap_MaybeExpression sem (Inh_MaybeExpression _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_MaybeExpression _lhsOannotatedTree _lhsOoriginalTree ))-sem_MaybeExpression_Just :: T_Expression  ->-                            T_MaybeExpression -sem_MaybeExpression_Just just_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: MaybeExpression-              _lhsOoriginalTree :: MaybeExpression-              _justOenv :: Environment-              _justOlib :: LocalIdentifierBindings-              _justIannotatedTree :: Expression-              _justIliftedColumnName :: String-              _justIoriginalTree :: Expression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Just _justIannotatedTree-                  {-# LINE 6210 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Just _justIoriginalTree-                  {-# LINE 6215 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6220 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6225 "AstInternal.hs" #-}-              -- copy rule (down)-              _justOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 6230 "AstInternal.hs" #-}-              -- copy rule (down)-              _justOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 6235 "AstInternal.hs" #-}-              ( _justIannotatedTree,_justIliftedColumnName,_justIoriginalTree) =-                  (just_ _justOenv _justOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_MaybeExpression_Nothing :: T_MaybeExpression -sem_MaybeExpression_Nothing  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: MaybeExpression-              _lhsOoriginalTree :: MaybeExpression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Nothing-                  {-# LINE 6249 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Nothing-                  {-# LINE 6254 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6259 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6264 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- MaybeSelectList ----------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         listType             : Maybe [(String,Type)]-         originalTree         : SELF -   alternatives:-      alternative Just:-         child just           : SelectList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nothing:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type MaybeSelectList  = (Maybe (SelectList))--- cata-sem_MaybeSelectList :: MaybeSelectList  ->-                       T_MaybeSelectList -sem_MaybeSelectList (Prelude.Just x )  =-    (sem_MaybeSelectList_Just (sem_SelectList x ) )-sem_MaybeSelectList Prelude.Nothing  =-    sem_MaybeSelectList_Nothing--- semantic domain-type T_MaybeSelectList  = Environment ->-                          LocalIdentifierBindings ->-                          ( MaybeSelectList,(Maybe [(String,Type)]),MaybeSelectList)-data Inh_MaybeSelectList  = Inh_MaybeSelectList {env_Inh_MaybeSelectList :: Environment,lib_Inh_MaybeSelectList :: LocalIdentifierBindings}-data Syn_MaybeSelectList  = Syn_MaybeSelectList {annotatedTree_Syn_MaybeSelectList :: MaybeSelectList,listType_Syn_MaybeSelectList :: Maybe [(String,Type)],originalTree_Syn_MaybeSelectList :: MaybeSelectList}-wrap_MaybeSelectList :: T_MaybeSelectList  ->-                        Inh_MaybeSelectList  ->-                        Syn_MaybeSelectList -wrap_MaybeSelectList sem (Inh_MaybeSelectList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_MaybeSelectList _lhsOannotatedTree _lhsOlistType _lhsOoriginalTree ))-sem_MaybeSelectList_Just :: T_SelectList  ->-                            T_MaybeSelectList -sem_MaybeSelectList_Just just_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOlistType :: (Maybe [(String,Type)])-              _lhsOannotatedTree :: MaybeSelectList-              _lhsOoriginalTree :: MaybeSelectList-              _justOenv :: Environment-              _justOlib :: LocalIdentifierBindings-              _justIannotatedTree :: SelectList-              _justIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _justIlistType :: ([(String,Type)])-              _justIoriginalTree :: SelectList-              -- "./TypeChecking/SelectLists.ag"(line 25, column 12)-              _lhsOlistType =-                  {-# LINE 25 "./TypeChecking/SelectLists.ag" #-}-                  Just _justIlistType-                  {-# LINE 6326 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Just _justIannotatedTree-                  {-# LINE 6331 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Just _justIoriginalTree-                  {-# LINE 6336 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6341 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6346 "AstInternal.hs" #-}-              -- copy rule (down)-              _justOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 6351 "AstInternal.hs" #-}-              -- copy rule (down)-              _justOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 6356 "AstInternal.hs" #-}-              ( _justIannotatedTree,_justIlibUpdates,_justIlistType,_justIoriginalTree) =-                  (just_ _justOenv _justOlib )-          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))-sem_MaybeSelectList_Nothing :: T_MaybeSelectList -sem_MaybeSelectList_Nothing  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOlistType :: (Maybe [(String,Type)])-              _lhsOannotatedTree :: MaybeSelectList-              _lhsOoriginalTree :: MaybeSelectList-              -- "./TypeChecking/SelectLists.ag"(line 26, column 15)-              _lhsOlistType =-                  {-# LINE 26 "./TypeChecking/SelectLists.ag" #-}-                  Nothing-                  {-# LINE 6371 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Nothing-                  {-# LINE 6376 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Nothing-                  {-# LINE 6381 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6386 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6391 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))--- Natural ------------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Natural:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Unnatural:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data Natural  = Natural -              | Unnatural -              deriving ( Data,Eq,Show,Typeable)--- cata-sem_Natural :: Natural  ->-               T_Natural -sem_Natural (Natural )  =-    (sem_Natural_Natural )-sem_Natural (Unnatural )  =-    (sem_Natural_Unnatural )--- semantic domain-type T_Natural  = Environment ->-                  LocalIdentifierBindings ->-                  ( Natural,Natural)-data Inh_Natural  = Inh_Natural {env_Inh_Natural :: Environment,lib_Inh_Natural :: LocalIdentifierBindings}-data Syn_Natural  = Syn_Natural {annotatedTree_Syn_Natural :: Natural,originalTree_Syn_Natural :: Natural}-wrap_Natural :: T_Natural  ->-                Inh_Natural  ->-                Syn_Natural -wrap_Natural sem (Inh_Natural _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_Natural _lhsOannotatedTree _lhsOoriginalTree ))-sem_Natural_Natural :: T_Natural -sem_Natural_Natural  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Natural-              _lhsOoriginalTree :: Natural-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Natural-                  {-# LINE 6445 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Natural-                  {-# LINE 6450 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6455 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6460 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Natural_Unnatural :: T_Natural -sem_Natural_Unnatural  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Natural-              _lhsOoriginalTree :: Natural-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Unnatural-                  {-# LINE 6472 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Unnatural-                  {-# LINE 6477 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6482 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6487 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- OnExpr -------------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Just:-         child just           : JoinExpression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nothing:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type OnExpr  = (Maybe (JoinExpression))--- cata-sem_OnExpr :: OnExpr  ->-              T_OnExpr -sem_OnExpr (Prelude.Just x )  =-    (sem_OnExpr_Just (sem_JoinExpression x ) )-sem_OnExpr Prelude.Nothing  =-    sem_OnExpr_Nothing--- semantic domain-type T_OnExpr  = Environment ->-                 LocalIdentifierBindings ->-                 ( OnExpr,OnExpr)-data Inh_OnExpr  = Inh_OnExpr {env_Inh_OnExpr :: Environment,lib_Inh_OnExpr :: LocalIdentifierBindings}-data Syn_OnExpr  = Syn_OnExpr {annotatedTree_Syn_OnExpr :: OnExpr,originalTree_Syn_OnExpr :: OnExpr}-wrap_OnExpr :: T_OnExpr  ->-               Inh_OnExpr  ->-               Syn_OnExpr -wrap_OnExpr sem (Inh_OnExpr _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_OnExpr _lhsOannotatedTree _lhsOoriginalTree ))-sem_OnExpr_Just :: T_JoinExpression  ->-                   T_OnExpr -sem_OnExpr_Just just_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: OnExpr-              _lhsOoriginalTree :: OnExpr-              _justOenv :: Environment-              _justOlib :: LocalIdentifierBindings-              _justIannotatedTree :: JoinExpression-              _justIoriginalTree :: JoinExpression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Just _justIannotatedTree-                  {-# LINE 6545 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Just _justIoriginalTree-                  {-# LINE 6550 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6555 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6560 "AstInternal.hs" #-}-              -- copy rule (down)-              _justOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 6565 "AstInternal.hs" #-}-              -- copy rule (down)-              _justOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 6570 "AstInternal.hs" #-}-              ( _justIannotatedTree,_justIoriginalTree) =-                  (just_ _justOenv _justOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_OnExpr_Nothing :: T_OnExpr -sem_OnExpr_Nothing  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: OnExpr-              _lhsOoriginalTree :: OnExpr-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Nothing-                  {-# LINE 6584 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Nothing-                  {-# LINE 6589 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6594 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6599 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- ParamDef -----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         namedType            : Type-         originalTree         : SELF -         paramName            : String-   alternatives:-      alternative ParamDef:-         child ann            : {Annotation}-         child name           : {String}-         child typ            : TypeName -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative ParamDefTp:-         child ann            : {Annotation}-         child typ            : TypeName -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data ParamDef  = ParamDef (Annotation) (String) (TypeName) -               | ParamDefTp (Annotation) (TypeName) -               deriving ( Data,Eq,Show,Typeable)--- cata-sem_ParamDef :: ParamDef  ->-                T_ParamDef -sem_ParamDef (ParamDef _ann _name _typ )  =-    (sem_ParamDef_ParamDef _ann _name (sem_TypeName _typ ) )-sem_ParamDef (ParamDefTp _ann _typ )  =-    (sem_ParamDef_ParamDefTp _ann (sem_TypeName _typ ) )--- semantic domain-type T_ParamDef  = Environment ->-                   LocalIdentifierBindings ->-                   ( ParamDef,Type,ParamDef,String)-data Inh_ParamDef  = Inh_ParamDef {env_Inh_ParamDef :: Environment,lib_Inh_ParamDef :: LocalIdentifierBindings}-data Syn_ParamDef  = Syn_ParamDef {annotatedTree_Syn_ParamDef :: ParamDef,namedType_Syn_ParamDef :: Type,originalTree_Syn_ParamDef :: ParamDef,paramName_Syn_ParamDef :: String}-wrap_ParamDef :: T_ParamDef  ->-                 Inh_ParamDef  ->-                 Syn_ParamDef -wrap_ParamDef sem (Inh_ParamDef _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree,_lhsOparamName) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ParamDef _lhsOannotatedTree _lhsOnamedType _lhsOoriginalTree _lhsOparamName ))-sem_ParamDef_ParamDef :: Annotation ->-                         String ->-                         T_TypeName  ->-                         T_ParamDef -sem_ParamDef_ParamDef ann_ name_ typ_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOnamedType :: Type-              _lhsOparamName :: String-              _lhsOannotatedTree :: ParamDef-              _lhsOoriginalTree :: ParamDef-              _typOenv :: Environment-              _typOlib :: LocalIdentifierBindings-              _typIannotatedTree :: TypeName-              _typInamedType :: Type-              _typIoriginalTree :: TypeName-              -- "./TypeChecking/CreateFunction.ag"(line 56, column 9)-              _lhsOnamedType =-                  {-# LINE 56 "./TypeChecking/CreateFunction.ag" #-}-                  _typInamedType-                  {-# LINE 6670 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 58, column 9)-              _lhsOparamName =-                  {-# LINE 58 "./TypeChecking/CreateFunction.ag" #-}-                  name_-                  {-# LINE 6675 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ParamDef ann_ name_ _typIannotatedTree-                  {-# LINE 6680 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ParamDef ann_ name_ _typIoriginalTree-                  {-# LINE 6685 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6690 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6695 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 6700 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 6705 "AstInternal.hs" #-}-              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =-                  (typ_ _typOenv _typOlib )-          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree,_lhsOparamName)))-sem_ParamDef_ParamDefTp :: Annotation ->-                           T_TypeName  ->-                           T_ParamDef -sem_ParamDef_ParamDefTp ann_ typ_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOnamedType :: Type-              _lhsOparamName :: String-              _lhsOannotatedTree :: ParamDef-              _lhsOoriginalTree :: ParamDef-              _typOenv :: Environment-              _typOlib :: LocalIdentifierBindings-              _typIannotatedTree :: TypeName-              _typInamedType :: Type-              _typIoriginalTree :: TypeName-              -- "./TypeChecking/CreateFunction.ag"(line 56, column 9)-              _lhsOnamedType =-                  {-# LINE 56 "./TypeChecking/CreateFunction.ag" #-}-                  _typInamedType-                  {-# LINE 6728 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 60, column 9)-              _lhsOparamName =-                  {-# LINE 60 "./TypeChecking/CreateFunction.ag" #-}-                  ""-                  {-# LINE 6733 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ParamDefTp ann_ _typIannotatedTree-                  {-# LINE 6738 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ParamDefTp ann_ _typIoriginalTree-                  {-# LINE 6743 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6748 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6753 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 6758 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 6763 "AstInternal.hs" #-}-              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =-                  (typ_ _typOenv _typOlib )-          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree,_lhsOparamName)))--- ParamDefList -------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -         params               : [(String, Type)]-   alternatives:-      alternative Cons:-         child hd             : ParamDef -         child tl             : ParamDefList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type ParamDefList  = [(ParamDef)]--- cata-sem_ParamDefList :: ParamDefList  ->-                    T_ParamDefList -sem_ParamDefList list  =-    (Prelude.foldr sem_ParamDefList_Cons sem_ParamDefList_Nil (Prelude.map sem_ParamDef list) )--- semantic domain-type T_ParamDefList  = Environment ->-                       LocalIdentifierBindings ->-                       ( ParamDefList,ParamDefList,([(String, Type)]))-data Inh_ParamDefList  = Inh_ParamDefList {env_Inh_ParamDefList :: Environment,lib_Inh_ParamDefList :: LocalIdentifierBindings}-data Syn_ParamDefList  = Syn_ParamDefList {annotatedTree_Syn_ParamDefList :: ParamDefList,originalTree_Syn_ParamDefList :: ParamDefList,params_Syn_ParamDefList :: [(String, Type)]}-wrap_ParamDefList :: T_ParamDefList  ->-                     Inh_ParamDefList  ->-                     Syn_ParamDefList -wrap_ParamDefList sem (Inh_ParamDefList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOparams) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_ParamDefList _lhsOannotatedTree _lhsOoriginalTree _lhsOparams ))-sem_ParamDefList_Cons :: T_ParamDef  ->-                         T_ParamDefList  ->-                         T_ParamDefList -sem_ParamDefList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOparams :: ([(String, Type)])-              _lhsOannotatedTree :: ParamDefList-              _lhsOoriginalTree :: ParamDefList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: ParamDef-              _hdInamedType :: Type-              _hdIoriginalTree :: ParamDef-              _hdIparamName :: String-              _tlIannotatedTree :: ParamDefList-              _tlIoriginalTree :: ParamDefList-              _tlIparams :: ([(String, Type)])-              -- "./TypeChecking/CreateFunction.ag"(line 64, column 13)-              _lhsOparams =-                  {-# LINE 64 "./TypeChecking/CreateFunction.ag" #-}-                  ((_hdIparamName, _hdInamedType) : _tlIparams)-                  {-# LINE 6832 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 6837 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 6842 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6847 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6852 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 6857 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 6862 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 6867 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 6872 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdInamedType,_hdIoriginalTree,_hdIparamName) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree,_tlIparams) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOparams)))-sem_ParamDefList_Nil :: T_ParamDefList -sem_ParamDefList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOparams :: ([(String, Type)])-              _lhsOannotatedTree :: ParamDefList-              _lhsOoriginalTree :: ParamDefList-              -- "./TypeChecking/CreateFunction.ag"(line 63, column 12)-              _lhsOparams =-                  {-# LINE 63 "./TypeChecking/CreateFunction.ag" #-}-                  []-                  {-# LINE 6889 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 6894 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 6899 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6904 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6909 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOparams)))--- RaiseType ----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative RError:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative RException:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative RNotice:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data RaiseType  = RError -                | RException -                | RNotice -                deriving ( Data,Eq,Show,Typeable)--- cata-sem_RaiseType :: RaiseType  ->-                 T_RaiseType -sem_RaiseType (RError )  =-    (sem_RaiseType_RError )-sem_RaiseType (RException )  =-    (sem_RaiseType_RException )-sem_RaiseType (RNotice )  =-    (sem_RaiseType_RNotice )--- semantic domain-type T_RaiseType  = Environment ->-                    LocalIdentifierBindings ->-                    ( RaiseType,RaiseType)-data Inh_RaiseType  = Inh_RaiseType {env_Inh_RaiseType :: Environment,lib_Inh_RaiseType :: LocalIdentifierBindings}-data Syn_RaiseType  = Syn_RaiseType {annotatedTree_Syn_RaiseType :: RaiseType,originalTree_Syn_RaiseType :: RaiseType}-wrap_RaiseType :: T_RaiseType  ->-                  Inh_RaiseType  ->-                  Syn_RaiseType -wrap_RaiseType sem (Inh_RaiseType _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_RaiseType _lhsOannotatedTree _lhsOoriginalTree ))-sem_RaiseType_RError :: T_RaiseType -sem_RaiseType_RError  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RaiseType-              _lhsOoriginalTree :: RaiseType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RError-                  {-# LINE 6970 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RError-                  {-# LINE 6975 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 6980 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 6985 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_RaiseType_RException :: T_RaiseType -sem_RaiseType_RException  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RaiseType-              _lhsOoriginalTree :: RaiseType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RException-                  {-# LINE 6997 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RException-                  {-# LINE 7002 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7007 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7012 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_RaiseType_RNotice :: T_RaiseType -sem_RaiseType_RNotice  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RaiseType-              _lhsOoriginalTree :: RaiseType-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RNotice-                  {-# LINE 7024 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RNotice-                  {-# LINE 7029 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7034 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7039 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- RestartIdentity ----------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative ContinueIdentity:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative RestartIdentity:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data RestartIdentity  = ContinueIdentity -                      | RestartIdentity -                      deriving ( Data,Eq,Show,Typeable)--- cata-sem_RestartIdentity :: RestartIdentity  ->-                       T_RestartIdentity -sem_RestartIdentity (ContinueIdentity )  =-    (sem_RestartIdentity_ContinueIdentity )-sem_RestartIdentity (RestartIdentity )  =-    (sem_RestartIdentity_RestartIdentity )--- semantic domain-type T_RestartIdentity  = Environment ->-                          LocalIdentifierBindings ->-                          ( RestartIdentity,RestartIdentity)-data Inh_RestartIdentity  = Inh_RestartIdentity {env_Inh_RestartIdentity :: Environment,lib_Inh_RestartIdentity :: LocalIdentifierBindings}-data Syn_RestartIdentity  = Syn_RestartIdentity {annotatedTree_Syn_RestartIdentity :: RestartIdentity,originalTree_Syn_RestartIdentity :: RestartIdentity}-wrap_RestartIdentity :: T_RestartIdentity  ->-                        Inh_RestartIdentity  ->-                        Syn_RestartIdentity -wrap_RestartIdentity sem (Inh_RestartIdentity _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_RestartIdentity _lhsOannotatedTree _lhsOoriginalTree ))-sem_RestartIdentity_ContinueIdentity :: T_RestartIdentity -sem_RestartIdentity_ContinueIdentity  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RestartIdentity-              _lhsOoriginalTree :: RestartIdentity-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ContinueIdentity-                  {-# LINE 7093 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ContinueIdentity-                  {-# LINE 7098 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7103 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7108 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_RestartIdentity_RestartIdentity :: T_RestartIdentity -sem_RestartIdentity_RestartIdentity  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RestartIdentity-              _lhsOoriginalTree :: RestartIdentity-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RestartIdentity-                  {-# LINE 7120 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RestartIdentity-                  {-# LINE 7125 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7130 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7135 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- Root ---------------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -         producedEnv          : Environment-         producedLib          : LocalIdentifierBindings-   alternatives:-      alternative Root:-         child statements     : StatementList -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data Root  = Root (StatementList) -           deriving ( Show)--- cata-sem_Root :: Root  ->-            T_Root -sem_Root (Root _statements )  =-    (sem_Root_Root (sem_StatementList _statements ) )--- semantic domain-type T_Root  = Environment ->-               LocalIdentifierBindings ->-               ( Root,Root,Environment,LocalIdentifierBindings)-data Inh_Root  = Inh_Root {env_Inh_Root :: Environment,lib_Inh_Root :: LocalIdentifierBindings}-data Syn_Root  = Syn_Root {annotatedTree_Syn_Root :: Root,originalTree_Syn_Root :: Root,producedEnv_Syn_Root :: Environment,producedLib_Syn_Root :: LocalIdentifierBindings}-wrap_Root :: T_Root  ->-             Inh_Root  ->-             Syn_Root -wrap_Root sem (Inh_Root _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedEnv,_lhsOproducedLib) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_Root _lhsOannotatedTree _lhsOoriginalTree _lhsOproducedEnv _lhsOproducedLib ))-sem_Root_Root :: T_StatementList  ->-                 T_Root -sem_Root_Root statements_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _statementsOenvUpdates :: ([EnvironmentUpdate])-              _statementsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Root-              _lhsOoriginalTree :: Root-              _lhsOproducedEnv :: Environment-              _lhsOproducedLib :: LocalIdentifierBindings-              _statementsOenv :: Environment-              _statementsOlib :: LocalIdentifierBindings-              _statementsIannotatedTree :: StatementList-              _statementsIoriginalTree :: StatementList-              _statementsIproducedEnv :: Environment-              _statementsIproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 80, column 12)-              _statementsOenvUpdates =-                  {-# LINE 80 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 7196 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 81, column 12)-              _statementsOlibUpdates =-                  {-# LINE 81 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 7201 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Root _statementsIannotatedTree-                  {-# LINE 7206 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Root _statementsIoriginalTree-                  {-# LINE 7211 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7216 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7221 "AstInternal.hs" #-}-              -- copy rule (up)-              _lhsOproducedEnv =-                  {-# LINE 27 "./TypeChecking/Statements.ag" #-}-                  _statementsIproducedEnv-                  {-# LINE 7226 "AstInternal.hs" #-}-              -- copy rule (up)-              _lhsOproducedLib =-                  {-# LINE 28 "./TypeChecking/Statements.ag" #-}-                  _statementsIproducedLib-                  {-# LINE 7231 "AstInternal.hs" #-}-              -- copy rule (down)-              _statementsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 7236 "AstInternal.hs" #-}-              -- copy rule (down)-              _statementsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 7241 "AstInternal.hs" #-}-              ( _statementsIannotatedTree,_statementsIoriginalTree,_statementsIproducedEnv,_statementsIproducedLib) =-                  (statements_ _statementsOenv _statementsOenvUpdates _statementsOlib _statementsOlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedEnv,_lhsOproducedLib)))--- RowConstraint ------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative NotNullConstraint:-         child ann            : {Annotation}-         child name           : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative NullConstraint:-         child ann            : {Annotation}-         child name           : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative RowCheckConstraint:-         child ann            : {Annotation}-         child name           : {String}-         child expression     : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative RowPrimaryKeyConstraint:-         child ann            : {Annotation}-         child name           : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative RowReferenceConstraint:-         child ann            : {Annotation}-         child name           : {String}-         child table          : {String}-         child att            : {Maybe String}-         child onUpdate       : Cascade -         child onDelete       : Cascade -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative RowUniqueConstraint:-         child ann            : {Annotation}-         child name           : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data RowConstraint  = NotNullConstraint (Annotation) (String) -                    | NullConstraint (Annotation) (String) -                    | RowCheckConstraint (Annotation) (String) (Expression) -                    | RowPrimaryKeyConstraint (Annotation) (String) -                    | RowReferenceConstraint (Annotation) (String) (String) (Maybe String) (Cascade) (Cascade) -                    | RowUniqueConstraint (Annotation) (String) -                    deriving ( Data,Eq,Show,Typeable)--- cata-sem_RowConstraint :: RowConstraint  ->-                     T_RowConstraint -sem_RowConstraint (NotNullConstraint _ann _name )  =-    (sem_RowConstraint_NotNullConstraint _ann _name )-sem_RowConstraint (NullConstraint _ann _name )  =-    (sem_RowConstraint_NullConstraint _ann _name )-sem_RowConstraint (RowCheckConstraint _ann _name _expression )  =-    (sem_RowConstraint_RowCheckConstraint _ann _name (sem_Expression _expression ) )-sem_RowConstraint (RowPrimaryKeyConstraint _ann _name )  =-    (sem_RowConstraint_RowPrimaryKeyConstraint _ann _name )-sem_RowConstraint (RowReferenceConstraint _ann _name _table _att _onUpdate _onDelete )  =-    (sem_RowConstraint_RowReferenceConstraint _ann _name _table _att (sem_Cascade _onUpdate ) (sem_Cascade _onDelete ) )-sem_RowConstraint (RowUniqueConstraint _ann _name )  =-    (sem_RowConstraint_RowUniqueConstraint _ann _name )--- semantic domain-type T_RowConstraint  = Environment ->-                        LocalIdentifierBindings ->-                        ( RowConstraint,RowConstraint)-data Inh_RowConstraint  = Inh_RowConstraint {env_Inh_RowConstraint :: Environment,lib_Inh_RowConstraint :: LocalIdentifierBindings}-data Syn_RowConstraint  = Syn_RowConstraint {annotatedTree_Syn_RowConstraint :: RowConstraint,originalTree_Syn_RowConstraint :: RowConstraint}-wrap_RowConstraint :: T_RowConstraint  ->-                      Inh_RowConstraint  ->-                      Syn_RowConstraint -wrap_RowConstraint sem (Inh_RowConstraint _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_RowConstraint _lhsOannotatedTree _lhsOoriginalTree ))-sem_RowConstraint_NotNullConstraint :: Annotation ->-                                       String ->-                                       T_RowConstraint -sem_RowConstraint_NotNullConstraint ann_ name_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RowConstraint-              _lhsOoriginalTree :: RowConstraint-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  NotNullConstraint ann_ name_-                  {-# LINE 7344 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  NotNullConstraint ann_ name_-                  {-# LINE 7349 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7354 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7359 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_RowConstraint_NullConstraint :: Annotation ->-                                    String ->-                                    T_RowConstraint -sem_RowConstraint_NullConstraint ann_ name_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RowConstraint-              _lhsOoriginalTree :: RowConstraint-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  NullConstraint ann_ name_-                  {-# LINE 7373 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  NullConstraint ann_ name_-                  {-# LINE 7378 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7383 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7388 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_RowConstraint_RowCheckConstraint :: Annotation ->-                                        String ->-                                        T_Expression  ->-                                        T_RowConstraint -sem_RowConstraint_RowCheckConstraint ann_ name_ expression_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RowConstraint-              _lhsOoriginalTree :: RowConstraint-              _expressionOenv :: Environment-              _expressionOlib :: LocalIdentifierBindings-              _expressionIannotatedTree :: Expression-              _expressionIliftedColumnName :: String-              _expressionIoriginalTree :: Expression-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RowCheckConstraint ann_ name_ _expressionIannotatedTree-                  {-# LINE 7408 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RowCheckConstraint ann_ name_ _expressionIoriginalTree-                  {-# LINE 7413 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7418 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7423 "AstInternal.hs" #-}-              -- copy rule (down)-              _expressionOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 7428 "AstInternal.hs" #-}-              -- copy rule (down)-              _expressionOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 7433 "AstInternal.hs" #-}-              ( _expressionIannotatedTree,_expressionIliftedColumnName,_expressionIoriginalTree) =-                  (expression_ _expressionOenv _expressionOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_RowConstraint_RowPrimaryKeyConstraint :: Annotation ->-                                             String ->-                                             T_RowConstraint -sem_RowConstraint_RowPrimaryKeyConstraint ann_ name_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RowConstraint-              _lhsOoriginalTree :: RowConstraint-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RowPrimaryKeyConstraint ann_ name_-                  {-# LINE 7449 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RowPrimaryKeyConstraint ann_ name_-                  {-# LINE 7454 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7459 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7464 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_RowConstraint_RowReferenceConstraint :: Annotation ->-                                            String ->-                                            String ->-                                            (Maybe String) ->-                                            T_Cascade  ->-                                            T_Cascade  ->-                                            T_RowConstraint -sem_RowConstraint_RowReferenceConstraint ann_ name_ table_ att_ onUpdate_ onDelete_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RowConstraint-              _lhsOoriginalTree :: RowConstraint-              _onUpdateOenv :: Environment-              _onUpdateOlib :: LocalIdentifierBindings-              _onDeleteOenv :: Environment-              _onDeleteOlib :: LocalIdentifierBindings-              _onUpdateIannotatedTree :: Cascade-              _onUpdateIoriginalTree :: Cascade-              _onDeleteIannotatedTree :: Cascade-              _onDeleteIoriginalTree :: Cascade-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RowReferenceConstraint ann_ name_ table_ att_ _onUpdateIannotatedTree _onDeleteIannotatedTree-                  {-# LINE 7490 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RowReferenceConstraint ann_ name_ table_ att_ _onUpdateIoriginalTree _onDeleteIoriginalTree-                  {-# LINE 7495 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7500 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7505 "AstInternal.hs" #-}-              -- copy rule (down)-              _onUpdateOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 7510 "AstInternal.hs" #-}-              -- copy rule (down)-              _onUpdateOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 7515 "AstInternal.hs" #-}-              -- copy rule (down)-              _onDeleteOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 7520 "AstInternal.hs" #-}-              -- copy rule (down)-              _onDeleteOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 7525 "AstInternal.hs" #-}-              ( _onUpdateIannotatedTree,_onUpdateIoriginalTree) =-                  (onUpdate_ _onUpdateOenv _onUpdateOlib )-              ( _onDeleteIannotatedTree,_onDeleteIoriginalTree) =-                  (onDelete_ _onDeleteOenv _onDeleteOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_RowConstraint_RowUniqueConstraint :: Annotation ->-                                         String ->-                                         T_RowConstraint -sem_RowConstraint_RowUniqueConstraint ann_ name_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RowConstraint-              _lhsOoriginalTree :: RowConstraint-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RowUniqueConstraint ann_ name_-                  {-# LINE 7543 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RowUniqueConstraint ann_ name_-                  {-# LINE 7548 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7553 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7558 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- RowConstraintList --------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : RowConstraint -         child tl             : RowConstraintList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type RowConstraintList  = [(RowConstraint)]--- cata-sem_RowConstraintList :: RowConstraintList  ->-                         T_RowConstraintList -sem_RowConstraintList list  =-    (Prelude.foldr sem_RowConstraintList_Cons sem_RowConstraintList_Nil (Prelude.map sem_RowConstraint list) )--- semantic domain-type T_RowConstraintList  = Environment ->-                            LocalIdentifierBindings ->-                            ( RowConstraintList,RowConstraintList)-data Inh_RowConstraintList  = Inh_RowConstraintList {env_Inh_RowConstraintList :: Environment,lib_Inh_RowConstraintList :: LocalIdentifierBindings}-data Syn_RowConstraintList  = Syn_RowConstraintList {annotatedTree_Syn_RowConstraintList :: RowConstraintList,originalTree_Syn_RowConstraintList :: RowConstraintList}-wrap_RowConstraintList :: T_RowConstraintList  ->-                          Inh_RowConstraintList  ->-                          Syn_RowConstraintList -wrap_RowConstraintList sem (Inh_RowConstraintList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_RowConstraintList _lhsOannotatedTree _lhsOoriginalTree ))-sem_RowConstraintList_Cons :: T_RowConstraint  ->-                              T_RowConstraintList  ->-                              T_RowConstraintList -sem_RowConstraintList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RowConstraintList-              _lhsOoriginalTree :: RowConstraintList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: RowConstraint-              _hdIoriginalTree :: RowConstraint-              _tlIannotatedTree :: RowConstraintList-              _tlIoriginalTree :: RowConstraintList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 7620 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 7625 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7630 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7635 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 7640 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 7645 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 7650 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 7655 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_RowConstraintList_Nil :: T_RowConstraintList -sem_RowConstraintList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: RowConstraintList-              _lhsOoriginalTree :: RowConstraintList-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 7671 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 7676 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 7681 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7686 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- SelectExpression ---------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         libUpdates           : [LocalIdentifierBindingsUpdate]-         originalTree         : SELF -   alternatives:-      alternative CombineSelect:-         child ann            : {Annotation}-         child ctype          : CombineType -         child sel1           : SelectExpression -         child sel2           : SelectExpression -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative Select:-         child ann            : {Annotation}-         child selDistinct    : Distinct -         child selSelectList  : SelectList -         child selTref        : TableRefList -         child selWhere       : MaybeBoolExpression -         child selGroupBy     : ExpressionList -         child selHaving      : MaybeBoolExpression -         child selOrderBy     : ExpressionDirectionPairList -         child selLimit       : MaybeExpression -         child selOffset      : MaybeExpression -         visit 0:-            local newLib      : _-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative Values:-         child ann            : {Annotation}-         child vll            : ExpressionListList -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _--}-data SelectExpression  = CombineSelect (Annotation) (CombineType) (SelectExpression) (SelectExpression) -                       | Select (Annotation) (Distinct) (SelectList) (TableRefList) (MaybeBoolExpression) (ExpressionList) (MaybeBoolExpression) (ExpressionDirectionPairList) (MaybeExpression) (MaybeExpression) -                       | Values (Annotation) (ExpressionListList) -                       deriving ( Data,Eq,Show,Typeable)--- cata-sem_SelectExpression :: SelectExpression  ->-                        T_SelectExpression -sem_SelectExpression (CombineSelect _ann _ctype _sel1 _sel2 )  =-    (sem_SelectExpression_CombineSelect _ann (sem_CombineType _ctype ) (sem_SelectExpression _sel1 ) (sem_SelectExpression _sel2 ) )-sem_SelectExpression (Select _ann _selDistinct _selSelectList _selTref _selWhere _selGroupBy _selHaving _selOrderBy _selLimit _selOffset )  =-    (sem_SelectExpression_Select _ann (sem_Distinct _selDistinct ) (sem_SelectList _selSelectList ) (sem_TableRefList _selTref ) (sem_MaybeBoolExpression _selWhere ) (sem_ExpressionList _selGroupBy ) (sem_MaybeBoolExpression _selHaving ) (sem_ExpressionDirectionPairList _selOrderBy ) (sem_MaybeExpression _selLimit ) (sem_MaybeExpression _selOffset ) )-sem_SelectExpression (Values _ann _vll )  =-    (sem_SelectExpression_Values _ann (sem_ExpressionListList _vll ) )--- semantic domain-type T_SelectExpression  = Environment ->-                           LocalIdentifierBindings ->-                           ( SelectExpression,([LocalIdentifierBindingsUpdate]),SelectExpression)-data Inh_SelectExpression  = Inh_SelectExpression {env_Inh_SelectExpression :: Environment,lib_Inh_SelectExpression :: LocalIdentifierBindings}-data Syn_SelectExpression  = Syn_SelectExpression {annotatedTree_Syn_SelectExpression :: SelectExpression,libUpdates_Syn_SelectExpression :: [LocalIdentifierBindingsUpdate],originalTree_Syn_SelectExpression :: SelectExpression}-wrap_SelectExpression :: T_SelectExpression  ->-                         Inh_SelectExpression  ->-                         Syn_SelectExpression -wrap_SelectExpression sem (Inh_SelectExpression _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_SelectExpression _lhsOannotatedTree _lhsOlibUpdates _lhsOoriginalTree ))-sem_SelectExpression_CombineSelect :: Annotation ->-                                      T_CombineType  ->-                                      T_SelectExpression  ->-                                      T_SelectExpression  ->-                                      T_SelectExpression -sem_SelectExpression_CombineSelect ann_ ctype_ sel1_ sel2_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: SelectExpression-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOoriginalTree :: SelectExpression-              _ctypeOenv :: Environment-              _ctypeOlib :: LocalIdentifierBindings-              _sel1Oenv :: Environment-              _sel1Olib :: LocalIdentifierBindings-              _sel2Oenv :: Environment-              _sel2Olib :: LocalIdentifierBindings-              _ctypeIannotatedTree :: CombineType-              _ctypeIoriginalTree :: CombineType-              _sel1IannotatedTree :: SelectExpression-              _sel1IlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _sel1IoriginalTree :: SelectExpression-              _sel2IannotatedTree :: SelectExpression-              _sel2IlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _sel2IoriginalTree :: SelectExpression-              -- "./TypeChecking/SelectStatement.ag"(line 26, column 9)-              _lhsOannotatedTree =-                  {-# LINE 26 "./TypeChecking/SelectStatement.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 7793 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 132, column 9)-              _tpe =-                  {-# LINE 132 "./TypeChecking/SelectStatement.ag" #-}-                  let sel1t = getTypeAnnotation _sel1IannotatedTree-                      sel2t = getTypeAnnotation _sel2IannotatedTree-                  in dependsOnRTpe [sel1t, sel2t] $-                        typeCheckCombineSelect _lhsIenv sel1t sel2t-                  {-# LINE 7801 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 137, column 9)-              _backTree =-                  {-# LINE 137 "./TypeChecking/SelectStatement.ag" #-}-                  CombineSelect ann_ _ctypeIannotatedTree-                                _sel1IannotatedTree-                                _sel2IannotatedTree-                  {-# LINE 7808 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 87, column 11)-              _lhsOlibUpdates =-                  {-# LINE 87 "./TypeChecking/SelectLists.ag" #-}-                  []-                  {-# LINE 7813 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CombineSelect ann_ _ctypeIannotatedTree _sel1IannotatedTree _sel2IannotatedTree-                  {-# LINE 7818 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CombineSelect ann_ _ctypeIoriginalTree _sel1IoriginalTree _sel2IoriginalTree-                  {-# LINE 7823 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7828 "AstInternal.hs" #-}-              -- copy rule (down)-              _ctypeOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 7833 "AstInternal.hs" #-}-              -- copy rule (down)-              _ctypeOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 7838 "AstInternal.hs" #-}-              -- copy rule (down)-              _sel1Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 7843 "AstInternal.hs" #-}-              -- copy rule (down)-              _sel1Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 7848 "AstInternal.hs" #-}-              -- copy rule (down)-              _sel2Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 7853 "AstInternal.hs" #-}-              -- copy rule (down)-              _sel2Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 7858 "AstInternal.hs" #-}-              ( _ctypeIannotatedTree,_ctypeIoriginalTree) =-                  (ctype_ _ctypeOenv _ctypeOlib )-              ( _sel1IannotatedTree,_sel1IlibUpdates,_sel1IoriginalTree) =-                  (sel1_ _sel1Oenv _sel1Olib )-              ( _sel2IannotatedTree,_sel2IlibUpdates,_sel2IoriginalTree) =-                  (sel2_ _sel2Oenv _sel2Olib )-          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_SelectExpression_Select :: Annotation ->-                               T_Distinct  ->-                               T_SelectList  ->-                               T_TableRefList  ->-                               T_MaybeBoolExpression  ->-                               T_ExpressionList  ->-                               T_MaybeBoolExpression  ->-                               T_ExpressionDirectionPairList  ->-                               T_MaybeExpression  ->-                               T_MaybeExpression  ->-                               T_SelectExpression -sem_SelectExpression_Select ann_ selDistinct_ selSelectList_ selTref_ selWhere_ selGroupBy_ selHaving_ selOrderBy_ selLimit_ selOffset_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: SelectExpression-              _selSelectListOlib :: LocalIdentifierBindings-              _selWhereOlib :: LocalIdentifierBindings-              _selGroupByOlib :: LocalIdentifierBindings-              _selOrderByOlib :: LocalIdentifierBindings-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOoriginalTree :: SelectExpression-              _selDistinctOenv :: Environment-              _selDistinctOlib :: LocalIdentifierBindings-              _selSelectListOenv :: Environment-              _selTrefOenv :: Environment-              _selTrefOlib :: LocalIdentifierBindings-              _selWhereOenv :: Environment-              _selGroupByOenv :: Environment-              _selHavingOenv :: Environment-              _selHavingOlib :: LocalIdentifierBindings-              _selOrderByOenv :: Environment-              _selLimitOenv :: Environment-              _selLimitOlib :: LocalIdentifierBindings-              _selOffsetOenv :: Environment-              _selOffsetOlib :: LocalIdentifierBindings-              _selDistinctIannotatedTree :: Distinct-              _selDistinctIoriginalTree :: Distinct-              _selSelectListIannotatedTree :: SelectList-              _selSelectListIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _selSelectListIlistType :: ([(String,Type)])-              _selSelectListIoriginalTree :: SelectList-              _selTrefIannotatedTree :: TableRefList-              _selTrefIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _selTrefIoriginalTree :: TableRefList-              _selWhereIannotatedTree :: MaybeBoolExpression-              _selWhereIoriginalTree :: MaybeBoolExpression-              _selGroupByIannotatedTree :: ExpressionList-              _selGroupByIoriginalTree :: ExpressionList-              _selGroupByItypeList :: ([Type])-              _selHavingIannotatedTree :: MaybeBoolExpression-              _selHavingIoriginalTree :: MaybeBoolExpression-              _selOrderByIannotatedTree :: ExpressionDirectionPairList-              _selOrderByIoriginalTree :: ExpressionDirectionPairList-              _selLimitIannotatedTree :: MaybeExpression-              _selLimitIoriginalTree :: MaybeExpression-              _selOffsetIannotatedTree :: MaybeExpression-              _selOffsetIoriginalTree :: MaybeExpression-              -- "./TypeChecking/SelectStatement.ag"(line 26, column 9)-              _lhsOannotatedTree =-                  {-# LINE 26 "./TypeChecking/SelectStatement.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 7930 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 97, column 10)-              _newLib =-                  {-# LINE 97 "./TypeChecking/SelectStatement.ag" #-}-                  case updateBindings _lhsIlib _lhsIenv _selTrefIlibUpdates of-                    Left x -> error $ show x-                    Right e -> e-                  {-# LINE 7937 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 100, column 10)-              _selSelectListOlib =-                  {-# LINE 100 "./TypeChecking/SelectStatement.ag" #-}-                  _newLib-                  {-# LINE 7942 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 101, column 10)-              _selWhereOlib =-                  {-# LINE 101 "./TypeChecking/SelectStatement.ag" #-}-                  _newLib-                  {-# LINE 7947 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 102, column 10)-              _selGroupByOlib =-                  {-# LINE 102 "./TypeChecking/SelectStatement.ag" #-}-                  _newLib-                  {-# LINE 7952 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 103, column 10)-              _selOrderByOlib =-                  {-# LINE 103 "./TypeChecking/SelectStatement.ag" #-}-                  _newLib-                  {-# LINE 7957 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 114, column 9)-              _tpe =-                  {-# LINE 114 "./TypeChecking/SelectStatement.ag" #-}-                  do-                  Right $ case _selSelectListIlistType of-                            [(_,Pseudo Void)] -> Pseudo Void-                            _ -> SetOfType $ CompositeType _selSelectListIlistType-                  {-# LINE 7965 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 121, column 9)-              _backTree =-                  {-# LINE 121 "./TypeChecking/SelectStatement.ag" #-}-                  Select ann_-                         _selDistinctIannotatedTree-                         _selSelectListIannotatedTree-                         _selTrefIannotatedTree-                         _selWhereIannotatedTree-                         _selGroupByIannotatedTree-                         _selHavingIannotatedTree-                         _selOrderByIannotatedTree-                         _selLimitIannotatedTree-                         _selOffsetIannotatedTree-                  {-# LINE 7979 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 85, column 9)-              _lhsOlibUpdates =-                  {-# LINE 85 "./TypeChecking/SelectLists.ag" #-}-                  _selSelectListIlibUpdates-                  {-# LINE 7984 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Select ann_ _selDistinctIannotatedTree _selSelectListIannotatedTree _selTrefIannotatedTree _selWhereIannotatedTree _selGroupByIannotatedTree _selHavingIannotatedTree _selOrderByIannotatedTree _selLimitIannotatedTree _selOffsetIannotatedTree-                  {-# LINE 7989 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Select ann_ _selDistinctIoriginalTree _selSelectListIoriginalTree _selTrefIoriginalTree _selWhereIoriginalTree _selGroupByIoriginalTree _selHavingIoriginalTree _selOrderByIoriginalTree _selLimitIoriginalTree _selOffsetIoriginalTree-                  {-# LINE 7994 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 7999 "AstInternal.hs" #-}-              -- copy rule (down)-              _selDistinctOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8004 "AstInternal.hs" #-}-              -- copy rule (down)-              _selDistinctOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8009 "AstInternal.hs" #-}-              -- copy rule (down)-              _selSelectListOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8014 "AstInternal.hs" #-}-              -- copy rule (down)-              _selTrefOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8019 "AstInternal.hs" #-}-              -- copy rule (down)-              _selTrefOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8024 "AstInternal.hs" #-}-              -- copy rule (down)-              _selWhereOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8029 "AstInternal.hs" #-}-              -- copy rule (down)-              _selGroupByOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8034 "AstInternal.hs" #-}-              -- copy rule (down)-              _selHavingOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8039 "AstInternal.hs" #-}-              -- copy rule (down)-              _selHavingOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8044 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOrderByOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8049 "AstInternal.hs" #-}-              -- copy rule (down)-              _selLimitOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8054 "AstInternal.hs" #-}-              -- copy rule (down)-              _selLimitOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8059 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOffsetOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8064 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOffsetOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8069 "AstInternal.hs" #-}-              ( _selDistinctIannotatedTree,_selDistinctIoriginalTree) =-                  (selDistinct_ _selDistinctOenv _selDistinctOlib )-              ( _selSelectListIannotatedTree,_selSelectListIlibUpdates,_selSelectListIlistType,_selSelectListIoriginalTree) =-                  (selSelectList_ _selSelectListOenv _selSelectListOlib )-              ( _selTrefIannotatedTree,_selTrefIlibUpdates,_selTrefIoriginalTree) =-                  (selTref_ _selTrefOenv _selTrefOlib )-              ( _selWhereIannotatedTree,_selWhereIoriginalTree) =-                  (selWhere_ _selWhereOenv _selWhereOlib )-              ( _selGroupByIannotatedTree,_selGroupByIoriginalTree,_selGroupByItypeList) =-                  (selGroupBy_ _selGroupByOenv _selGroupByOlib )-              ( _selHavingIannotatedTree,_selHavingIoriginalTree) =-                  (selHaving_ _selHavingOenv _selHavingOlib )-              ( _selOrderByIannotatedTree,_selOrderByIoriginalTree) =-                  (selOrderBy_ _selOrderByOenv _selOrderByOlib )-              ( _selLimitIannotatedTree,_selLimitIoriginalTree) =-                  (selLimit_ _selLimitOenv _selLimitOlib )-              ( _selOffsetIannotatedTree,_selOffsetIoriginalTree) =-                  (selOffset_ _selOffsetOenv _selOffsetOlib )-          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_SelectExpression_Values :: Annotation ->-                               T_ExpressionListList  ->-                               T_SelectExpression -sem_SelectExpression_Values ann_ vll_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: SelectExpression-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOoriginalTree :: SelectExpression-              _vllOenv :: Environment-              _vllOlib :: LocalIdentifierBindings-              _vllIannotatedTree :: ExpressionListList-              _vllIoriginalTree :: ExpressionListList-              _vllItypeListList :: ([[Type]])-              -- "./TypeChecking/SelectStatement.ag"(line 26, column 9)-              _lhsOannotatedTree =-                  {-# LINE 26 "./TypeChecking/SelectStatement.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    Nothing-                  {-# LINE 8110 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 109, column 9)-              _tpe =-                  {-# LINE 109 "./TypeChecking/SelectStatement.ag" #-}-                  typeCheckValuesExpr-                              _lhsIenv-                              _vllItypeListList-                  {-# LINE 8117 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 112, column 9)-              _backTree =-                  {-# LINE 112 "./TypeChecking/SelectStatement.ag" #-}-                  Values ann_ _vllIannotatedTree-                  {-# LINE 8122 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 87, column 11)-              _lhsOlibUpdates =-                  {-# LINE 87 "./TypeChecking/SelectLists.ag" #-}-                  []-                  {-# LINE 8127 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Values ann_ _vllIannotatedTree-                  {-# LINE 8132 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Values ann_ _vllIoriginalTree-                  {-# LINE 8137 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8142 "AstInternal.hs" #-}-              -- copy rule (down)-              _vllOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8147 "AstInternal.hs" #-}-              -- copy rule (down)-              _vllOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8152 "AstInternal.hs" #-}-              ( _vllIannotatedTree,_vllIoriginalTree,_vllItypeListList) =-                  (vll_ _vllOenv _vllOlib )-          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))--- SelectItem ---------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         columnName           : String-         itemType             : Type-         originalTree         : SELF -   alternatives:-      alternative SelExp:-         child ann            : {Annotation}-         child ex             : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative SelectItem:-         child ann            : {Annotation}-         child ex             : Expression -         child name           : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data SelectItem  = SelExp (Annotation) (Expression) -                 | SelectItem (Annotation) (Expression) (String) -                 deriving ( Data,Eq,Show,Typeable)--- cata-sem_SelectItem :: SelectItem  ->-                  T_SelectItem -sem_SelectItem (SelExp _ann _ex )  =-    (sem_SelectItem_SelExp _ann (sem_Expression _ex ) )-sem_SelectItem (SelectItem _ann _ex _name )  =-    (sem_SelectItem_SelectItem _ann (sem_Expression _ex ) _name )--- semantic domain-type T_SelectItem  = Environment ->-                     LocalIdentifierBindings ->-                     ( SelectItem,String,Type,SelectItem)-data Inh_SelectItem  = Inh_SelectItem {env_Inh_SelectItem :: Environment,lib_Inh_SelectItem :: LocalIdentifierBindings}-data Syn_SelectItem  = Syn_SelectItem {annotatedTree_Syn_SelectItem :: SelectItem,columnName_Syn_SelectItem :: String,itemType_Syn_SelectItem :: Type,originalTree_Syn_SelectItem :: SelectItem}-wrap_SelectItem :: T_SelectItem  ->-                   Inh_SelectItem  ->-                   Syn_SelectItem -wrap_SelectItem sem (Inh_SelectItem _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_SelectItem _lhsOannotatedTree _lhsOcolumnName _lhsOitemType _lhsOoriginalTree ))-sem_SelectItem_SelExp :: Annotation ->-                         T_Expression  ->-                         T_SelectItem -sem_SelectItem_SelExp ann_ ex_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOitemType :: Type-              _lhsOcolumnName :: String-              _lhsOannotatedTree :: SelectItem-              _lhsOoriginalTree :: SelectItem-              _exOenv :: Environment-              _exOlib :: LocalIdentifierBindings-              _exIannotatedTree :: Expression-              _exIliftedColumnName :: String-              _exIoriginalTree :: Expression-              -- "./TypeChecking/SelectLists.ag"(line 13, column 9)-              _annotatedTree =-                  {-# LINE 13 "./TypeChecking/SelectLists.ag" #-}-                  SelExp ann_ $ fixStar _exIannotatedTree-                  {-# LINE 8224 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 35, column 9)-              _lhsOitemType =-                  {-# LINE 35 "./TypeChecking/SelectLists.ag" #-}-                  getTypeAnnotation _exIannotatedTree-                  {-# LINE 8229 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 181, column 14)-              _lhsOcolumnName =-                  {-# LINE 181 "./TypeChecking/SelectLists.ag" #-}-                  case _exIliftedColumnName of-                    "" -> "?column?"-                    s -> s-                  {-# LINE 8236 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SelExp ann_ _exIoriginalTree-                  {-# LINE 8241 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 8246 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8251 "AstInternal.hs" #-}-              -- copy rule (down)-              _exOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8256 "AstInternal.hs" #-}-              -- copy rule (down)-              _exOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8261 "AstInternal.hs" #-}-              ( _exIannotatedTree,_exIliftedColumnName,_exIoriginalTree) =-                  (ex_ _exOenv _exOlib )-          in  ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType,_lhsOoriginalTree)))-sem_SelectItem_SelectItem :: Annotation ->-                             T_Expression  ->-                             String ->-                             T_SelectItem -sem_SelectItem_SelectItem ann_ ex_ name_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOitemType :: Type-              _lhsOcolumnName :: String-              _lhsOannotatedTree :: SelectItem-              _lhsOoriginalTree :: SelectItem-              _exOenv :: Environment-              _exOlib :: LocalIdentifierBindings-              _exIannotatedTree :: Expression-              _exIliftedColumnName :: String-              _exIoriginalTree :: Expression-              -- "./TypeChecking/SelectLists.ag"(line 15, column 9)-              _annotatedTree =-                  {-# LINE 15 "./TypeChecking/SelectLists.ag" #-}-                  SelectItem ann_ (fixStar _exIannotatedTree) name_-                  {-# LINE 8285 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 35, column 9)-              _lhsOitemType =-                  {-# LINE 35 "./TypeChecking/SelectLists.ag" #-}-                  getTypeAnnotation _exIannotatedTree-                  {-# LINE 8290 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 184, column 18)-              _lhsOcolumnName =-                  {-# LINE 184 "./TypeChecking/SelectLists.ag" #-}-                  name_-                  {-# LINE 8295 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SelectItem ann_ _exIoriginalTree name_-                  {-# LINE 8300 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 8305 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8310 "AstInternal.hs" #-}-              -- copy rule (down)-              _exOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8315 "AstInternal.hs" #-}-              -- copy rule (down)-              _exOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8320 "AstInternal.hs" #-}-              ( _exIannotatedTree,_exIliftedColumnName,_exIoriginalTree) =-                  (ex_ _exOenv _exOlib )-          in  ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType,_lhsOoriginalTree)))--- SelectItemList -----------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         listType             : [(String,Type)]-         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : SelectItem -         child tl             : SelectItemList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type SelectItemList  = [(SelectItem)]--- cata-sem_SelectItemList :: SelectItemList  ->-                      T_SelectItemList -sem_SelectItemList list  =-    (Prelude.foldr sem_SelectItemList_Cons sem_SelectItemList_Nil (Prelude.map sem_SelectItem list) )--- semantic domain-type T_SelectItemList  = Environment ->-                         LocalIdentifierBindings ->-                         ( SelectItemList,([(String,Type)]),SelectItemList)-data Inh_SelectItemList  = Inh_SelectItemList {env_Inh_SelectItemList :: Environment,lib_Inh_SelectItemList :: LocalIdentifierBindings}-data Syn_SelectItemList  = Syn_SelectItemList {annotatedTree_Syn_SelectItemList :: SelectItemList,listType_Syn_SelectItemList :: [(String,Type)],originalTree_Syn_SelectItemList :: SelectItemList}-wrap_SelectItemList :: T_SelectItemList  ->-                       Inh_SelectItemList  ->-                       Syn_SelectItemList -wrap_SelectItemList sem (Inh_SelectItemList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_SelectItemList _lhsOannotatedTree _lhsOlistType _lhsOoriginalTree ))-sem_SelectItemList_Cons :: T_SelectItem  ->-                           T_SelectItemList  ->-                           T_SelectItemList -sem_SelectItemList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOlistType :: ([(String,Type)])-              _lhsOannotatedTree :: SelectItemList-              _lhsOoriginalTree :: SelectItemList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: SelectItem-              _hdIcolumnName :: String-              _hdIitemType :: Type-              _hdIoriginalTree :: SelectItem-              _tlIannotatedTree :: SelectItemList-              _tlIlistType :: ([(String,Type)])-              _tlIoriginalTree :: SelectItemList-              -- "./TypeChecking/SelectLists.ag"(line 29, column 12)-              _lhsOlistType =-                  {-# LINE 29 "./TypeChecking/SelectLists.ag" #-}-                  expandStar _lhsIlib _hdIcolumnName _hdIitemType _tlIlistType-                  {-# LINE 8389 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 8394 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 8399 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 8404 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8409 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8414 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8419 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8424 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8429 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIcolumnName,_hdIitemType,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIlistType,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))-sem_SelectItemList_Nil :: T_SelectItemList -sem_SelectItemList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOlistType :: ([(String,Type)])-              _lhsOannotatedTree :: SelectItemList-              _lhsOoriginalTree :: SelectItemList-              -- "./TypeChecking/SelectLists.ag"(line 30, column 11)-              _lhsOlistType =-                  {-# LINE 30 "./TypeChecking/SelectLists.ag" #-}-                  []-                  {-# LINE 8446 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 8451 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 8456 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 8461 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8466 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))--- SelectList ---------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         libUpdates           : [LocalIdentifierBindingsUpdate]-         listType             : [(String,Type)]-         originalTree         : SELF -   alternatives:-      alternative SelectList:-         child ann            : {Annotation}-         child items          : SelectItemList -         child into           : StringList -         visit 0:-            local errs        : _-            local stuff       : _-            local annotatedTree : _-            local originalTree : _--}-data SelectList  = SelectList (Annotation) (SelectItemList) (StringList) -                 deriving ( Data,Eq,Show,Typeable)--- cata-sem_SelectList :: SelectList  ->-                  T_SelectList -sem_SelectList (SelectList _ann _items _into )  =-    (sem_SelectList_SelectList _ann (sem_SelectItemList _items ) (sem_StringList _into ) )--- semantic domain-type T_SelectList  = Environment ->-                     LocalIdentifierBindings ->-                     ( SelectList,([LocalIdentifierBindingsUpdate]),([(String,Type)]),SelectList)-data Inh_SelectList  = Inh_SelectList {env_Inh_SelectList :: Environment,lib_Inh_SelectList :: LocalIdentifierBindings}-data Syn_SelectList  = Syn_SelectList {annotatedTree_Syn_SelectList :: SelectList,libUpdates_Syn_SelectList :: [LocalIdentifierBindingsUpdate],listType_Syn_SelectList :: [(String,Type)],originalTree_Syn_SelectList :: SelectList}-wrap_SelectList :: T_SelectList  ->-                   Inh_SelectList  ->-                   Syn_SelectList -wrap_SelectList sem (Inh_SelectList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOlistType,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_SelectList _lhsOannotatedTree _lhsOlibUpdates _lhsOlistType _lhsOoriginalTree ))-sem_SelectList_SelectList :: Annotation ->-                             T_SelectItemList  ->-                             T_StringList  ->-                             T_SelectList -sem_SelectList_SelectList ann_ items_ into_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOlistType :: ([(String,Type)])-              _lhsOannotatedTree :: SelectList-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOoriginalTree :: SelectList-              _itemsOenv :: Environment-              _itemsOlib :: LocalIdentifierBindings-              _intoOenv :: Environment-              _intoOlib :: LocalIdentifierBindings-              _itemsIannotatedTree :: SelectItemList-              _itemsIlistType :: ([(String,Type)])-              _itemsIoriginalTree :: SelectItemList-              _intoIannotatedTree :: StringList-              _intoIoriginalTree :: StringList-              _intoIstrings :: ([String])-              -- "./TypeChecking/SelectLists.ag"(line 41, column 9)-              _lhsOlistType =-                  {-# LINE 41 "./TypeChecking/SelectLists.ag" #-}-                  _itemsIlistType-                  {-# LINE 8535 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 43, column 9)-              _errs =-                  {-# LINE 43 "./TypeChecking/SelectLists.ag" #-}-                  case _stuff     of-                    (er,_) -> er-                  {-# LINE 8541 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 45, column 9)-              _stuff =-                  {-# LINE 45 "./TypeChecking/SelectLists.ag" #-}-                  case () of-                    _ | null sl -> ([],Nothing)-                      | not (null targetTypeErrs) -> (targetTypeErrs,Nothing)-                      | (case targetTypes of-                           [PgRecord _] -> True-                           _ -> False) -> ([],Just (head sl, CompositeType _itemsIlistType))-                      | matchingComposite /= Left [] -> (fromLeft [] matchingComposite,Nothing)-                      | length sl /= length _itemsIlistType -> ([WrongNumberOfColumns],Nothing)-                      | not (null assignErrs) -> (assignErrs,Nothing)-                      | otherwise -> ([],Nothing)-                  where-                    targetTypeEithers = map (libLookupID _lhsIlib) sl-                    targetTypeErrs = concat $ lefts $ targetTypeEithers-                    targetTypes = rights $ targetTypeEithers-                    typePairs = zip (map snd _itemsIlistType) targetTypes-                    assignErrs = concat $ lefts $ map (uncurry $ checkAssignmentValid _lhsIenv) typePairs-                    sl = _intoIstrings-                    matchingComposite =-                        case targetTypes of-                          [t] | isCompositeType t -> checkAssignmentValid _lhsIenv (AnonymousRecordType (map snd _itemsIlistType)) t-                          _ -> Left []-                  {-# LINE 8566 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 68, column 9)-              _lhsOannotatedTree =-                  {-# LINE 68 "./TypeChecking/SelectLists.ag" #-}-                  SelectList (ann_ ++ map TypeErrorA _errs    )-                             _itemsIannotatedTree-                             _intoIannotatedTree-                  {-# LINE 8573 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 71, column 9)-              _lhsOlibUpdates =-                  {-# LINE 71 "./TypeChecking/SelectLists.ag" #-}-                  case _stuff     of-                    (_,Just r) -> [LibStackIDs [("", [r])]]-                    _ -> []-                  {-# LINE 8580 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SelectList ann_ _itemsIannotatedTree _intoIannotatedTree-                  {-# LINE 8585 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SelectList ann_ _itemsIoriginalTree _intoIoriginalTree-                  {-# LINE 8590 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8595 "AstInternal.hs" #-}-              -- copy rule (down)-              _itemsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8600 "AstInternal.hs" #-}-              -- copy rule (down)-              _itemsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8605 "AstInternal.hs" #-}-              -- copy rule (down)-              _intoOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8610 "AstInternal.hs" #-}-              -- copy rule (down)-              _intoOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8615 "AstInternal.hs" #-}-              ( _itemsIannotatedTree,_itemsIlistType,_itemsIoriginalTree) =-                  (items_ _itemsOenv _itemsOlib )-              ( _intoIannotatedTree,_intoIoriginalTree,_intoIstrings) =-                  (into_ _intoOenv _intoOlib )-          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOlistType,_lhsOoriginalTree)))--- SetClause ----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -         pairs                : [(String,Type)]-         rowSetError          : Maybe TypeError-   alternatives:-      alternative RowSetClause:-         child ann            : {Annotation}-         child atts           : StringList -         child vals           : ExpressionList -         visit 0:-            local rowSetError : _-            local annotatedTree : _-            local originalTree : _-      alternative SetClause:-         child ann            : {Annotation}-         child att            : {String}-         child val            : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data SetClause  = RowSetClause (Annotation) (StringList) (ExpressionList) -                | SetClause (Annotation) (String) (Expression) -                deriving ( Data,Eq,Show,Typeable)--- cata-sem_SetClause :: SetClause  ->-                 T_SetClause -sem_SetClause (RowSetClause _ann _atts _vals )  =-    (sem_SetClause_RowSetClause _ann (sem_StringList _atts ) (sem_ExpressionList _vals ) )-sem_SetClause (SetClause _ann _att _val )  =-    (sem_SetClause_SetClause _ann _att (sem_Expression _val ) )--- semantic domain-type T_SetClause  = Environment ->-                    LocalIdentifierBindings ->-                    ( SetClause,SetClause,([(String,Type)]),(Maybe TypeError))-data Inh_SetClause  = Inh_SetClause {env_Inh_SetClause :: Environment,lib_Inh_SetClause :: LocalIdentifierBindings}-data Syn_SetClause  = Syn_SetClause {annotatedTree_Syn_SetClause :: SetClause,originalTree_Syn_SetClause :: SetClause,pairs_Syn_SetClause :: [(String,Type)],rowSetError_Syn_SetClause :: Maybe TypeError}-wrap_SetClause :: T_SetClause  ->-                  Inh_SetClause  ->-                  Syn_SetClause -wrap_SetClause sem (Inh_SetClause _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetError) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_SetClause _lhsOannotatedTree _lhsOoriginalTree _lhsOpairs _lhsOrowSetError ))-sem_SetClause_RowSetClause :: Annotation ->-                              T_StringList  ->-                              T_ExpressionList  ->-                              T_SetClause -sem_SetClause_RowSetClause ann_ atts_ vals_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOpairs :: ([(String,Type)])-              _lhsOannotatedTree :: SetClause-              _lhsOoriginalTree :: SetClause-              _lhsOrowSetError :: (Maybe TypeError)-              _attsOenv :: Environment-              _attsOlib :: LocalIdentifierBindings-              _valsOenv :: Environment-              _valsOlib :: LocalIdentifierBindings-              _attsIannotatedTree :: StringList-              _attsIoriginalTree :: StringList-              _attsIstrings :: ([String])-              _valsIannotatedTree :: ExpressionList-              _valsIoriginalTree :: ExpressionList-              _valsItypeList :: ([Type])-              -- "./TypeChecking/Dml.ag"(line 128, column 9)-              _rowSetError =-                  {-# LINE 128 "./TypeChecking/Dml.ag" #-}-                  let atts = _attsIstrings-                      types = getRowTypes _valsItypeList-                  in if length atts /= length types-                       then Just WrongNumberOfColumns-                       else Nothing-                  {-# LINE 8701 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 134, column 9)-              _lhsOpairs =-                  {-# LINE 134 "./TypeChecking/Dml.ag" #-}-                  zip _attsIstrings $ getRowTypes _valsItypeList-                  {-# LINE 8706 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  RowSetClause ann_ _attsIannotatedTree _valsIannotatedTree-                  {-# LINE 8711 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  RowSetClause ann_ _attsIoriginalTree _valsIoriginalTree-                  {-# LINE 8716 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 8721 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8726 "AstInternal.hs" #-}-              -- copy rule (from local)-              _lhsOrowSetError =-                  {-# LINE 121 "./TypeChecking/Dml.ag" #-}-                  _rowSetError-                  {-# LINE 8731 "AstInternal.hs" #-}-              -- copy rule (down)-              _attsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8736 "AstInternal.hs" #-}-              -- copy rule (down)-              _attsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8741 "AstInternal.hs" #-}-              -- copy rule (down)-              _valsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8746 "AstInternal.hs" #-}-              -- copy rule (down)-              _valsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8751 "AstInternal.hs" #-}-              ( _attsIannotatedTree,_attsIoriginalTree,_attsIstrings) =-                  (atts_ _attsOenv _attsOlib )-              ( _valsIannotatedTree,_valsIoriginalTree,_valsItypeList) =-                  (vals_ _valsOenv _valsOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetError)))-sem_SetClause_SetClause :: Annotation ->-                           String ->-                           T_Expression  ->-                           T_SetClause -sem_SetClause_SetClause ann_ att_ val_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOpairs :: ([(String,Type)])-              _lhsOrowSetError :: (Maybe TypeError)-              _lhsOannotatedTree :: SetClause-              _lhsOoriginalTree :: SetClause-              _valOenv :: Environment-              _valOlib :: LocalIdentifierBindings-              _valIannotatedTree :: Expression-              _valIliftedColumnName :: String-              _valIoriginalTree :: Expression-              -- "./TypeChecking/Dml.ag"(line 125, column 9)-              _lhsOpairs =-                  {-# LINE 125 "./TypeChecking/Dml.ag" #-}-                  [(att_, getTypeAnnotation _valIannotatedTree)]-                  {-# LINE 8777 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 126, column 9)-              _lhsOrowSetError =-                  {-# LINE 126 "./TypeChecking/Dml.ag" #-}-                  Nothing-                  {-# LINE 8782 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SetClause ann_ att_ _valIannotatedTree-                  {-# LINE 8787 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SetClause ann_ att_ _valIoriginalTree-                  {-# LINE 8792 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 8797 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8802 "AstInternal.hs" #-}-              -- copy rule (down)-              _valOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8807 "AstInternal.hs" #-}-              -- copy rule (down)-              _valOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8812 "AstInternal.hs" #-}-              ( _valIannotatedTree,_valIliftedColumnName,_valIoriginalTree) =-                  (val_ _valOenv _valOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetError)))--- SetClauseList ------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -         pairs                : [(String,Type)]-         rowSetErrors         : [TypeError]-   alternatives:-      alternative Cons:-         child hd             : SetClause -         child tl             : SetClauseList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type SetClauseList  = [(SetClause)]--- cata-sem_SetClauseList :: SetClauseList  ->-                     T_SetClauseList -sem_SetClauseList list  =-    (Prelude.foldr sem_SetClauseList_Cons sem_SetClauseList_Nil (Prelude.map sem_SetClause list) )--- semantic domain-type T_SetClauseList  = Environment ->-                        LocalIdentifierBindings ->-                        ( SetClauseList,SetClauseList,([(String,Type)]),([TypeError]))-data Inh_SetClauseList  = Inh_SetClauseList {env_Inh_SetClauseList :: Environment,lib_Inh_SetClauseList :: LocalIdentifierBindings}-data Syn_SetClauseList  = Syn_SetClauseList {annotatedTree_Syn_SetClauseList :: SetClauseList,originalTree_Syn_SetClauseList :: SetClauseList,pairs_Syn_SetClauseList :: [(String,Type)],rowSetErrors_Syn_SetClauseList :: [TypeError]}-wrap_SetClauseList :: T_SetClauseList  ->-                      Inh_SetClauseList  ->-                      Syn_SetClauseList -wrap_SetClauseList sem (Inh_SetClauseList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetErrors) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_SetClauseList _lhsOannotatedTree _lhsOoriginalTree _lhsOpairs _lhsOrowSetErrors ))-sem_SetClauseList_Cons :: T_SetClause  ->-                          T_SetClauseList  ->-                          T_SetClauseList -sem_SetClauseList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOpairs :: ([(String,Type)])-              _lhsOrowSetErrors :: ([TypeError])-              _lhsOannotatedTree :: SetClauseList-              _lhsOoriginalTree :: SetClauseList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: SetClause-              _hdIoriginalTree :: SetClause-              _hdIpairs :: ([(String,Type)])-              _hdIrowSetError :: (Maybe TypeError)-              _tlIannotatedTree :: SetClauseList-              _tlIoriginalTree :: SetClauseList-              _tlIpairs :: ([(String,Type)])-              _tlIrowSetErrors :: ([TypeError])-              -- "./TypeChecking/Dml.ag"(line 115, column 10)-              _lhsOpairs =-                  {-# LINE 115 "./TypeChecking/Dml.ag" #-}-                  _hdIpairs ++ _tlIpairs-                  {-# LINE 8884 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 116, column 10)-              _lhsOrowSetErrors =-                  {-# LINE 116 "./TypeChecking/Dml.ag" #-}-                  maybeToList _hdIrowSetError ++ _tlIrowSetErrors-                  {-# LINE 8889 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 8894 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 8899 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 8904 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8909 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8914 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8919 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 8924 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 8929 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIoriginalTree,_hdIpairs,_hdIrowSetError) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree,_tlIpairs,_tlIrowSetErrors) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetErrors)))-sem_SetClauseList_Nil :: T_SetClauseList -sem_SetClauseList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOpairs :: ([(String,Type)])-              _lhsOrowSetErrors :: ([TypeError])-              _lhsOannotatedTree :: SetClauseList-              _lhsOoriginalTree :: SetClauseList-              -- "./TypeChecking/Dml.ag"(line 117, column 9)-              _lhsOpairs =-                  {-# LINE 117 "./TypeChecking/Dml.ag" #-}-                  []-                  {-# LINE 8947 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 118, column 9)-              _lhsOrowSetErrors =-                  {-# LINE 118 "./TypeChecking/Dml.ag" #-}-                  []-                  {-# LINE 8952 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 8957 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 8962 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 8967 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 8972 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetErrors)))--- SetValue -----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative SetId:-         child ann            : {Annotation}-         child string         : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative SetNum:-         child ann            : {Annotation}-         child double         : {Double}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative SetStr:-         child ann            : {Annotation}-         child string         : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data SetValue  = SetId (Annotation) (String) -               | SetNum (Annotation) (Double) -               | SetStr (Annotation) (String) -               deriving ( Data,Eq,Show,Typeable)--- cata-sem_SetValue :: SetValue  ->-                T_SetValue -sem_SetValue (SetId _ann _string )  =-    (sem_SetValue_SetId _ann _string )-sem_SetValue (SetNum _ann _double )  =-    (sem_SetValue_SetNum _ann _double )-sem_SetValue (SetStr _ann _string )  =-    (sem_SetValue_SetStr _ann _string )--- semantic domain-type T_SetValue  = Environment ->-                   LocalIdentifierBindings ->-                   ( SetValue,SetValue)-data Inh_SetValue  = Inh_SetValue {env_Inh_SetValue :: Environment,lib_Inh_SetValue :: LocalIdentifierBindings}-data Syn_SetValue  = Syn_SetValue {annotatedTree_Syn_SetValue :: SetValue,originalTree_Syn_SetValue :: SetValue}-wrap_SetValue :: T_SetValue  ->-                 Inh_SetValue  ->-                 Syn_SetValue -wrap_SetValue sem (Inh_SetValue _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_SetValue _lhsOannotatedTree _lhsOoriginalTree ))-sem_SetValue_SetId :: Annotation ->-                      String ->-                      T_SetValue -sem_SetValue_SetId ann_ string_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: SetValue-              _lhsOoriginalTree :: SetValue-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SetId ann_ string_-                  {-# LINE 9041 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SetId ann_ string_-                  {-# LINE 9046 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 9051 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 9056 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_SetValue_SetNum :: Annotation ->-                       Double ->-                       T_SetValue -sem_SetValue_SetNum ann_ double_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: SetValue-              _lhsOoriginalTree :: SetValue-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SetNum ann_ double_-                  {-# LINE 9070 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SetNum ann_ double_-                  {-# LINE 9075 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 9080 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 9085 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_SetValue_SetStr :: Annotation ->-                       String ->-                       T_SetValue -sem_SetValue_SetStr ann_ string_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: SetValue-              _lhsOoriginalTree :: SetValue-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SetStr ann_ string_-                  {-# LINE 9099 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SetStr ann_ string_-                  {-# LINE 9104 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 9109 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 9114 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- Statement ----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         inProducedEnv        : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         envUpdates           : [EnvironmentUpdate]-         libUpdates           : [LocalIdentifierBindingsUpdate]-         originalTree         : SELF -   alternatives:-      alternative AlterSequence:-         child ann            : {Annotation}-         child name           : {String}-         child ownedBy        : {String}-         visit 0:-            local libUpdates  : _-            local annotatedTree : _-            local originalTree : _-      alternative AlterTable:-         child ann            : {Annotation}-         child name           : {String}-         child actions        : {[AlterTableAction]}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Assignment:-         child ann            : {Annotation}-         child target         : {String}-         child value          : Expression -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local backTree    : _-            local envUpdates  : {[EnvironmentUpdate]}-            local statementType : _-            local annotatedTree : _-            local originalTree : _-      alternative CaseStatement:-         child ann            : {Annotation}-         child val            : Expression -         child cases          : ExpressionListStatementListPairList -         child els            : StatementList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative ContinueStatement:-         child ann            : {Annotation}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Copy:-         child ann            : {Annotation}-         child table          : {String}-         child targetCols     : StringList -         child source         : CopySource -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative CopyData:-         child ann            : {Annotation}-         child insData        : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative CreateDomain:-         child ann            : {Annotation}-         child name           : {String}-         child typ            : TypeName -         child checkName      : {String}-         child check          : MaybeBoolExpression -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local backTree    : _-            local statementType : _-            local envUpdates  : {[EnvironmentUpdate]}-            local annotatedTree : _-            local originalTree : _-      alternative CreateFunction:-         child ann            : {Annotation}-         child name           : {String}-         child params         : ParamDefList -         child rettype        : TypeName -         child lang           : Language -         child bodyQuote      : {String}-         child body           : FnBody -         child vol            : Volatility -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local envUpdates  : {[EnvironmentUpdate]}-            local parameterTypes : _-            local backTree    : _-            local statementType : _-            local annotatedTree : _-            local originalTree : _-      alternative CreateLanguage:-         child ann            : {Annotation}-         child name           : {String}-         visit 0:-            local libUpdates  : _-            local annotatedTree : _-            local originalTree : _-      alternative CreateSequence:-         child ann            : {Annotation}-         child name           : {String}-         child incr           : {Integer}-         child min            : {Integer}-         child max            : {Integer}-         child start          : {Integer}-         child cache          : {Integer}-         visit 0:-            local libUpdates  : _-            local annotatedTree : _-            local originalTree : _-      alternative CreateTable:-         child ann            : {Annotation}-         child name           : {String}-         child atts           : AttributeDefList -         child cons           : ConstraintList -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local envUpdates  : {[EnvironmentUpdate]}-            local attrTypes   : {[Type]}-            local statementType : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative CreateTableAs:-         child ann            : {Annotation}-         child name           : {String}-         child expr           : SelectExpression -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local envUpdates  : {[EnvironmentUpdate]}-            local selType     : _-            local attrs       : _-            local backTree    : _-            local statementType : _-            local annotatedTree : _-            local originalTree : _-      alternative CreateTrigger:-         child ann            : {Annotation}-         child name           : {String}-         child wh             : TriggerWhen -         child events         : {[TriggerEvent]}-         child tbl            : {String}-         child firing         : TriggerFire -         child fnName         : {String}-         child fnArgs         : {[Expression]}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative CreateType:-         child ann            : {Annotation}-         child name           : {String}-         child atts           : TypeAttributeDefList -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local backTree    : _-            local statementType : _-            local envUpdates  : {[EnvironmentUpdate]}-            local annotatedTree : _-            local originalTree : _-      alternative CreateView:-         child ann            : {Annotation}-         child name           : {String}-         child expr           : SelectExpression -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local backTree    : _-            local attrs       : _-            local envUpdates  : {[EnvironmentUpdate]}-            local statementType : _-            local annotatedTree : _-            local originalTree : _-      alternative Delete:-         child ann            : {Annotation}-         child table          : {String}-         child whr            : MaybeBoolExpression -         child returning      : MaybeSelectList -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local statementType : _-            local backTree    : _-            local envUpdates  : {[EnvironmentUpdate]}-            local lib         : _-            local annotatedTree : _-            local originalTree : _-      alternative DropFunction:-         child ann            : {Annotation}-         child ifE            : IfExists -         child sigs           : StringTypeNameListPairList -         child cascade        : Cascade -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local backTree    : _-            local envUpdates  : {[EnvironmentUpdate]}-            local statementType : _-            local annotatedTree : _-            local originalTree : _-      alternative DropSomething:-         child ann            : {Annotation}-         child dropType       : DropType -         child ifE            : IfExists -         child names          : StringList -         child cascade        : Cascade -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Execute:-         child ann            : {Annotation}-         child expr           : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative ExecuteInto:-         child ann            : {Annotation}-         child expr           : Expression -         child targets        : StringList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative ForIntegerStatement:-         child ann            : {Annotation}-         child var            : {String}-         child from           : Expression -         child to             : Expression -         child sts            : StatementList -         visit 0:-            local libUpdates  : _-            local varTypeE    : _-            local tpe         : {Either [TypeError] Type}-            local backTree    : _-            local envUpdates  : {[EnvironmentUpdate]}-            local statementType : _-            local annotatedTree : _-            local originalTree : _-      alternative ForSelectStatement:-         child ann            : {Annotation}-         child var            : {String}-         child sel            : SelectExpression -         child sts            : StatementList -         visit 0:-            local libUpdates  : _-            local selType     : _-            local tpe         : {Either [TypeError] Type}-            local backTree    : _-            local envUpdates  : {[EnvironmentUpdate]}-            local statementType : _-            local annotatedTree : _-            local originalTree : _-      alternative If:-         child ann            : {Annotation}-         child cases          : ExpressionStatementListPairList -         child els            : StatementList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Insert:-         child ann            : {Annotation}-         child table          : {String}-         child targetCols     : StringList -         child insData        : SelectExpression -         child returning      : MaybeSelectList -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local statementType : _-            local columnTypes : _-            local backTree    : _-            local envUpdates  : {[EnvironmentUpdate]}-            local annotatedTree : _-            local originalTree : _-      alternative Notify:-         child ann            : {Annotation}-         child name           : {String}-         visit 0:-            local libUpdates  : _-            local annotatedTree : _-            local originalTree : _-      alternative NullStatement:-         child ann            : {Annotation}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Perform:-         child ann            : {Annotation}-         child expr           : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Raise:-         child ann            : {Annotation}-         child level          : RaiseType -         child message        : {String}-         child args           : ExpressionList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Return:-         child ann            : {Annotation}-         child value          : MaybeExpression -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local backTree    : _-            local envUpdates  : {[EnvironmentUpdate]}-            local statementType : _-            local annotatedTree : _-            local originalTree : _-      alternative ReturnNext:-         child ann            : {Annotation}-         child expr           : Expression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative ReturnQuery:-         child ann            : {Annotation}-         child sel            : SelectExpression -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative SelectStatement:-         child ann            : {Annotation}-         child ex             : SelectExpression -         visit 0:-            local tpe         : {Either [TypeError] Type}-            local statementType : _-            local backTree    : _-            local envUpdates  : {[EnvironmentUpdate]}-            local libUpdates  : _-            local annotatedTree : _-            local originalTree : _-      alternative Set:-         child ann            : {Annotation}-         child name           : {String}-         child values         : {[SetValue]}-         visit 0:-            local libUpdates  : _-            local annotatedTree : _-            local originalTree : _-      alternative Truncate:-         child ann            : {Annotation}-         child tables         : StringList -         child restartIdentity : RestartIdentity -         child cascade        : Cascade -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Update:-         child ann            : {Annotation}-         child table          : {String}-         child assigns        : SetClauseList -         child whr            : MaybeBoolExpression -         child returning      : MaybeSelectList -         visit 0:-            local libUpdates  : _-            local tpe         : {Either [TypeError] Type}-            local statementType : _-            local columnTypes : _-            local backTree    : _-            local envUpdates  : {[EnvironmentUpdate]}-            local lib         : _-            local annotatedTree : _-            local originalTree : _-      alternative WhileStatement:-         child ann            : {Annotation}-         child expr           : Expression -         child sts            : StatementList -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data Statement  = AlterSequence (Annotation) (String) (String) -                | AlterTable (Annotation) (String) ([AlterTableAction]) -                | Assignment (Annotation) (String) (Expression) -                | CaseStatement (Annotation) (Expression) (ExpressionListStatementListPairList) (StatementList) -                | ContinueStatement (Annotation) -                | Copy (Annotation) (String) (StringList) (CopySource) -                | CopyData (Annotation) (String) -                | CreateDomain (Annotation) (String) (TypeName) (String) (MaybeBoolExpression) -                | CreateFunction (Annotation) (String) (ParamDefList) (TypeName) (Language) (String) (FnBody) (Volatility) -                | CreateLanguage (Annotation) (String) -                | CreateSequence (Annotation) (String) (Integer) (Integer) (Integer) (Integer) (Integer) -                | CreateTable (Annotation) (String) (AttributeDefList) (ConstraintList) -                | CreateTableAs (Annotation) (String) (SelectExpression) -                | CreateTrigger (Annotation) (String) (TriggerWhen) ([TriggerEvent]) (String) (TriggerFire) (String) ([Expression]) -                | CreateType (Annotation) (String) (TypeAttributeDefList) -                | CreateView (Annotation) (String) (SelectExpression) -                | Delete (Annotation) (String) (MaybeBoolExpression) (MaybeSelectList) -                | DropFunction (Annotation) (IfExists) (StringTypeNameListPairList) (Cascade) -                | DropSomething (Annotation) (DropType) (IfExists) (StringList) (Cascade) -                | Execute (Annotation) (Expression) -                | ExecuteInto (Annotation) (Expression) (StringList) -                | ForIntegerStatement (Annotation) (String) (Expression) (Expression) (StatementList) -                | ForSelectStatement (Annotation) (String) (SelectExpression) (StatementList) -                | If (Annotation) (ExpressionStatementListPairList) (StatementList) -                | Insert (Annotation) (String) (StringList) (SelectExpression) (MaybeSelectList) -                | Notify (Annotation) (String) -                | NullStatement (Annotation) -                | Perform (Annotation) (Expression) -                | Raise (Annotation) (RaiseType) (String) (ExpressionList) -                | Return (Annotation) (MaybeExpression) -                | ReturnNext (Annotation) (Expression) -                | ReturnQuery (Annotation) (SelectExpression) -                | SelectStatement (Annotation) (SelectExpression) -                | Set (Annotation) (String) ([SetValue]) -                | Truncate (Annotation) (StringList) (RestartIdentity) (Cascade) -                | Update (Annotation) (String) (SetClauseList) (MaybeBoolExpression) (MaybeSelectList) -                | WhileStatement (Annotation) (Expression) (StatementList) -                deriving ( Data,Eq,Show,Typeable)--- cata-sem_Statement :: Statement  ->-                 T_Statement -sem_Statement (AlterSequence _ann _name _ownedBy )  =-    (sem_Statement_AlterSequence _ann _name _ownedBy )-sem_Statement (AlterTable _ann _name _actions )  =-    (sem_Statement_AlterTable _ann _name _actions )-sem_Statement (Assignment _ann _target _value )  =-    (sem_Statement_Assignment _ann _target (sem_Expression _value ) )-sem_Statement (CaseStatement _ann _val _cases _els )  =-    (sem_Statement_CaseStatement _ann (sem_Expression _val ) (sem_ExpressionListStatementListPairList _cases ) (sem_StatementList _els ) )-sem_Statement (ContinueStatement _ann )  =-    (sem_Statement_ContinueStatement _ann )-sem_Statement (Copy _ann _table _targetCols _source )  =-    (sem_Statement_Copy _ann _table (sem_StringList _targetCols ) (sem_CopySource _source ) )-sem_Statement (CopyData _ann _insData )  =-    (sem_Statement_CopyData _ann _insData )-sem_Statement (CreateDomain _ann _name _typ _checkName _check )  =-    (sem_Statement_CreateDomain _ann _name (sem_TypeName _typ ) _checkName (sem_MaybeBoolExpression _check ) )-sem_Statement (CreateFunction _ann _name _params _rettype _lang _bodyQuote _body _vol )  =-    (sem_Statement_CreateFunction _ann _name (sem_ParamDefList _params ) (sem_TypeName _rettype ) (sem_Language _lang ) _bodyQuote (sem_FnBody _body ) (sem_Volatility _vol ) )-sem_Statement (CreateLanguage _ann _name )  =-    (sem_Statement_CreateLanguage _ann _name )-sem_Statement (CreateSequence _ann _name _incr _min _max _start _cache )  =-    (sem_Statement_CreateSequence _ann _name _incr _min _max _start _cache )-sem_Statement (CreateTable _ann _name _atts _cons )  =-    (sem_Statement_CreateTable _ann _name (sem_AttributeDefList _atts ) (sem_ConstraintList _cons ) )-sem_Statement (CreateTableAs _ann _name _expr )  =-    (sem_Statement_CreateTableAs _ann _name (sem_SelectExpression _expr ) )-sem_Statement (CreateTrigger _ann _name _wh _events _tbl _firing _fnName _fnArgs )  =-    (sem_Statement_CreateTrigger _ann _name (sem_TriggerWhen _wh ) _events _tbl (sem_TriggerFire _firing ) _fnName _fnArgs )-sem_Statement (CreateType _ann _name _atts )  =-    (sem_Statement_CreateType _ann _name (sem_TypeAttributeDefList _atts ) )-sem_Statement (CreateView _ann _name _expr )  =-    (sem_Statement_CreateView _ann _name (sem_SelectExpression _expr ) )-sem_Statement (Delete _ann _table _whr _returning )  =-    (sem_Statement_Delete _ann _table (sem_MaybeBoolExpression _whr ) (sem_MaybeSelectList _returning ) )-sem_Statement (DropFunction _ann _ifE _sigs _cascade )  =-    (sem_Statement_DropFunction _ann (sem_IfExists _ifE ) (sem_StringTypeNameListPairList _sigs ) (sem_Cascade _cascade ) )-sem_Statement (DropSomething _ann _dropType _ifE _names _cascade )  =-    (sem_Statement_DropSomething _ann (sem_DropType _dropType ) (sem_IfExists _ifE ) (sem_StringList _names ) (sem_Cascade _cascade ) )-sem_Statement (Execute _ann _expr )  =-    (sem_Statement_Execute _ann (sem_Expression _expr ) )-sem_Statement (ExecuteInto _ann _expr _targets )  =-    (sem_Statement_ExecuteInto _ann (sem_Expression _expr ) (sem_StringList _targets ) )-sem_Statement (ForIntegerStatement _ann _var _from _to _sts )  =-    (sem_Statement_ForIntegerStatement _ann _var (sem_Expression _from ) (sem_Expression _to ) (sem_StatementList _sts ) )-sem_Statement (ForSelectStatement _ann _var _sel _sts )  =-    (sem_Statement_ForSelectStatement _ann _var (sem_SelectExpression _sel ) (sem_StatementList _sts ) )-sem_Statement (If _ann _cases _els )  =-    (sem_Statement_If _ann (sem_ExpressionStatementListPairList _cases ) (sem_StatementList _els ) )-sem_Statement (Insert _ann _table _targetCols _insData _returning )  =-    (sem_Statement_Insert _ann _table (sem_StringList _targetCols ) (sem_SelectExpression _insData ) (sem_MaybeSelectList _returning ) )-sem_Statement (Notify _ann _name )  =-    (sem_Statement_Notify _ann _name )-sem_Statement (NullStatement _ann )  =-    (sem_Statement_NullStatement _ann )-sem_Statement (Perform _ann _expr )  =-    (sem_Statement_Perform _ann (sem_Expression _expr ) )-sem_Statement (Raise _ann _level _message _args )  =-    (sem_Statement_Raise _ann (sem_RaiseType _level ) _message (sem_ExpressionList _args ) )-sem_Statement (Return _ann _value )  =-    (sem_Statement_Return _ann (sem_MaybeExpression _value ) )-sem_Statement (ReturnNext _ann _expr )  =-    (sem_Statement_ReturnNext _ann (sem_Expression _expr ) )-sem_Statement (ReturnQuery _ann _sel )  =-    (sem_Statement_ReturnQuery _ann (sem_SelectExpression _sel ) )-sem_Statement (SelectStatement _ann _ex )  =-    (sem_Statement_SelectStatement _ann (sem_SelectExpression _ex ) )-sem_Statement (Set _ann _name _values )  =-    (sem_Statement_Set _ann _name _values )-sem_Statement (Truncate _ann _tables _restartIdentity _cascade )  =-    (sem_Statement_Truncate _ann (sem_StringList _tables ) (sem_RestartIdentity _restartIdentity ) (sem_Cascade _cascade ) )-sem_Statement (Update _ann _table _assigns _whr _returning )  =-    (sem_Statement_Update _ann _table (sem_SetClauseList _assigns ) (sem_MaybeBoolExpression _whr ) (sem_MaybeSelectList _returning ) )-sem_Statement (WhileStatement _ann _expr _sts )  =-    (sem_Statement_WhileStatement _ann (sem_Expression _expr ) (sem_StatementList _sts ) )--- semantic domain-type T_Statement  = Environment ->-                    Environment ->-                    LocalIdentifierBindings ->-                    ( Statement,([EnvironmentUpdate]),([LocalIdentifierBindingsUpdate]),Statement)-data Inh_Statement  = Inh_Statement {env_Inh_Statement :: Environment,inProducedEnv_Inh_Statement :: Environment,lib_Inh_Statement :: LocalIdentifierBindings}-data Syn_Statement  = Syn_Statement {annotatedTree_Syn_Statement :: Statement,envUpdates_Syn_Statement :: [EnvironmentUpdate],libUpdates_Syn_Statement :: [LocalIdentifierBindingsUpdate],originalTree_Syn_Statement :: Statement}-wrap_Statement :: T_Statement  ->-                  Inh_Statement  ->-                  Syn_Statement -wrap_Statement sem (Inh_Statement _lhsIenv _lhsIinProducedEnv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIinProducedEnv _lhsIlib )-     in  (Syn_Statement _lhsOannotatedTree _lhsOenvUpdates _lhsOlibUpdates _lhsOoriginalTree ))-sem_Statement_AlterSequence :: Annotation ->-                               String ->-                               String ->-                               T_Statement -sem_Statement_AlterSequence ann_ name_ ownedBy_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9644 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9649 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9654 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  AlterSequence ann_ name_ ownedBy_-                  {-# LINE 9659 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  AlterSequence ann_ name_ ownedBy_-                  {-# LINE 9664 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 9669 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 9674 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_AlterTable :: Annotation ->-                            String ->-                            ([AlterTableAction]) ->-                            T_Statement -sem_Statement_AlterTable ann_ name_ actions_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9692 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9697 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  AlterTable ann_ name_ actions_-                  {-# LINE 9702 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  AlterTable ann_ name_ actions_-                  {-# LINE 9707 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 9712 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 9717 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Assignment :: Annotation ->-                            String ->-                            T_Expression  ->-                            T_Statement -sem_Statement_Assignment ann_ target_ value_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _lhsOoriginalTree :: Statement-              _valueOenv :: Environment-              _valueOlib :: LocalIdentifierBindings-              _valueIannotatedTree :: Expression-              _valueIliftedColumnName :: String-              _valueIoriginalTree :: Expression-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 9746 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 9751 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 9756 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9761 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 23, column 9)-              _tpe =-                  {-# LINE 23 "./TypeChecking/Plpgsql.ag" #-}-                  do-                  let fromType = getTypeAnnotation _valueIannotatedTree-                  toType <- libLookupID _lhsIlib target_-                  dependsOnRTpe [getTypeAnnotation _valueIannotatedTree, toType] $ do-                  checkAssignmentValid _lhsIenv fromType toType-                  return $ Pseudo Void-                  {-# LINE 9771 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 30, column 9)-              _backTree =-                  {-# LINE 30 "./TypeChecking/Plpgsql.ag" #-}-                  Assignment ann_ target_ _valueIannotatedTree-                  {-# LINE 9776 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 31, column 9)-              _envUpdates =-                  {-# LINE 31 "./TypeChecking/Plpgsql.ag" #-}-                  []-                  {-# LINE 9781 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 32, column 9)-              _statementType =-                  {-# LINE 32 "./TypeChecking/Plpgsql.ag" #-}-                  []-                  {-# LINE 9786 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Assignment ann_ target_ _valueIannotatedTree-                  {-# LINE 9791 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Assignment ann_ target_ _valueIoriginalTree-                  {-# LINE 9796 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 9801 "AstInternal.hs" #-}-              -- copy rule (down)-              _valueOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 9806 "AstInternal.hs" #-}-              -- copy rule (down)-              _valueOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 9811 "AstInternal.hs" #-}-              ( _valueIannotatedTree,_valueIliftedColumnName,_valueIoriginalTree) =-                  (value_ _valueOenv _valueOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CaseStatement :: Annotation ->-                               T_Expression  ->-                               T_ExpressionListStatementListPairList  ->-                               T_StatementList  ->-                               T_Statement -sem_Statement_CaseStatement ann_ val_ cases_ els_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _elsOenvUpdates :: ([EnvironmentUpdate])-              _elsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _valOenv :: Environment-              _valOlib :: LocalIdentifierBindings-              _casesOenv :: Environment-              _casesOlib :: LocalIdentifierBindings-              _elsOenv :: Environment-              _elsOlib :: LocalIdentifierBindings-              _valIannotatedTree :: Expression-              _valIliftedColumnName :: String-              _valIoriginalTree :: Expression-              _casesIannotatedTree :: ExpressionListStatementListPairList-              _casesIoriginalTree :: ExpressionListStatementListPairList-              _elsIannotatedTree :: StatementList-              _elsIoriginalTree :: StatementList-              _elsIproducedEnv :: Environment-              _elsIproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9849 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9854 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 106, column 9)-              _elsOenvUpdates =-                  {-# LINE 106 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9859 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 107, column 9)-              _elsOlibUpdates =-                  {-# LINE 107 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9864 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CaseStatement ann_ _valIannotatedTree _casesIannotatedTree _elsIannotatedTree-                  {-# LINE 9869 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CaseStatement ann_ _valIoriginalTree _casesIoriginalTree _elsIoriginalTree-                  {-# LINE 9874 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 9879 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 9884 "AstInternal.hs" #-}-              -- copy rule (down)-              _valOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 9889 "AstInternal.hs" #-}-              -- copy rule (down)-              _valOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 9894 "AstInternal.hs" #-}-              -- copy rule (down)-              _casesOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 9899 "AstInternal.hs" #-}-              -- copy rule (down)-              _casesOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 9904 "AstInternal.hs" #-}-              -- copy rule (down)-              _elsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 9909 "AstInternal.hs" #-}-              -- copy rule (down)-              _elsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 9914 "AstInternal.hs" #-}-              ( _valIannotatedTree,_valIliftedColumnName,_valIoriginalTree) =-                  (val_ _valOenv _valOlib )-              ( _casesIannotatedTree,_casesIoriginalTree) =-                  (cases_ _casesOenv _casesOlib )-              ( _elsIannotatedTree,_elsIoriginalTree,_elsIproducedEnv,_elsIproducedLib) =-                  (els_ _elsOenv _elsOenvUpdates _elsOlib _elsOlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_ContinueStatement :: Annotation ->-                                   T_Statement -sem_Statement_ContinueStatement ann_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9936 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9941 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ContinueStatement ann_-                  {-# LINE 9946 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ContinueStatement ann_-                  {-# LINE 9951 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 9956 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 9961 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Copy :: Annotation ->-                      String ->-                      T_StringList  ->-                      T_CopySource  ->-                      T_Statement -sem_Statement_Copy ann_ table_ targetCols_ source_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _targetColsOenv :: Environment-              _targetColsOlib :: LocalIdentifierBindings-              _sourceOenv :: Environment-              _sourceOlib :: LocalIdentifierBindings-              _targetColsIannotatedTree :: StringList-              _targetColsIoriginalTree :: StringList-              _targetColsIstrings :: ([String])-              _sourceIannotatedTree :: CopySource-              _sourceIoriginalTree :: CopySource-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9989 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 9994 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Copy ann_ table_ _targetColsIannotatedTree _sourceIannotatedTree-                  {-# LINE 9999 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Copy ann_ table_ _targetColsIoriginalTree _sourceIoriginalTree-                  {-# LINE 10004 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 10009 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10014 "AstInternal.hs" #-}-              -- copy rule (down)-              _targetColsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10019 "AstInternal.hs" #-}-              -- copy rule (down)-              _targetColsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10024 "AstInternal.hs" #-}-              -- copy rule (down)-              _sourceOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10029 "AstInternal.hs" #-}-              -- copy rule (down)-              _sourceOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10034 "AstInternal.hs" #-}-              ( _targetColsIannotatedTree,_targetColsIoriginalTree,_targetColsIstrings) =-                  (targetCols_ _targetColsOenv _targetColsOlib )-              ( _sourceIannotatedTree,_sourceIoriginalTree) =-                  (source_ _sourceOenv _sourceOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CopyData :: Annotation ->-                          String ->-                          T_Statement -sem_Statement_CopyData ann_ insData_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10055 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10060 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CopyData ann_ insData_-                  {-# LINE 10065 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CopyData ann_ insData_-                  {-# LINE 10070 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 10075 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10080 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CreateDomain :: Annotation ->-                              String ->-                              T_TypeName  ->-                              String ->-                              T_MaybeBoolExpression  ->-                              T_Statement -sem_Statement_CreateDomain ann_ name_ typ_ checkName_ check_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _checkOlib :: LocalIdentifierBindings-              _lhsOoriginalTree :: Statement-              _typOenv :: Environment-              _typOlib :: LocalIdentifierBindings-              _checkOenv :: Environment-              _typIannotatedTree :: TypeName-              _typInamedType :: Type-              _typIoriginalTree :: TypeName-              _checkIannotatedTree :: MaybeBoolExpression-              _checkIoriginalTree :: MaybeBoolExpression-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 10115 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 10120 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 10125 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10130 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 64, column 9)-              _tpe =-                  {-# LINE 64 "./TypeChecking/MiscCreates.ag" #-}-                  Right $ Pseudo Void-                  {-# LINE 10135 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 65, column 9)-              _backTree =-                  {-# LINE 65 "./TypeChecking/MiscCreates.ag" #-}-                  CreateDomain ann_ name_ _typIannotatedTree checkName_ _checkIannotatedTree-                  {-# LINE 10140 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 66, column 9)-              _statementType =-                  {-# LINE 66 "./TypeChecking/MiscCreates.ag" #-}-                  []-                  {-# LINE 10145 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 67, column 9)-              _envUpdates =-                  {-# LINE 67 "./TypeChecking/MiscCreates.ag" #-}-                  [EnvCreateDomain (DomainType name_) _typInamedType]-                  {-# LINE 10150 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 69, column 9)-              _checkOlib =-                  {-# LINE 69 "./TypeChecking/MiscCreates.ag" #-}-                  fromRight _lhsIlib $-                  updateBindings _lhsIlib _lhsIenv-                    [LibStackIDs [("", [("value", _typInamedType)])]]-                  {-# LINE 10157 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CreateDomain ann_ name_ _typIannotatedTree checkName_ _checkIannotatedTree-                  {-# LINE 10162 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CreateDomain ann_ name_ _typIoriginalTree checkName_ _checkIoriginalTree-                  {-# LINE 10167 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10172 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10177 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10182 "AstInternal.hs" #-}-              -- copy rule (down)-              _checkOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10187 "AstInternal.hs" #-}-              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =-                  (typ_ _typOenv _typOlib )-              ( _checkIannotatedTree,_checkIoriginalTree) =-                  (check_ _checkOenv _checkOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CreateFunction :: Annotation ->-                                String ->-                                T_ParamDefList  ->-                                T_TypeName  ->-                                T_Language  ->-                                String ->-                                T_FnBody  ->-                                T_Volatility  ->-                                T_Statement -sem_Statement_CreateFunction ann_ name_ params_ rettype_ lang_ bodyQuote_ body_ vol_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _bodyOenv :: Environment-              _bodyOlib :: LocalIdentifierBindings-              _lhsOoriginalTree :: Statement-              _paramsOenv :: Environment-              _paramsOlib :: LocalIdentifierBindings-              _rettypeOenv :: Environment-              _rettypeOlib :: LocalIdentifierBindings-              _langOenv :: Environment-              _langOlib :: LocalIdentifierBindings-              _volOenv :: Environment-              _volOlib :: LocalIdentifierBindings-              _paramsIannotatedTree :: ParamDefList-              _paramsIoriginalTree :: ParamDefList-              _paramsIparams :: ([(String, Type)])-              _rettypeIannotatedTree :: TypeName-              _rettypeInamedType :: Type-              _rettypeIoriginalTree :: TypeName-              _langIannotatedTree :: Language-              _langIoriginalTree :: Language-              _bodyIannotatedTree :: FnBody-              _bodyIoriginalTree :: FnBody-              _volIannotatedTree :: Volatility-              _volIoriginalTree :: Volatility-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 10242 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 10247 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 10252 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10257 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 23, column 9)-              _tpe =-                  {-# LINE 23 "./TypeChecking/CreateFunction.ag" #-}-                  dependsOnRTpe-                    (_rettypeInamedType : _parameterTypes    ) $-                    Right $ Pseudo Void-                  {-# LINE 10264 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 26, column 9)-              _envUpdates =-                  {-# LINE 26 "./TypeChecking/CreateFunction.ag" #-}-                  dependsOn [tpeToT _tpe    ] []-                            [EnvCreateFunction FunName-                                               (map toLower name_)-                                               _parameterTypes-                                               _rettypeInamedType-                                               False]-                  {-# LINE 10274 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 32, column 9)-              _parameterTypes =-                  {-# LINE 32 "./TypeChecking/CreateFunction.ag" #-}-                  (map snd _paramsIparams)-                  {-# LINE 10279 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 34, column 9)-              _backTree =-                  {-# LINE 34 "./TypeChecking/CreateFunction.ag" #-}-                  CreateFunction ann_-                                 name_-                                 _paramsIannotatedTree-                                 _rettypeIannotatedTree-                                 _langIannotatedTree-                                 bodyQuote_-                                 _bodyIannotatedTree-                                 _volIannotatedTree-                  {-# LINE 10291 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 42, column 9)-              _statementType =-                  {-# LINE 42 "./TypeChecking/CreateFunction.ag" #-}-                  []-                  {-# LINE 10296 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 43, column 9)-              _bodyOenv =-                  {-# LINE 43 "./TypeChecking/CreateFunction.ag" #-}-                  _lhsIinProducedEnv-                  {-# LINE 10301 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateFunction.ag"(line 99, column 9)-              _bodyOlib =-                  {-# LINE 99 "./TypeChecking/CreateFunction.ag" #-}-                  let p = _paramsIparams-                          ++ (zip posNames $ map snd _paramsIparams)-                  in fromRight _lhsIlib $-                     updateBindings _lhsIlib _lhsIenv-                                    [LibStackIDs [("", p)-                                                 ,(name_, _paramsIparams)]]-                  where-                    posNames :: [String]-                    posNames = map (\l -> '$':show l) [1..]-                  {-# LINE 10314 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CreateFunction ann_ name_ _paramsIannotatedTree _rettypeIannotatedTree _langIannotatedTree bodyQuote_ _bodyIannotatedTree _volIannotatedTree-                  {-# LINE 10319 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CreateFunction ann_ name_ _paramsIoriginalTree _rettypeIoriginalTree _langIoriginalTree bodyQuote_ _bodyIoriginalTree _volIoriginalTree-                  {-# LINE 10324 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10329 "AstInternal.hs" #-}-              -- copy rule (down)-              _paramsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10334 "AstInternal.hs" #-}-              -- copy rule (down)-              _paramsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10339 "AstInternal.hs" #-}-              -- copy rule (down)-              _rettypeOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10344 "AstInternal.hs" #-}-              -- copy rule (down)-              _rettypeOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10349 "AstInternal.hs" #-}-              -- copy rule (down)-              _langOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10354 "AstInternal.hs" #-}-              -- copy rule (down)-              _langOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10359 "AstInternal.hs" #-}-              -- copy rule (down)-              _volOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10364 "AstInternal.hs" #-}-              -- copy rule (down)-              _volOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10369 "AstInternal.hs" #-}-              ( _paramsIannotatedTree,_paramsIoriginalTree,_paramsIparams) =-                  (params_ _paramsOenv _paramsOlib )-              ( _rettypeIannotatedTree,_rettypeInamedType,_rettypeIoriginalTree) =-                  (rettype_ _rettypeOenv _rettypeOlib )-              ( _langIannotatedTree,_langIoriginalTree) =-                  (lang_ _langOenv _langOlib )-              ( _bodyIannotatedTree,_bodyIoriginalTree) =-                  (body_ _bodyOenv _bodyOlib )-              ( _volIannotatedTree,_volIoriginalTree) =-                  (vol_ _volOenv _volOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CreateLanguage :: Annotation ->-                                String ->-                                T_Statement -sem_Statement_CreateLanguage ann_ name_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10396 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10401 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10406 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CreateLanguage ann_ name_-                  {-# LINE 10411 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CreateLanguage ann_ name_-                  {-# LINE 10416 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 10421 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10426 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CreateSequence :: Annotation ->-                                String ->-                                Integer ->-                                Integer ->-                                Integer ->-                                Integer ->-                                Integer ->-                                T_Statement -sem_Statement_CreateSequence ann_ name_ incr_ min_ max_ start_ cache_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10448 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10453 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10458 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CreateSequence ann_ name_ incr_ min_ max_ start_ cache_-                  {-# LINE 10463 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CreateSequence ann_ name_ incr_ min_ max_ start_ cache_-                  {-# LINE 10468 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 10473 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10478 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CreateTable :: Annotation ->-                             String ->-                             T_AttributeDefList  ->-                             T_ConstraintList  ->-                             T_Statement -sem_Statement_CreateTable ann_ name_ atts_ cons_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _attrTypes :: ([Type])-              _consOlib :: LocalIdentifierBindings-              _lhsOoriginalTree :: Statement-              _attsOenv :: Environment-              _attsOlib :: LocalIdentifierBindings-              _consOenv :: Environment-              _attsIannotatedTree :: AttributeDefList-              _attsIattrs :: ([(String, Type)])-              _attsIoriginalTree :: AttributeDefList-              _consIannotatedTree :: ConstraintList-              _consIoriginalTree :: ConstraintList-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 10513 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 10518 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 10523 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10528 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 25, column 9)-              _tpe =-                  {-# LINE 25 "./TypeChecking/CreateTable.ag" #-}-                  dependsOnRTpe _attrTypes     $ Right $ Pseudo Void-                  {-# LINE 10533 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 26, column 9)-              _envUpdates =-                  {-# LINE 26 "./TypeChecking/CreateTable.ag" #-}-                  dependsOn _attrTypes     []-                    [EnvCreateTable name_ _attsIattrs defaultSystemColumns]-                  {-# LINE 10539 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 29, column 9)-              _attrTypes =-                  {-# LINE 29 "./TypeChecking/CreateTable.ag" #-}-                  map snd _attsIattrs-                  {-# LINE 10544 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 31, column 9)-              _statementType =-                  {-# LINE 31 "./TypeChecking/CreateTable.ag" #-}-                  []-                  {-# LINE 10549 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 32, column 9)-              _backTree =-                  {-# LINE 32 "./TypeChecking/CreateTable.ag" #-}-                  CreateTable ann_-                              name_-                              _attsIannotatedTree-                              _consIannotatedTree-                  {-# LINE 10557 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 36, column 9)-              _consOlib =-                  {-# LINE 36 "./TypeChecking/CreateTable.ag" #-}-                  case updateBindings _lhsIlib _lhsIenv-                    [LibStackIDs [("", _attsIattrs)]] of-                     Left x -> error $ show x-                     Right e -> e-                  {-# LINE 10565 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CreateTable ann_ name_ _attsIannotatedTree _consIannotatedTree-                  {-# LINE 10570 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CreateTable ann_ name_ _attsIoriginalTree _consIoriginalTree-                  {-# LINE 10575 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10580 "AstInternal.hs" #-}-              -- copy rule (down)-              _attsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10585 "AstInternal.hs" #-}-              -- copy rule (down)-              _attsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10590 "AstInternal.hs" #-}-              -- copy rule (down)-              _consOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10595 "AstInternal.hs" #-}-              ( _attsIannotatedTree,_attsIattrs,_attsIoriginalTree) =-                  (atts_ _attsOenv _attsOlib )-              ( _consIannotatedTree,_consIoriginalTree) =-                  (cons_ _consOenv _consOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CreateTableAs :: Annotation ->-                               String ->-                               T_SelectExpression  ->-                               T_Statement -sem_Statement_CreateTableAs ann_ name_ expr_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _lhsOoriginalTree :: Statement-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: SelectExpression-              _exprIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _exprIoriginalTree :: SelectExpression-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 10628 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 10633 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 10638 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10643 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 53, column 9)-              _tpe =-                  {-# LINE 53 "./TypeChecking/CreateTable.ag" #-}-                  dependsOnRTpe [_selType    ] $ do-                    _attrs-                    Right _selType-                  {-# LINE 10650 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 57, column 9)-              _envUpdates =-                  {-# LINE 57 "./TypeChecking/CreateTable.ag" #-}-                  leftToEmpty (\as -> [EnvCreateTable name_ as defaultSystemColumns]) $ do-                     ats <- _attrs-                     return $ dependsOn (tpeToT _tpe     :-                                         (map snd ats)) [] ats-                  {-# LINE 10658 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 63, column 9)-              _selType =-                  {-# LINE 63 "./TypeChecking/CreateTable.ag" #-}-                  getTypeAnnotation _exprIannotatedTree-                  {-# LINE 10663 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 65, column 9)-              _attrs =-                  {-# LINE 65 "./TypeChecking/CreateTable.ag" #-}-                  unwrapSetOfComposite _selType-                  {-# LINE 10668 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 67, column 9)-              _backTree =-                  {-# LINE 67 "./TypeChecking/CreateTable.ag" #-}-                  CreateTableAs ann_ name_ _exprIannotatedTree-                  {-# LINE 10673 "AstInternal.hs" #-}-              -- "./TypeChecking/CreateTable.ag"(line 68, column 9)-              _statementType =-                  {-# LINE 68 "./TypeChecking/CreateTable.ag" #-}-                  []-                  {-# LINE 10678 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CreateTableAs ann_ name_ _exprIannotatedTree-                  {-# LINE 10683 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CreateTableAs ann_ name_ _exprIoriginalTree-                  {-# LINE 10688 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10693 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10698 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10703 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIlibUpdates,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CreateTrigger :: Annotation ->-                               String ->-                               T_TriggerWhen  ->-                               ([TriggerEvent]) ->-                               String ->-                               T_TriggerFire  ->-                               String ->-                               ([Expression]) ->-                               T_Statement -sem_Statement_CreateTrigger ann_ name_ wh_ events_ tbl_ firing_ fnName_ fnArgs_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _whOenv :: Environment-              _whOlib :: LocalIdentifierBindings-              _firingOenv :: Environment-              _firingOlib :: LocalIdentifierBindings-              _whIannotatedTree :: TriggerWhen-              _whIoriginalTree :: TriggerWhen-              _firingIannotatedTree :: TriggerFire-              _firingIoriginalTree :: TriggerFire-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10736 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10741 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CreateTrigger ann_ name_ _whIannotatedTree events_ tbl_ _firingIannotatedTree fnName_ fnArgs_-                  {-# LINE 10746 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CreateTrigger ann_ name_ _whIoriginalTree events_ tbl_ _firingIoriginalTree fnName_ fnArgs_-                  {-# LINE 10751 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 10756 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10761 "AstInternal.hs" #-}-              -- copy rule (down)-              _whOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10766 "AstInternal.hs" #-}-              -- copy rule (down)-              _whOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10771 "AstInternal.hs" #-}-              -- copy rule (down)-              _firingOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10776 "AstInternal.hs" #-}-              -- copy rule (down)-              _firingOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10781 "AstInternal.hs" #-}-              ( _whIannotatedTree,_whIoriginalTree) =-                  (wh_ _whOenv _whOlib )-              ( _firingIannotatedTree,_firingIoriginalTree) =-                  (firing_ _firingOenv _firingOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CreateType :: Annotation ->-                            String ->-                            T_TypeAttributeDefList  ->-                            T_Statement -sem_Statement_CreateType ann_ name_ atts_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _lhsOoriginalTree :: Statement-              _attsOenv :: Environment-              _attsOlib :: LocalIdentifierBindings-              _attsIannotatedTree :: TypeAttributeDefList-              _attsIattrs :: ([(String, Type)])-              _attsIoriginalTree :: TypeAttributeDefList-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 10814 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 10819 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 10824 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10829 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 51, column 9)-              _tpe =-                  {-# LINE 51 "./TypeChecking/MiscCreates.ag" #-}-                  Right $ Pseudo Void-                  {-# LINE 10834 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 52, column 9)-              _backTree =-                  {-# LINE 52 "./TypeChecking/MiscCreates.ag" #-}-                  CreateType ann_ name_ _attsIannotatedTree-                  {-# LINE 10839 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 53, column 9)-              _statementType =-                  {-# LINE 53 "./TypeChecking/MiscCreates.ag" #-}-                  []-                  {-# LINE 10844 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 54, column 9)-              _envUpdates =-                  {-# LINE 54 "./TypeChecking/MiscCreates.ag" #-}-                  [EnvCreateComposite name_ _attsIattrs]-                  {-# LINE 10849 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CreateType ann_ name_ _attsIannotatedTree-                  {-# LINE 10854 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CreateType ann_ name_ _attsIoriginalTree-                  {-# LINE 10859 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10864 "AstInternal.hs" #-}-              -- copy rule (down)-              _attsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10869 "AstInternal.hs" #-}-              -- copy rule (down)-              _attsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10874 "AstInternal.hs" #-}-              ( _attsIannotatedTree,_attsIattrs,_attsIoriginalTree) =-                  (atts_ _attsOenv _attsOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_CreateView :: Annotation ->-                            String ->-                            T_SelectExpression  ->-                            T_Statement -sem_Statement_CreateView ann_ name_ expr_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _lhsOoriginalTree :: Statement-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: SelectExpression-              _exprIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _exprIoriginalTree :: SelectExpression-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 10905 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 10910 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 10915 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 10920 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 15, column 9)-              _tpe =-                  {-# LINE 15 "./TypeChecking/MiscCreates.ag" #-}-                  dependsOnRTpe [getTypeAnnotation _exprIannotatedTree] $-                    Right $ Pseudo Void-                  {-# LINE 10926 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 17, column 9)-              _backTree =-                  {-# LINE 17 "./TypeChecking/MiscCreates.ag" #-}-                  CreateView ann_ name_ _exprIannotatedTree-                  {-# LINE 10931 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 18, column 9)-              _attrs =-                  {-# LINE 18 "./TypeChecking/MiscCreates.ag" #-}-                  case getTypeAnnotation _exprIannotatedTree of-                    SetOfType (CompositeType c) -> c-                    _ -> []-                  {-# LINE 10938 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 21, column 9)-              _envUpdates =-                  {-# LINE 21 "./TypeChecking/MiscCreates.ag" #-}-                  [EnvCreateView name_ _attrs    ]-                  {-# LINE 10943 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 22, column 9)-              _statementType =-                  {-# LINE 22 "./TypeChecking/MiscCreates.ag" #-}-                  []-                  {-# LINE 10948 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  CreateView ann_ name_ _exprIannotatedTree-                  {-# LINE 10953 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  CreateView ann_ name_ _exprIoriginalTree-                  {-# LINE 10958 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 10963 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 10968 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 10973 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIlibUpdates,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Delete :: Annotation ->-                        String ->-                        T_MaybeBoolExpression  ->-                        T_MaybeSelectList  ->-                        T_Statement -sem_Statement_Delete ann_ table_ whr_ returning_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _whrOlib :: LocalIdentifierBindings-              _returningOlib :: LocalIdentifierBindings-              _lhsOoriginalTree :: Statement-              _whrOenv :: Environment-              _returningOenv :: Environment-              _whrIannotatedTree :: MaybeBoolExpression-              _whrIoriginalTree :: MaybeBoolExpression-              _returningIannotatedTree :: MaybeSelectList-              _returningIlistType :: (Maybe [(String,Type)])-              _returningIoriginalTree :: MaybeSelectList-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 11009 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 11014 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 11019 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11024 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 153, column 9)-              _tpe =-                  {-# LINE 153 "./TypeChecking/Dml.ag" #-}-                  checkRelationExists _lhsIenv table_ >>-                  Right (Pseudo Void)-                  {-# LINE 11030 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 156, column 9)-              _statementType =-                  {-# LINE 156 "./TypeChecking/Dml.ag" #-}-                  [StatementType [] (fromMaybe [] _returningIlistType)]-                  {-# LINE 11035 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 158, column 9)-              _backTree =-                  {-# LINE 158 "./TypeChecking/Dml.ag" #-}-                  Delete ann_ table_ _whrIannotatedTree _returningIannotatedTree-                  {-# LINE 11040 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 159, column 9)-              _envUpdates =-                  {-# LINE 159 "./TypeChecking/Dml.ag" #-}-                  []-                  {-# LINE 11045 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 164, column 9)-              _lib =-                  {-# LINE 164 "./TypeChecking/Dml.ag" #-}-                  fromRight _lhsIlib $ do-                  columnTypes <- envCompositeAttrs _lhsIenv relationComposites table_-                  updateBindings _lhsIlib _lhsIenv [LibStackIDs [("", columnTypes)]]-                  {-# LINE 11052 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 168, column 9)-              _whrOlib =-                  {-# LINE 168 "./TypeChecking/Dml.ag" #-}-                  _lib-                  {-# LINE 11057 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 169, column 9)-              _returningOlib =-                  {-# LINE 169 "./TypeChecking/Dml.ag" #-}-                  _lib-                  {-# LINE 11062 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Delete ann_ table_ _whrIannotatedTree _returningIannotatedTree-                  {-# LINE 11067 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Delete ann_ table_ _whrIoriginalTree _returningIoriginalTree-                  {-# LINE 11072 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 11077 "AstInternal.hs" #-}-              -- copy rule (down)-              _whrOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11082 "AstInternal.hs" #-}-              -- copy rule (down)-              _returningOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11087 "AstInternal.hs" #-}-              ( _whrIannotatedTree,_whrIoriginalTree) =-                  (whr_ _whrOenv _whrOlib )-              ( _returningIannotatedTree,_returningIlistType,_returningIoriginalTree) =-                  (returning_ _returningOenv _returningOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_DropFunction :: Annotation ->-                              T_IfExists  ->-                              T_StringTypeNameListPairList  ->-                              T_Cascade  ->-                              T_Statement -sem_Statement_DropFunction ann_ ifE_ sigs_ cascade_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _lhsOoriginalTree :: Statement-              _ifEOenv :: Environment-              _ifEOlib :: LocalIdentifierBindings-              _sigsOenv :: Environment-              _sigsOlib :: LocalIdentifierBindings-              _cascadeOenv :: Environment-              _cascadeOlib :: LocalIdentifierBindings-              _ifEIannotatedTree :: IfExists-              _ifEIoriginalTree :: IfExists-              _sigsIannotatedTree :: StringTypeNameListPairList-              _sigsIfnSigs :: ([(String,[Type])])-              _sigsIoriginalTree :: StringTypeNameListPairList-              _cascadeIannotatedTree :: Cascade-              _cascadeIoriginalTree :: Cascade-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 11129 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 11134 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 11139 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11144 "AstInternal.hs" #-}-              -- "./TypeChecking/Drops.ag"(line 10, column 9)-              _tpe =-                  {-# LINE 10 "./TypeChecking/Drops.ag" #-}-                  Right $ Pseudo Void-                  {-# LINE 11149 "AstInternal.hs" #-}-              -- "./TypeChecking/Drops.ag"(line 11, column 9)-              _backTree =-                  {-# LINE 11 "./TypeChecking/Drops.ag" #-}-                  DropFunction ann_ _ifEIannotatedTree _sigsIannotatedTree _cascadeIannotatedTree-                  {-# LINE 11154 "AstInternal.hs" #-}-              -- "./TypeChecking/Drops.ag"(line 12, column 9)-              _envUpdates =-                  {-# LINE 12 "./TypeChecking/Drops.ag" #-}-                  flip map _sigsIfnSigs $ \(nm,args) ->-                        EnvDropFunction ifE nm args-                  where-                    ifE = _ifEIannotatedTree == IfExists-                  {-# LINE 11162 "AstInternal.hs" #-}-              -- "./TypeChecking/Drops.ag"(line 16, column 9)-              _statementType =-                  {-# LINE 16 "./TypeChecking/Drops.ag" #-}-                  []-                  {-# LINE 11167 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  DropFunction ann_ _ifEIannotatedTree _sigsIannotatedTree _cascadeIannotatedTree-                  {-# LINE 11172 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  DropFunction ann_ _ifEIoriginalTree _sigsIoriginalTree _cascadeIoriginalTree-                  {-# LINE 11177 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 11182 "AstInternal.hs" #-}-              -- copy rule (down)-              _ifEOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11187 "AstInternal.hs" #-}-              -- copy rule (down)-              _ifEOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11192 "AstInternal.hs" #-}-              -- copy rule (down)-              _sigsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11197 "AstInternal.hs" #-}-              -- copy rule (down)-              _sigsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11202 "AstInternal.hs" #-}-              -- copy rule (down)-              _cascadeOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11207 "AstInternal.hs" #-}-              -- copy rule (down)-              _cascadeOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11212 "AstInternal.hs" #-}-              ( _ifEIannotatedTree,_ifEIoriginalTree) =-                  (ifE_ _ifEOenv _ifEOlib )-              ( _sigsIannotatedTree,_sigsIfnSigs,_sigsIoriginalTree) =-                  (sigs_ _sigsOenv _sigsOlib )-              ( _cascadeIannotatedTree,_cascadeIoriginalTree) =-                  (cascade_ _cascadeOenv _cascadeOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_DropSomething :: Annotation ->-                               T_DropType  ->-                               T_IfExists  ->-                               T_StringList  ->-                               T_Cascade  ->-                               T_Statement -sem_Statement_DropSomething ann_ dropType_ ifE_ names_ cascade_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _dropTypeOenv :: Environment-              _dropTypeOlib :: LocalIdentifierBindings-              _ifEOenv :: Environment-              _ifEOlib :: LocalIdentifierBindings-              _namesOenv :: Environment-              _namesOlib :: LocalIdentifierBindings-              _cascadeOenv :: Environment-              _cascadeOlib :: LocalIdentifierBindings-              _dropTypeIannotatedTree :: DropType-              _dropTypeIoriginalTree :: DropType-              _ifEIannotatedTree :: IfExists-              _ifEIoriginalTree :: IfExists-              _namesIannotatedTree :: StringList-              _namesIoriginalTree :: StringList-              _namesIstrings :: ([String])-              _cascadeIannotatedTree :: Cascade-              _cascadeIoriginalTree :: Cascade-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11255 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11260 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  DropSomething ann_ _dropTypeIannotatedTree _ifEIannotatedTree _namesIannotatedTree _cascadeIannotatedTree-                  {-# LINE 11265 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  DropSomething ann_ _dropTypeIoriginalTree _ifEIoriginalTree _namesIoriginalTree _cascadeIoriginalTree-                  {-# LINE 11270 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 11275 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 11280 "AstInternal.hs" #-}-              -- copy rule (down)-              _dropTypeOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11285 "AstInternal.hs" #-}-              -- copy rule (down)-              _dropTypeOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11290 "AstInternal.hs" #-}-              -- copy rule (down)-              _ifEOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11295 "AstInternal.hs" #-}-              -- copy rule (down)-              _ifEOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11300 "AstInternal.hs" #-}-              -- copy rule (down)-              _namesOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11305 "AstInternal.hs" #-}-              -- copy rule (down)-              _namesOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11310 "AstInternal.hs" #-}-              -- copy rule (down)-              _cascadeOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11315 "AstInternal.hs" #-}-              -- copy rule (down)-              _cascadeOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11320 "AstInternal.hs" #-}-              ( _dropTypeIannotatedTree,_dropTypeIoriginalTree) =-                  (dropType_ _dropTypeOenv _dropTypeOlib )-              ( _ifEIannotatedTree,_ifEIoriginalTree) =-                  (ifE_ _ifEOenv _ifEOlib )-              ( _namesIannotatedTree,_namesIoriginalTree,_namesIstrings) =-                  (names_ _namesOenv _namesOlib )-              ( _cascadeIannotatedTree,_cascadeIoriginalTree) =-                  (cascade_ _cascadeOenv _cascadeOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Execute :: Annotation ->-                         T_Expression  ->-                         T_Statement -sem_Statement_Execute ann_ expr_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _exprIoriginalTree :: Expression-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11350 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11355 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Execute ann_ _exprIannotatedTree-                  {-# LINE 11360 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Execute ann_ _exprIoriginalTree-                  {-# LINE 11365 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 11370 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 11375 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11380 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11385 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_ExecuteInto :: Annotation ->-                             T_Expression  ->-                             T_StringList  ->-                             T_Statement -sem_Statement_ExecuteInto ann_ expr_ targets_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _targetsOenv :: Environment-              _targetsOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _exprIoriginalTree :: Expression-              _targetsIannotatedTree :: StringList-              _targetsIoriginalTree :: StringList-              _targetsIstrings :: ([String])-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11415 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11420 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ExecuteInto ann_ _exprIannotatedTree _targetsIannotatedTree-                  {-# LINE 11425 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ExecuteInto ann_ _exprIoriginalTree _targetsIoriginalTree-                  {-# LINE 11430 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 11435 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 11440 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11445 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11450 "AstInternal.hs" #-}-              -- copy rule (down)-              _targetsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11455 "AstInternal.hs" #-}-              -- copy rule (down)-              _targetsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11460 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-              ( _targetsIannotatedTree,_targetsIoriginalTree,_targetsIstrings) =-                  (targets_ _targetsOenv _targetsOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_ForIntegerStatement :: Annotation ->-                                     String ->-                                     T_Expression  ->-                                     T_Expression  ->-                                     T_StatementList  ->-                                     T_Statement -sem_Statement_ForIntegerStatement ann_ var_ from_ to_ sts_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _stsOenvUpdates :: ([EnvironmentUpdate])-              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _stsOlib :: LocalIdentifierBindings-              _envUpdates :: ([EnvironmentUpdate])-              _lhsOoriginalTree :: Statement-              _fromOenv :: Environment-              _fromOlib :: LocalIdentifierBindings-              _toOenv :: Environment-              _toOlib :: LocalIdentifierBindings-              _stsOenv :: Environment-              _fromIannotatedTree :: Expression-              _fromIliftedColumnName :: String-              _fromIoriginalTree :: Expression-              _toIannotatedTree :: Expression-              _toIliftedColumnName :: String-              _toIoriginalTree :: Expression-              _stsIannotatedTree :: StatementList-              _stsIoriginalTree :: StatementList-              _stsIproducedEnv :: Environment-              _stsIproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 11508 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 11513 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 11518 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11523 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 110, column 9)-              _stsOenvUpdates =-                  {-# LINE 110 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11528 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 111, column 9)-              _stsOlibUpdates =-                  {-# LINE 111 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11533 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 36, column 9)-              _varTypeE =-                  {-# LINE 36 "./TypeChecking/Plpgsql.ag" #-}-                  libLookupID _lhsIlib var_-                  {-# LINE 11538 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 37, column 9)-              _tpe =-                  {-# LINE 37 "./TypeChecking/Plpgsql.ag" #-}-                  do-                  let fromType = getTypeAnnotation _fromIannotatedTree-                      toType = getTypeAnnotation _toIannotatedTree-                  dependsOnRTpe [fromType,toType] $ do-                  errorWhen (fromType /= toType) [FromToTypesNotSame fromType toType]-                  case _varTypeE     of-                    Right t -> checkAssignmentValid _lhsIenv fromType t-                    Left _ -> return ()-                  return $ Pseudo Void-                  {-# LINE 11551 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 48, column 9)-              _stsOlib =-                  {-# LINE 48 "./TypeChecking/Plpgsql.ag" #-}-                  case _varTypeE     of-                    Left [UnrecognisedIdentifier var_] ->-                        fromRight _lhsIlib $-                        updateBindings _lhsIlib _lhsIenv-                                       [LibStackIDs [("", [(var_,getTypeAnnotation _fromIannotatedTree)])]]-                    _ -> _lhsIlib-                  {-# LINE 11561 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 56, column 9)-              _backTree =-                  {-# LINE 56 "./TypeChecking/Plpgsql.ag" #-}-                  ForIntegerStatement ann_ var_ _fromIannotatedTree _toIannotatedTree _stsIannotatedTree-                  {-# LINE 11566 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 57, column 9)-              _envUpdates =-                  {-# LINE 57 "./TypeChecking/Plpgsql.ag" #-}-                  []-                  {-# LINE 11571 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 58, column 9)-              _statementType =-                  {-# LINE 58 "./TypeChecking/Plpgsql.ag" #-}-                  []-                  {-# LINE 11576 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ForIntegerStatement ann_ var_ _fromIannotatedTree _toIannotatedTree _stsIannotatedTree-                  {-# LINE 11581 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ForIntegerStatement ann_ var_ _fromIoriginalTree _toIoriginalTree _stsIoriginalTree-                  {-# LINE 11586 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 11591 "AstInternal.hs" #-}-              -- copy rule (down)-              _fromOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11596 "AstInternal.hs" #-}-              -- copy rule (down)-              _fromOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11601 "AstInternal.hs" #-}-              -- copy rule (down)-              _toOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11606 "AstInternal.hs" #-}-              -- copy rule (down)-              _toOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11611 "AstInternal.hs" #-}-              -- copy rule (down)-              _stsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11616 "AstInternal.hs" #-}-              ( _fromIannotatedTree,_fromIliftedColumnName,_fromIoriginalTree) =-                  (from_ _fromOenv _fromOlib )-              ( _toIannotatedTree,_toIliftedColumnName,_toIoriginalTree) =-                  (to_ _toOenv _toOlib )-              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedEnv,_stsIproducedLib) =-                  (sts_ _stsOenv _stsOenvUpdates _stsOlib _stsOlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_ForSelectStatement :: Annotation ->-                                    String ->-                                    T_SelectExpression  ->-                                    T_StatementList  ->-                                    T_Statement -sem_Statement_ForSelectStatement ann_ var_ sel_ sts_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _stsOenvUpdates :: ([EnvironmentUpdate])-              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _stsOlib :: LocalIdentifierBindings-              _envUpdates :: ([EnvironmentUpdate])-              _lhsOoriginalTree :: Statement-              _selOenv :: Environment-              _selOlib :: LocalIdentifierBindings-              _stsOenv :: Environment-              _selIannotatedTree :: SelectExpression-              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _selIoriginalTree :: SelectExpression-              _stsIannotatedTree :: StatementList-              _stsIoriginalTree :: StatementList-              _stsIproducedEnv :: Environment-              _stsIproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 11660 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 11665 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 11670 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11675 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 110, column 9)-              _stsOenvUpdates =-                  {-# LINE 110 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11680 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 111, column 9)-              _stsOlibUpdates =-                  {-# LINE 111 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11685 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 63, column 9)-              _selType =-                  {-# LINE 63 "./TypeChecking/Plpgsql.ag" #-}-                  getTypeAnnotation _selIannotatedTree-                  {-# LINE 11690 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 64, column 9)-              _tpe =-                  {-# LINE 64 "./TypeChecking/Plpgsql.ag" #-}-                  do-                  dependsOnRTpe [_selType    ] $ do-                  toType <- libLookupID _lhsIlib var_-                  dependsOnRTpe [toType] $ do-                  checkAssignmentValid _lhsIenv _selType     toType-                  return $ Pseudo Void-                  {-# LINE 11700 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 75, column 9)-              _stsOlib =-                  {-# LINE 75 "./TypeChecking/Plpgsql.ag" #-}-                  if okToUpdate-                    then fromRight _lhsIlib $-                         updateBindings _lhsIlib _lhsIenv [LibStackIDs [("", [(var_,_selType    )])]]-                    else _lhsIlib-                  where-                    okToUpdate = isRight _tpe     && _selType     /= TypeCheckFailed-                  {-# LINE 11710 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 84, column 9)-              _backTree =-                  {-# LINE 84 "./TypeChecking/Plpgsql.ag" #-}-                  ForSelectStatement ann_ var_ _selIannotatedTree _stsIannotatedTree-                  {-# LINE 11715 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 85, column 9)-              _envUpdates =-                  {-# LINE 85 "./TypeChecking/Plpgsql.ag" #-}-                  []-                  {-# LINE 11720 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 86, column 9)-              _statementType =-                  {-# LINE 86 "./TypeChecking/Plpgsql.ag" #-}-                  []-                  {-# LINE 11725 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ForSelectStatement ann_ var_ _selIannotatedTree _stsIannotatedTree-                  {-# LINE 11730 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ForSelectStatement ann_ var_ _selIoriginalTree _stsIoriginalTree-                  {-# LINE 11735 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 11740 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11745 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11750 "AstInternal.hs" #-}-              -- copy rule (down)-              _stsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11755 "AstInternal.hs" #-}-              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =-                  (sel_ _selOenv _selOlib )-              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedEnv,_stsIproducedLib) =-                  (sts_ _stsOenv _stsOenvUpdates _stsOlib _stsOlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_If :: Annotation ->-                    T_ExpressionStatementListPairList  ->-                    T_StatementList  ->-                    T_Statement -sem_Statement_If ann_ cases_ els_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _elsOenvUpdates :: ([EnvironmentUpdate])-              _elsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _casesOenv :: Environment-              _casesOlib :: LocalIdentifierBindings-              _elsOenv :: Environment-              _elsOlib :: LocalIdentifierBindings-              _casesIannotatedTree :: ExpressionStatementListPairList-              _casesIoriginalTree :: ExpressionStatementListPairList-              _elsIannotatedTree :: StatementList-              _elsIoriginalTree :: StatementList-              _elsIproducedEnv :: Environment-              _elsIproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11789 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11794 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 106, column 9)-              _elsOenvUpdates =-                  {-# LINE 106 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11799 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 107, column 9)-              _elsOlibUpdates =-                  {-# LINE 107 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11804 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  If ann_ _casesIannotatedTree _elsIannotatedTree-                  {-# LINE 11809 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  If ann_ _casesIoriginalTree _elsIoriginalTree-                  {-# LINE 11814 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 11819 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 11824 "AstInternal.hs" #-}-              -- copy rule (down)-              _casesOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11829 "AstInternal.hs" #-}-              -- copy rule (down)-              _casesOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11834 "AstInternal.hs" #-}-              -- copy rule (down)-              _elsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11839 "AstInternal.hs" #-}-              -- copy rule (down)-              _elsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11844 "AstInternal.hs" #-}-              ( _casesIannotatedTree,_casesIoriginalTree) =-                  (cases_ _casesOenv _casesOlib )-              ( _elsIannotatedTree,_elsIoriginalTree,_elsIproducedEnv,_elsIproducedLib) =-                  (els_ _elsOenv _elsOenvUpdates _elsOlib _elsOlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Insert :: Annotation ->-                        String ->-                        T_StringList  ->-                        T_SelectExpression  ->-                        T_MaybeSelectList  ->-                        T_Statement -sem_Statement_Insert ann_ table_ targetCols_ insData_ returning_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _returningOlib :: LocalIdentifierBindings-              _lhsOoriginalTree :: Statement-              _targetColsOenv :: Environment-              _targetColsOlib :: LocalIdentifierBindings-              _insDataOenv :: Environment-              _insDataOlib :: LocalIdentifierBindings-              _returningOenv :: Environment-              _targetColsIannotatedTree :: StringList-              _targetColsIoriginalTree :: StringList-              _targetColsIstrings :: ([String])-              _insDataIannotatedTree :: SelectExpression-              _insDataIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _insDataIoriginalTree :: SelectExpression-              _returningIannotatedTree :: MaybeSelectList-              _returningIlistType :: (Maybe [(String,Type)])-              _returningIoriginalTree :: MaybeSelectList-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 11889 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 11894 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 11899 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 11904 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 18, column 9)-              _tpe =-                  {-# LINE 18 "./TypeChecking/Dml.ag" #-}-                  dependsOnRTpe [getTypeAnnotation _insDataIannotatedTree] $ do-                    _columnTypes-                    Right $ Pseudo Void-                  {-# LINE 11911 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 22, column 9)-              _statementType =-                  {-# LINE 22 "./TypeChecking/Dml.ag" #-}-                  leftToEmpty (\ct -> [StatementType [] (fromMaybe [] _returningIlistType)]) _columnTypes-                  {-# LINE 11916 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 25, column 9)-              _columnTypes =-                  {-# LINE 25 "./TypeChecking/Dml.ag" #-}-                  do-                  tys <- unwrapSetOfComposite $-                         getTypeAnnotation _insDataIannotatedTree-                  checkColumnConsistency _lhsIenv-                                         table_-                                         _targetColsIstrings-                                         tys-                  {-# LINE 11927 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 34, column 9)-              _backTree =-                  {-# LINE 34 "./TypeChecking/Dml.ag" #-}-                  Insert ann_ table_ _targetColsIannotatedTree-                         _insDataIannotatedTree _returningIannotatedTree-                  {-# LINE 11933 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 36, column 9)-              _envUpdates =-                  {-# LINE 36 "./TypeChecking/Dml.ag" #-}-                  []-                  {-# LINE 11938 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 42, column 9)-              _returningOlib =-                  {-# LINE 42 "./TypeChecking/Dml.ag" #-}-                  fromRight _lhsIlib $ do-                    atts <- envCompositeAttrs _lhsIenv relationComposites table_-                    updateBindings _lhsIlib _lhsIenv [LibStackIDs [("", atts)]]-                  {-# LINE 11945 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Insert ann_ table_ _targetColsIannotatedTree _insDataIannotatedTree _returningIannotatedTree-                  {-# LINE 11950 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Insert ann_ table_ _targetColsIoriginalTree _insDataIoriginalTree _returningIoriginalTree-                  {-# LINE 11955 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 11960 "AstInternal.hs" #-}-              -- copy rule (down)-              _targetColsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11965 "AstInternal.hs" #-}-              -- copy rule (down)-              _targetColsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11970 "AstInternal.hs" #-}-              -- copy rule (down)-              _insDataOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11975 "AstInternal.hs" #-}-              -- copy rule (down)-              _insDataOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 11980 "AstInternal.hs" #-}-              -- copy rule (down)-              _returningOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 11985 "AstInternal.hs" #-}-              ( _targetColsIannotatedTree,_targetColsIoriginalTree,_targetColsIstrings) =-                  (targetCols_ _targetColsOenv _targetColsOlib )-              ( _insDataIannotatedTree,_insDataIlibUpdates,_insDataIoriginalTree) =-                  (insData_ _insDataOenv _insDataOlib )-              ( _returningIannotatedTree,_returningIlistType,_returningIoriginalTree) =-                  (returning_ _returningOenv _returningOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Notify :: Annotation ->-                        String ->-                        T_Statement -sem_Statement_Notify ann_ name_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12008 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12013 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12018 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Notify ann_ name_-                  {-# LINE 12023 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Notify ann_ name_-                  {-# LINE 12028 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 12033 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12038 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_NullStatement :: Annotation ->-                               T_Statement -sem_Statement_NullStatement ann_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12054 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12059 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  NullStatement ann_-                  {-# LINE 12064 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  NullStatement ann_-                  {-# LINE 12069 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 12074 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12079 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Perform :: Annotation ->-                         T_Expression  ->-                         T_Statement -sem_Statement_Perform ann_ expr_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _exprIoriginalTree :: Expression-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12101 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12106 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Perform ann_ _exprIannotatedTree-                  {-# LINE 12111 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Perform ann_ _exprIoriginalTree-                  {-# LINE 12116 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 12121 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12126 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12131 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12136 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Raise :: Annotation ->-                       T_RaiseType  ->-                       String ->-                       T_ExpressionList  ->-                       T_Statement -sem_Statement_Raise ann_ level_ message_ args_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _levelOenv :: Environment-              _levelOlib :: LocalIdentifierBindings-              _argsOenv :: Environment-              _argsOlib :: LocalIdentifierBindings-              _levelIannotatedTree :: RaiseType-              _levelIoriginalTree :: RaiseType-              _argsIannotatedTree :: ExpressionList-              _argsIoriginalTree :: ExpressionList-              _argsItypeList :: ([Type])-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12166 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12171 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Raise ann_ _levelIannotatedTree message_ _argsIannotatedTree-                  {-# LINE 12176 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Raise ann_ _levelIoriginalTree message_ _argsIoriginalTree-                  {-# LINE 12181 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 12186 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12191 "AstInternal.hs" #-}-              -- copy rule (down)-              _levelOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12196 "AstInternal.hs" #-}-              -- copy rule (down)-              _levelOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12201 "AstInternal.hs" #-}-              -- copy rule (down)-              _argsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12206 "AstInternal.hs" #-}-              -- copy rule (down)-              _argsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12211 "AstInternal.hs" #-}-              ( _levelIannotatedTree,_levelIoriginalTree) =-                  (level_ _levelOenv _levelOlib )-              ( _argsIannotatedTree,_argsIoriginalTree,_argsItypeList) =-                  (args_ _argsOenv _argsOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Return :: Annotation ->-                        T_MaybeExpression  ->-                        T_Statement -sem_Statement_Return ann_ value_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _lhsOoriginalTree :: Statement-              _valueOenv :: Environment-              _valueOlib :: LocalIdentifierBindings-              _valueIannotatedTree :: MaybeExpression-              _valueIoriginalTree :: MaybeExpression-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 12242 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 12247 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 12252 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12257 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 12, column 9)-              _tpe =-                  {-# LINE 12 "./TypeChecking/Plpgsql.ag" #-}-                  dependsOnRTpe [maybe typeBool-                                      getTypeAnnotation-                                      _valueIannotatedTree] $ Right $ Pseudo Void-                  {-# LINE 12264 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 16, column 9)-              _backTree =-                  {-# LINE 16 "./TypeChecking/Plpgsql.ag" #-}-                  Return ann_ _valueIannotatedTree-                  {-# LINE 12269 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 17, column 9)-              _envUpdates =-                  {-# LINE 17 "./TypeChecking/Plpgsql.ag" #-}-                  []-                  {-# LINE 12274 "AstInternal.hs" #-}-              -- "./TypeChecking/Plpgsql.ag"(line 18, column 9)-              _statementType =-                  {-# LINE 18 "./TypeChecking/Plpgsql.ag" #-}-                  []-                  {-# LINE 12279 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Return ann_ _valueIannotatedTree-                  {-# LINE 12284 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Return ann_ _valueIoriginalTree-                  {-# LINE 12289 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12294 "AstInternal.hs" #-}-              -- copy rule (down)-              _valueOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12299 "AstInternal.hs" #-}-              -- copy rule (down)-              _valueOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12304 "AstInternal.hs" #-}-              ( _valueIannotatedTree,_valueIoriginalTree) =-                  (value_ _valueOenv _valueOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_ReturnNext :: Annotation ->-                            T_Expression  ->-                            T_Statement -sem_Statement_ReturnNext ann_ expr_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _exprIoriginalTree :: Expression-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12328 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12333 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ReturnNext ann_ _exprIannotatedTree-                  {-# LINE 12338 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ReturnNext ann_ _exprIoriginalTree-                  {-# LINE 12343 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 12348 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12353 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12358 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12363 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_ReturnQuery :: Annotation ->-                             T_SelectExpression  ->-                             T_Statement -sem_Statement_ReturnQuery ann_ sel_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _selOenv :: Environment-              _selOlib :: LocalIdentifierBindings-              _selIannotatedTree :: SelectExpression-              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _selIoriginalTree :: SelectExpression-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12387 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12392 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ReturnQuery ann_ _selIannotatedTree-                  {-# LINE 12397 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ReturnQuery ann_ _selIoriginalTree-                  {-# LINE 12402 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 12407 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12412 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12417 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12422 "AstInternal.hs" #-}-              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =-                  (sel_ _selOenv _selOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_SelectStatement :: Annotation ->-                                 T_SelectExpression  ->-                                 T_Statement -sem_Statement_SelectStatement ann_ ex_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _lhsOoriginalTree :: Statement-              _exOenv :: Environment-              _exOlib :: LocalIdentifierBindings-              _exIannotatedTree :: SelectExpression-              _exIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _exIoriginalTree :: SelectExpression-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 12452 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 12457 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 12462 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 14, column 9)-              _tpe =-                  {-# LINE 14 "./TypeChecking/SelectStatement.ag" #-}-                  dependsOnRTpe [getTypeAnnotation _exIannotatedTree] $ Right $ Pseudo Void-                  {-# LINE 12467 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 15, column 9)-              _statementType =-                  {-# LINE 15 "./TypeChecking/SelectStatement.ag" #-}-                  [StatementType ph $ leftToEmpty id  $-                                      unwrapSetOfComposite $-                                      getTypeAnnotation _exIannotatedTree]-                  where-                    ph = flip map (getPlaceholders _exIannotatedTree)-                           $ const $ ScalarType "text"-                  {-# LINE 12477 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 21, column 9)-              _backTree =-                  {-# LINE 21 "./TypeChecking/SelectStatement.ag" #-}-                  SelectStatement ann_ _exIannotatedTree-                  {-# LINE 12482 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectStatement.ag"(line 22, column 9)-              _envUpdates =-                  {-# LINE 22 "./TypeChecking/SelectStatement.ag" #-}-                  []-                  {-# LINE 12487 "AstInternal.hs" #-}-              -- "./TypeChecking/SelectLists.ag"(line 79, column 9)-              _libUpdates =-                  {-# LINE 79 "./TypeChecking/SelectLists.ag" #-}-                  _exIlibUpdates-                  {-# LINE 12492 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SelectStatement ann_ _exIannotatedTree-                  {-# LINE 12497 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SelectStatement ann_ _exIoriginalTree-                  {-# LINE 12502 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12507 "AstInternal.hs" #-}-              -- copy rule (down)-              _exOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12512 "AstInternal.hs" #-}-              -- copy rule (down)-              _exOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12517 "AstInternal.hs" #-}-              ( _exIannotatedTree,_exIlibUpdates,_exIoriginalTree) =-                  (ex_ _exOenv _exOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Set :: Annotation ->-                     String ->-                     ([SetValue]) ->-                     T_Statement -sem_Statement_Set ann_ name_ values_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12537 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12542 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12547 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Set ann_ name_ values_-                  {-# LINE 12552 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Set ann_ name_ values_-                  {-# LINE 12557 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 12562 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12567 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Truncate :: Annotation ->-                          T_StringList  ->-                          T_RestartIdentity  ->-                          T_Cascade  ->-                          T_Statement -sem_Statement_Truncate ann_ tables_ restartIdentity_ cascade_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _tablesOenv :: Environment-              _tablesOlib :: LocalIdentifierBindings-              _restartIdentityOenv :: Environment-              _restartIdentityOlib :: LocalIdentifierBindings-              _cascadeOenv :: Environment-              _cascadeOlib :: LocalIdentifierBindings-              _tablesIannotatedTree :: StringList-              _tablesIoriginalTree :: StringList-              _tablesIstrings :: ([String])-              _restartIdentityIannotatedTree :: RestartIdentity-              _restartIdentityIoriginalTree :: RestartIdentity-              _cascadeIannotatedTree :: Cascade-              _cascadeIoriginalTree :: Cascade-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12599 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12604 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Truncate ann_ _tablesIannotatedTree _restartIdentityIannotatedTree _cascadeIannotatedTree-                  {-# LINE 12609 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Truncate ann_ _tablesIoriginalTree _restartIdentityIoriginalTree _cascadeIoriginalTree-                  {-# LINE 12614 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 12619 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12624 "AstInternal.hs" #-}-              -- copy rule (down)-              _tablesOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12629 "AstInternal.hs" #-}-              -- copy rule (down)-              _tablesOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12634 "AstInternal.hs" #-}-              -- copy rule (down)-              _restartIdentityOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12639 "AstInternal.hs" #-}-              -- copy rule (down)-              _restartIdentityOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12644 "AstInternal.hs" #-}-              -- copy rule (down)-              _cascadeOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12649 "AstInternal.hs" #-}-              -- copy rule (down)-              _cascadeOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12654 "AstInternal.hs" #-}-              ( _tablesIannotatedTree,_tablesIoriginalTree,_tablesIstrings) =-                  (tables_ _tablesOenv _tablesOlib )-              ( _restartIdentityIannotatedTree,_restartIdentityIoriginalTree) =-                  (restartIdentity_ _restartIdentityOenv _restartIdentityOlib )-              ( _cascadeIannotatedTree,_cascadeIoriginalTree) =-                  (cascade_ _cascadeOenv _cascadeOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_Update :: Annotation ->-                        String ->-                        T_SetClauseList  ->-                        T_MaybeBoolExpression  ->-                        T_MaybeSelectList  ->-                        T_Statement -sem_Statement_Update ann_ table_ assigns_ whr_ returning_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Statement-              _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tpe :: (Either [TypeError] Type)-              _envUpdates :: ([EnvironmentUpdate])-              _whrOlib :: LocalIdentifierBindings-              _assignsOlib :: LocalIdentifierBindings-              _returningOlib :: LocalIdentifierBindings-              _lhsOoriginalTree :: Statement-              _assignsOenv :: Environment-              _whrOenv :: Environment-              _returningOenv :: Environment-              _assignsIannotatedTree :: SetClauseList-              _assignsIoriginalTree :: SetClauseList-              _assignsIpairs :: ([(String,Type)])-              _assignsIrowSetErrors :: ([TypeError])-              _whrIannotatedTree :: MaybeBoolExpression-              _whrIoriginalTree :: MaybeBoolExpression-              _returningIannotatedTree :: MaybeSelectList-              _returningIlistType :: (Maybe [(String,Type)])-              _returningIoriginalTree :: MaybeSelectList-              -- "./TypeChecking/Statements.ag"(line 61, column 9)-              _lhsOannotatedTree =-                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}-                  annTypesAndErrors _backTree-                    (tpeToT _tpe    )-                    (getErrors _tpe    )-                    $ Just (map StatementTypeA _statementType     ++-                            [EnvUpdates _envUpdates    ])-                  {-# LINE 12701 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 67, column 9)-              _lhsOenvUpdates =-                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}-                  _envUpdates-                  {-# LINE 12706 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 68, column 9)-              _lhsOlibUpdates =-                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}-                  _libUpdates-                  {-# LINE 12711 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 73, column 9)-              _libUpdates =-                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12716 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 58, column 9)-              _tpe =-                  {-# LINE 58 "./TypeChecking/Dml.ag" #-}-                  do-                  checkRelationExists _lhsIenv table_-                  dependsOnRTpe (map snd _assignsIpairs) $ do-                    _columnTypes-                    liftErrors _assignsIrowSetErrors-                    return $ Pseudo Void-                  {-# LINE 12726 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 65, column 9)-              _statementType =-                  {-# LINE 65 "./TypeChecking/Dml.ag" #-}-                  leftToEmpty (\ct -> [StatementType [] (fromMaybe [] _returningIlistType)]) _columnTypes-                  {-# LINE 12731 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 68, column 9)-              _columnTypes =-                  {-# LINE 68 "./TypeChecking/Dml.ag" #-}-                  checkColumnConsistency _lhsIenv-                                         table_-                                         (map fst _assignsIpairs)-                                         _assignsIpairs-                  {-# LINE 12739 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 74, column 9)-              _backTree =-                  {-# LINE 74 "./TypeChecking/Dml.ag" #-}-                  Update ann_-                         table_-                         _assignsIannotatedTree-                         _whrIannotatedTree-                         _returningIannotatedTree-                  {-# LINE 12748 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 79, column 9)-              _envUpdates =-                  {-# LINE 79 "./TypeChecking/Dml.ag" #-}-                  []-                  {-# LINE 12753 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 87, column 9)-              _lib =-                  {-# LINE 87 "./TypeChecking/Dml.ag" #-}-                  fromRight _lhsIlib $ do-                  ct <- envCompositeAttrs _lhsIenv-                                          relationComposites-                                          table_-                  updateBindings _lhsIlib _lhsIenv [LibStackIDs [("", ct)]]-                  {-# LINE 12762 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 93, column 9)-              _whrOlib =-                  {-# LINE 93 "./TypeChecking/Dml.ag" #-}-                  _lib-                  {-# LINE 12767 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 94, column 9)-              _assignsOlib =-                  {-# LINE 94 "./TypeChecking/Dml.ag" #-}-                  _lib-                  {-# LINE 12772 "AstInternal.hs" #-}-              -- "./TypeChecking/Dml.ag"(line 95, column 9)-              _returningOlib =-                  {-# LINE 95 "./TypeChecking/Dml.ag" #-}-                  _lib-                  {-# LINE 12777 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Update ann_ table_ _assignsIannotatedTree _whrIannotatedTree _returningIannotatedTree-                  {-# LINE 12782 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Update ann_ table_ _assignsIoriginalTree _whrIoriginalTree _returningIoriginalTree-                  {-# LINE 12787 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12792 "AstInternal.hs" #-}-              -- copy rule (down)-              _assignsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12797 "AstInternal.hs" #-}-              -- copy rule (down)-              _whrOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12802 "AstInternal.hs" #-}-              -- copy rule (down)-              _returningOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12807 "AstInternal.hs" #-}-              ( _assignsIannotatedTree,_assignsIoriginalTree,_assignsIpairs,_assignsIrowSetErrors) =-                  (assigns_ _assignsOenv _assignsOlib )-              ( _whrIannotatedTree,_whrIoriginalTree) =-                  (whr_ _whrOenv _whrOlib )-              ( _returningIannotatedTree,_returningIlistType,_returningIoriginalTree) =-                  (returning_ _returningOenv _returningOlib )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_Statement_WhileStatement :: Annotation ->-                                T_Expression  ->-                                T_StatementList  ->-                                T_Statement -sem_Statement_WhileStatement ann_ expr_ sts_  =-    (\ _lhsIenv-       _lhsIinProducedEnv-       _lhsIlib ->-         (let _lhsOenvUpdates :: ([EnvironmentUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _stsOenvUpdates :: ([EnvironmentUpdate])-              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: Statement-              _lhsOoriginalTree :: Statement-              _exprOenv :: Environment-              _exprOlib :: LocalIdentifierBindings-              _stsOenv :: Environment-              _stsOlib :: LocalIdentifierBindings-              _exprIannotatedTree :: Expression-              _exprIliftedColumnName :: String-              _exprIoriginalTree :: Expression-              _stsIannotatedTree :: StatementList-              _stsIoriginalTree :: StatementList-              _stsIproducedEnv :: Environment-              _stsIproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 89, column 9)-              _lhsOenvUpdates =-                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12844 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 90, column 9)-              _lhsOlibUpdates =-                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12849 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 110, column 9)-              _stsOenvUpdates =-                  {-# LINE 110 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12854 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 111, column 9)-              _stsOlibUpdates =-                  {-# LINE 111 "./TypeChecking/Statements.ag" #-}-                  []-                  {-# LINE 12859 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  WhileStatement ann_ _exprIannotatedTree _stsIannotatedTree-                  {-# LINE 12864 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  WhileStatement ann_ _exprIoriginalTree _stsIoriginalTree-                  {-# LINE 12869 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 12874 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 12879 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12884 "AstInternal.hs" #-}-              -- copy rule (down)-              _exprOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12889 "AstInternal.hs" #-}-              -- copy rule (down)-              _stsOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 12894 "AstInternal.hs" #-}-              -- copy rule (down)-              _stsOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 12899 "AstInternal.hs" #-}-              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =-                  (expr_ _exprOenv _exprOlib )-              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedEnv,_stsIproducedLib) =-                  (sts_ _stsOenv _stsOenvUpdates _stsOlib _stsOlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOenvUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))--- StatementList ------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         envUpdates           : [EnvironmentUpdate]-         lib                  : LocalIdentifierBindings-         libUpdates           : [LocalIdentifierBindingsUpdate]-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -         producedEnv          : Environment-         producedLib          : LocalIdentifierBindings-   alternatives:-      alternative Cons:-         child hd             : Statement -         child tl             : StatementList -         visit 0:-            local newEnv      : _-            local newLib      : _-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local newEnv      : _-            local newLib      : _-            local annotatedTree : _-            local originalTree : _--}-type StatementList  = [(Statement)]--- cata-sem_StatementList :: StatementList  ->-                     T_StatementList -sem_StatementList list  =-    (Prelude.foldr sem_StatementList_Cons sem_StatementList_Nil (Prelude.map sem_Statement list) )--- semantic domain-type T_StatementList  = Environment ->-                        ([EnvironmentUpdate]) ->-                        LocalIdentifierBindings ->-                        ([LocalIdentifierBindingsUpdate]) ->-                        ( StatementList,StatementList,Environment,LocalIdentifierBindings)-data Inh_StatementList  = Inh_StatementList {env_Inh_StatementList :: Environment,envUpdates_Inh_StatementList :: [EnvironmentUpdate],lib_Inh_StatementList :: LocalIdentifierBindings,libUpdates_Inh_StatementList :: [LocalIdentifierBindingsUpdate]}-data Syn_StatementList  = Syn_StatementList {annotatedTree_Syn_StatementList :: StatementList,originalTree_Syn_StatementList :: StatementList,producedEnv_Syn_StatementList :: Environment,producedLib_Syn_StatementList :: LocalIdentifierBindings}-wrap_StatementList :: T_StatementList  ->-                      Inh_StatementList  ->-                      Syn_StatementList -wrap_StatementList sem (Inh_StatementList _lhsIenv _lhsIenvUpdates _lhsIlib _lhsIlibUpdates )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedEnv,_lhsOproducedLib) =-             (sem _lhsIenv _lhsIenvUpdates _lhsIlib _lhsIlibUpdates )-     in  (Syn_StatementList _lhsOannotatedTree _lhsOoriginalTree _lhsOproducedEnv _lhsOproducedLib ))-sem_StatementList_Cons :: T_Statement  ->-                          T_StatementList  ->-                          T_StatementList -sem_StatementList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIenvUpdates-       _lhsIlib-       _lhsIlibUpdates ->-         (let _hdOenv :: Environment-              _tlOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOlib :: LocalIdentifierBindings-              _lhsOproducedEnv :: Environment-              _lhsOproducedLib :: LocalIdentifierBindings-              _tlOenvUpdates :: ([EnvironmentUpdate])-              _tlOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _hdOinProducedEnv :: Environment-              _lhsOannotatedTree :: StatementList-              _lhsOoriginalTree :: StatementList-              _hdIannotatedTree :: Statement-              _hdIenvUpdates :: ([EnvironmentUpdate])-              _hdIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _hdIoriginalTree :: Statement-              _tlIannotatedTree :: StatementList-              _tlIoriginalTree :: StatementList-              _tlIproducedEnv :: Environment-              _tlIproducedLib :: LocalIdentifierBindings-              -- "./TypeChecking/Statements.ag"(line 36, column 9)-              _newEnv =-                  {-# LINE 36 "./TypeChecking/Statements.ag" #-}-                  fromRight _lhsIenv $ updateEnvironment _lhsIenv _lhsIenvUpdates-                  {-# LINE 12986 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 37, column 9)-              _newLib =-                  {-# LINE 37 "./TypeChecking/Statements.ag" #-}-                  fromRight _lhsIlib $ updateBindings _lhsIlib _lhsIenv _lhsIlibUpdates-                  {-# LINE 12991 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 39, column 9)-              _hdOenv =-                  {-# LINE 39 "./TypeChecking/Statements.ag" #-}-                  _newEnv-                  {-# LINE 12996 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 40, column 9)-              _tlOenv =-                  {-# LINE 40 "./TypeChecking/Statements.ag" #-}-                  _newEnv-                  {-# LINE 13001 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 41, column 9)-              _hdOlib =-                  {-# LINE 41 "./TypeChecking/Statements.ag" #-}-                  _newLib-                  {-# LINE 13006 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 42, column 9)-              _tlOlib =-                  {-# LINE 42 "./TypeChecking/Statements.ag" #-}-                  _newLib-                  {-# LINE 13011 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 46, column 9)-              _lhsOproducedEnv =-                  {-# LINE 46 "./TypeChecking/Statements.ag" #-}-                  _tlIproducedEnv-                  {-# LINE 13016 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 47, column 9)-              _lhsOproducedLib =-                  {-# LINE 47 "./TypeChecking/Statements.ag" #-}-                  _tlIproducedLib-                  {-# LINE 13021 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 50, column 9)-              _tlOenvUpdates =-                  {-# LINE 50 "./TypeChecking/Statements.ag" #-}-                  _hdIenvUpdates-                  {-# LINE 13026 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 51, column 9)-              _tlOlibUpdates =-                  {-# LINE 51 "./TypeChecking/Statements.ag" #-}-                  _hdIlibUpdates-                  {-# LINE 13031 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 76, column 12)-              _hdOinProducedEnv =-                  {-# LINE 76 "./TypeChecking/Statements.ag" #-}-                  _tlIproducedEnv-                  {-# LINE 13036 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 13041 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 13046 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13051 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13056 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIenvUpdates,_hdIlibUpdates,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOinProducedEnv _hdOlib )-              ( _tlIannotatedTree,_tlIoriginalTree,_tlIproducedEnv,_tlIproducedLib) =-                  (tl_ _tlOenv _tlOenvUpdates _tlOlib _tlOlibUpdates )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedEnv,_lhsOproducedLib)))-sem_StatementList_Nil :: T_StatementList -sem_StatementList_Nil  =-    (\ _lhsIenv-       _lhsIenvUpdates-       _lhsIlib-       _lhsIlibUpdates ->-         (let _lhsOproducedEnv :: Environment-              _lhsOproducedLib :: LocalIdentifierBindings-              _lhsOannotatedTree :: StatementList-              _lhsOoriginalTree :: StatementList-              -- "./TypeChecking/Statements.ag"(line 36, column 9)-              _newEnv =-                  {-# LINE 36 "./TypeChecking/Statements.ag" #-}-                  fromRight _lhsIenv $ updateEnvironment _lhsIenv _lhsIenvUpdates-                  {-# LINE 13076 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 37, column 9)-              _newLib =-                  {-# LINE 37 "./TypeChecking/Statements.ag" #-}-                  fromRight _lhsIlib $ updateBindings _lhsIlib _lhsIenv _lhsIlibUpdates-                  {-# LINE 13081 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 53, column 9)-              _lhsOproducedEnv =-                  {-# LINE 53 "./TypeChecking/Statements.ag" #-}-                  _newEnv-                  {-# LINE 13086 "AstInternal.hs" #-}-              -- "./TypeChecking/Statements.ag"(line 54, column 9)-              _lhsOproducedLib =-                  {-# LINE 54 "./TypeChecking/Statements.ag" #-}-                  _newLib-                  {-# LINE 13091 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 13096 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 13101 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13106 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13111 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedEnv,_lhsOproducedLib)))--- StringList ---------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -         strings              : [String]-   alternatives:-      alternative Cons:-         child hd             : {String}-         child tl             : StringList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type StringList  = [(String)]--- cata-sem_StringList :: StringList  ->-                  T_StringList -sem_StringList list  =-    (Prelude.foldr sem_StringList_Cons sem_StringList_Nil list )--- semantic domain-type T_StringList  = Environment ->-                     LocalIdentifierBindings ->-                     ( StringList,StringList,([String]))-data Inh_StringList  = Inh_StringList {env_Inh_StringList :: Environment,lib_Inh_StringList :: LocalIdentifierBindings}-data Syn_StringList  = Syn_StringList {annotatedTree_Syn_StringList :: StringList,originalTree_Syn_StringList :: StringList,strings_Syn_StringList :: [String]}-wrap_StringList :: T_StringList  ->-                   Inh_StringList  ->-                   Syn_StringList -wrap_StringList sem (Inh_StringList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOstrings) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_StringList _lhsOannotatedTree _lhsOoriginalTree _lhsOstrings ))-sem_StringList_Cons :: String ->-                       T_StringList  ->-                       T_StringList -sem_StringList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOstrings :: ([String])-              _lhsOannotatedTree :: StringList-              _lhsOoriginalTree :: StringList-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _tlIannotatedTree :: StringList-              _tlIoriginalTree :: StringList-              _tlIstrings :: ([String])-              -- "./TypeChecking/Misc.ag"(line 67, column 10)-              _lhsOstrings =-                  {-# LINE 67 "./TypeChecking/Misc.ag" #-}-                  hd_ : _tlIstrings-                  {-# LINE 13172 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) hd_ _tlIannotatedTree-                  {-# LINE 13177 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) hd_ _tlIoriginalTree-                  {-# LINE 13182 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13187 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13192 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13197 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 13202 "AstInternal.hs" #-}-              ( _tlIannotatedTree,_tlIoriginalTree,_tlIstrings) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOstrings)))-sem_StringList_Nil :: T_StringList -sem_StringList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOstrings :: ([String])-              _lhsOannotatedTree :: StringList-              _lhsOoriginalTree :: StringList-              -- "./TypeChecking/Misc.ag"(line 68, column 9)-              _lhsOstrings =-                  {-# LINE 68 "./TypeChecking/Misc.ag" #-}-                  []-                  {-# LINE 13217 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 13222 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 13227 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13232 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13237 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOstrings)))--- StringTypeNameListPair ---------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         fnSig                : (String,[Type])-         originalTree         : SELF -   alternatives:-      alternative Tuple:-         child x1             : {String}-         child x2             : TypeNameList -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type StringTypeNameListPair  = ( (String),(TypeNameList))--- cata-sem_StringTypeNameListPair :: StringTypeNameListPair  ->-                              T_StringTypeNameListPair -sem_StringTypeNameListPair ( x1,x2)  =-    (sem_StringTypeNameListPair_Tuple x1 (sem_TypeNameList x2 ) )--- semantic domain-type T_StringTypeNameListPair  = Environment ->-                                 LocalIdentifierBindings ->-                                 ( StringTypeNameListPair,((String,[Type])),StringTypeNameListPair)-data Inh_StringTypeNameListPair  = Inh_StringTypeNameListPair {env_Inh_StringTypeNameListPair :: Environment,lib_Inh_StringTypeNameListPair :: LocalIdentifierBindings}-data Syn_StringTypeNameListPair  = Syn_StringTypeNameListPair {annotatedTree_Syn_StringTypeNameListPair :: StringTypeNameListPair,fnSig_Syn_StringTypeNameListPair :: (String,[Type]),originalTree_Syn_StringTypeNameListPair :: StringTypeNameListPair}-wrap_StringTypeNameListPair :: T_StringTypeNameListPair  ->-                               Inh_StringTypeNameListPair  ->-                               Syn_StringTypeNameListPair -wrap_StringTypeNameListPair sem (Inh_StringTypeNameListPair _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOfnSig,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_StringTypeNameListPair _lhsOannotatedTree _lhsOfnSig _lhsOoriginalTree ))-sem_StringTypeNameListPair_Tuple :: String ->-                                    T_TypeNameList  ->-                                    T_StringTypeNameListPair -sem_StringTypeNameListPair_Tuple x1_ x2_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOfnSig :: ((String,[Type]))-              _lhsOannotatedTree :: StringTypeNameListPair-              _lhsOoriginalTree :: StringTypeNameListPair-              _x2Oenv :: Environment-              _x2Olib :: LocalIdentifierBindings-              _x2IannotatedTree :: TypeNameList-              _x2InamedTypes :: ([Type])-              _x2IoriginalTree :: TypeNameList-              -- "./TypeChecking/Drops.ag"(line 25, column 13)-              _lhsOfnSig =-                  {-# LINE 25 "./TypeChecking/Drops.ag" #-}-                  (x1_, _x2InamedTypes)-                  {-# LINE 13294 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (x1_,_x2IannotatedTree)-                  {-# LINE 13299 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (x1_,_x2IoriginalTree)-                  {-# LINE 13304 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13309 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13314 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13319 "AstInternal.hs" #-}-              -- copy rule (down)-              _x2Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 13324 "AstInternal.hs" #-}-              ( _x2IannotatedTree,_x2InamedTypes,_x2IoriginalTree) =-                  (x2_ _x2Oenv _x2Olib )-          in  ( _lhsOannotatedTree,_lhsOfnSig,_lhsOoriginalTree)))--- StringTypeNameListPairList -----------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         fnSigs               : [(String,[Type])]-         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : StringTypeNameListPair -         child tl             : StringTypeNameListPairList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type StringTypeNameListPairList  = [(StringTypeNameListPair)]--- cata-sem_StringTypeNameListPairList :: StringTypeNameListPairList  ->-                                  T_StringTypeNameListPairList -sem_StringTypeNameListPairList list  =-    (Prelude.foldr sem_StringTypeNameListPairList_Cons sem_StringTypeNameListPairList_Nil (Prelude.map sem_StringTypeNameListPair list) )--- semantic domain-type T_StringTypeNameListPairList  = Environment ->-                                     LocalIdentifierBindings ->-                                     ( StringTypeNameListPairList,([(String,[Type])]),StringTypeNameListPairList)-data Inh_StringTypeNameListPairList  = Inh_StringTypeNameListPairList {env_Inh_StringTypeNameListPairList :: Environment,lib_Inh_StringTypeNameListPairList :: LocalIdentifierBindings}-data Syn_StringTypeNameListPairList  = Syn_StringTypeNameListPairList {annotatedTree_Syn_StringTypeNameListPairList :: StringTypeNameListPairList,fnSigs_Syn_StringTypeNameListPairList :: [(String,[Type])],originalTree_Syn_StringTypeNameListPairList :: StringTypeNameListPairList}-wrap_StringTypeNameListPairList :: T_StringTypeNameListPairList  ->-                                   Inh_StringTypeNameListPairList  ->-                                   Syn_StringTypeNameListPairList -wrap_StringTypeNameListPairList sem (Inh_StringTypeNameListPairList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOfnSigs,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_StringTypeNameListPairList _lhsOannotatedTree _lhsOfnSigs _lhsOoriginalTree ))-sem_StringTypeNameListPairList_Cons :: T_StringTypeNameListPair  ->-                                       T_StringTypeNameListPairList  ->-                                       T_StringTypeNameListPairList -sem_StringTypeNameListPairList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOfnSigs :: ([(String,[Type])])-              _lhsOannotatedTree :: StringTypeNameListPairList-              _lhsOoriginalTree :: StringTypeNameListPairList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: StringTypeNameListPair-              _hdIfnSig :: ((String,[Type]))-              _hdIoriginalTree :: StringTypeNameListPair-              _tlIannotatedTree :: StringTypeNameListPairList-              _tlIfnSigs :: ([(String,[Type])])-              _tlIoriginalTree :: StringTypeNameListPairList-              -- "./TypeChecking/Drops.ag"(line 20, column 12)-              _lhsOfnSigs =-                  {-# LINE 20 "./TypeChecking/Drops.ag" #-}-                  _hdIfnSig : _tlIfnSigs-                  {-# LINE 13392 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 13397 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 13402 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13407 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13412 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13417 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 13422 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13427 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 13432 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIfnSig,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIfnSigs,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOfnSigs,_lhsOoriginalTree)))-sem_StringTypeNameListPairList_Nil :: T_StringTypeNameListPairList -sem_StringTypeNameListPairList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOfnSigs :: ([(String,[Type])])-              _lhsOannotatedTree :: StringTypeNameListPairList-              _lhsOoriginalTree :: StringTypeNameListPairList-              -- "./TypeChecking/Drops.ag"(line 21, column 11)-              _lhsOfnSigs =-                  {-# LINE 21 "./TypeChecking/Drops.ag" #-}-                  []-                  {-# LINE 13449 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 13454 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 13459 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13464 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13469 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOfnSigs,_lhsOoriginalTree)))--- TableAlias ---------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative FullAlias:-         child alias          : {String}-         child cols           : {[String]}-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative NoAlias:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative TableAlias:-         child alias          : {String}-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data TableAlias  = FullAlias (String) ([String]) -                 | NoAlias -                 | TableAlias (String) -                 deriving ( Data,Eq,Show,Typeable)--- cata-sem_TableAlias :: TableAlias  ->-                  T_TableAlias -sem_TableAlias (FullAlias _alias _cols )  =-    (sem_TableAlias_FullAlias _alias _cols )-sem_TableAlias (NoAlias )  =-    (sem_TableAlias_NoAlias )-sem_TableAlias (TableAlias _alias )  =-    (sem_TableAlias_TableAlias _alias )--- semantic domain-type T_TableAlias  = Environment ->-                     LocalIdentifierBindings ->-                     ( TableAlias,TableAlias)-data Inh_TableAlias  = Inh_TableAlias {env_Inh_TableAlias :: Environment,lib_Inh_TableAlias :: LocalIdentifierBindings}-data Syn_TableAlias  = Syn_TableAlias {annotatedTree_Syn_TableAlias :: TableAlias,originalTree_Syn_TableAlias :: TableAlias}-wrap_TableAlias :: T_TableAlias  ->-                   Inh_TableAlias  ->-                   Syn_TableAlias -wrap_TableAlias sem (Inh_TableAlias _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_TableAlias _lhsOannotatedTree _lhsOoriginalTree ))-sem_TableAlias_FullAlias :: String ->-                            ([String]) ->-                            T_TableAlias -sem_TableAlias_FullAlias alias_ cols_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TableAlias-              _lhsOoriginalTree :: TableAlias-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  FullAlias alias_ cols_-                  {-# LINE 13535 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  FullAlias alias_ cols_-                  {-# LINE 13540 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13545 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13550 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_TableAlias_NoAlias :: T_TableAlias -sem_TableAlias_NoAlias  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TableAlias-              _lhsOoriginalTree :: TableAlias-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  NoAlias-                  {-# LINE 13562 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  NoAlias-                  {-# LINE 13567 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13572 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13577 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_TableAlias_TableAlias :: String ->-                             T_TableAlias -sem_TableAlias_TableAlias alias_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TableAlias-              _lhsOoriginalTree :: TableAlias-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  TableAlias alias_-                  {-# LINE 13590 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  TableAlias alias_-                  {-# LINE 13595 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 13600 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13605 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- TableRef -----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         jlibUpdates          : [LocalIdentifierBindingsUpdate]-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         idLookups            : [(String,Type)]-         libUpdates           : [LocalIdentifierBindingsUpdate]-         originalTree         : SELF -         qidLookups           : [(String,[(String,Type)])]-         qstarExpansion       : [(String,[(String,Type)])]-         starExpansion        : [(String,Type)]-   alternatives:-      alternative JoinedTref:-         child ann            : {Annotation}-         child tbl            : TableRef -         child nat            : Natural -         child joinType       : JoinType -         child tbl1           : TableRef -         child onExpr         : OnExpr -         child alias          : TableAlias -         visit 0:-            local libUpdates  : _-            local errs        : _-            local removeJoinAttrs : _-            local ejoinAttrs  : {Either [TypeError] [(String,Type)]}-            local joinNames   : _-            local joinAttrs   : _-            local idLookups   : {[(String,Type)]}-            local qidLookups  : {[(String,[(String,Type)])]}-            local starExpansion : {[(String,Type)]}-            local qstarExpansion : {[(String,[(String,Type)])]}-            local newLib      : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative SubTref:-         child ann            : {Annotation}-         child sel            : SelectExpression -         child alias          : TableAlias -         visit 0:-            local libUpdates  : _-            local errs        : _-            local selectAttrs : {Either [TypeError] [(String,Type)]}-            local idLookups   : {[(String,Type)]}-            local qidLookups  : {[(String,[(String,Type)])]}-            local starExpansion : {[(String,Type)]}-            local qstarExpansion : {[(String,[(String,Type)])]}-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative Tref:-         child ann            : {Annotation}-         child tbl            : {String}-         child alias          : TableAlias -         visit 0:-            local libUpdates  : _-            local errs        : _-            local relType     : {Either [TypeError] ([(String, Type)], [(String, Type)])}-            local relType1    : _-            local pAttrs      : _-            local sAttrs      : _-            local idLookups   : {[(String,Type)]}-            local alias       : _-            local qidLookups  : {[(String,[(String,Type)])]}-            local starExpansion : {[(String,Type)]}-            local qstarExpansion : {[(String,[(String,Type)])]}-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative TrefFun:-         child ann            : {Annotation}-         child fn             : Expression -         child alias          : TableAlias -         visit 0:-            local libUpdates  : _-            local errs        : _-            local eqfunIdens  : {Either [TypeError] (String,[(String,Type)])}-            local qfunIdens   : _-            local alias2      : _-            local funIdens    : _-            local alias       : _-            local idLookups   : {[(String,Type)]}-            local qidLookups  : {[(String,[(String,Type)])]}-            local starExpansion : {[(String,Type)]}-            local qstarExpansion : {[(String,[(String,Type)])]}-            local backTree    : _-            local annotatedTree : _-            local originalTree : _--}-data TableRef  = JoinedTref (Annotation) (TableRef) (Natural) (JoinType) (TableRef) (OnExpr) (TableAlias) -               | SubTref (Annotation) (SelectExpression) (TableAlias) -               | Tref (Annotation) (String) (TableAlias) -               | TrefFun (Annotation) (Expression) (TableAlias) -               deriving ( Data,Eq,Show,Typeable)--- cata-sem_TableRef :: TableRef  ->-                T_TableRef -sem_TableRef (JoinedTref _ann _tbl _nat _joinType _tbl1 _onExpr _alias )  =-    (sem_TableRef_JoinedTref _ann (sem_TableRef _tbl ) (sem_Natural _nat ) (sem_JoinType _joinType ) (sem_TableRef _tbl1 ) (sem_OnExpr _onExpr ) (sem_TableAlias _alias ) )-sem_TableRef (SubTref _ann _sel _alias )  =-    (sem_TableRef_SubTref _ann (sem_SelectExpression _sel ) (sem_TableAlias _alias ) )-sem_TableRef (Tref _ann _tbl _alias )  =-    (sem_TableRef_Tref _ann _tbl (sem_TableAlias _alias ) )-sem_TableRef (TrefFun _ann _fn _alias )  =-    (sem_TableRef_TrefFun _ann (sem_Expression _fn ) (sem_TableAlias _alias ) )--- semantic domain-type T_TableRef  = Environment ->-                   ([LocalIdentifierBindingsUpdate]) ->-                   LocalIdentifierBindings ->-                   ( TableRef,([(String,Type)]),([LocalIdentifierBindingsUpdate]),TableRef,([(String,[(String,Type)])]),([(String,[(String,Type)])]),([(String,Type)]))-data Inh_TableRef  = Inh_TableRef {env_Inh_TableRef :: Environment,jlibUpdates_Inh_TableRef :: [LocalIdentifierBindingsUpdate],lib_Inh_TableRef :: LocalIdentifierBindings}-data Syn_TableRef  = Syn_TableRef {annotatedTree_Syn_TableRef :: TableRef,idLookups_Syn_TableRef :: [(String,Type)],libUpdates_Syn_TableRef :: [LocalIdentifierBindingsUpdate],originalTree_Syn_TableRef :: TableRef,qidLookups_Syn_TableRef :: [(String,[(String,Type)])],qstarExpansion_Syn_TableRef :: [(String,[(String,Type)])],starExpansion_Syn_TableRef :: [(String,Type)]}-wrap_TableRef :: T_TableRef  ->-                 Inh_TableRef  ->-                 Syn_TableRef -wrap_TableRef sem (Inh_TableRef _lhsIenv _lhsIjlibUpdates _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion) =-             (sem _lhsIenv _lhsIjlibUpdates _lhsIlib )-     in  (Syn_TableRef _lhsOannotatedTree _lhsOidLookups _lhsOlibUpdates _lhsOoriginalTree _lhsOqidLookups _lhsOqstarExpansion _lhsOstarExpansion ))-sem_TableRef_JoinedTref :: Annotation ->-                           T_TableRef  ->-                           T_Natural  ->-                           T_JoinType  ->-                           T_TableRef  ->-                           T_OnExpr  ->-                           T_TableAlias  ->-                           T_TableRef -sem_TableRef_JoinedTref ann_ tbl_ nat_ joinType_ tbl1_ onExpr_ alias_  =-    (\ _lhsIenv-       _lhsIjlibUpdates-       _lhsIlib ->-         (let _lhsOannotatedTree :: TableRef-              _ejoinAttrs :: (Either [TypeError] [(String,Type)])-              _idLookups :: ([(String,Type)])-              _qidLookups :: ([(String,[(String,Type)])])-              _starExpansion :: ([(String,Type)])-              _qstarExpansion :: ([(String,[(String,Type)])])-              _onExprOlib :: LocalIdentifierBindings-              _tblOjlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tbl1OjlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOidLookups :: ([(String,Type)])-              _lhsOqidLookups :: ([(String,[(String,Type)])])-              _lhsOstarExpansion :: ([(String,Type)])-              _lhsOqstarExpansion :: ([(String,[(String,Type)])])-              _lhsOoriginalTree :: TableRef-              _tblOenv :: Environment-              _tblOlib :: LocalIdentifierBindings-              _natOenv :: Environment-              _natOlib :: LocalIdentifierBindings-              _joinTypeOenv :: Environment-              _joinTypeOlib :: LocalIdentifierBindings-              _tbl1Oenv :: Environment-              _tbl1Olib :: LocalIdentifierBindings-              _onExprOenv :: Environment-              _aliasOenv :: Environment-              _aliasOlib :: LocalIdentifierBindings-              _tblIannotatedTree :: TableRef-              _tblIidLookups :: ([(String,Type)])-              _tblIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tblIoriginalTree :: TableRef-              _tblIqidLookups :: ([(String,[(String,Type)])])-              _tblIqstarExpansion :: ([(String,[(String,Type)])])-              _tblIstarExpansion :: ([(String,Type)])-              _natIannotatedTree :: Natural-              _natIoriginalTree :: Natural-              _joinTypeIannotatedTree :: JoinType-              _joinTypeIoriginalTree :: JoinType-              _tbl1IannotatedTree :: TableRef-              _tbl1IidLookups :: ([(String,Type)])-              _tbl1IlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tbl1IoriginalTree :: TableRef-              _tbl1IqidLookups :: ([(String,[(String,Type)])])-              _tbl1IqstarExpansion :: ([(String,[(String,Type)])])-              _tbl1IstarExpansion :: ([(String,Type)])-              _onExprIannotatedTree :: OnExpr-              _onExprIoriginalTree :: OnExpr-              _aliasIannotatedTree :: TableAlias-              _aliasIoriginalTree :: TableAlias-              -- "./TypeChecking/TableRefs.ag"(line 33, column 9)-              _lhsOannotatedTree =-                  {-# LINE 33 "./TypeChecking/TableRefs.ag" #-}-                  updateAnnotation (map TypeErrorA _errs     ++) _backTree-                  {-# LINE 13794 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 75, column 9)-              _libUpdates =-                  {-# LINE 75 "./TypeChecking/TableRefs.ag" #-}-                  if null _errs-                    then [LibStackIDs $ ("", _idLookups    ): _qidLookups-                         ,LibSetStarExpansion $ ("", _starExpansion    ): _qstarExpansion    ]-                    else []-                  {-# LINE 13802 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 135, column 9)-              _errs =-                  {-# LINE 135 "./TypeChecking/TableRefs.ag" #-}-                  fromLeft [] _ejoinAttrs-                  {-# LINE 13807 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 136, column 9)-              _removeJoinAttrs =-                  {-# LINE 136 "./TypeChecking/TableRefs.ag" #-}-                  filter (\(n,_) -> n `notElem` _joinNames    )-                  {-# LINE 13812 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 146, column 9)-              _ejoinAttrs =-                  {-# LINE 146 "./TypeChecking/TableRefs.ag" #-}-                  do-                  let jns = case (_natIannotatedTree, _onExprIoriginalTree) of-                                (Natural, _) -> commonFieldNames-                                (_,Just (JoinUsing _ s)) -> s-                                _ -> []-                      tjtsm = map (flip lookup _tblIidLookups) jns-                      t1jtsm = map (flip lookup _tbl1IidLookups) jns-                  errorWhen (not $ null $ filter (==Nothing) $ tjtsm ++ t1jtsm)-                            [MissingJoinAttribute]-                  let tjts = catMaybes tjtsm-                      t1jts = catMaybes t1jtsm-                      resolvedTypes :: [Either [TypeError] Type]-                      resolvedTypes = map (\(a,b) -> resolveResultSetType _lhsIenv [a,b]) $ zip tjts t1jts-                  liftErrors $ concat $ lefts resolvedTypes-                  return $ zip jns $ rights resolvedTypes-                  where-                    commonFieldNames = intersect (f _tblIstarExpansion) (f _tbl1IstarExpansion)-                                       where f = map fst-                  {-# LINE 13834 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 170, column 9)-              _joinNames =-                  {-# LINE 170 "./TypeChecking/TableRefs.ag" #-}-                  map fst _joinAttrs-                  {-# LINE 13839 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 171, column 9)-              _joinAttrs =-                  {-# LINE 171 "./TypeChecking/TableRefs.ag" #-}-                  fromRight [] _ejoinAttrs-                  {-# LINE 13844 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 176, column 9)-              _idLookups =-                  {-# LINE 176 "./TypeChecking/TableRefs.ag" #-}-                  _joinAttrs     ++-                    _removeJoinAttrs     _tblIidLookups ++-                    _removeJoinAttrs     _tbl1IidLookups-                  {-# LINE 13851 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 179, column 9)-              _qidLookups =-                  {-# LINE 179 "./TypeChecking/TableRefs.ag" #-}-                  _tblIqidLookups ++ _tbl1IqidLookups-                  {-# LINE 13856 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 180, column 9)-              _starExpansion =-                  {-# LINE 180 "./TypeChecking/TableRefs.ag" #-}-                  _joinAttrs     ++-                    _removeJoinAttrs     _tblIstarExpansion ++-                    _removeJoinAttrs     _tbl1IstarExpansion-                  {-# LINE 13863 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 183, column 9)-              _qstarExpansion =-                  {-# LINE 183 "./TypeChecking/TableRefs.ag" #-}-                  _tblIqstarExpansion ++ _tbl1IqstarExpansion-                  {-# LINE 13868 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 187, column 9)-              _newLib =-                  {-# LINE 187 "./TypeChecking/TableRefs.ag" #-}-                  case updateBindings _lhsIlib _lhsIenv (_libUpdates     ++ _lhsIjlibUpdates) of-                    Left x -> error $ show x-                    Right e ->                                      e-                  {-# LINE 13875 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 190, column 9)-              _onExprOlib =-                  {-# LINE 190 "./TypeChecking/TableRefs.ag" #-}-                  _newLib-                  {-# LINE 13880 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 192, column 9)-              _tblOjlibUpdates =-                  {-# LINE 192 "./TypeChecking/TableRefs.ag" #-}-                  _libUpdates-                  {-# LINE 13885 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 193, column 9)-              _tbl1OjlibUpdates =-                  {-# LINE 193 "./TypeChecking/TableRefs.ag" #-}-                  _libUpdates-                  {-# LINE 13890 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 248, column 9)-              _lhsOlibUpdates =-                  {-# LINE 248 "./TypeChecking/TableRefs.ag" #-}-                  _libUpdates-                  {-# LINE 13895 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 249, column 9)-              _lhsOidLookups =-                  {-# LINE 249 "./TypeChecking/TableRefs.ag" #-}-                  _idLookups-                  {-# LINE 13900 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 250, column 9)-              _lhsOqidLookups =-                  {-# LINE 250 "./TypeChecking/TableRefs.ag" #-}-                  _qidLookups-                  {-# LINE 13905 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 251, column 9)-              _lhsOstarExpansion =-                  {-# LINE 251 "./TypeChecking/TableRefs.ag" #-}-                  _starExpansion-                  {-# LINE 13910 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 252, column 9)-              _lhsOqstarExpansion =-                  {-# LINE 252 "./TypeChecking/TableRefs.ag" #-}-                  _qstarExpansion-                  {-# LINE 13915 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 264, column 9)-              _backTree =-                  {-# LINE 264 "./TypeChecking/TableRefs.ag" #-}-                  JoinedTref ann_-                             _tblIannotatedTree-                             _natIannotatedTree-                             _joinTypeIannotatedTree-                             _tbl1IannotatedTree-                             _onExprIannotatedTree-                             _aliasIannotatedTree-                  {-# LINE 13926 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  JoinedTref ann_ _tblIannotatedTree _natIannotatedTree _joinTypeIannotatedTree _tbl1IannotatedTree _onExprIannotatedTree _aliasIannotatedTree-                  {-# LINE 13931 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  JoinedTref ann_ _tblIoriginalTree _natIoriginalTree _joinTypeIoriginalTree _tbl1IoriginalTree _onExprIoriginalTree _aliasIoriginalTree-                  {-# LINE 13936 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 13941 "AstInternal.hs" #-}-              -- copy rule (down)-              _tblOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13946 "AstInternal.hs" #-}-              -- copy rule (down)-              _tblOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 13951 "AstInternal.hs" #-}-              -- copy rule (down)-              _natOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13956 "AstInternal.hs" #-}-              -- copy rule (down)-              _natOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 13961 "AstInternal.hs" #-}-              -- copy rule (down)-              _joinTypeOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13966 "AstInternal.hs" #-}-              -- copy rule (down)-              _joinTypeOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 13971 "AstInternal.hs" #-}-              -- copy rule (down)-              _tbl1Oenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13976 "AstInternal.hs" #-}-              -- copy rule (down)-              _tbl1Olib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 13981 "AstInternal.hs" #-}-              -- copy rule (down)-              _onExprOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13986 "AstInternal.hs" #-}-              -- copy rule (down)-              _aliasOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 13991 "AstInternal.hs" #-}-              -- copy rule (down)-              _aliasOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 13996 "AstInternal.hs" #-}-              ( _tblIannotatedTree,_tblIidLookups,_tblIlibUpdates,_tblIoriginalTree,_tblIqidLookups,_tblIqstarExpansion,_tblIstarExpansion) =-                  (tbl_ _tblOenv _tblOjlibUpdates _tblOlib )-              ( _natIannotatedTree,_natIoriginalTree) =-                  (nat_ _natOenv _natOlib )-              ( _joinTypeIannotatedTree,_joinTypeIoriginalTree) =-                  (joinType_ _joinTypeOenv _joinTypeOlib )-              ( _tbl1IannotatedTree,_tbl1IidLookups,_tbl1IlibUpdates,_tbl1IoriginalTree,_tbl1IqidLookups,_tbl1IqstarExpansion,_tbl1IstarExpansion) =-                  (tbl1_ _tbl1Oenv _tbl1OjlibUpdates _tbl1Olib )-              ( _onExprIannotatedTree,_onExprIoriginalTree) =-                  (onExpr_ _onExprOenv _onExprOlib )-              ( _aliasIannotatedTree,_aliasIoriginalTree) =-                  (alias_ _aliasOenv _aliasOlib )-          in  ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion)))-sem_TableRef_SubTref :: Annotation ->-                        T_SelectExpression  ->-                        T_TableAlias  ->-                        T_TableRef -sem_TableRef_SubTref ann_ sel_ alias_  =-    (\ _lhsIenv-       _lhsIjlibUpdates-       _lhsIlib ->-         (let _lhsOannotatedTree :: TableRef-              _selectAttrs :: (Either [TypeError] [(String,Type)])-              _idLookups :: ([(String,Type)])-              _qidLookups :: ([(String,[(String,Type)])])-              _starExpansion :: ([(String,Type)])-              _qstarExpansion :: ([(String,[(String,Type)])])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOidLookups :: ([(String,Type)])-              _lhsOqidLookups :: ([(String,[(String,Type)])])-              _lhsOstarExpansion :: ([(String,Type)])-              _lhsOqstarExpansion :: ([(String,[(String,Type)])])-              _lhsOoriginalTree :: TableRef-              _selOenv :: Environment-              _selOlib :: LocalIdentifierBindings-              _aliasOenv :: Environment-              _aliasOlib :: LocalIdentifierBindings-              _selIannotatedTree :: SelectExpression-              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _selIoriginalTree :: SelectExpression-              _aliasIannotatedTree :: TableAlias-              _aliasIoriginalTree :: TableAlias-              -- "./TypeChecking/TableRefs.ag"(line 33, column 9)-              _lhsOannotatedTree =-                  {-# LINE 33 "./TypeChecking/TableRefs.ag" #-}-                  updateAnnotation (map TypeErrorA _errs     ++) _backTree-                  {-# LINE 14043 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 75, column 9)-              _libUpdates =-                  {-# LINE 75 "./TypeChecking/TableRefs.ag" #-}-                  if null _errs-                    then [LibStackIDs $ ("", _idLookups    ): _qidLookups-                         ,LibSetStarExpansion $ ("", _starExpansion    ): _qstarExpansion    ]-                    else []-                  {-# LINE 14051 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 92, column 9)-              _errs =-                  {-# LINE 92 "./TypeChecking/TableRefs.ag" #-}-                  case _selectAttrs     of-                          Left e -> e-                          Right _ -> []-                  {-# LINE 14058 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 96, column 9)-              _selectAttrs =-                  {-# LINE 96 "./TypeChecking/TableRefs.ag" #-}-                  unwrapSetOfComposite (getTypeAnnotation _selIannotatedTree)-                  {-# LINE 14063 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 98, column 9)-              _idLookups =-                  {-# LINE 98 "./TypeChecking/TableRefs.ag" #-}-                  fromRight [] _selectAttrs-                  {-# LINE 14068 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 99, column 9)-              _qidLookups =-                  {-# LINE 99 "./TypeChecking/TableRefs.ag" #-}-                  [(getAlias "" _aliasIannotatedTree, _idLookups    )]-                  {-# LINE 14073 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 100, column 9)-              _starExpansion =-                  {-# LINE 100 "./TypeChecking/TableRefs.ag" #-}-                  _idLookups-                  {-# LINE 14078 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 101, column 9)-              _qstarExpansion =-                  {-# LINE 101 "./TypeChecking/TableRefs.ag" #-}-                  _qidLookups-                  {-# LINE 14083 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 248, column 9)-              _lhsOlibUpdates =-                  {-# LINE 248 "./TypeChecking/TableRefs.ag" #-}-                  _libUpdates-                  {-# LINE 14088 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 249, column 9)-              _lhsOidLookups =-                  {-# LINE 249 "./TypeChecking/TableRefs.ag" #-}-                  _idLookups-                  {-# LINE 14093 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 250, column 9)-              _lhsOqidLookups =-                  {-# LINE 250 "./TypeChecking/TableRefs.ag" #-}-                  _qidLookups-                  {-# LINE 14098 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 251, column 9)-              _lhsOstarExpansion =-                  {-# LINE 251 "./TypeChecking/TableRefs.ag" #-}-                  _starExpansion-                  {-# LINE 14103 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 252, column 9)-              _lhsOqstarExpansion =-                  {-# LINE 252 "./TypeChecking/TableRefs.ag" #-}-                  _qstarExpansion-                  {-# LINE 14108 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 258, column 9)-              _backTree =-                  {-# LINE 258 "./TypeChecking/TableRefs.ag" #-}-                  SubTref ann_ _selIannotatedTree _aliasIannotatedTree-                  {-# LINE 14113 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SubTref ann_ _selIannotatedTree _aliasIannotatedTree-                  {-# LINE 14118 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SubTref ann_ _selIoriginalTree _aliasIoriginalTree-                  {-# LINE 14123 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14128 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 14133 "AstInternal.hs" #-}-              -- copy rule (down)-              _selOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 14138 "AstInternal.hs" #-}-              -- copy rule (down)-              _aliasOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 14143 "AstInternal.hs" #-}-              -- copy rule (down)-              _aliasOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 14148 "AstInternal.hs" #-}-              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =-                  (sel_ _selOenv _selOlib )-              ( _aliasIannotatedTree,_aliasIoriginalTree) =-                  (alias_ _aliasOenv _aliasOlib )-          in  ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion)))-sem_TableRef_Tref :: Annotation ->-                     String ->-                     T_TableAlias  ->-                     T_TableRef -sem_TableRef_Tref ann_ tbl_ alias_  =-    (\ _lhsIenv-       _lhsIjlibUpdates-       _lhsIlib ->-         (let _lhsOannotatedTree :: TableRef-              _relType :: (Either [TypeError] ([(String, Type)], [(String, Type)]))-              _idLookups :: ([(String,Type)])-              _qidLookups :: ([(String,[(String,Type)])])-              _starExpansion :: ([(String,Type)])-              _qstarExpansion :: ([(String,[(String,Type)])])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOidLookups :: ([(String,Type)])-              _lhsOqidLookups :: ([(String,[(String,Type)])])-              _lhsOstarExpansion :: ([(String,Type)])-              _lhsOqstarExpansion :: ([(String,[(String,Type)])])-              _lhsOoriginalTree :: TableRef-              _aliasOenv :: Environment-              _aliasOlib :: LocalIdentifierBindings-              _aliasIannotatedTree :: TableAlias-              _aliasIoriginalTree :: TableAlias-              -- "./TypeChecking/TableRefs.ag"(line 33, column 9)-              _lhsOannotatedTree =-                  {-# LINE 33 "./TypeChecking/TableRefs.ag" #-}-                  updateAnnotation (map TypeErrorA _errs     ++) _backTree-                  {-# LINE 14182 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 75, column 9)-              _libUpdates =-                  {-# LINE 75 "./TypeChecking/TableRefs.ag" #-}-                  if null _errs-                    then [LibStackIDs $ ("", _idLookups    ): _qidLookups-                         ,LibSetStarExpansion $ ("", _starExpansion    ): _qstarExpansion    ]-                    else []-                  {-# LINE 14190 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 104, column 9)-              _errs =-                  {-# LINE 104 "./TypeChecking/TableRefs.ag" #-}-                  case _relType     of-                    Left e -> e-                    Right _ -> []-                  {-# LINE 14197 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 108, column 9)-              _relType =-                  {-# LINE 108 "./TypeChecking/TableRefs.ag" #-}-                  envCompositeAttrsPair _lhsIenv [] tbl_-                  {-# LINE 14202 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 109, column 9)-              _relType1 =-                  {-# LINE 109 "./TypeChecking/TableRefs.ag" #-}-                  fromRight ([],[]) _relType-                  {-# LINE 14207 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 110, column 9)-              _pAttrs =-                  {-# LINE 110 "./TypeChecking/TableRefs.ag" #-}-                  fst _relType1-                  {-# LINE 14212 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 111, column 9)-              _sAttrs =-                  {-# LINE 111 "./TypeChecking/TableRefs.ag" #-}-                  snd _relType1-                  {-# LINE 14217 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 113, column 9)-              _idLookups =-                  {-# LINE 113 "./TypeChecking/TableRefs.ag" #-}-                  _pAttrs     ++ _sAttrs-                  {-# LINE 14222 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 114, column 9)-              _alias =-                  {-# LINE 114 "./TypeChecking/TableRefs.ag" #-}-                  getAlias tbl_ _aliasIannotatedTree-                  {-# LINE 14227 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 115, column 9)-              _qidLookups =-                  {-# LINE 115 "./TypeChecking/TableRefs.ag" #-}-                  [(_alias    , _idLookups    )]-                  {-# LINE 14232 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 116, column 9)-              _starExpansion =-                  {-# LINE 116 "./TypeChecking/TableRefs.ag" #-}-                  _pAttrs-                  {-# LINE 14237 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 117, column 9)-              _qstarExpansion =-                  {-# LINE 117 "./TypeChecking/TableRefs.ag" #-}-                  [(_alias    , _pAttrs    )]-                  {-# LINE 14242 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 248, column 9)-              _lhsOlibUpdates =-                  {-# LINE 248 "./TypeChecking/TableRefs.ag" #-}-                  _libUpdates-                  {-# LINE 14247 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 249, column 9)-              _lhsOidLookups =-                  {-# LINE 249 "./TypeChecking/TableRefs.ag" #-}-                  _idLookups-                  {-# LINE 14252 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 250, column 9)-              _lhsOqidLookups =-                  {-# LINE 250 "./TypeChecking/TableRefs.ag" #-}-                  _qidLookups-                  {-# LINE 14257 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 251, column 9)-              _lhsOstarExpansion =-                  {-# LINE 251 "./TypeChecking/TableRefs.ag" #-}-                  _starExpansion-                  {-# LINE 14262 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 252, column 9)-              _lhsOqstarExpansion =-                  {-# LINE 252 "./TypeChecking/TableRefs.ag" #-}-                  _qstarExpansion-                  {-# LINE 14267 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 260, column 9)-              _backTree =-                  {-# LINE 260 "./TypeChecking/TableRefs.ag" #-}-                  Tref ann_ tbl_ _aliasIannotatedTree-                  {-# LINE 14272 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Tref ann_ tbl_ _aliasIannotatedTree-                  {-# LINE 14277 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Tref ann_ tbl_ _aliasIoriginalTree-                  {-# LINE 14282 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14287 "AstInternal.hs" #-}-              -- copy rule (down)-              _aliasOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 14292 "AstInternal.hs" #-}-              -- copy rule (down)-              _aliasOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 14297 "AstInternal.hs" #-}-              ( _aliasIannotatedTree,_aliasIoriginalTree) =-                  (alias_ _aliasOenv _aliasOlib )-          in  ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion)))-sem_TableRef_TrefFun :: Annotation ->-                        T_Expression  ->-                        T_TableAlias  ->-                        T_TableRef -sem_TableRef_TrefFun ann_ fn_ alias_  =-    (\ _lhsIenv-       _lhsIjlibUpdates-       _lhsIlib ->-         (let _lhsOannotatedTree :: TableRef-              _eqfunIdens :: (Either [TypeError] (String,[(String,Type)]))-              _idLookups :: ([(String,Type)])-              _qidLookups :: ([(String,[(String,Type)])])-              _starExpansion :: ([(String,Type)])-              _qstarExpansion :: ([(String,[(String,Type)])])-              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOidLookups :: ([(String,Type)])-              _lhsOqidLookups :: ([(String,[(String,Type)])])-              _lhsOstarExpansion :: ([(String,Type)])-              _lhsOqstarExpansion :: ([(String,[(String,Type)])])-              _lhsOoriginalTree :: TableRef-              _fnOenv :: Environment-              _fnOlib :: LocalIdentifierBindings-              _aliasOenv :: Environment-              _aliasOlib :: LocalIdentifierBindings-              _fnIannotatedTree :: Expression-              _fnIliftedColumnName :: String-              _fnIoriginalTree :: Expression-              _aliasIannotatedTree :: TableAlias-              _aliasIoriginalTree :: TableAlias-              -- "./TypeChecking/TableRefs.ag"(line 33, column 9)-              _lhsOannotatedTree =-                  {-# LINE 33 "./TypeChecking/TableRefs.ag" #-}-                  updateAnnotation (map TypeErrorA _errs     ++) _backTree-                  {-# LINE 14334 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 75, column 9)-              _libUpdates =-                  {-# LINE 75 "./TypeChecking/TableRefs.ag" #-}-                  if null _errs-                    then [LibStackIDs $ ("", _idLookups    ): _qidLookups-                         ,LibSetStarExpansion $ ("", _starExpansion    ): _qstarExpansion    ]-                    else []-                  {-# LINE 14342 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 120, column 9)-              _errs =-                  {-# LINE 120 "./TypeChecking/TableRefs.ag" #-}-                  case _eqfunIdens of-                    Left e -> e-                    Right _ -> []-                  {-# LINE 14349 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 124, column 9)-              _eqfunIdens =-                  {-# LINE 124 "./TypeChecking/TableRefs.ag" #-}-                  funIdens _lhsIenv _alias     _fnIannotatedTree-                  {-# LINE 14354 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 125, column 9)-              _qfunIdens =-                  {-# LINE 125 "./TypeChecking/TableRefs.ag" #-}-                  fromRight ("",[]) _eqfunIdens-                  {-# LINE 14359 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 126, column 9)-              _alias2 =-                  {-# LINE 126 "./TypeChecking/TableRefs.ag" #-}-                  fst _qfunIdens-                  {-# LINE 14364 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 127, column 9)-              _funIdens =-                  {-# LINE 127 "./TypeChecking/TableRefs.ag" #-}-                  snd _qfunIdens-                  {-# LINE 14369 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 128, column 9)-              _alias =-                  {-# LINE 128 "./TypeChecking/TableRefs.ag" #-}-                  getAlias "" _aliasIannotatedTree-                  {-# LINE 14374 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 130, column 9)-              _idLookups =-                  {-# LINE 130 "./TypeChecking/TableRefs.ag" #-}-                  _funIdens-                  {-# LINE 14379 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 131, column 9)-              _qidLookups =-                  {-# LINE 131 "./TypeChecking/TableRefs.ag" #-}-                  [(_alias2, _idLookups    )]-                  {-# LINE 14384 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 132, column 9)-              _starExpansion =-                  {-# LINE 132 "./TypeChecking/TableRefs.ag" #-}-                  _idLookups-                  {-# LINE 14389 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 133, column 9)-              _qstarExpansion =-                  {-# LINE 133 "./TypeChecking/TableRefs.ag" #-}-                  _qidLookups-                  {-# LINE 14394 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 248, column 9)-              _lhsOlibUpdates =-                  {-# LINE 248 "./TypeChecking/TableRefs.ag" #-}-                  _libUpdates-                  {-# LINE 14399 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 249, column 9)-              _lhsOidLookups =-                  {-# LINE 249 "./TypeChecking/TableRefs.ag" #-}-                  _idLookups-                  {-# LINE 14404 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 250, column 9)-              _lhsOqidLookups =-                  {-# LINE 250 "./TypeChecking/TableRefs.ag" #-}-                  _qidLookups-                  {-# LINE 14409 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 251, column 9)-              _lhsOstarExpansion =-                  {-# LINE 251 "./TypeChecking/TableRefs.ag" #-}-                  _starExpansion-                  {-# LINE 14414 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 252, column 9)-              _lhsOqstarExpansion =-                  {-# LINE 252 "./TypeChecking/TableRefs.ag" #-}-                  _qstarExpansion-                  {-# LINE 14419 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 262, column 9)-              _backTree =-                  {-# LINE 262 "./TypeChecking/TableRefs.ag" #-}-                  TrefFun ann_ _fnIannotatedTree _aliasIannotatedTree-                  {-# LINE 14424 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  TrefFun ann_ _fnIannotatedTree _aliasIannotatedTree-                  {-# LINE 14429 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  TrefFun ann_ _fnIoriginalTree _aliasIoriginalTree-                  {-# LINE 14434 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14439 "AstInternal.hs" #-}-              -- copy rule (down)-              _fnOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 14444 "AstInternal.hs" #-}-              -- copy rule (down)-              _fnOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 14449 "AstInternal.hs" #-}-              -- copy rule (down)-              _aliasOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 14454 "AstInternal.hs" #-}-              -- copy rule (down)-              _aliasOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 14459 "AstInternal.hs" #-}-              ( _fnIannotatedTree,_fnIliftedColumnName,_fnIoriginalTree) =-                  (fn_ _fnOenv _fnOlib )-              ( _aliasIannotatedTree,_aliasIoriginalTree) =-                  (alias_ _aliasOenv _aliasOlib )-          in  ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion)))--- TableRefList -------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         libUpdates           : [LocalIdentifierBindingsUpdate]-         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : TableRef -         child tl             : TableRefList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type TableRefList  = [(TableRef)]--- cata-sem_TableRefList :: TableRefList  ->-                    T_TableRefList -sem_TableRefList list  =-    (Prelude.foldr sem_TableRefList_Cons sem_TableRefList_Nil (Prelude.map sem_TableRef list) )--- semantic domain-type T_TableRefList  = Environment ->-                       LocalIdentifierBindings ->-                       ( TableRefList,([LocalIdentifierBindingsUpdate]),TableRefList)-data Inh_TableRefList  = Inh_TableRefList {env_Inh_TableRefList :: Environment,lib_Inh_TableRefList :: LocalIdentifierBindings}-data Syn_TableRefList  = Syn_TableRefList {annotatedTree_Syn_TableRefList :: TableRefList,libUpdates_Syn_TableRefList :: [LocalIdentifierBindingsUpdate],originalTree_Syn_TableRefList :: TableRefList}-wrap_TableRefList :: T_TableRefList  ->-                     Inh_TableRefList  ->-                     Syn_TableRefList -wrap_TableRefList sem (Inh_TableRefList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_TableRefList _lhsOannotatedTree _lhsOlibUpdates _lhsOoriginalTree ))-sem_TableRefList_Cons :: T_TableRef  ->-                         T_TableRefList  ->-                         T_TableRefList -sem_TableRefList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _hdOjlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: TableRefList-              _lhsOoriginalTree :: TableRefList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: TableRef-              _hdIidLookups :: ([(String,Type)])-              _hdIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _hdIoriginalTree :: TableRef-              _hdIqidLookups :: ([(String,[(String,Type)])])-              _hdIqstarExpansion :: ([(String,[(String,Type)])])-              _hdIstarExpansion :: ([(String,Type)])-              _tlIannotatedTree :: TableRefList-              _tlIlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _tlIoriginalTree :: TableRefList-              -- "./TypeChecking/TableRefs.ag"(line 40, column 9)-              _lhsOlibUpdates =-                  {-# LINE 40 "./TypeChecking/TableRefs.ag" #-}-                  _hdIlibUpdates-                  {-# LINE 14534 "AstInternal.hs" #-}-              -- "./TypeChecking/TableRefs.ag"(line 197, column 12)-              _hdOjlibUpdates =-                  {-# LINE 197 "./TypeChecking/TableRefs.ag" #-}-                  []-                  {-# LINE 14539 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 14544 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 14549 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 14554 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14559 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 14564 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 14569 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 14574 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 14579 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIidLookups,_hdIlibUpdates,_hdIoriginalTree,_hdIqidLookups,_hdIqstarExpansion,_hdIstarExpansion) =-                  (hd_ _hdOenv _hdOjlibUpdates _hdOlib )-              ( _tlIannotatedTree,_tlIlibUpdates,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))-sem_TableRefList_Nil :: T_TableRefList -sem_TableRefList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])-              _lhsOannotatedTree :: TableRefList-              _lhsOoriginalTree :: TableRefList-              -- "./TypeChecking/TableRefs.ag"(line 38, column 9)-              _lhsOlibUpdates =-                  {-# LINE 38 "./TypeChecking/TableRefs.ag" #-}-                  []-                  {-# LINE 14596 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 14601 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 14606 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 14611 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14616 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))--- TriggerEvent -------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative TDelete:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative TInsert:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative TUpdate:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data TriggerEvent  = TDelete -                   | TInsert -                   | TUpdate -                   deriving ( Data,Eq,Show,Typeable)--- cata-sem_TriggerEvent :: TriggerEvent  ->-                    T_TriggerEvent -sem_TriggerEvent (TDelete )  =-    (sem_TriggerEvent_TDelete )-sem_TriggerEvent (TInsert )  =-    (sem_TriggerEvent_TInsert )-sem_TriggerEvent (TUpdate )  =-    (sem_TriggerEvent_TUpdate )--- semantic domain-type T_TriggerEvent  = Environment ->-                       LocalIdentifierBindings ->-                       ( TriggerEvent,TriggerEvent)-data Inh_TriggerEvent  = Inh_TriggerEvent {env_Inh_TriggerEvent :: Environment,lib_Inh_TriggerEvent :: LocalIdentifierBindings}-data Syn_TriggerEvent  = Syn_TriggerEvent {annotatedTree_Syn_TriggerEvent :: TriggerEvent,originalTree_Syn_TriggerEvent :: TriggerEvent}-wrap_TriggerEvent :: T_TriggerEvent  ->-                     Inh_TriggerEvent  ->-                     Syn_TriggerEvent -wrap_TriggerEvent sem (Inh_TriggerEvent _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_TriggerEvent _lhsOannotatedTree _lhsOoriginalTree ))-sem_TriggerEvent_TDelete :: T_TriggerEvent -sem_TriggerEvent_TDelete  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TriggerEvent-              _lhsOoriginalTree :: TriggerEvent-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  TDelete-                  {-# LINE 14677 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  TDelete-                  {-# LINE 14682 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 14687 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14692 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_TriggerEvent_TInsert :: T_TriggerEvent -sem_TriggerEvent_TInsert  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TriggerEvent-              _lhsOoriginalTree :: TriggerEvent-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  TInsert-                  {-# LINE 14704 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  TInsert-                  {-# LINE 14709 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 14714 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14719 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_TriggerEvent_TUpdate :: T_TriggerEvent -sem_TriggerEvent_TUpdate  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TriggerEvent-              _lhsOoriginalTree :: TriggerEvent-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  TUpdate-                  {-# LINE 14731 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  TUpdate-                  {-# LINE 14736 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 14741 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14746 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- TriggerFire --------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative EachRow:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative EachStatement:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data TriggerFire  = EachRow -                  | EachStatement -                  deriving ( Data,Eq,Show,Typeable)--- cata-sem_TriggerFire :: TriggerFire  ->-                   T_TriggerFire -sem_TriggerFire (EachRow )  =-    (sem_TriggerFire_EachRow )-sem_TriggerFire (EachStatement )  =-    (sem_TriggerFire_EachStatement )--- semantic domain-type T_TriggerFire  = Environment ->-                      LocalIdentifierBindings ->-                      ( TriggerFire,TriggerFire)-data Inh_TriggerFire  = Inh_TriggerFire {env_Inh_TriggerFire :: Environment,lib_Inh_TriggerFire :: LocalIdentifierBindings}-data Syn_TriggerFire  = Syn_TriggerFire {annotatedTree_Syn_TriggerFire :: TriggerFire,originalTree_Syn_TriggerFire :: TriggerFire}-wrap_TriggerFire :: T_TriggerFire  ->-                    Inh_TriggerFire  ->-                    Syn_TriggerFire -wrap_TriggerFire sem (Inh_TriggerFire _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_TriggerFire _lhsOannotatedTree _lhsOoriginalTree ))-sem_TriggerFire_EachRow :: T_TriggerFire -sem_TriggerFire_EachRow  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TriggerFire-              _lhsOoriginalTree :: TriggerFire-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  EachRow-                  {-# LINE 14800 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  EachRow-                  {-# LINE 14805 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 14810 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14815 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_TriggerFire_EachStatement :: T_TriggerFire -sem_TriggerFire_EachStatement  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TriggerFire-              _lhsOoriginalTree :: TriggerFire-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  EachStatement-                  {-# LINE 14827 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  EachStatement-                  {-# LINE 14832 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 14837 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14842 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- TriggerWhen --------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative TriggerAfter:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative TriggerBefore:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data TriggerWhen  = TriggerAfter -                  | TriggerBefore -                  deriving ( Data,Eq,Show,Typeable)--- cata-sem_TriggerWhen :: TriggerWhen  ->-                   T_TriggerWhen -sem_TriggerWhen (TriggerAfter )  =-    (sem_TriggerWhen_TriggerAfter )-sem_TriggerWhen (TriggerBefore )  =-    (sem_TriggerWhen_TriggerBefore )--- semantic domain-type T_TriggerWhen  = Environment ->-                      LocalIdentifierBindings ->-                      ( TriggerWhen,TriggerWhen)-data Inh_TriggerWhen  = Inh_TriggerWhen {env_Inh_TriggerWhen :: Environment,lib_Inh_TriggerWhen :: LocalIdentifierBindings}-data Syn_TriggerWhen  = Syn_TriggerWhen {annotatedTree_Syn_TriggerWhen :: TriggerWhen,originalTree_Syn_TriggerWhen :: TriggerWhen}-wrap_TriggerWhen :: T_TriggerWhen  ->-                    Inh_TriggerWhen  ->-                    Syn_TriggerWhen -wrap_TriggerWhen sem (Inh_TriggerWhen _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_TriggerWhen _lhsOannotatedTree _lhsOoriginalTree ))-sem_TriggerWhen_TriggerAfter :: T_TriggerWhen -sem_TriggerWhen_TriggerAfter  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TriggerWhen-              _lhsOoriginalTree :: TriggerWhen-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  TriggerAfter-                  {-# LINE 14896 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  TriggerAfter-                  {-# LINE 14901 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 14906 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14911 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_TriggerWhen_TriggerBefore :: T_TriggerWhen -sem_TriggerWhen_TriggerBefore  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: TriggerWhen-              _lhsOoriginalTree :: TriggerWhen-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  TriggerBefore-                  {-# LINE 14923 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  TriggerBefore-                  {-# LINE 14928 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 14933 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 14938 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))--- TypeAttributeDef ---------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         attrName             : String-         namedType            : Type-         originalTree         : SELF -   alternatives:-      alternative TypeAttDef:-         child ann            : {Annotation}-         child name           : {String}-         child typ            : TypeName -         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data TypeAttributeDef  = TypeAttDef (Annotation) (String) (TypeName) -                       deriving ( Data,Eq,Show,Typeable)--- cata-sem_TypeAttributeDef :: TypeAttributeDef  ->-                        T_TypeAttributeDef -sem_TypeAttributeDef (TypeAttDef _ann _name _typ )  =-    (sem_TypeAttributeDef_TypeAttDef _ann _name (sem_TypeName _typ ) )--- semantic domain-type T_TypeAttributeDef  = Environment ->-                           LocalIdentifierBindings ->-                           ( TypeAttributeDef,String,Type,TypeAttributeDef)-data Inh_TypeAttributeDef  = Inh_TypeAttributeDef {env_Inh_TypeAttributeDef :: Environment,lib_Inh_TypeAttributeDef :: LocalIdentifierBindings}-data Syn_TypeAttributeDef  = Syn_TypeAttributeDef {annotatedTree_Syn_TypeAttributeDef :: TypeAttributeDef,attrName_Syn_TypeAttributeDef :: String,namedType_Syn_TypeAttributeDef :: Type,originalTree_Syn_TypeAttributeDef :: TypeAttributeDef}-wrap_TypeAttributeDef :: T_TypeAttributeDef  ->-                         Inh_TypeAttributeDef  ->-                         Syn_TypeAttributeDef -wrap_TypeAttributeDef sem (Inh_TypeAttributeDef _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_TypeAttributeDef _lhsOannotatedTree _lhsOattrName _lhsOnamedType _lhsOoriginalTree ))-sem_TypeAttributeDef_TypeAttDef :: Annotation ->-                                   String ->-                                   T_TypeName  ->-                                   T_TypeAttributeDef -sem_TypeAttributeDef_TypeAttDef ann_ name_ typ_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOattrName :: String-              _lhsOnamedType :: Type-              _lhsOannotatedTree :: TypeAttributeDef-              _lhsOoriginalTree :: TypeAttributeDef-              _typOenv :: Environment-              _typOlib :: LocalIdentifierBindings-              _typIannotatedTree :: TypeName-              _typInamedType :: Type-              _typIoriginalTree :: TypeName-              -- "./TypeChecking/MiscCreates.ag"(line 40, column 9)-              _lhsOattrName =-                  {-# LINE 40 "./TypeChecking/MiscCreates.ag" #-}-                  name_-                  {-# LINE 15000 "AstInternal.hs" #-}-              -- "./TypeChecking/MiscCreates.ag"(line 41, column 9)-              _lhsOnamedType =-                  {-# LINE 41 "./TypeChecking/MiscCreates.ag" #-}-                  _typInamedType-                  {-# LINE 15005 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  TypeAttDef ann_ name_ _typIannotatedTree-                  {-# LINE 15010 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  TypeAttDef ann_ name_ _typIoriginalTree-                  {-# LINE 15015 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15020 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15025 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15030 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15035 "AstInternal.hs" #-}-              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =-                  (typ_ _typOenv _typOlib )-          in  ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType,_lhsOoriginalTree)))--- TypeAttributeDefList -----------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         attrs                : [(String, Type)]-         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : TypeAttributeDef -         child tl             : TypeAttributeDefList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type TypeAttributeDefList  = [(TypeAttributeDef)]--- cata-sem_TypeAttributeDefList :: TypeAttributeDefList  ->-                            T_TypeAttributeDefList -sem_TypeAttributeDefList list  =-    (Prelude.foldr sem_TypeAttributeDefList_Cons sem_TypeAttributeDefList_Nil (Prelude.map sem_TypeAttributeDef list) )--- semantic domain-type T_TypeAttributeDefList  = Environment ->-                               LocalIdentifierBindings ->-                               ( TypeAttributeDefList,([(String, Type)]),TypeAttributeDefList)-data Inh_TypeAttributeDefList  = Inh_TypeAttributeDefList {env_Inh_TypeAttributeDefList :: Environment,lib_Inh_TypeAttributeDefList :: LocalIdentifierBindings}-data Syn_TypeAttributeDefList  = Syn_TypeAttributeDefList {annotatedTree_Syn_TypeAttributeDefList :: TypeAttributeDefList,attrs_Syn_TypeAttributeDefList :: [(String, Type)],originalTree_Syn_TypeAttributeDefList :: TypeAttributeDefList}-wrap_TypeAttributeDefList :: T_TypeAttributeDefList  ->-                             Inh_TypeAttributeDefList  ->-                             Syn_TypeAttributeDefList -wrap_TypeAttributeDefList sem (Inh_TypeAttributeDefList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_TypeAttributeDefList _lhsOannotatedTree _lhsOattrs _lhsOoriginalTree ))-sem_TypeAttributeDefList_Cons :: T_TypeAttributeDef  ->-                                 T_TypeAttributeDefList  ->-                                 T_TypeAttributeDefList -sem_TypeAttributeDefList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOattrs :: ([(String, Type)])-              _lhsOannotatedTree :: TypeAttributeDefList-              _lhsOoriginalTree :: TypeAttributeDefList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: TypeAttributeDef-              _hdIattrName :: String-              _hdInamedType :: Type-              _hdIoriginalTree :: TypeAttributeDef-              _tlIannotatedTree :: TypeAttributeDefList-              _tlIattrs :: ([(String, Type)])-              _tlIoriginalTree :: TypeAttributeDefList-              -- "./TypeChecking/MiscCreates.ag"(line 46, column 12)-              _lhsOattrs =-                  {-# LINE 46 "./TypeChecking/MiscCreates.ag" #-}-                  (_hdIattrName, _hdInamedType) : _tlIattrs-                  {-# LINE 15104 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 15109 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 15114 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15119 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15124 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15129 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15134 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15139 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15144 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIattrName,_hdInamedType,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIattrs,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree)))-sem_TypeAttributeDefList_Nil :: T_TypeAttributeDefList -sem_TypeAttributeDefList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOattrs :: ([(String, Type)])-              _lhsOannotatedTree :: TypeAttributeDefList-              _lhsOoriginalTree :: TypeAttributeDefList-              -- "./TypeChecking/MiscCreates.ag"(line 47, column 11)-              _lhsOattrs =-                  {-# LINE 47 "./TypeChecking/MiscCreates.ag" #-}-                  []-                  {-# LINE 15161 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 15166 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 15171 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15176 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15181 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree)))--- TypeName -----------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         namedType            : Type-         originalTree         : SELF -   alternatives:-      alternative ArrayTypeName:-         child ann            : {Annotation}-         child typ            : TypeName -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative PrecTypeName:-         child ann            : {Annotation}-         child tn             : {String}-         child prec           : {Integer}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative SetOfTypeName:-         child ann            : {Annotation}-         child typ            : TypeName -         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _-      alternative SimpleTypeName:-         child ann            : {Annotation}-         child tn             : {String}-         visit 0:-            local tpe         : _-            local backTree    : _-            local annotatedTree : _-            local originalTree : _--}-data TypeName  = ArrayTypeName (Annotation) (TypeName) -               | PrecTypeName (Annotation) (String) (Integer) -               | SetOfTypeName (Annotation) (TypeName) -               | SimpleTypeName (Annotation) (String) -               deriving ( Data,Eq,Show,Typeable)--- cata-sem_TypeName :: TypeName  ->-                T_TypeName -sem_TypeName (ArrayTypeName _ann _typ )  =-    (sem_TypeName_ArrayTypeName _ann (sem_TypeName _typ ) )-sem_TypeName (PrecTypeName _ann _tn _prec )  =-    (sem_TypeName_PrecTypeName _ann _tn _prec )-sem_TypeName (SetOfTypeName _ann _typ )  =-    (sem_TypeName_SetOfTypeName _ann (sem_TypeName _typ ) )-sem_TypeName (SimpleTypeName _ann _tn )  =-    (sem_TypeName_SimpleTypeName _ann _tn )--- semantic domain-type T_TypeName  = Environment ->-                   LocalIdentifierBindings ->-                   ( TypeName,Type,TypeName)-data Inh_TypeName  = Inh_TypeName {env_Inh_TypeName :: Environment,lib_Inh_TypeName :: LocalIdentifierBindings}-data Syn_TypeName  = Syn_TypeName {annotatedTree_Syn_TypeName :: TypeName,namedType_Syn_TypeName :: Type,originalTree_Syn_TypeName :: TypeName}-wrap_TypeName :: T_TypeName  ->-                 Inh_TypeName  ->-                 Syn_TypeName -wrap_TypeName sem (Inh_TypeName _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_TypeName _lhsOannotatedTree _lhsOnamedType _lhsOoriginalTree ))-sem_TypeName_ArrayTypeName :: Annotation ->-                              T_TypeName  ->-                              T_TypeName -sem_TypeName_ArrayTypeName ann_ typ_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOnamedType :: Type-              _lhsOannotatedTree :: TypeName-              _lhsOoriginalTree :: TypeName-              _typOenv :: Environment-              _typOlib :: LocalIdentifierBindings-              _typIannotatedTree :: TypeName-              _typInamedType :: Type-              _typIoriginalTree :: TypeName-              -- "./TypeChecking/Misc.ag"(line 19, column 10)-              _lhsOnamedType =-                  {-# LINE 19 "./TypeChecking/Misc.ag" #-}-                  tpeToT _tpe-                  {-# LINE 15275 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 20, column 10)-              _lhsOannotatedTree =-                  {-# LINE 20 "./TypeChecking/Misc.ag" #-}-                  updateAnnotation-                    ((map TypeErrorA $ getErrors _tpe    ) ++)-                    _backTree-                  {-# LINE 15282 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 30, column 9)-              _tpe =-                  {-# LINE 30 "./TypeChecking/Misc.ag" #-}-                  dependsOnRTpe [_typInamedType] $ Right $ ArrayType _typInamedType-                  {-# LINE 15287 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 31, column 9)-              _backTree =-                  {-# LINE 31 "./TypeChecking/Misc.ag" #-}-                  ArrayTypeName ann_ _typIannotatedTree-                  {-# LINE 15292 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  ArrayTypeName ann_ _typIannotatedTree-                  {-# LINE 15297 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  ArrayTypeName ann_ _typIoriginalTree-                  {-# LINE 15302 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15307 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15312 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15317 "AstInternal.hs" #-}-              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =-                  (typ_ _typOenv _typOlib )-          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree)))-sem_TypeName_PrecTypeName :: Annotation ->-                             String ->-                             Integer ->-                             T_TypeName -sem_TypeName_PrecTypeName ann_ tn_ prec_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOnamedType :: Type-              _lhsOannotatedTree :: TypeName-              _lhsOoriginalTree :: TypeName-              -- "./TypeChecking/Misc.ag"(line 19, column 10)-              _lhsOnamedType =-                  {-# LINE 19 "./TypeChecking/Misc.ag" #-}-                  tpeToT _tpe-                  {-# LINE 15335 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 20, column 10)-              _lhsOannotatedTree =-                  {-# LINE 20 "./TypeChecking/Misc.ag" #-}-                  updateAnnotation-                    ((map TypeErrorA $ getErrors _tpe    ) ++)-                    _backTree-                  {-# LINE 15342 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 36, column 9)-              _tpe =-                  {-# LINE 36 "./TypeChecking/Misc.ag" #-}-                  envLookupType _lhsIenv $ canonicalizeTypeName tn_-                  {-# LINE 15347 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 37, column 9)-              _backTree =-                  {-# LINE 37 "./TypeChecking/Misc.ag" #-}-                  PrecTypeName ann_ tn_ prec_-                  {-# LINE 15352 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  PrecTypeName ann_ tn_ prec_-                  {-# LINE 15357 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  PrecTypeName ann_ tn_ prec_-                  {-# LINE 15362 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15367 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree)))-sem_TypeName_SetOfTypeName :: Annotation ->-                              T_TypeName  ->-                              T_TypeName -sem_TypeName_SetOfTypeName ann_ typ_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOnamedType :: Type-              _lhsOannotatedTree :: TypeName-              _lhsOoriginalTree :: TypeName-              _typOenv :: Environment-              _typOlib :: LocalIdentifierBindings-              _typIannotatedTree :: TypeName-              _typInamedType :: Type-              _typIoriginalTree :: TypeName-              -- "./TypeChecking/Misc.ag"(line 19, column 10)-              _lhsOnamedType =-                  {-# LINE 19 "./TypeChecking/Misc.ag" #-}-                  tpeToT _tpe-                  {-# LINE 15387 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 20, column 10)-              _lhsOannotatedTree =-                  {-# LINE 20 "./TypeChecking/Misc.ag" #-}-                  updateAnnotation-                    ((map TypeErrorA $ getErrors _tpe    ) ++)-                    _backTree-                  {-# LINE 15394 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 33, column 9)-              _tpe =-                  {-# LINE 33 "./TypeChecking/Misc.ag" #-}-                  dependsOnRTpe [_typInamedType] $ Right $ SetOfType _typInamedType-                  {-# LINE 15399 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 34, column 9)-              _backTree =-                  {-# LINE 34 "./TypeChecking/Misc.ag" #-}-                  SetOfTypeName ann_ _typIannotatedTree-                  {-# LINE 15404 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SetOfTypeName ann_ _typIannotatedTree-                  {-# LINE 15409 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SetOfTypeName ann_ _typIoriginalTree-                  {-# LINE 15414 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15419 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15424 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15429 "AstInternal.hs" #-}-              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =-                  (typ_ _typOenv _typOlib )-          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree)))-sem_TypeName_SimpleTypeName :: Annotation ->-                               String ->-                               T_TypeName -sem_TypeName_SimpleTypeName ann_ tn_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOnamedType :: Type-              _lhsOannotatedTree :: TypeName-              _lhsOoriginalTree :: TypeName-              -- "./TypeChecking/Misc.ag"(line 19, column 10)-              _lhsOnamedType =-                  {-# LINE 19 "./TypeChecking/Misc.ag" #-}-                  tpeToT _tpe-                  {-# LINE 15446 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 20, column 10)-              _lhsOannotatedTree =-                  {-# LINE 20 "./TypeChecking/Misc.ag" #-}-                  updateAnnotation-                    ((map TypeErrorA $ getErrors _tpe    ) ++)-                    _backTree-                  {-# LINE 15453 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 27, column 9)-              _tpe =-                  {-# LINE 27 "./TypeChecking/Misc.ag" #-}-                  envLookupType _lhsIenv $ canonicalizeTypeName tn_-                  {-# LINE 15458 "AstInternal.hs" #-}-              -- "./TypeChecking/Misc.ag"(line 28, column 9)-              _backTree =-                  {-# LINE 28 "./TypeChecking/Misc.ag" #-}-                  SimpleTypeName ann_ tn_-                  {-# LINE 15463 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  SimpleTypeName ann_ tn_-                  {-# LINE 15468 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  SimpleTypeName ann_ tn_-                  {-# LINE 15473 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15478 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree)))--- TypeNameList -------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         namedTypes           : [Type]-         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : TypeName -         child tl             : TypeNameList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type TypeNameList  = [(TypeName)]--- cata-sem_TypeNameList :: TypeNameList  ->-                    T_TypeNameList -sem_TypeNameList list  =-    (Prelude.foldr sem_TypeNameList_Cons sem_TypeNameList_Nil (Prelude.map sem_TypeName list) )--- semantic domain-type T_TypeNameList  = Environment ->-                       LocalIdentifierBindings ->-                       ( TypeNameList,([Type]),TypeNameList)-data Inh_TypeNameList  = Inh_TypeNameList {env_Inh_TypeNameList :: Environment,lib_Inh_TypeNameList :: LocalIdentifierBindings}-data Syn_TypeNameList  = Syn_TypeNameList {annotatedTree_Syn_TypeNameList :: TypeNameList,namedTypes_Syn_TypeNameList :: [Type],originalTree_Syn_TypeNameList :: TypeNameList}-wrap_TypeNameList :: T_TypeNameList  ->-                     Inh_TypeNameList  ->-                     Syn_TypeNameList -wrap_TypeNameList sem (Inh_TypeNameList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOnamedTypes,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_TypeNameList _lhsOannotatedTree _lhsOnamedTypes _lhsOoriginalTree ))-sem_TypeNameList_Cons :: T_TypeName  ->-                         T_TypeNameList  ->-                         T_TypeNameList -sem_TypeNameList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOnamedTypes :: ([Type])-              _lhsOannotatedTree :: TypeNameList-              _lhsOoriginalTree :: TypeNameList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: TypeName-              _hdInamedType :: Type-              _hdIoriginalTree :: TypeName-              _tlIannotatedTree :: TypeNameList-              _tlInamedTypes :: ([Type])-              _tlIoriginalTree :: TypeNameList-              -- "./TypeChecking/Drops.ag"(line 30, column 12)-              _lhsOnamedTypes =-                  {-# LINE 30 "./TypeChecking/Drops.ag" #-}-                  _hdInamedType : _tlInamedTypes-                  {-# LINE 15544 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 15549 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 15554 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15559 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15564 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15569 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15574 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15579 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15584 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdInamedType,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlInamedTypes,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOnamedTypes,_lhsOoriginalTree)))-sem_TypeNameList_Nil :: T_TypeNameList -sem_TypeNameList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOnamedTypes :: ([Type])-              _lhsOannotatedTree :: TypeNameList-              _lhsOoriginalTree :: TypeNameList-              -- "./TypeChecking/Drops.ag"(line 31, column 11)-              _lhsOnamedTypes =-                  {-# LINE 31 "./TypeChecking/Drops.ag" #-}-                  []-                  {-# LINE 15601 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 15606 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 15611 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15616 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15621 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOnamedTypes,_lhsOoriginalTree)))--- VarDef -------------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         def                  : (String,Type)-         originalTree         : SELF -   alternatives:-      alternative VarDef:-         child ann            : {Annotation}-         child name           : {String}-         child typ            : TypeName -         child value          : {Maybe Expression}-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data VarDef  = VarDef (Annotation) (String) (TypeName) (Maybe Expression) -             deriving ( Data,Eq,Show,Typeable)--- cata-sem_VarDef :: VarDef  ->-              T_VarDef -sem_VarDef (VarDef _ann _name _typ _value )  =-    (sem_VarDef_VarDef _ann _name (sem_TypeName _typ ) _value )--- semantic domain-type T_VarDef  = Environment ->-                 LocalIdentifierBindings ->-                 ( VarDef,((String,Type)),VarDef)-data Inh_VarDef  = Inh_VarDef {env_Inh_VarDef :: Environment,lib_Inh_VarDef :: LocalIdentifierBindings}-data Syn_VarDef  = Syn_VarDef {annotatedTree_Syn_VarDef :: VarDef,def_Syn_VarDef :: (String,Type),originalTree_Syn_VarDef :: VarDef}-wrap_VarDef :: T_VarDef  ->-               Inh_VarDef  ->-               Syn_VarDef -wrap_VarDef sem (Inh_VarDef _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOdef,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_VarDef _lhsOannotatedTree _lhsOdef _lhsOoriginalTree ))-sem_VarDef_VarDef :: Annotation ->-                     String ->-                     T_TypeName  ->-                     (Maybe Expression) ->-                     T_VarDef -sem_VarDef_VarDef ann_ name_ typ_ value_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOdef :: ((String,Type))-              _lhsOannotatedTree :: VarDef-              _lhsOoriginalTree :: VarDef-              _typOenv :: Environment-              _typOlib :: LocalIdentifierBindings-              _typIannotatedTree :: TypeName-              _typInamedType :: Type-              _typIoriginalTree :: TypeName-              -- "./TypeChecking/CreateFunction.ag"(line 131, column 14)-              _lhsOdef =-                  {-# LINE 131 "./TypeChecking/CreateFunction.ag" #-}-                  (name_, if _typInamedType == Pseudo Record then PgRecord Nothing else _typInamedType)-                  {-# LINE 15683 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  VarDef ann_ name_ _typIannotatedTree value_-                  {-# LINE 15688 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  VarDef ann_ name_ _typIoriginalTree value_-                  {-# LINE 15693 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15698 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15703 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15708 "AstInternal.hs" #-}-              -- copy rule (down)-              _typOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15713 "AstInternal.hs" #-}-              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =-                  (typ_ _typOenv _typOlib )-          in  ( _lhsOannotatedTree,_lhsOdef,_lhsOoriginalTree)))--- VarDefList ---------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         defs                 : [(String,Type)]-         originalTree         : SELF -   alternatives:-      alternative Cons:-         child hd             : VarDef -         child tl             : VarDefList -         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Nil:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-type VarDefList  = [(VarDef)]--- cata-sem_VarDefList :: VarDefList  ->-                  T_VarDefList -sem_VarDefList list  =-    (Prelude.foldr sem_VarDefList_Cons sem_VarDefList_Nil (Prelude.map sem_VarDef list) )--- semantic domain-type T_VarDefList  = Environment ->-                     LocalIdentifierBindings ->-                     ( VarDefList,([(String,Type)]),VarDefList)-data Inh_VarDefList  = Inh_VarDefList {env_Inh_VarDefList :: Environment,lib_Inh_VarDefList :: LocalIdentifierBindings}-data Syn_VarDefList  = Syn_VarDefList {annotatedTree_Syn_VarDefList :: VarDefList,defs_Syn_VarDefList :: [(String,Type)],originalTree_Syn_VarDefList :: VarDefList}-wrap_VarDefList :: T_VarDefList  ->-                   Inh_VarDefList  ->-                   Syn_VarDefList -wrap_VarDefList sem (Inh_VarDefList _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOdefs,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_VarDefList _lhsOannotatedTree _lhsOdefs _lhsOoriginalTree ))-sem_VarDefList_Cons :: T_VarDef  ->-                       T_VarDefList  ->-                       T_VarDefList -sem_VarDefList_Cons hd_ tl_  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOdefs :: ([(String,Type)])-              _lhsOannotatedTree :: VarDefList-              _lhsOoriginalTree :: VarDefList-              _hdOenv :: Environment-              _hdOlib :: LocalIdentifierBindings-              _tlOenv :: Environment-              _tlOlib :: LocalIdentifierBindings-              _hdIannotatedTree :: VarDef-              _hdIdef :: ((String,Type))-              _hdIoriginalTree :: VarDef-              _tlIannotatedTree :: VarDefList-              _tlIdefs :: ([(String,Type)])-              _tlIoriginalTree :: VarDefList-              -- "./TypeChecking/CreateFunction.ag"(line 134, column 12)-              _lhsOdefs =-                  {-# LINE 134 "./TypeChecking/CreateFunction.ag" #-}-                  _hdIdef : _tlIdefs-                  {-# LINE 15781 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIannotatedTree _tlIannotatedTree-                  {-# LINE 15786 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  (:) _hdIoriginalTree _tlIoriginalTree-                  {-# LINE 15791 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15796 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15801 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15806 "AstInternal.hs" #-}-              -- copy rule (down)-              _hdOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15811 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOenv =-                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIenv-                  {-# LINE 15816 "AstInternal.hs" #-}-              -- copy rule (down)-              _tlOlib =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _lhsIlib-                  {-# LINE 15821 "AstInternal.hs" #-}-              ( _hdIannotatedTree,_hdIdef,_hdIoriginalTree) =-                  (hd_ _hdOenv _hdOlib )-              ( _tlIannotatedTree,_tlIdefs,_tlIoriginalTree) =-                  (tl_ _tlOenv _tlOlib )-          in  ( _lhsOannotatedTree,_lhsOdefs,_lhsOoriginalTree)))-sem_VarDefList_Nil :: T_VarDefList -sem_VarDefList_Nil  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOdefs :: ([(String,Type)])-              _lhsOannotatedTree :: VarDefList-              _lhsOoriginalTree :: VarDefList-              -- "./TypeChecking/CreateFunction.ag"(line 135, column 11)-              _lhsOdefs =-                  {-# LINE 135 "./TypeChecking/CreateFunction.ag" #-}-                  []-                  {-# LINE 15838 "AstInternal.hs" #-}-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 15843 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  []-                  {-# LINE 15848 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15853 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15858 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOdefs,_lhsOoriginalTree)))--- Volatility ---------------------------------------------------{--   visit 0:-      inherited attributes:-         env                  : Environment-         lib                  : LocalIdentifierBindings-      synthesized attributes:-         annotatedTree        : SELF -         originalTree         : SELF -   alternatives:-      alternative Immutable:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Stable:-         visit 0:-            local annotatedTree : _-            local originalTree : _-      alternative Volatile:-         visit 0:-            local annotatedTree : _-            local originalTree : _--}-data Volatility  = Immutable -                 | Stable -                 | Volatile -                 deriving ( Data,Eq,Show,Typeable)--- cata-sem_Volatility :: Volatility  ->-                  T_Volatility -sem_Volatility (Immutable )  =-    (sem_Volatility_Immutable )-sem_Volatility (Stable )  =-    (sem_Volatility_Stable )-sem_Volatility (Volatile )  =-    (sem_Volatility_Volatile )--- semantic domain-type T_Volatility  = Environment ->-                     LocalIdentifierBindings ->-                     ( Volatility,Volatility)-data Inh_Volatility  = Inh_Volatility {env_Inh_Volatility :: Environment,lib_Inh_Volatility :: LocalIdentifierBindings}-data Syn_Volatility  = Syn_Volatility {annotatedTree_Syn_Volatility :: Volatility,originalTree_Syn_Volatility :: Volatility}-wrap_Volatility :: T_Volatility  ->-                   Inh_Volatility  ->-                   Syn_Volatility -wrap_Volatility sem (Inh_Volatility _lhsIenv _lhsIlib )  =-    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =-             (sem _lhsIenv _lhsIlib )-     in  (Syn_Volatility _lhsOannotatedTree _lhsOoriginalTree ))-sem_Volatility_Immutable :: T_Volatility -sem_Volatility_Immutable  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Volatility-              _lhsOoriginalTree :: Volatility-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Immutable-                  {-# LINE 15919 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Immutable-                  {-# LINE 15924 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15929 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15934 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Volatility_Stable :: T_Volatility -sem_Volatility_Stable  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Volatility-              _lhsOoriginalTree :: Volatility-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Stable-                  {-# LINE 15946 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Stable-                  {-# LINE 15951 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15956 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15961 "AstInternal.hs" #-}-          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))-sem_Volatility_Volatile :: T_Volatility -sem_Volatility_Volatile  =-    (\ _lhsIenv-       _lhsIlib ->-         (let _lhsOannotatedTree :: Volatility-              _lhsOoriginalTree :: Volatility-              -- self rule-              _annotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  Volatile-                  {-# LINE 15973 "AstInternal.hs" #-}-              -- self rule-              _originalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  Volatile-                  {-# LINE 15978 "AstInternal.hs" #-}-              -- self rule-              _lhsOannotatedTree =-                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}-                  _annotatedTree-                  {-# LINE 15983 "AstInternal.hs" #-}-              -- self rule-              _lhsOoriginalTree =-                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}-                  _originalTree-                  {-# LINE 15988 "AstInternal.hs" #-}+-- UUAGC 0.9.13 (AstInternal.ag)+module Database.HsSqlPpp.AstInternals.AstInternal(+    -- {-# LANGUAGE DeriveDataTypeable,RankNTypes,ScopedTypeVariables #-}+    -- {-# OPTIONS_HADDOCK hide  #-}+    --from the ag files:+    --ast nodes+    Statement (..)+   ,SelectExpression (..)+   ,FnBody (..)+   ,SetClause (..)+   ,TableRef (..)+   ,TableAlias(..)+   ,JoinExpression (..)+   ,JoinType (..)+   ,SelectList (..)+   ,SelectItem (..)+   ,CopySource (..)+   ,AttributeDef (..)+   ,RowConstraint (..)+   ,AlterTableAction(..)+   ,Constraint (..)+   ,TypeAttributeDef (..)+   ,ParamDef (..)+   ,VarDef (..)+   ,RaiseType (..)+   ,CombineType (..)+   ,Volatility (..)+   ,Language (..)+   ,TypeName (..)+   ,DropType (..)+   ,Cascade (..)+   ,Direction (..)+   ,Distinct (..)+   ,Natural (..)+   ,IfExists (..)+   ,RestartIdentity (..)+   ,Expression (..)+   ,FrameClause(..)+   ,InList (..)+   ,LiftFlavour(..)+   ,TriggerWhen(..)+   ,TriggerEvent(..)+   ,TriggerFire(..)+   ,StatementList+   ,ExpressionListStatementListPairList+   ,ExpressionListStatementListPair+   ,ExpressionList+   ,StringList+   ,ParamDefList+   ,AttributeDefList+   ,ConstraintList+   ,TypeAttributeDefList+   ,TypeNameList+   ,StringTypeNameListPair+   ,StringTypeNameListPairList+   ,ExpressionStatementListPairList+   ,SetClauseList+   ,CaseExpressionListExpressionPairList+   ,MaybeExpression+   ,TableRefList+   ,ExpressionListList+   ,SelectItemList+   ,OnExpr+   ,RowConstraintList+   ,VarDefList+   ,ExpressionStatementListPair+   ,CaseExpressionListExpressionPair+   ,CaseExpressionList+   ,ExpressionDirectionPair+   ,ExpressionDirectionPairList+   ,MaybeBoolExpression+   ,MaybeSelectList+   ,SetValue(..)+   -- typechecking+   ,typeCheck+   ,typeCheckPS+   ,typeCheckExpression+) where++import Data.Maybe+import Data.List+import Debug.Trace+--import Control.Monad.Error+import Data.Either+import Control.Applicative+import Data.Generics+import Data.Char+import Control.Monad.State++import Database.HsSqlPpp.AstInternals.TypeType+import Database.HsSqlPpp.AstInternals.TypeChecking.TypeConversion+import Database.HsSqlPpp.AstInternals.TypeChecking.ErrorUtils+import Database.HsSqlPpp.AstInternals.AstAnnotation+import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal+import Database.HsSqlPpp.AstInternals.TypeChecking.LocalIdentifierBindings+--import Database.HsSqlPpp.AstInternals.Catalog.DefaultTemplate1Catalog+import Database.HsSqlPpp.Utils+import Data.Generics.PlateData+++{-# LINE 683 "AstInternal.ag" #-}++{-+-- | Type check multiple asts, allowing type checking references in+--   later files to definitions in earlier files. This is probably+--   more straightforward if you parse the files then concatenate the+--   statementlists together before type checking rather than using+--   this function+typeCheckMany :: Catalog -> [StatementList] -> [StatementList]+typeCheckMany cat sts =+    annInt cat sts []+    where+      annInt e (s:ss) ress =+          let (e1,res) = typeCheck e s+          in annInt e1 ss (res:ress)+      annInt _ [] ress = reverse ress+-}++-- | Takes an ast, checks against catalog passed, and adds+--   annotations, including types, type errors, and statement info.+--   Returns the updated catalog as well as the annotated ast.+typeCheck :: Catalog -> StatementList -> (Catalog,StatementList)+typeCheck cat sts =+    let t = sem_Root (Root (fixupImplicitJoins sts))+        ta = wrap_Root t Inh_Root {cat_Inh_Root = cat+                                  ,lib_Inh_Root = emptyBindings}+        tl = annotatedTree_Syn_Root ta+        cat1 = producedCat_Syn_Root ta+   in case tl of+         Root r -> (cat1,r)++-- | Unfinished version of type check which can type check an+-- individual statement with ? or positional arg placeholders in+-- it. Will error if the statement isn't select, update, insert or+-- delete. For use in type checking embedded parameterized+-- statements. Does all typechecking and annotation that the regular+-- typecheck does.+typeCheckPS :: Catalog -> Statement -> Either String Statement+typeCheckPS cat st =+    case st of+      SelectStatement _ _ -> tc+      Insert _ _ _ _ _ -> tc+      Update _ _ _ _ _ -> tc+      Delete _ _ _ _ -> tc+      _ -> Left "requires select, update, insert or delete statement"+    where+      tc = let t = sem_Root (Root (fixupImplicitJoins [st]))+               ta = wrap_Root t Inh_Root {cat_Inh_Root = cat+                                         ,lib_Inh_Root = emptyBindings}+               tl = annotatedTree_Syn_Root ta+               cat1 = producedCat_Syn_Root ta+           in case tl of+                Root [st1] -> Right st1+                _ -> error "impossible happened in typeCheckPS!"+++-- | Testing utility, mainly used to check an expression for type errors+-- or to get its type.+typeCheckExpression :: Catalog -> Expression -> Expression+typeCheckExpression cat ex =+    let t = sem_ExpressionRoot (ExpressionRoot (fixupImplicitJoins ex))+        rt = (annotatedTree_Syn_ExpressionRoot+              (wrap_ExpressionRoot t Inh_ExpressionRoot {cat_Inh_ExpressionRoot = cat+                                                        ,lib_Inh_ExpressionRoot = emptyBindings}))+    in case rt of+         ExpressionRoot e -> e++{-+bit of a hack, to avoid rewriting the tableref type checking to be+able to do implicit joins, we just convert them in to the equivalent+explicit join+-}++fixupImplicitJoins :: Data a => a -> a+fixupImplicitJoins =+    transformBi $ \x ->+            case x of+              -- alter asts to change implicit joins into explicit joins+              Select an dis sl trs@(_:_:_) whr grp hav ord lim off+                  -> Select an dis sl [convTrefs trs] whr grp hav ord lim off+              x1 -> x1+    where+      convTrefs (tr:tr1:trs) = JoinedTref [] tr Unnatural Cross (convTrefs (tr1:trs)) Nothing NoAlias+      convTrefs (tr:[]) = tr+      convTrefs _ = error "failed doing implicit join fixup hack"++{-# LINE 190 "AstInternal.hs" #-}++{-# LINE 81 "./TypeChecking/Misc.ag" #-}++{-+================================================================================++= couple of small utils++I think this should be alright, an identifier referenced in an+expression can only have zero or one dot in it.+-}++splitIdentifier :: String -> (String,String)+splitIdentifier s = let (a,b) = span (/= '.') s+                    in if b == ""+                         then ("", a)+                         else (a,tail b)++{-+helper to make adding annotations a bit easier+-}++annTypesAndErrors :: Data a => a -> Type -> [TypeError]+                  -> Maybe [AnnotationElement] -> a+annTypesAndErrors item nt errs add =+    updateAnnotation modifier item+    where+      modifier = (([TypeAnnotation nt] ++ fromMaybe [] add +++       map TypeErrorA errs) ++)++{-+================================================================================++proper dodgy:+1st pass is to add inferred types to the tree. This is done only for+expressions in a funcall argument list atm. Then we pull out the+placeholders after they've had this information added. Only the+placeholders in funcall argument lists will have their type inferred+in this way, to be expanded. Insert also does this currently, but in Dml.ag++This should probably be done during the typechecking phase instead,+but probably needs a proper type inferencing algorithm to be used, is+done like this for development expediency.++-}+getPlaceholders :: Data a => a -> [Expression]+getPlaceholders st =+    filter isPlaceholder $ everything (++) (mkQ [] ga) (setInferredTypes st)+    where+      ga :: Expression -> [Expression]+      ga s = [s]+      isPlaceholder e = case e of+                          PositionalArg _ _ -> True+                          Placeholder _ -> True+                          _ -> False++getPlaceholderTypes :: Data a => a -> [Type]+getPlaceholderTypes ex =+    map (getInferredType . getAnnotation) $ getPlaceholders ex+    where+      getInferredType (InferredType t:_) = t+      getInferredType (_:as) = getInferredType as+      getInferredType [] = TypeCheckFailed+++setInferredTypes :: Data a => a -> a+setInferredTypes =+      doExprs {-. doSts-}+     where+       doExprs =+         transformBi (\x ->+           case x of+             FunCall an op exprs+                 -> FunCall an op (addInferredTypes an exprs)+             x1 -> x1)+       {-doSts =+         transformBi (\x ->+           case x of+             Insert ann table targetCols insData returning+                 -> Insert ann table targetCols insData returning+             x1 -> x1)-}+       addInferredTypes an exprs =+           let args1 = fmap (\(_,a,_,_) -> a) $ fp an+               args = fromMaybe [] args1+               fargs = args ++ repeat TypeCheckFailed+           in flip map (zip exprs fargs)+                  (\(ex, ty) -> updateAnnotation (++ [InferredType ty]) ex)+           where+             fp (FunctionPrototypeA f:_) = Just f+             fp (_:ls) = fp ls+             fp [] = Nothing++{-# LINE 283 "AstInternal.hs" #-}++{-# LINE 94 "./TypeChecking/Expressions.ag" #-}++{-++small shim in front of findCallMatch in the type conversion code, to+handle some special cases.++Some of the special cases will no longer be needed when variadic+support is added.++between, greatest and least are treated as syntactic sugar so we+delegate the function lookups to the <=/>= operators.++the row comparison should be more general than this, since it supports+any operator satisfying some properties+++TODO: move all of this into find call match. Don't know why it's separate+-}+typeCheckFunCall :: Catalog -> String -> [Type] -> Either [TypeError] FunctionPrototype+typeCheckFunCall cat fnName' argsType =+    {-trace ("typecheckfncall " ++ fnName' ++ show argsType) $-}+    --dependsOnRTpe argsType $+      case fnName of+              "count" -> -- not quite sure how this is suppose to work,+                         -- the counts in the pg catalog accept either+                         -- no args, or one arg of type any, but you can call+                         -- count with multiple arguments?+                         return ("count", argsType, typeBigInt, False)+              "!between" -> do+                    f1 <- lookupReturnType ">=" [argsType !! 0, argsType !! 1]+                    f2 <- lookupReturnType "<=" [argsType !! 0, argsType !! 2]+                    lookupFn "!and" [f1,f2]+              "greatest" -> do+                    fp@(_,_,t,_) <- lookupFn fnName argsType+                    lookupFn ">=" [t,t]+                    return fp+              "least" -> do+                    fp@(_,_,t,_) <- lookupFn fnName argsType+                    lookupFn "<=" [t,t]+                    return fp+              "!rowctor" -> return $ ("!rowCtor", argsType, AnonymousRecordType argsType, False)+                    -- special case the row comparison ops+                    -- this needs to be fixed: we want to match+                    -- any implicit casts to functions on composite types+                    -- first, then we can use the anonymous record type on+                    -- any composite+              _ | fnName `elem` ["=", "<>", "<=", ">=", "<", ">"]+                         && length argsType == 2+                         && all isCompositeOrSetOfCompositeType argsType+                         && compositesCompatible cat (head argsType) (head $ tail argsType) -> return (fnName, argsType, typeBool, False)+              --checked for all special cases, so run general case now+              s -> lookupFn s argsType+    where+      lookupReturnType :: String -> [Type] -> Either [TypeError] Type+      lookupReturnType s1 args = fmap (\(_,_,r,_) -> r) $ lookupFn s1 args+      lookupFn :: String -> [Type] -> Either [TypeError] FunctionPrototype+      lookupFn s1 args = findCallMatch cat+                             (if s1 == "u-" then "-" else s1) args+      fnName = map toLower fnName'+{-# LINE 345 "AstInternal.hs" #-}++{-# LINE 138 "./TypeChecking/SelectStatement.ag" #-}+++typeCheckValuesExpr :: Catalog -> [[Type]] -> Either [TypeError] Type+typeCheckValuesExpr cat rowsTs =+        let colNames = zipWith (++)+                           (repeat "column")+                           (map show [1..length $ head rowsTs])+        in unionRelTypes cat rowsTs colNames+++typeCheckCombineSelect :: Catalog -> Type -> Type -> Either [TypeError] Type+typeCheckCombineSelect cat v1 v2 = do+    u1 <- unwrapSetOfComposite v1+    let colNames = map fst u1+    u2 <- unwrapSetOfComposite v2+    let colTypes1 = map snd u1+    let colTypes2 = map snd u2+    unionRelTypes cat [colTypes1,colTypes2] colNames++unionRelTypes :: Catalog -> [[Type]] -> [String] -> Either [TypeError] Type+unionRelTypes cat rowsTs colNames =+  let lengths = map length rowsTs+  in case () of+             _ | null rowsTs ->+                   Left [NoRowsGivenForValues]+               | not (all (==head lengths) lengths) ->+                   Left [ValuesListsMustBeSameLength]+               | otherwise ->+                   --i don't think this propagates all the errors, just the first set+                   mapM (resolveResultSetType cat) (transpose rowsTs) >>=+                     (return . SetOfType . CompositeType . zip colNames)++{-# LINE 380 "AstInternal.hs" #-}++{-# LINE 200 "./TypeChecking/TableRefs.ag" #-}++{-+convert a function call into a [String,[(string,type)]] list for use+in a tableref context+first consideration is the alias: if there is an alias in the select,+e.g. select * from generate_series(1,2) x;  (alias is x)+we use that, otherwise we use the name of the function+second consideration is the attributes coming out, roughly speaking+we have to convert an arbitrary type to a relation type+if we have a relation valued function, we don't need to do anything+if we have a setof non composite, we lift the single type to an+attribute, using the function name for the attribute name+if we have a non setof, we lift the single type to an attribute and+then relation, using the function name for the attribute name+need to check to see what should happen with arrayof++-}+funIdens :: Catalog -> String -> Expression -> Either [TypeError] (String,[(String,Type)])+funIdens cat alias fnVal = do+   errorWhen (case fnVal of+                FunCall _ _ _ -> False+                _ -> True)+             [ContextError "FunCall"]+   let (FunCall _ fnName _) = fnVal+       correlationName = if alias /= ""+                           then alias+                           else fnName+   attrs <- do+     case getTypeAnnotation fnVal of+       SetOfType (NamedCompositeType t) -> catCompositePublicAttrs cat [] t+       SetOfType x -> return [(correlationName,x)]+       y -> return [(correlationName,y)]+   return (correlationName, attrs)++getAlias :: String -> TableAlias -> String+getAlias def alias =+  case alias of+    NoAlias -> def+    TableAlias t -> t+    FullAlias t _ -> t++{-# LINE 424 "AstInternal.hs" #-}++{-# LINE 92 "./TypeChecking/SelectLists.ag" #-}++expandStar :: LocalIdentifierBindings+           -> String+           -> Type+           -> [(String,Type)]+           -> [(String,Type)]+expandStar cat colName colType types =+    fromRight types $ do+    let (correlationName,iden) = splitIdentifier colName+    newCols <- if iden == "*"+                 then libExpandStar cat correlationName+                 else return [(iden, colType)]+    return $ newCols ++ types++fixStar :: Expression -> Expression+fixStar =+    everywhere (mkT fixStar')+    where+      fixStar' :: Annotation -> Annotation+      fixStar' a =+          if TypeAnnotation TypeCheckFailed `elem` a+              && any (\an ->+                       case an of+                         TypeErrorA (UnrecognisedIdentifier x) |+                           let (_,iden) = splitIdentifier x+                           in iden == "*" -> True+                         _ -> False) a+             then filter (\an -> case an of+                                   TypeAnnotation TypeCheckFailed -> False+                                   TypeErrorA (UnrecognisedIdentifier _) -> False+                                   _ -> True) a+             else a+{-# LINE 459 "AstInternal.hs" #-}++{-# LINE 96 "./TypeChecking/Dml.ag" #-}+++setInferredTypesG :: Data a => [Type] -> a -> a+setInferredTypesG tys x =+  evalState (transformBiM f x) tys+  where+    f (p@(Placeholder _)) = do+         y:ys <- get+         put ys+         return $ updateAnnotation (++ [InferredType y]) p+    f z = return z+{-# LINE 473 "AstInternal.hs" #-}++{-# LINE 163 "./TypeChecking/Dml.ag" #-}++getRowTypes :: [Type] -> [Type]+getRowTypes [AnonymousRecordType ts] = ts+getRowTypes ts = ts+{-# LINE 480 "AstInternal.hs" #-}++{-# LINE 202 "./TypeChecking/Dml.ag" #-}+++--small shortcut to help produce better errors?+checkRelationExists :: Catalog -> String -> Either [TypeError] ()+checkRelationExists cat tbl =+    catCompositeDef cat relationComposites tbl >>+    return ()++--used by both insert and update+checkColumnConsistency :: Catalog ->  String -> [String] -> [(String,Type)]+                       -> Either [TypeError] [(String,Type)]+checkColumnConsistency cat tbl cols' insNameTypePairs = do+  ttcols <- lowerize <$> catCompositePublicAttrs cat [] tbl+  let cols = if null cols'+               then map fst ttcols+               else map (map toLower) cols'+  errorWhen (length insNameTypePairs /= length cols) [WrongNumberOfColumns]+  let nonMatchingColumns = cols \\ map fst ttcols+  errorWhen (not $ null nonMatchingColumns) $+       map UnrecognisedIdentifier nonMatchingColumns+  let targetNameTypePairs = map (\l -> (l,fromJust $ lookup l ttcols)) cols+        --check the types of the insdata match the column targets+        --name datatype columntype+      typeTriples = map (\((a,b),c) -> (a,b,c)) $+                    zip targetNameTypePairs $+                    map snd insNameTypePairs+      errs :: [TypeError]+      errs = concat $ lefts $+             map (\(_,b,c) -> checkAssignmentValid cat c b) typeTriples+  liftErrors errs+  return targetNameTypePairs+  where+    lowerize = map (\(a,b) -> (map toLower a,b))++{-# LINE 517 "AstInternal.hs" #-}++{-# LINE 40 "./TypeChecking/CreateTable.ag" #-}++defaultSystemColumns :: [(String,Type)]+defaultSystemColumns = [("tableoid", ScalarType "oid")+                       ,("cmax", ScalarType "cid")+                       ,("xmax", ScalarType "xid")+                       ,("cmin", ScalarType "cid")+                       ,("xmin", ScalarType "xid")+                       ,("ctid", ScalarType "tid")]+{-# LINE 528 "AstInternal.hs" #-}+-- AlterTableAction --------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative AddConstraint:+         child ann            : {Annotation}+         child con            : Constraint +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative AlterColumnDefault:+         child ann            : {Annotation}+         child nm             : {String}+         child def            : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data AlterTableAction  = AddConstraint (Annotation) (Constraint) +                       | AlterColumnDefault (Annotation) (String) (Expression) +                       deriving ( Data,Eq,Show,Typeable)+-- cata+sem_AlterTableAction :: AlterTableAction  ->+                        T_AlterTableAction +sem_AlterTableAction (AddConstraint _ann _con )  =+    (sem_AlterTableAction_AddConstraint _ann (sem_Constraint _con ) )+sem_AlterTableAction (AlterColumnDefault _ann _nm _def )  =+    (sem_AlterTableAction_AlterColumnDefault _ann _nm (sem_Expression _def ) )+-- semantic domain+type T_AlterTableAction  = Catalog ->+                           LocalIdentifierBindings ->+                           ( AlterTableAction,AlterTableAction)+data Inh_AlterTableAction  = Inh_AlterTableAction {cat_Inh_AlterTableAction :: Catalog,lib_Inh_AlterTableAction :: LocalIdentifierBindings}+data Syn_AlterTableAction  = Syn_AlterTableAction {annotatedTree_Syn_AlterTableAction :: AlterTableAction,originalTree_Syn_AlterTableAction :: AlterTableAction}+wrap_AlterTableAction :: T_AlterTableAction  ->+                         Inh_AlterTableAction  ->+                         Syn_AlterTableAction +wrap_AlterTableAction sem (Inh_AlterTableAction _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_AlterTableAction _lhsOannotatedTree _lhsOoriginalTree ))+sem_AlterTableAction_AddConstraint :: Annotation ->+                                      T_Constraint  ->+                                      T_AlterTableAction +sem_AlterTableAction_AddConstraint ann_ con_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: AlterTableAction+              _lhsOoriginalTree :: AlterTableAction+              _conOcat :: Catalog+              _conOlib :: LocalIdentifierBindings+              _conIannotatedTree :: Constraint+              _conIoriginalTree :: Constraint+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  AddConstraint ann_ _conIannotatedTree+                  {-# LINE 592 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  AddConstraint ann_ _conIoriginalTree+                  {-# LINE 597 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 602 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 607 "AstInternal.hs" #-}+              -- copy rule (down)+              _conOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 612 "AstInternal.hs" #-}+              -- copy rule (down)+              _conOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 617 "AstInternal.hs" #-}+              ( _conIannotatedTree,_conIoriginalTree) =+                  (con_ _conOcat _conOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_AlterTableAction_AlterColumnDefault :: Annotation ->+                                           String ->+                                           T_Expression  ->+                                           T_AlterTableAction +sem_AlterTableAction_AlterColumnDefault ann_ nm_ def_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: AlterTableAction+              _lhsOoriginalTree :: AlterTableAction+              _defOcat :: Catalog+              _defOlib :: LocalIdentifierBindings+              _defIannotatedTree :: Expression+              _defIliftedColumnName :: String+              _defIoriginalTree :: Expression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  AlterColumnDefault ann_ nm_ _defIannotatedTree+                  {-# LINE 639 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  AlterColumnDefault ann_ nm_ _defIoriginalTree+                  {-# LINE 644 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 649 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 654 "AstInternal.hs" #-}+              -- copy rule (down)+              _defOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 659 "AstInternal.hs" #-}+              -- copy rule (down)+              _defOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 664 "AstInternal.hs" #-}+              ( _defIannotatedTree,_defIliftedColumnName,_defIoriginalTree) =+                  (def_ _defOcat _defOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- AttributeDef ------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         attrName             : String+         namedType            : Type+         originalTree         : SELF +   alternatives:+      alternative AttributeDef:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         child def            : MaybeExpression +         child cons           : RowConstraintList +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data AttributeDef  = AttributeDef (Annotation) (String) (TypeName) (MaybeExpression) (RowConstraintList) +                   deriving ( Data,Eq,Show,Typeable)+-- cata+sem_AttributeDef :: AttributeDef  ->+                    T_AttributeDef +sem_AttributeDef (AttributeDef _ann _name _typ _def _cons )  =+    (sem_AttributeDef_AttributeDef _ann _name (sem_TypeName _typ ) (sem_MaybeExpression _def ) (sem_RowConstraintList _cons ) )+-- semantic domain+type T_AttributeDef  = Catalog ->+                       LocalIdentifierBindings ->+                       ( AttributeDef,String,Type,AttributeDef)+data Inh_AttributeDef  = Inh_AttributeDef {cat_Inh_AttributeDef :: Catalog,lib_Inh_AttributeDef :: LocalIdentifierBindings}+data Syn_AttributeDef  = Syn_AttributeDef {annotatedTree_Syn_AttributeDef :: AttributeDef,attrName_Syn_AttributeDef :: String,namedType_Syn_AttributeDef :: Type,originalTree_Syn_AttributeDef :: AttributeDef}+wrap_AttributeDef :: T_AttributeDef  ->+                     Inh_AttributeDef  ->+                     Syn_AttributeDef +wrap_AttributeDef sem (Inh_AttributeDef _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_AttributeDef _lhsOannotatedTree _lhsOattrName _lhsOnamedType _lhsOoriginalTree ))+sem_AttributeDef_AttributeDef :: Annotation ->+                                 String ->+                                 T_TypeName  ->+                                 T_MaybeExpression  ->+                                 T_RowConstraintList  ->+                                 T_AttributeDef +sem_AttributeDef_AttributeDef ann_ name_ typ_ def_ cons_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOattrName :: String+              _lhsOnamedType :: Type+              _consOlib :: LocalIdentifierBindings+              _lhsOannotatedTree :: AttributeDef+              _lhsOoriginalTree :: AttributeDef+              _typOcat :: Catalog+              _typOlib :: LocalIdentifierBindings+              _defOcat :: Catalog+              _defOlib :: LocalIdentifierBindings+              _consOcat :: Catalog+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _typIoriginalTree :: TypeName+              _defIannotatedTree :: MaybeExpression+              _defIoriginalTree :: MaybeExpression+              _consIannotatedTree :: RowConstraintList+              _consIoriginalTree :: RowConstraintList+              -- "./TypeChecking/CreateTable.ag"(line 79, column 9)+              _lhsOattrName =+                  {-# LINE 79 "./TypeChecking/CreateTable.ag" #-}+                  map toLower name_+                  {-# LINE 740 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 80, column 9)+              _lhsOnamedType =+                  {-# LINE 80 "./TypeChecking/CreateTable.ag" #-}+                  _typInamedType+                  {-# LINE 745 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 95, column 9)+              _consOlib =+                  {-# LINE 95 "./TypeChecking/CreateTable.ag" #-}+                  case updateBindings _lhsIlib _lhsIcat+                           [LibStackIDs [("", [(name_, _typInamedType)])]] of+                    Left x -> error $ show x+                    Right e -> e+                  {-# LINE 753 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  AttributeDef ann_ name_ _typIannotatedTree _defIannotatedTree _consIannotatedTree+                  {-# LINE 758 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  AttributeDef ann_ name_ _typIoriginalTree _defIoriginalTree _consIoriginalTree+                  {-# LINE 763 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 768 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 773 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 778 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 783 "AstInternal.hs" #-}+              -- copy rule (down)+              _defOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 788 "AstInternal.hs" #-}+              -- copy rule (down)+              _defOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 793 "AstInternal.hs" #-}+              -- copy rule (down)+              _consOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 798 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =+                  (typ_ _typOcat _typOlib )+              ( _defIannotatedTree,_defIoriginalTree) =+                  (def_ _defOcat _defOlib )+              ( _consIannotatedTree,_consIoriginalTree) =+                  (cons_ _consOcat _consOlib )+          in  ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType,_lhsOoriginalTree)))+-- AttributeDefList --------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         attrs                : [(String, Type)]+         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : AttributeDef +         child tl             : AttributeDefList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type AttributeDefList  = [(AttributeDef)]+-- cata+sem_AttributeDefList :: AttributeDefList  ->+                        T_AttributeDefList +sem_AttributeDefList list  =+    (Prelude.foldr sem_AttributeDefList_Cons sem_AttributeDefList_Nil (Prelude.map sem_AttributeDef list) )+-- semantic domain+type T_AttributeDefList  = Catalog ->+                           LocalIdentifierBindings ->+                           ( AttributeDefList,([(String, Type)]),AttributeDefList)+data Inh_AttributeDefList  = Inh_AttributeDefList {cat_Inh_AttributeDefList :: Catalog,lib_Inh_AttributeDefList :: LocalIdentifierBindings}+data Syn_AttributeDefList  = Syn_AttributeDefList {annotatedTree_Syn_AttributeDefList :: AttributeDefList,attrs_Syn_AttributeDefList :: [(String, Type)],originalTree_Syn_AttributeDefList :: AttributeDefList}+wrap_AttributeDefList :: T_AttributeDefList  ->+                         Inh_AttributeDefList  ->+                         Syn_AttributeDefList +wrap_AttributeDefList sem (Inh_AttributeDefList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_AttributeDefList _lhsOannotatedTree _lhsOattrs _lhsOoriginalTree ))+sem_AttributeDefList_Cons :: T_AttributeDef  ->+                             T_AttributeDefList  ->+                             T_AttributeDefList +sem_AttributeDefList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOattrs :: ([(String, Type)])+              _lhsOannotatedTree :: AttributeDefList+              _lhsOoriginalTree :: AttributeDefList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: AttributeDef+              _hdIattrName :: String+              _hdInamedType :: Type+              _hdIoriginalTree :: AttributeDef+              _tlIannotatedTree :: AttributeDefList+              _tlIattrs :: ([(String, Type)])+              _tlIoriginalTree :: AttributeDefList+              -- "./TypeChecking/CreateTable.ag"(line 85, column 12)+              _lhsOattrs =+                  {-# LINE 85 "./TypeChecking/CreateTable.ag" #-}+                  (_hdIattrName, _hdInamedType) : _tlIattrs+                  {-# LINE 871 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 876 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 881 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 886 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 891 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 896 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 901 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 906 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 911 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIattrName,_hdInamedType,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIattrs,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree)))+sem_AttributeDefList_Nil :: T_AttributeDefList +sem_AttributeDefList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOattrs :: ([(String, Type)])+              _lhsOannotatedTree :: AttributeDefList+              _lhsOoriginalTree :: AttributeDefList+              -- "./TypeChecking/CreateTable.ag"(line 86, column 11)+              _lhsOattrs =+                  {-# LINE 86 "./TypeChecking/CreateTable.ag" #-}+                  []+                  {-# LINE 928 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 933 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 938 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 943 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 948 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree)))+-- Cascade -----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Cascade:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Restrict:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data Cascade  = Cascade +              | Restrict +              deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Cascade :: Cascade  ->+               T_Cascade +sem_Cascade (Cascade )  =+    (sem_Cascade_Cascade )+sem_Cascade (Restrict )  =+    (sem_Cascade_Restrict )+-- semantic domain+type T_Cascade  = Catalog ->+                  LocalIdentifierBindings ->+                  ( Cascade,Cascade)+data Inh_Cascade  = Inh_Cascade {cat_Inh_Cascade :: Catalog,lib_Inh_Cascade :: LocalIdentifierBindings}+data Syn_Cascade  = Syn_Cascade {annotatedTree_Syn_Cascade :: Cascade,originalTree_Syn_Cascade :: Cascade}+wrap_Cascade :: T_Cascade  ->+                Inh_Cascade  ->+                Syn_Cascade +wrap_Cascade sem (Inh_Cascade _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_Cascade _lhsOannotatedTree _lhsOoriginalTree ))+sem_Cascade_Cascade :: T_Cascade +sem_Cascade_Cascade  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Cascade+              _lhsOoriginalTree :: Cascade+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Cascade+                  {-# LINE 1002 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Cascade+                  {-# LINE 1007 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1012 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1017 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Cascade_Restrict :: T_Cascade +sem_Cascade_Restrict  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Cascade+              _lhsOoriginalTree :: Cascade+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Restrict+                  {-# LINE 1029 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Restrict+                  {-# LINE 1034 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1039 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1044 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- CaseExpressionList ------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : Expression +         child tl             : CaseExpressionList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type CaseExpressionList  = [(Expression)]+-- cata+sem_CaseExpressionList :: CaseExpressionList  ->+                          T_CaseExpressionList +sem_CaseExpressionList list  =+    (Prelude.foldr sem_CaseExpressionList_Cons sem_CaseExpressionList_Nil (Prelude.map sem_Expression list) )+-- semantic domain+type T_CaseExpressionList  = Catalog ->+                             LocalIdentifierBindings ->+                             ( CaseExpressionList,CaseExpressionList)+data Inh_CaseExpressionList  = Inh_CaseExpressionList {cat_Inh_CaseExpressionList :: Catalog,lib_Inh_CaseExpressionList :: LocalIdentifierBindings}+data Syn_CaseExpressionList  = Syn_CaseExpressionList {annotatedTree_Syn_CaseExpressionList :: CaseExpressionList,originalTree_Syn_CaseExpressionList :: CaseExpressionList}+wrap_CaseExpressionList :: T_CaseExpressionList  ->+                           Inh_CaseExpressionList  ->+                           Syn_CaseExpressionList +wrap_CaseExpressionList sem (Inh_CaseExpressionList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_CaseExpressionList _lhsOannotatedTree _lhsOoriginalTree ))+sem_CaseExpressionList_Cons :: T_Expression  ->+                               T_CaseExpressionList  ->+                               T_CaseExpressionList +sem_CaseExpressionList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CaseExpressionList+              _lhsOoriginalTree :: CaseExpressionList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: Expression+              _hdIliftedColumnName :: String+              _hdIoriginalTree :: Expression+              _tlIannotatedTree :: CaseExpressionList+              _tlIoriginalTree :: CaseExpressionList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 1107 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 1112 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1117 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1122 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1127 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1132 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1137 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1142 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIliftedColumnName,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_CaseExpressionList_Nil :: T_CaseExpressionList +sem_CaseExpressionList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CaseExpressionList+              _lhsOoriginalTree :: CaseExpressionList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 1158 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 1163 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1168 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1173 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- CaseExpressionListExpressionPair ----------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Tuple:+         child x1             : CaseExpressionList +         child x2             : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type CaseExpressionListExpressionPair  = ( (CaseExpressionList),(Expression))+-- cata+sem_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair  ->+                                        T_CaseExpressionListExpressionPair +sem_CaseExpressionListExpressionPair ( x1,x2)  =+    (sem_CaseExpressionListExpressionPair_Tuple (sem_CaseExpressionList x1 ) (sem_Expression x2 ) )+-- semantic domain+type T_CaseExpressionListExpressionPair  = Catalog ->+                                           LocalIdentifierBindings ->+                                           ( CaseExpressionListExpressionPair,CaseExpressionListExpressionPair)+data Inh_CaseExpressionListExpressionPair  = Inh_CaseExpressionListExpressionPair {cat_Inh_CaseExpressionListExpressionPair :: Catalog,lib_Inh_CaseExpressionListExpressionPair :: LocalIdentifierBindings}+data Syn_CaseExpressionListExpressionPair  = Syn_CaseExpressionListExpressionPair {annotatedTree_Syn_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair,originalTree_Syn_CaseExpressionListExpressionPair :: CaseExpressionListExpressionPair}+wrap_CaseExpressionListExpressionPair :: T_CaseExpressionListExpressionPair  ->+                                         Inh_CaseExpressionListExpressionPair  ->+                                         Syn_CaseExpressionListExpressionPair +wrap_CaseExpressionListExpressionPair sem (Inh_CaseExpressionListExpressionPair _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_CaseExpressionListExpressionPair _lhsOannotatedTree _lhsOoriginalTree ))+sem_CaseExpressionListExpressionPair_Tuple :: T_CaseExpressionList  ->+                                              T_Expression  ->+                                              T_CaseExpressionListExpressionPair +sem_CaseExpressionListExpressionPair_Tuple x1_ x2_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CaseExpressionListExpressionPair+              _lhsOoriginalTree :: CaseExpressionListExpressionPair+              _x1Ocat :: Catalog+              _x1Olib :: LocalIdentifierBindings+              _x2Ocat :: Catalog+              _x2Olib :: LocalIdentifierBindings+              _x1IannotatedTree :: CaseExpressionList+              _x1IoriginalTree :: CaseExpressionList+              _x2IannotatedTree :: Expression+              _x2IliftedColumnName :: String+              _x2IoriginalTree :: Expression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (_x1IannotatedTree,_x2IannotatedTree)+                  {-# LINE 1232 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (_x1IoriginalTree,_x2IoriginalTree)+                  {-# LINE 1237 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1242 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1247 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1252 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1257 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1262 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1267 "AstInternal.hs" #-}+              ( _x1IannotatedTree,_x1IoriginalTree) =+                  (x1_ _x1Ocat _x1Olib )+              ( _x2IannotatedTree,_x2IliftedColumnName,_x2IoriginalTree) =+                  (x2_ _x2Ocat _x2Olib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- CaseExpressionListExpressionPairList ------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : CaseExpressionListExpressionPair +         child tl             : CaseExpressionListExpressionPairList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type CaseExpressionListExpressionPairList  = [(CaseExpressionListExpressionPair)]+-- cata+sem_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList  ->+                                            T_CaseExpressionListExpressionPairList +sem_CaseExpressionListExpressionPairList list  =+    (Prelude.foldr sem_CaseExpressionListExpressionPairList_Cons sem_CaseExpressionListExpressionPairList_Nil (Prelude.map sem_CaseExpressionListExpressionPair list) )+-- semantic domain+type T_CaseExpressionListExpressionPairList  = Catalog ->+                                               LocalIdentifierBindings ->+                                               ( CaseExpressionListExpressionPairList,CaseExpressionListExpressionPairList)+data Inh_CaseExpressionListExpressionPairList  = Inh_CaseExpressionListExpressionPairList {cat_Inh_CaseExpressionListExpressionPairList :: Catalog,lib_Inh_CaseExpressionListExpressionPairList :: LocalIdentifierBindings}+data Syn_CaseExpressionListExpressionPairList  = Syn_CaseExpressionListExpressionPairList {annotatedTree_Syn_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList,originalTree_Syn_CaseExpressionListExpressionPairList :: CaseExpressionListExpressionPairList}+wrap_CaseExpressionListExpressionPairList :: T_CaseExpressionListExpressionPairList  ->+                                             Inh_CaseExpressionListExpressionPairList  ->+                                             Syn_CaseExpressionListExpressionPairList +wrap_CaseExpressionListExpressionPairList sem (Inh_CaseExpressionListExpressionPairList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_CaseExpressionListExpressionPairList _lhsOannotatedTree _lhsOoriginalTree ))+sem_CaseExpressionListExpressionPairList_Cons :: T_CaseExpressionListExpressionPair  ->+                                                 T_CaseExpressionListExpressionPairList  ->+                                                 T_CaseExpressionListExpressionPairList +sem_CaseExpressionListExpressionPairList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CaseExpressionListExpressionPairList+              _lhsOoriginalTree :: CaseExpressionListExpressionPairList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: CaseExpressionListExpressionPair+              _hdIoriginalTree :: CaseExpressionListExpressionPair+              _tlIannotatedTree :: CaseExpressionListExpressionPairList+              _tlIoriginalTree :: CaseExpressionListExpressionPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 1333 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 1338 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1343 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1348 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1353 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1358 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1363 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1368 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_CaseExpressionListExpressionPairList_Nil :: T_CaseExpressionListExpressionPairList +sem_CaseExpressionListExpressionPairList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CaseExpressionListExpressionPairList+              _lhsOoriginalTree :: CaseExpressionListExpressionPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 1384 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 1389 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1394 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1399 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- CombineType -------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Except:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Intersect:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Union:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative UnionAll:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data CombineType  = Except +                  | Intersect +                  | Union +                  | UnionAll +                  deriving ( Data,Eq,Show,Typeable)+-- cata+sem_CombineType :: CombineType  ->+                   T_CombineType +sem_CombineType (Except )  =+    (sem_CombineType_Except )+sem_CombineType (Intersect )  =+    (sem_CombineType_Intersect )+sem_CombineType (Union )  =+    (sem_CombineType_Union )+sem_CombineType (UnionAll )  =+    (sem_CombineType_UnionAll )+-- semantic domain+type T_CombineType  = Catalog ->+                      LocalIdentifierBindings ->+                      ( CombineType,CombineType)+data Inh_CombineType  = Inh_CombineType {cat_Inh_CombineType :: Catalog,lib_Inh_CombineType :: LocalIdentifierBindings}+data Syn_CombineType  = Syn_CombineType {annotatedTree_Syn_CombineType :: CombineType,originalTree_Syn_CombineType :: CombineType}+wrap_CombineType :: T_CombineType  ->+                    Inh_CombineType  ->+                    Syn_CombineType +wrap_CombineType sem (Inh_CombineType _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_CombineType _lhsOannotatedTree _lhsOoriginalTree ))+sem_CombineType_Except :: T_CombineType +sem_CombineType_Except  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CombineType+              _lhsOoriginalTree :: CombineType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Except+                  {-# LINE 1467 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Except+                  {-# LINE 1472 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1477 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1482 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_CombineType_Intersect :: T_CombineType +sem_CombineType_Intersect  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CombineType+              _lhsOoriginalTree :: CombineType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Intersect+                  {-# LINE 1494 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Intersect+                  {-# LINE 1499 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1504 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1509 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_CombineType_Union :: T_CombineType +sem_CombineType_Union  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CombineType+              _lhsOoriginalTree :: CombineType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Union+                  {-# LINE 1521 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Union+                  {-# LINE 1526 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1531 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1536 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_CombineType_UnionAll :: T_CombineType +sem_CombineType_UnionAll  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CombineType+              _lhsOoriginalTree :: CombineType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  UnionAll+                  {-# LINE 1548 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  UnionAll+                  {-# LINE 1553 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1558 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1563 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- Constraint --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative CheckConstraint:+         child ann            : {Annotation}+         child name           : {String}+         child expression     : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative PrimaryKeyConstraint:+         child ann            : {Annotation}+         child name           : {String}+         child stringList     : StringList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative ReferenceConstraint:+         child ann            : {Annotation}+         child name           : {String}+         child atts           : StringList +         child table          : {String}+         child tableAtts      : StringList +         child onUpdate       : Cascade +         child onDelete       : Cascade +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative UniqueConstraint:+         child ann            : {Annotation}+         child name           : {String}+         child stringList     : StringList +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data Constraint  = CheckConstraint (Annotation) (String) (Expression) +                 | PrimaryKeyConstraint (Annotation) (String) (StringList) +                 | ReferenceConstraint (Annotation) (String) (StringList) (String) (StringList) (Cascade) (Cascade) +                 | UniqueConstraint (Annotation) (String) (StringList) +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Constraint :: Constraint  ->+                  T_Constraint +sem_Constraint (CheckConstraint _ann _name _expression )  =+    (sem_Constraint_CheckConstraint _ann _name (sem_Expression _expression ) )+sem_Constraint (PrimaryKeyConstraint _ann _name _stringList )  =+    (sem_Constraint_PrimaryKeyConstraint _ann _name (sem_StringList _stringList ) )+sem_Constraint (ReferenceConstraint _ann _name _atts _table _tableAtts _onUpdate _onDelete )  =+    (sem_Constraint_ReferenceConstraint _ann _name (sem_StringList _atts ) _table (sem_StringList _tableAtts ) (sem_Cascade _onUpdate ) (sem_Cascade _onDelete ) )+sem_Constraint (UniqueConstraint _ann _name _stringList )  =+    (sem_Constraint_UniqueConstraint _ann _name (sem_StringList _stringList ) )+-- semantic domain+type T_Constraint  = Catalog ->+                     LocalIdentifierBindings ->+                     ( Constraint,Constraint)+data Inh_Constraint  = Inh_Constraint {cat_Inh_Constraint :: Catalog,lib_Inh_Constraint :: LocalIdentifierBindings}+data Syn_Constraint  = Syn_Constraint {annotatedTree_Syn_Constraint :: Constraint,originalTree_Syn_Constraint :: Constraint}+wrap_Constraint :: T_Constraint  ->+                   Inh_Constraint  ->+                   Syn_Constraint +wrap_Constraint sem (Inh_Constraint _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_Constraint _lhsOannotatedTree _lhsOoriginalTree ))+sem_Constraint_CheckConstraint :: Annotation ->+                                  String ->+                                  T_Expression  ->+                                  T_Constraint +sem_Constraint_CheckConstraint ann_ name_ expression_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Constraint+              _lhsOoriginalTree :: Constraint+              _expressionOcat :: Catalog+              _expressionOlib :: LocalIdentifierBindings+              _expressionIannotatedTree :: Expression+              _expressionIliftedColumnName :: String+              _expressionIoriginalTree :: Expression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CheckConstraint ann_ name_ _expressionIannotatedTree+                  {-# LINE 1655 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CheckConstraint ann_ name_ _expressionIoriginalTree+                  {-# LINE 1660 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1665 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1670 "AstInternal.hs" #-}+              -- copy rule (down)+              _expressionOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1675 "AstInternal.hs" #-}+              -- copy rule (down)+              _expressionOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1680 "AstInternal.hs" #-}+              ( _expressionIannotatedTree,_expressionIliftedColumnName,_expressionIoriginalTree) =+                  (expression_ _expressionOcat _expressionOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Constraint_PrimaryKeyConstraint :: Annotation ->+                                       String ->+                                       T_StringList  ->+                                       T_Constraint +sem_Constraint_PrimaryKeyConstraint ann_ name_ stringList_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Constraint+              _lhsOoriginalTree :: Constraint+              _stringListOcat :: Catalog+              _stringListOlib :: LocalIdentifierBindings+              _stringListIannotatedTree :: StringList+              _stringListIoriginalTree :: StringList+              _stringListIstrings :: ([String])+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  PrimaryKeyConstraint ann_ name_ _stringListIannotatedTree+                  {-# LINE 1702 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  PrimaryKeyConstraint ann_ name_ _stringListIoriginalTree+                  {-# LINE 1707 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1712 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1717 "AstInternal.hs" #-}+              -- copy rule (down)+              _stringListOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1722 "AstInternal.hs" #-}+              -- copy rule (down)+              _stringListOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1727 "AstInternal.hs" #-}+              ( _stringListIannotatedTree,_stringListIoriginalTree,_stringListIstrings) =+                  (stringList_ _stringListOcat _stringListOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Constraint_ReferenceConstraint :: Annotation ->+                                      String ->+                                      T_StringList  ->+                                      String ->+                                      T_StringList  ->+                                      T_Cascade  ->+                                      T_Cascade  ->+                                      T_Constraint +sem_Constraint_ReferenceConstraint ann_ name_ atts_ table_ tableAtts_ onUpdate_ onDelete_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Constraint+              _lhsOoriginalTree :: Constraint+              _attsOcat :: Catalog+              _attsOlib :: LocalIdentifierBindings+              _tableAttsOcat :: Catalog+              _tableAttsOlib :: LocalIdentifierBindings+              _onUpdateOcat :: Catalog+              _onUpdateOlib :: LocalIdentifierBindings+              _onDeleteOcat :: Catalog+              _onDeleteOlib :: LocalIdentifierBindings+              _attsIannotatedTree :: StringList+              _attsIoriginalTree :: StringList+              _attsIstrings :: ([String])+              _tableAttsIannotatedTree :: StringList+              _tableAttsIoriginalTree :: StringList+              _tableAttsIstrings :: ([String])+              _onUpdateIannotatedTree :: Cascade+              _onUpdateIoriginalTree :: Cascade+              _onDeleteIannotatedTree :: Cascade+              _onDeleteIoriginalTree :: Cascade+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ReferenceConstraint ann_ name_ _attsIannotatedTree table_ _tableAttsIannotatedTree _onUpdateIannotatedTree _onDeleteIannotatedTree+                  {-# LINE 1766 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ReferenceConstraint ann_ name_ _attsIoriginalTree table_ _tableAttsIoriginalTree _onUpdateIoriginalTree _onDeleteIoriginalTree+                  {-# LINE 1771 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1776 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1781 "AstInternal.hs" #-}+              -- copy rule (down)+              _attsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1786 "AstInternal.hs" #-}+              -- copy rule (down)+              _attsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1791 "AstInternal.hs" #-}+              -- copy rule (down)+              _tableAttsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1796 "AstInternal.hs" #-}+              -- copy rule (down)+              _tableAttsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1801 "AstInternal.hs" #-}+              -- copy rule (down)+              _onUpdateOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1806 "AstInternal.hs" #-}+              -- copy rule (down)+              _onUpdateOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1811 "AstInternal.hs" #-}+              -- copy rule (down)+              _onDeleteOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1816 "AstInternal.hs" #-}+              -- copy rule (down)+              _onDeleteOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1821 "AstInternal.hs" #-}+              ( _attsIannotatedTree,_attsIoriginalTree,_attsIstrings) =+                  (atts_ _attsOcat _attsOlib )+              ( _tableAttsIannotatedTree,_tableAttsIoriginalTree,_tableAttsIstrings) =+                  (tableAtts_ _tableAttsOcat _tableAttsOlib )+              ( _onUpdateIannotatedTree,_onUpdateIoriginalTree) =+                  (onUpdate_ _onUpdateOcat _onUpdateOlib )+              ( _onDeleteIannotatedTree,_onDeleteIoriginalTree) =+                  (onDelete_ _onDeleteOcat _onDeleteOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Constraint_UniqueConstraint :: Annotation ->+                                   String ->+                                   T_StringList  ->+                                   T_Constraint +sem_Constraint_UniqueConstraint ann_ name_ stringList_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Constraint+              _lhsOoriginalTree :: Constraint+              _stringListOcat :: Catalog+              _stringListOlib :: LocalIdentifierBindings+              _stringListIannotatedTree :: StringList+              _stringListIoriginalTree :: StringList+              _stringListIstrings :: ([String])+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  UniqueConstraint ann_ name_ _stringListIannotatedTree+                  {-# LINE 1849 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  UniqueConstraint ann_ name_ _stringListIoriginalTree+                  {-# LINE 1854 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1859 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1864 "AstInternal.hs" #-}+              -- copy rule (down)+              _stringListOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1869 "AstInternal.hs" #-}+              -- copy rule (down)+              _stringListOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1874 "AstInternal.hs" #-}+              ( _stringListIannotatedTree,_stringListIoriginalTree,_stringListIstrings) =+                  (stringList_ _stringListOcat _stringListOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- ConstraintList ----------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : Constraint +         child tl             : ConstraintList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ConstraintList  = [(Constraint)]+-- cata+sem_ConstraintList :: ConstraintList  ->+                      T_ConstraintList +sem_ConstraintList list  =+    (Prelude.foldr sem_ConstraintList_Cons sem_ConstraintList_Nil (Prelude.map sem_Constraint list) )+-- semantic domain+type T_ConstraintList  = Catalog ->+                         LocalIdentifierBindings ->+                         ( ConstraintList,ConstraintList)+data Inh_ConstraintList  = Inh_ConstraintList {cat_Inh_ConstraintList :: Catalog,lib_Inh_ConstraintList :: LocalIdentifierBindings}+data Syn_ConstraintList  = Syn_ConstraintList {annotatedTree_Syn_ConstraintList :: ConstraintList,originalTree_Syn_ConstraintList :: ConstraintList}+wrap_ConstraintList :: T_ConstraintList  ->+                       Inh_ConstraintList  ->+                       Syn_ConstraintList +wrap_ConstraintList sem (Inh_ConstraintList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ConstraintList _lhsOannotatedTree _lhsOoriginalTree ))+sem_ConstraintList_Cons :: T_Constraint  ->+                           T_ConstraintList  ->+                           T_ConstraintList +sem_ConstraintList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ConstraintList+              _lhsOoriginalTree :: ConstraintList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: Constraint+              _hdIoriginalTree :: Constraint+              _tlIannotatedTree :: ConstraintList+              _tlIoriginalTree :: ConstraintList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 1938 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 1943 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1948 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 1953 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1958 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1963 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 1968 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 1973 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_ConstraintList_Nil :: T_ConstraintList +sem_ConstraintList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ConstraintList+              _lhsOoriginalTree :: ConstraintList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 1989 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 1994 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 1999 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2004 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- CopySource --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative CopyFilename:+         child string         : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Stdin:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data CopySource  = CopyFilename (String) +                 | Stdin +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_CopySource :: CopySource  ->+                  T_CopySource +sem_CopySource (CopyFilename _string )  =+    (sem_CopySource_CopyFilename _string )+sem_CopySource (Stdin )  =+    (sem_CopySource_Stdin )+-- semantic domain+type T_CopySource  = Catalog ->+                     LocalIdentifierBindings ->+                     ( CopySource,CopySource)+data Inh_CopySource  = Inh_CopySource {cat_Inh_CopySource :: Catalog,lib_Inh_CopySource :: LocalIdentifierBindings}+data Syn_CopySource  = Syn_CopySource {annotatedTree_Syn_CopySource :: CopySource,originalTree_Syn_CopySource :: CopySource}+wrap_CopySource :: T_CopySource  ->+                   Inh_CopySource  ->+                   Syn_CopySource +wrap_CopySource sem (Inh_CopySource _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_CopySource _lhsOannotatedTree _lhsOoriginalTree ))+sem_CopySource_CopyFilename :: String ->+                               T_CopySource +sem_CopySource_CopyFilename string_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CopySource+              _lhsOoriginalTree :: CopySource+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CopyFilename string_+                  {-# LINE 2060 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CopyFilename string_+                  {-# LINE 2065 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2070 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2075 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_CopySource_Stdin :: T_CopySource +sem_CopySource_Stdin  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: CopySource+              _lhsOoriginalTree :: CopySource+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Stdin+                  {-# LINE 2087 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Stdin+                  {-# LINE 2092 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2097 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2102 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- Direction ---------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Asc:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Desc:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data Direction  = Asc +                | Desc +                deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Direction :: Direction  ->+                 T_Direction +sem_Direction (Asc )  =+    (sem_Direction_Asc )+sem_Direction (Desc )  =+    (sem_Direction_Desc )+-- semantic domain+type T_Direction  = Catalog ->+                    LocalIdentifierBindings ->+                    ( Direction,Direction)+data Inh_Direction  = Inh_Direction {cat_Inh_Direction :: Catalog,lib_Inh_Direction :: LocalIdentifierBindings}+data Syn_Direction  = Syn_Direction {annotatedTree_Syn_Direction :: Direction,originalTree_Syn_Direction :: Direction}+wrap_Direction :: T_Direction  ->+                  Inh_Direction  ->+                  Syn_Direction +wrap_Direction sem (Inh_Direction _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_Direction _lhsOannotatedTree _lhsOoriginalTree ))+sem_Direction_Asc :: T_Direction +sem_Direction_Asc  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Direction+              _lhsOoriginalTree :: Direction+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Asc+                  {-# LINE 2156 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Asc+                  {-# LINE 2161 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2166 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2171 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Direction_Desc :: T_Direction +sem_Direction_Desc  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Direction+              _lhsOoriginalTree :: Direction+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Desc+                  {-# LINE 2183 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Desc+                  {-# LINE 2188 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2193 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2198 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- Distinct ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Distinct:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Dupes:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data Distinct  = Distinct +               | Dupes +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Distinct :: Distinct  ->+                T_Distinct +sem_Distinct (Distinct )  =+    (sem_Distinct_Distinct )+sem_Distinct (Dupes )  =+    (sem_Distinct_Dupes )+-- semantic domain+type T_Distinct  = Catalog ->+                   LocalIdentifierBindings ->+                   ( Distinct,Distinct)+data Inh_Distinct  = Inh_Distinct {cat_Inh_Distinct :: Catalog,lib_Inh_Distinct :: LocalIdentifierBindings}+data Syn_Distinct  = Syn_Distinct {annotatedTree_Syn_Distinct :: Distinct,originalTree_Syn_Distinct :: Distinct}+wrap_Distinct :: T_Distinct  ->+                 Inh_Distinct  ->+                 Syn_Distinct +wrap_Distinct sem (Inh_Distinct _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_Distinct _lhsOannotatedTree _lhsOoriginalTree ))+sem_Distinct_Distinct :: T_Distinct +sem_Distinct_Distinct  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Distinct+              _lhsOoriginalTree :: Distinct+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Distinct+                  {-# LINE 2252 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Distinct+                  {-# LINE 2257 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2262 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2267 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Distinct_Dupes :: T_Distinct +sem_Distinct_Dupes  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Distinct+              _lhsOoriginalTree :: Distinct+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Dupes+                  {-# LINE 2279 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Dupes+                  {-# LINE 2284 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2289 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2294 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- DropType ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Domain:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Table:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Type:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative View:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data DropType  = Domain +               | Table +               | Type +               | View +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_DropType :: DropType  ->+                T_DropType +sem_DropType (Domain )  =+    (sem_DropType_Domain )+sem_DropType (Table )  =+    (sem_DropType_Table )+sem_DropType (Type )  =+    (sem_DropType_Type )+sem_DropType (View )  =+    (sem_DropType_View )+-- semantic domain+type T_DropType  = Catalog ->+                   LocalIdentifierBindings ->+                   ( DropType,DropType)+data Inh_DropType  = Inh_DropType {cat_Inh_DropType :: Catalog,lib_Inh_DropType :: LocalIdentifierBindings}+data Syn_DropType  = Syn_DropType {annotatedTree_Syn_DropType :: DropType,originalTree_Syn_DropType :: DropType}+wrap_DropType :: T_DropType  ->+                 Inh_DropType  ->+                 Syn_DropType +wrap_DropType sem (Inh_DropType _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_DropType _lhsOannotatedTree _lhsOoriginalTree ))+sem_DropType_Domain :: T_DropType +sem_DropType_Domain  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: DropType+              _lhsOoriginalTree :: DropType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Domain+                  {-# LINE 2362 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Domain+                  {-# LINE 2367 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2372 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2377 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_DropType_Table :: T_DropType +sem_DropType_Table  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: DropType+              _lhsOoriginalTree :: DropType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Table+                  {-# LINE 2389 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Table+                  {-# LINE 2394 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2399 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2404 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_DropType_Type :: T_DropType +sem_DropType_Type  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: DropType+              _lhsOoriginalTree :: DropType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Type+                  {-# LINE 2416 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Type+                  {-# LINE 2421 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2426 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2431 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_DropType_View :: T_DropType +sem_DropType_View  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: DropType+              _lhsOoriginalTree :: DropType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  View+                  {-# LINE 2443 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  View+                  {-# LINE 2448 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 2453 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2458 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- Expression --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         liftedColumnName     : String+         originalTree         : SELF +   alternatives:+      alternative BooleanLit:+         child ann            : {Annotation}+         child b              : {Bool}+         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative Case:+         child ann            : {Annotation}+         child cases          : CaseExpressionListExpressionPairList +         child els            : MaybeExpression +         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local whenTypes   : _+            local thenTypes   : _+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative CaseSimple:+         child ann            : {Annotation}+         child value          : Expression +         child cases          : CaseExpressionListExpressionPairList +         child els            : MaybeExpression +         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local whenTypes   : _+            local thenTypes   : _+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative Cast:+         child ann            : {Annotation}+         child expr           : Expression +         child tn             : TypeName +         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative Exists:+         child ann            : {Annotation}+         child sel            : SelectExpression +         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative FloatLit:+         child ann            : {Annotation}+         child d              : {Double}+         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative FunCall:+         child ann            : {Annotation}+         child funName        : {String}+         child args           : ExpressionList +         visit 0:+            local _tup1       : _+            local tpe         : _+            local prototype   : {Maybe FunctionPrototype}+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative Identifier:+         child ann            : {Annotation}+         child i              : {String}+         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative InPredicate:+         child ann            : {Annotation}+         child expr           : Expression +         child i              : {Bool}+         child list           : InList +         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative IntegerLit:+         child ann            : {Annotation}+         child i              : {Integer}+         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative LiftOperator:+         child ann            : {Annotation}+         child oper           : {String}+         child flav           : LiftFlavour +         child args           : ExpressionList +         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative NullLit:+         child ann            : {Annotation}+         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative Placeholder:+         child ann            : {Annotation}+         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative PositionalArg:+         child ann            : {Annotation}+         child p              : {Integer}+         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative ScalarSubQuery:+         child ann            : {Annotation}+         child sel            : SelectExpression +         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative StringLit:+         child ann            : {Annotation}+         child quote          : {String}+         child value          : {String}+         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative WindowFn:+         child ann            : {Annotation}+         child fn             : Expression +         child partitionBy    : ExpressionList +         child orderBy        : ExpressionList +         child dir            : Direction +         child frm            : FrameClause +         visit 0:+            local prototype   : {Maybe FunctionPrototype}+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+-}+data Expression  = BooleanLit (Annotation) (Bool) +                 | Case (Annotation) (CaseExpressionListExpressionPairList) (MaybeExpression) +                 | CaseSimple (Annotation) (Expression) (CaseExpressionListExpressionPairList) (MaybeExpression) +                 | Cast (Annotation) (Expression) (TypeName) +                 | Exists (Annotation) (SelectExpression) +                 | FloatLit (Annotation) (Double) +                 | FunCall (Annotation) (String) (ExpressionList) +                 | Identifier (Annotation) (String) +                 | InPredicate (Annotation) (Expression) (Bool) (InList) +                 | IntegerLit (Annotation) (Integer) +                 | LiftOperator (Annotation) (String) (LiftFlavour) (ExpressionList) +                 | NullLit (Annotation) +                 | Placeholder (Annotation) +                 | PositionalArg (Annotation) (Integer) +                 | ScalarSubQuery (Annotation) (SelectExpression) +                 | StringLit (Annotation) (String) (String) +                 | WindowFn (Annotation) (Expression) (ExpressionList) (ExpressionList) (Direction) (FrameClause) +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Expression :: Expression  ->+                  T_Expression +sem_Expression (BooleanLit _ann _b )  =+    (sem_Expression_BooleanLit _ann _b )+sem_Expression (Case _ann _cases _els )  =+    (sem_Expression_Case _ann (sem_CaseExpressionListExpressionPairList _cases ) (sem_MaybeExpression _els ) )+sem_Expression (CaseSimple _ann _value _cases _els )  =+    (sem_Expression_CaseSimple _ann (sem_Expression _value ) (sem_CaseExpressionListExpressionPairList _cases ) (sem_MaybeExpression _els ) )+sem_Expression (Cast _ann _expr _tn )  =+    (sem_Expression_Cast _ann (sem_Expression _expr ) (sem_TypeName _tn ) )+sem_Expression (Exists _ann _sel )  =+    (sem_Expression_Exists _ann (sem_SelectExpression _sel ) )+sem_Expression (FloatLit _ann _d )  =+    (sem_Expression_FloatLit _ann _d )+sem_Expression (FunCall _ann _funName _args )  =+    (sem_Expression_FunCall _ann _funName (sem_ExpressionList _args ) )+sem_Expression (Identifier _ann _i )  =+    (sem_Expression_Identifier _ann _i )+sem_Expression (InPredicate _ann _expr _i _list )  =+    (sem_Expression_InPredicate _ann (sem_Expression _expr ) _i (sem_InList _list ) )+sem_Expression (IntegerLit _ann _i )  =+    (sem_Expression_IntegerLit _ann _i )+sem_Expression (LiftOperator _ann _oper _flav _args )  =+    (sem_Expression_LiftOperator _ann _oper (sem_LiftFlavour _flav ) (sem_ExpressionList _args ) )+sem_Expression (NullLit _ann )  =+    (sem_Expression_NullLit _ann )+sem_Expression (Placeholder _ann )  =+    (sem_Expression_Placeholder _ann )+sem_Expression (PositionalArg _ann _p )  =+    (sem_Expression_PositionalArg _ann _p )+sem_Expression (ScalarSubQuery _ann _sel )  =+    (sem_Expression_ScalarSubQuery _ann (sem_SelectExpression _sel ) )+sem_Expression (StringLit _ann _quote _value )  =+    (sem_Expression_StringLit _ann _quote _value )+sem_Expression (WindowFn _ann _fn _partitionBy _orderBy _dir _frm )  =+    (sem_Expression_WindowFn _ann (sem_Expression _fn ) (sem_ExpressionList _partitionBy ) (sem_ExpressionList _orderBy ) (sem_Direction _dir ) (sem_FrameClause _frm ) )+-- semantic domain+type T_Expression  = Catalog ->+                     LocalIdentifierBindings ->+                     ( Expression,String,Expression)+data Inh_Expression  = Inh_Expression {cat_Inh_Expression :: Catalog,lib_Inh_Expression :: LocalIdentifierBindings}+data Syn_Expression  = Syn_Expression {annotatedTree_Syn_Expression :: Expression,liftedColumnName_Syn_Expression :: String,originalTree_Syn_Expression :: Expression}+wrap_Expression :: T_Expression  ->+                   Inh_Expression  ->+                   Syn_Expression +wrap_Expression sem (Inh_Expression _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_Expression _lhsOannotatedTree _lhsOliftedColumnName _lhsOoriginalTree ))+sem_Expression_BooleanLit :: Annotation ->+                             Bool ->+                             T_Expression +sem_Expression_BooleanLit ann_ b_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 2727 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 2732 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 41, column 19)+              _tpe =+                  {-# LINE 41 "./TypeChecking/Expressions.ag" #-}+                  Right typeBool+                  {-# LINE 2737 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 53, column 9)+              _backTree =+                  {-# LINE 53 "./TypeChecking/Expressions.ag" #-}+                  BooleanLit ann_ b_+                  {-# LINE 2742 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 2747 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  BooleanLit ann_ b_+                  {-# LINE 2752 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  BooleanLit ann_ b_+                  {-# LINE 2757 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2762 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_Case :: Annotation ->+                       T_CaseExpressionListExpressionPairList  ->+                       T_MaybeExpression  ->+                       T_Expression +sem_Expression_Case ann_ cases_ els_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              _casesOcat :: Catalog+              _casesOlib :: LocalIdentifierBindings+              _elsOcat :: Catalog+              _elsOlib :: LocalIdentifierBindings+              _casesIannotatedTree :: CaseExpressionListExpressionPairList+              _casesIoriginalTree :: CaseExpressionListExpressionPairList+              _elsIannotatedTree :: MaybeExpression+              _elsIoriginalTree :: MaybeExpression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 2790 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 2795 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 202, column 9)+              _whenTypes =+                  {-# LINE 202 "./TypeChecking/Expressions.ag" #-}+                  map getTypeAnnotation $ concatMap fst $+                  _casesIannotatedTree+                  {-# LINE 2801 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 204, column 9)+              _thenTypes =+                  {-# LINE 204 "./TypeChecking/Expressions.ag" #-}+                  map getTypeAnnotation $+                      (map snd $ _casesIannotatedTree) +++                        maybeToList _elsIannotatedTree+                  {-# LINE 2808 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 210, column 9)+              _tpe =+                  {-# LINE 210 "./TypeChecking/Expressions.ag" #-}+                  dependsOnRTpe _whenTypes     $ do+                  errorWhen (any (/= typeBool) _whenTypes    ) $+                            [WrongTypes typeBool _whenTypes    ]+                  dependsOnRTpe _thenTypes     $+                    resolveResultSetType _lhsIcat _thenTypes+                  {-# LINE 2817 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 216, column 9)+              _backTree =+                  {-# LINE 216 "./TypeChecking/Expressions.ag" #-}+                  Case ann_ _casesIannotatedTree _elsIannotatedTree+                  {-# LINE 2822 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 2827 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Case ann_ _casesIannotatedTree _elsIannotatedTree+                  {-# LINE 2832 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Case ann_ _casesIoriginalTree _elsIoriginalTree+                  {-# LINE 2837 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2842 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 2847 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 2852 "AstInternal.hs" #-}+              -- copy rule (down)+              _elsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 2857 "AstInternal.hs" #-}+              -- copy rule (down)+              _elsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 2862 "AstInternal.hs" #-}+              ( _casesIannotatedTree,_casesIoriginalTree) =+                  (cases_ _casesOcat _casesOlib )+              ( _elsIannotatedTree,_elsIoriginalTree) =+                  (els_ _elsOcat _elsOlib )+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_CaseSimple :: Annotation ->+                             T_Expression  ->+                             T_CaseExpressionListExpressionPairList  ->+                             T_MaybeExpression  ->+                             T_Expression +sem_Expression_CaseSimple ann_ value_ cases_ els_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOoriginalTree :: Expression+              _lhsOliftedColumnName :: String+              _valueOcat :: Catalog+              _valueOlib :: LocalIdentifierBindings+              _casesOcat :: Catalog+              _casesOlib :: LocalIdentifierBindings+              _elsOcat :: Catalog+              _elsOlib :: LocalIdentifierBindings+              _valueIannotatedTree :: Expression+              _valueIliftedColumnName :: String+              _valueIoriginalTree :: Expression+              _casesIannotatedTree :: CaseExpressionListExpressionPairList+              _casesIoriginalTree :: CaseExpressionListExpressionPairList+              _elsIannotatedTree :: MaybeExpression+              _elsIoriginalTree :: MaybeExpression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 2900 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 2905 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 202, column 9)+              _whenTypes =+                  {-# LINE 202 "./TypeChecking/Expressions.ag" #-}+                  map getTypeAnnotation $ concatMap fst $+                  _casesIannotatedTree+                  {-# LINE 2911 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 204, column 9)+              _thenTypes =+                  {-# LINE 204 "./TypeChecking/Expressions.ag" #-}+                  map getTypeAnnotation $+                      (map snd $ _casesIannotatedTree) +++                        maybeToList _elsIannotatedTree+                  {-# LINE 2918 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 221, column 9)+              _tpe =+                  {-# LINE 221 "./TypeChecking/Expressions.ag" #-}+                  dependsOnRTpe _whenTypes     $ do+                  let valueType = getTypeAnnotation _valueIannotatedTree+                  checkWhenTypes <-+                      resolveResultSetType _lhsIcat (valueType : _whenTypes    )+                  dependsOnRTpe _thenTypes     $+                    resolveResultSetType _lhsIcat _thenTypes+                  {-# LINE 2928 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 228, column 9)+              _backTree =+                  {-# LINE 228 "./TypeChecking/Expressions.ag" #-}+                  CaseSimple ann_+                             _valueIannotatedTree+                             _casesIannotatedTree+                             _elsIannotatedTree+                  {-# LINE 2936 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CaseSimple ann_ _valueIannotatedTree _casesIannotatedTree _elsIannotatedTree+                  {-# LINE 2941 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CaseSimple ann_ _valueIoriginalTree _casesIoriginalTree _elsIoriginalTree+                  {-# LINE 2946 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 2951 "AstInternal.hs" #-}+              -- copy rule (up)+              _lhsOliftedColumnName =+                  {-# LINE 161 "./TypeChecking/SelectLists.ag" #-}+                  _valueIliftedColumnName+                  {-# LINE 2956 "AstInternal.hs" #-}+              -- copy rule (down)+              _valueOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 2961 "AstInternal.hs" #-}+              -- copy rule (down)+              _valueOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 2966 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 2971 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 2976 "AstInternal.hs" #-}+              -- copy rule (down)+              _elsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 2981 "AstInternal.hs" #-}+              -- copy rule (down)+              _elsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 2986 "AstInternal.hs" #-}+              ( _valueIannotatedTree,_valueIliftedColumnName,_valueIoriginalTree) =+                  (value_ _valueOcat _valueOlib )+              ( _casesIannotatedTree,_casesIoriginalTree) =+                  (cases_ _casesOcat _casesOlib )+              ( _elsIannotatedTree,_elsIoriginalTree) =+                  (els_ _elsOcat _elsOlib )+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_Cast :: Annotation ->+                       T_Expression  ->+                       T_TypeName  ->+                       T_Expression +sem_Expression_Cast ann_ expr_ tn_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _tnOcat :: Catalog+              _tnOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _exprIoriginalTree :: Expression+              _tnIannotatedTree :: TypeName+              _tnInamedType :: Type+              _tnIoriginalTree :: TypeName+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3022 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3027 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 66, column 12)+              _tpe =+                  {-# LINE 66 "./TypeChecking/Expressions.ag" #-}+                  Right $ _tnInamedType+                  {-# LINE 3032 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 67, column 12)+              _backTree =+                  {-# LINE 67 "./TypeChecking/Expressions.ag" #-}+                  Cast ann_ _exprIannotatedTree _tnIannotatedTree+                  {-# LINE 3037 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 169, column 10)+              _lhsOliftedColumnName =+                  {-# LINE 169 "./TypeChecking/SelectLists.ag" #-}+                  case _tnIannotatedTree of+                    SimpleTypeName _ tn -> tn+                    _ -> ""+                  {-# LINE 3044 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Cast ann_ _exprIannotatedTree _tnIannotatedTree+                  {-# LINE 3049 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Cast ann_ _exprIoriginalTree _tnIoriginalTree+                  {-# LINE 3054 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3059 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3064 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3069 "AstInternal.hs" #-}+              -- copy rule (down)+              _tnOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3074 "AstInternal.hs" #-}+              -- copy rule (down)+              _tnOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3079 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+              ( _tnIannotatedTree,_tnInamedType,_tnIoriginalTree) =+                  (tn_ _tnOcat _tnOlib )+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_Exists :: Annotation ->+                         T_SelectExpression  ->+                         T_Expression +sem_Expression_Exists ann_ sel_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              _selOcat :: Catalog+              _selOlib :: LocalIdentifierBindings+              _selIannotatedTree :: SelectExpression+              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _selIoriginalTree :: SelectExpression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3107 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3112 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 259, column 9)+              _tpe =+                  {-# LINE 259 "./TypeChecking/Expressions.ag" #-}+                  Right typeBool+                  {-# LINE 3117 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 260, column 9)+              _backTree =+                  {-# LINE 260 "./TypeChecking/Expressions.ag" #-}+                  Exists ann_ _selIannotatedTree+                  {-# LINE 3122 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 3127 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Exists ann_ _selIannotatedTree+                  {-# LINE 3132 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Exists ann_ _selIoriginalTree+                  {-# LINE 3137 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3142 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3147 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3152 "AstInternal.hs" #-}+              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =+                  (sel_ _selOcat _selOlib )+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_FloatLit :: Annotation ->+                           Double ->+                           T_Expression +sem_Expression_FloatLit ann_ d_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3173 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3178 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 40, column 17)+              _tpe =+                  {-# LINE 40 "./TypeChecking/Expressions.ag" #-}+                  Right typeNumeric+                  {-# LINE 3183 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 51, column 9)+              _backTree =+                  {-# LINE 51 "./TypeChecking/Expressions.ag" #-}+                  FloatLit ann_ d_+                  {-# LINE 3188 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 3193 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  FloatLit ann_ d_+                  {-# LINE 3198 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  FloatLit ann_ d_+                  {-# LINE 3203 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3208 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_FunCall :: Annotation ->+                          String ->+                          T_ExpressionList  ->+                          T_Expression +sem_Expression_FunCall ann_ funName_ args_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              _argsOcat :: Catalog+              _argsOlib :: LocalIdentifierBindings+              _argsIannotatedTree :: ExpressionList+              _argsIoriginalTree :: ExpressionList+              _argsItypeList :: ([Type])+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3233 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 74, column 9)+              __tup1 =+                  {-# LINE 74 "./TypeChecking/Expressions.ag" #-}+                  if any (==TypeCheckFailed) _argsItypeList+                  then (Right TypeCheckFailed, Nothing)+                  else+                    let fe = typeCheckFunCall+                             _lhsIcat+                             funName_+                             _argsItypeList+                    in (dependsOnRTpe _argsItypeList $ fmap (\(_,_,r,_) -> r) fe+                       ,eitherToMaybe fe)+                  {-# LINE 3246 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 74, column 9)+              (_tpe,_) =+                  {-# LINE 74 "./TypeChecking/Expressions.ag" #-}+                  __tup1+                  {-# LINE 3251 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 74, column 9)+              (_,_prototype) =+                  {-# LINE 74 "./TypeChecking/Expressions.ag" #-}+                  __tup1+                  {-# LINE 3256 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 83, column 9)+              _backTree =+                  {-# LINE 83 "./TypeChecking/Expressions.ag" #-}+                  FunCall ann_ funName_ _argsIannotatedTree+                  {-# LINE 3261 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 165, column 13)+              _lhsOliftedColumnName =+                  {-# LINE 165 "./TypeChecking/SelectLists.ag" #-}+                  if isOperatorName funName_+                     then ""+                     else funName_+                  {-# LINE 3268 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  FunCall ann_ funName_ _argsIannotatedTree+                  {-# LINE 3273 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  FunCall ann_ funName_ _argsIoriginalTree+                  {-# LINE 3278 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3283 "AstInternal.hs" #-}+              -- copy rule (down)+              _argsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3288 "AstInternal.hs" #-}+              -- copy rule (down)+              _argsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3293 "AstInternal.hs" #-}+              ( _argsIannotatedTree,_argsIoriginalTree,_argsItypeList) =+                  (args_ _argsOcat _argsOlib )+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_Identifier :: Annotation ->+                             String ->+                             T_Expression +sem_Expression_Identifier ann_ i_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3314 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3319 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 241, column 9)+              _tpe =+                  {-# LINE 241 "./TypeChecking/Expressions.ag" #-}+                  libLookupID _lhsIlib i_+                  {-# LINE 3324 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 242, column 9)+              _backTree =+                  {-# LINE 242 "./TypeChecking/Expressions.ag" #-}+                  Identifier ann_ i_+                  {-# LINE 3329 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 164, column 16)+              _lhsOliftedColumnName =+                  {-# LINE 164 "./TypeChecking/SelectLists.ag" #-}+                  i_+                  {-# LINE 3334 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Identifier ann_ i_+                  {-# LINE 3339 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Identifier ann_ i_+                  {-# LINE 3344 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3349 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_InPredicate :: Annotation ->+                              T_Expression  ->+                              Bool ->+                              T_InList  ->+                              T_Expression +sem_Expression_InPredicate ann_ expr_ i_ list_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOoriginalTree :: Expression+              _lhsOliftedColumnName :: String+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _listOcat :: Catalog+              _listOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _exprIoriginalTree :: Expression+              _listIannotatedTree :: InList+              _listIlistType :: (Either [TypeError] Type)+              _listIoriginalTree :: InList+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3380 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3385 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 289, column 9)+              _tpe =+                  {-# LINE 289 "./TypeChecking/Expressions.ag" #-}+                  do+                  lt <- _listIlistType+                  ty <- resolveResultSetType+                            _lhsIcat+                            [getTypeAnnotation _exprIannotatedTree, lt]+                  return typeBool+                  {-# LINE 3395 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 295, column 9)+              _backTree =+                  {-# LINE 295 "./TypeChecking/Expressions.ag" #-}+                  InPredicate ann_+                              _exprIannotatedTree+                              i_+                              _listIannotatedTree+                  {-# LINE 3403 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  InPredicate ann_ _exprIannotatedTree i_ _listIannotatedTree+                  {-# LINE 3408 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  InPredicate ann_ _exprIoriginalTree i_ _listIoriginalTree+                  {-# LINE 3413 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3418 "AstInternal.hs" #-}+              -- copy rule (up)+              _lhsOliftedColumnName =+                  {-# LINE 161 "./TypeChecking/SelectLists.ag" #-}+                  _exprIliftedColumnName+                  {-# LINE 3423 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3428 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3433 "AstInternal.hs" #-}+              -- copy rule (down)+              _listOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3438 "AstInternal.hs" #-}+              -- copy rule (down)+              _listOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3443 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+              ( _listIannotatedTree,_listIlistType,_listIoriginalTree) =+                  (list_ _listOcat _listOlib )+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_IntegerLit :: Annotation ->+                             Integer ->+                             T_Expression +sem_Expression_IntegerLit ann_ i_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3466 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3471 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 38, column 19)+              _tpe =+                  {-# LINE 38 "./TypeChecking/Expressions.ag" #-}+                  Right typeInt+                  {-# LINE 3476 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 47, column 9)+              _backTree =+                  {-# LINE 47 "./TypeChecking/Expressions.ag" #-}+                  IntegerLit ann_ i_+                  {-# LINE 3481 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 3486 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  IntegerLit ann_ i_+                  {-# LINE 3491 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  IntegerLit ann_ i_+                  {-# LINE 3496 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3501 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_LiftOperator :: Annotation ->+                               String ->+                               T_LiftFlavour  ->+                               T_ExpressionList  ->+                               T_Expression +sem_Expression_LiftOperator ann_ oper_ flav_ args_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              _flavOcat :: Catalog+              _flavOlib :: LocalIdentifierBindings+              _argsOcat :: Catalog+              _argsOlib :: LocalIdentifierBindings+              _flavIannotatedTree :: LiftFlavour+              _flavIoriginalTree :: LiftFlavour+              _argsIannotatedTree :: ExpressionList+              _argsIoriginalTree :: ExpressionList+              _argsItypeList :: ([Type])+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3531 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3536 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 167, column 9)+              _tpe =+                  {-# LINE 167 "./TypeChecking/Expressions.ag" #-}+                  dependsOnRTpe _argsItypeList $ do+                  let args = _argsIannotatedTree+                  errorWhen (length args /= 2)+                            [AnyAllError $ "must have two args, got " ++ show args]+                  let [a,b] = args+                      aType = getTypeAnnotation a+                      bType = getTypeAnnotation b+                  dependsOnRTpe [aType,bType] $ do+                  errorWhen (not $ isArrayType bType)+                            [AnyAllError $ "second arg must be array, got " ++ show args]+                  elemType <- unwrapArray $ bType+                  resType <- fmap (\(_,_,r,_) -> r) $ typeCheckFunCall+                                     _lhsIcat+                                     oper_+                                     [aType,elemType]+                  errorWhen (resType /= typeBool)+                            [AnyAllError $ "operator must have bool return, got " ++ show resType]+                  return resType+                  {-# LINE 3558 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 185, column 9)+              _backTree =+                  {-# LINE 185 "./TypeChecking/Expressions.ag" #-}+                  LiftOperator ann_ oper_ _flavIannotatedTree _argsIannotatedTree+                  {-# LINE 3563 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 3568 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  LiftOperator ann_ oper_ _flavIannotatedTree _argsIannotatedTree+                  {-# LINE 3573 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  LiftOperator ann_ oper_ _flavIoriginalTree _argsIoriginalTree+                  {-# LINE 3578 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3583 "AstInternal.hs" #-}+              -- copy rule (down)+              _flavOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3588 "AstInternal.hs" #-}+              -- copy rule (down)+              _flavOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3593 "AstInternal.hs" #-}+              -- copy rule (down)+              _argsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3598 "AstInternal.hs" #-}+              -- copy rule (down)+              _argsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3603 "AstInternal.hs" #-}+              ( _flavIannotatedTree,_flavIoriginalTree) =+                  (flav_ _flavOcat _flavOlib )+              ( _argsIannotatedTree,_argsIoriginalTree,_argsItypeList) =+                  (args_ _argsOcat _argsOlib )+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_NullLit :: Annotation ->+                          T_Expression +sem_Expression_NullLit ann_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3625 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3630 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 43, column 16)+              _tpe =+                  {-# LINE 43 "./TypeChecking/Expressions.ag" #-}+                  Right UnknownType+                  {-# LINE 3635 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 55, column 9)+              _backTree =+                  {-# LINE 55 "./TypeChecking/Expressions.ag" #-}+                  NullLit ann_+                  {-# LINE 3640 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 3645 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  NullLit ann_+                  {-# LINE 3650 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  NullLit ann_+                  {-# LINE 3655 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3660 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_Placeholder :: Annotation ->+                              T_Expression +sem_Expression_Placeholder ann_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3678 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3683 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 253, column 9)+              _tpe =+                  {-# LINE 253 "./TypeChecking/Expressions.ag" #-}+                  Right UnknownType+                  {-# LINE 3688 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 254, column 9)+              _backTree =+                  {-# LINE 254 "./TypeChecking/Expressions.ag" #-}+                  Placeholder ann_+                  {-# LINE 3693 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 3698 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Placeholder ann_+                  {-# LINE 3703 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Placeholder ann_+                  {-# LINE 3708 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3713 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_PositionalArg :: Annotation ->+                                Integer ->+                                T_Expression +sem_Expression_PositionalArg ann_ p_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3732 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3737 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 247, column 9)+              _tpe =+                  {-# LINE 247 "./TypeChecking/Expressions.ag" #-}+                  libLookupID _lhsIlib ('$':show p_)+                  {-# LINE 3742 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 248, column 9)+              _backTree =+                  {-# LINE 248 "./TypeChecking/Expressions.ag" #-}+                  PositionalArg ann_ p_+                  {-# LINE 3747 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 3752 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  PositionalArg ann_ p_+                  {-# LINE 3757 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  PositionalArg ann_ p_+                  {-# LINE 3762 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3767 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_ScalarSubQuery :: Annotation ->+                                 T_SelectExpression  ->+                                 T_Expression +sem_Expression_ScalarSubQuery ann_ sel_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              _selOcat :: Catalog+              _selOlib :: LocalIdentifierBindings+              _selIannotatedTree :: SelectExpression+              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _selIoriginalTree :: SelectExpression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3791 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3796 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 271, column 9)+              _tpe =+                  {-# LINE 271 "./TypeChecking/Expressions.ag" #-}+                  do+                  let selType = getTypeAnnotation _selIannotatedTree+                  dependsOnRTpe [selType] $ do+                  f <- map snd <$> unwrapSetOfComposite selType+                  case length f of+                    0 -> Left [InternalError "no columns in scalar subquery?"]+                    1 -> Right $ head f+                    _ -> Right $ AnonymousRecordType f+                  {-# LINE 3808 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 281, column 9)+              _backTree =+                  {-# LINE 281 "./TypeChecking/Expressions.ag" #-}+                  ScalarSubQuery ann_ _selIannotatedTree+                  {-# LINE 3813 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 3818 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ScalarSubQuery ann_ _selIannotatedTree+                  {-# LINE 3823 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ScalarSubQuery ann_ _selIoriginalTree+                  {-# LINE 3828 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3833 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3838 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3843 "AstInternal.hs" #-}+              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =+                  (sel_ _selOcat _selOlib )+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_StringLit :: Annotation ->+                            String ->+                            String ->+                            T_Expression +sem_Expression_StringLit ann_ quote_ value_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOliftedColumnName :: String+              _lhsOoriginalTree :: Expression+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3865 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3870 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 39, column 18)+              _tpe =+                  {-# LINE 39 "./TypeChecking/Expressions.ag" #-}+                  Right UnknownType+                  {-# LINE 3875 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 49, column 9)+              _backTree =+                  {-# LINE 49 "./TypeChecking/Expressions.ag" #-}+                  StringLit ann_ quote_ value_+                  {-# LINE 3880 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 177, column 7)+              _lhsOliftedColumnName =+                  {-# LINE 177 "./TypeChecking/SelectLists.ag" #-}+                  ""+                  {-# LINE 3885 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  StringLit ann_ quote_ value_+                  {-# LINE 3890 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  StringLit ann_ quote_ value_+                  {-# LINE 3895 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3900 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+sem_Expression_WindowFn :: Annotation ->+                           T_Expression  ->+                           T_ExpressionList  ->+                           T_ExpressionList  ->+                           T_Direction  ->+                           T_FrameClause  ->+                           T_Expression +sem_Expression_WindowFn ann_ fn_ partitionBy_ orderBy_ dir_ frm_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Expression+              _prototype :: (Maybe FunctionPrototype)+              _lhsOoriginalTree :: Expression+              _lhsOliftedColumnName :: String+              _fnOcat :: Catalog+              _fnOlib :: LocalIdentifierBindings+              _partitionByOcat :: Catalog+              _partitionByOlib :: LocalIdentifierBindings+              _orderByOcat :: Catalog+              _orderByOlib :: LocalIdentifierBindings+              _dirOcat :: Catalog+              _dirOlib :: LocalIdentifierBindings+              _frmOcat :: Catalog+              _frmOlib :: LocalIdentifierBindings+              _fnIannotatedTree :: Expression+              _fnIliftedColumnName :: String+              _fnIoriginalTree :: Expression+              _partitionByIannotatedTree :: ExpressionList+              _partitionByIoriginalTree :: ExpressionList+              _partitionByItypeList :: ([Type])+              _orderByIannotatedTree :: ExpressionList+              _orderByIoriginalTree :: ExpressionList+              _orderByItypeList :: ([Type])+              _dirIannotatedTree :: Direction+              _dirIoriginalTree :: Direction+              _frmIannotatedTree :: FrameClause+              _frmIoriginalTree :: FrameClause+              -- "./TypeChecking/Expressions.ag"(line 14, column 9)+              _lhsOannotatedTree =+                  {-# LINE 14 "./TypeChecking/Expressions.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ fmap ((:[]) . FunctionPrototypeA) _prototype+                  {-# LINE 3946 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 29, column 9)+              _prototype =+                  {-# LINE 29 "./TypeChecking/Expressions.ag" #-}+                  Nothing+                  {-# LINE 3951 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 87, column 9)+              _tpe =+                  {-# LINE 87 "./TypeChecking/Expressions.ag" #-}+                  Right (getTypeAnnotation _fnIannotatedTree)+                  {-# LINE 3956 "AstInternal.hs" #-}+              -- "./TypeChecking/Expressions.ag"(line 88, column 9)+              _backTree =+                  {-# LINE 88 "./TypeChecking/Expressions.ag" #-}+                  WindowFn ann_+                           _fnIannotatedTree+                           _partitionByIannotatedTree+                           _orderByIannotatedTree+                           _dirIannotatedTree+                           _frmIannotatedTree+                  {-# LINE 3966 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  WindowFn ann_ _fnIannotatedTree _partitionByIannotatedTree _orderByIannotatedTree _dirIannotatedTree _frmIannotatedTree+                  {-# LINE 3971 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  WindowFn ann_ _fnIoriginalTree _partitionByIoriginalTree _orderByIoriginalTree _dirIoriginalTree _frmIoriginalTree+                  {-# LINE 3976 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 3981 "AstInternal.hs" #-}+              -- copy rule (up)+              _lhsOliftedColumnName =+                  {-# LINE 161 "./TypeChecking/SelectLists.ag" #-}+                  _fnIliftedColumnName+                  {-# LINE 3986 "AstInternal.hs" #-}+              -- copy rule (down)+              _fnOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 3991 "AstInternal.hs" #-}+              -- copy rule (down)+              _fnOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 3996 "AstInternal.hs" #-}+              -- copy rule (down)+              _partitionByOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4001 "AstInternal.hs" #-}+              -- copy rule (down)+              _partitionByOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4006 "AstInternal.hs" #-}+              -- copy rule (down)+              _orderByOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4011 "AstInternal.hs" #-}+              -- copy rule (down)+              _orderByOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4016 "AstInternal.hs" #-}+              -- copy rule (down)+              _dirOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4021 "AstInternal.hs" #-}+              -- copy rule (down)+              _dirOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4026 "AstInternal.hs" #-}+              -- copy rule (down)+              _frmOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4031 "AstInternal.hs" #-}+              -- copy rule (down)+              _frmOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4036 "AstInternal.hs" #-}+              ( _fnIannotatedTree,_fnIliftedColumnName,_fnIoriginalTree) =+                  (fn_ _fnOcat _fnOlib )+              ( _partitionByIannotatedTree,_partitionByIoriginalTree,_partitionByItypeList) =+                  (partitionBy_ _partitionByOcat _partitionByOlib )+              ( _orderByIannotatedTree,_orderByIoriginalTree,_orderByItypeList) =+                  (orderBy_ _orderByOcat _orderByOlib )+              ( _dirIannotatedTree,_dirIoriginalTree) =+                  (dir_ _dirOcat _dirOlib )+              ( _frmIannotatedTree,_frmIoriginalTree) =+                  (frm_ _frmOcat _frmOlib )+          in  ( _lhsOannotatedTree,_lhsOliftedColumnName,_lhsOoriginalTree)))+-- ExpressionDirectionPair -------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Tuple:+         child x1             : Expression +         child x2             : Direction +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ExpressionDirectionPair  = ( (Expression),(Direction))+-- cata+sem_ExpressionDirectionPair :: ExpressionDirectionPair  ->+                               T_ExpressionDirectionPair +sem_ExpressionDirectionPair ( x1,x2)  =+    (sem_ExpressionDirectionPair_Tuple (sem_Expression x1 ) (sem_Direction x2 ) )+-- semantic domain+type T_ExpressionDirectionPair  = Catalog ->+                                  LocalIdentifierBindings ->+                                  ( ExpressionDirectionPair,ExpressionDirectionPair)+data Inh_ExpressionDirectionPair  = Inh_ExpressionDirectionPair {cat_Inh_ExpressionDirectionPair :: Catalog,lib_Inh_ExpressionDirectionPair :: LocalIdentifierBindings}+data Syn_ExpressionDirectionPair  = Syn_ExpressionDirectionPair {annotatedTree_Syn_ExpressionDirectionPair :: ExpressionDirectionPair,originalTree_Syn_ExpressionDirectionPair :: ExpressionDirectionPair}+wrap_ExpressionDirectionPair :: T_ExpressionDirectionPair  ->+                                Inh_ExpressionDirectionPair  ->+                                Syn_ExpressionDirectionPair +wrap_ExpressionDirectionPair sem (Inh_ExpressionDirectionPair _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ExpressionDirectionPair _lhsOannotatedTree _lhsOoriginalTree ))+sem_ExpressionDirectionPair_Tuple :: T_Expression  ->+                                     T_Direction  ->+                                     T_ExpressionDirectionPair +sem_ExpressionDirectionPair_Tuple x1_ x2_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ExpressionDirectionPair+              _lhsOoriginalTree :: ExpressionDirectionPair+              _x1Ocat :: Catalog+              _x1Olib :: LocalIdentifierBindings+              _x2Ocat :: Catalog+              _x2Olib :: LocalIdentifierBindings+              _x1IannotatedTree :: Expression+              _x1IliftedColumnName :: String+              _x1IoriginalTree :: Expression+              _x2IannotatedTree :: Direction+              _x2IoriginalTree :: Direction+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (_x1IannotatedTree,_x2IannotatedTree)+                  {-# LINE 4105 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (_x1IoriginalTree,_x2IoriginalTree)+                  {-# LINE 4110 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4115 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4120 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4125 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4130 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4135 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4140 "AstInternal.hs" #-}+              ( _x1IannotatedTree,_x1IliftedColumnName,_x1IoriginalTree) =+                  (x1_ _x1Ocat _x1Olib )+              ( _x2IannotatedTree,_x2IoriginalTree) =+                  (x2_ _x2Ocat _x2Olib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- ExpressionDirectionPairList ---------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : ExpressionDirectionPair +         child tl             : ExpressionDirectionPairList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ExpressionDirectionPairList  = [(ExpressionDirectionPair)]+-- cata+sem_ExpressionDirectionPairList :: ExpressionDirectionPairList  ->+                                   T_ExpressionDirectionPairList +sem_ExpressionDirectionPairList list  =+    (Prelude.foldr sem_ExpressionDirectionPairList_Cons sem_ExpressionDirectionPairList_Nil (Prelude.map sem_ExpressionDirectionPair list) )+-- semantic domain+type T_ExpressionDirectionPairList  = Catalog ->+                                      LocalIdentifierBindings ->+                                      ( ExpressionDirectionPairList,ExpressionDirectionPairList)+data Inh_ExpressionDirectionPairList  = Inh_ExpressionDirectionPairList {cat_Inh_ExpressionDirectionPairList :: Catalog,lib_Inh_ExpressionDirectionPairList :: LocalIdentifierBindings}+data Syn_ExpressionDirectionPairList  = Syn_ExpressionDirectionPairList {annotatedTree_Syn_ExpressionDirectionPairList :: ExpressionDirectionPairList,originalTree_Syn_ExpressionDirectionPairList :: ExpressionDirectionPairList}+wrap_ExpressionDirectionPairList :: T_ExpressionDirectionPairList  ->+                                    Inh_ExpressionDirectionPairList  ->+                                    Syn_ExpressionDirectionPairList +wrap_ExpressionDirectionPairList sem (Inh_ExpressionDirectionPairList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ExpressionDirectionPairList _lhsOannotatedTree _lhsOoriginalTree ))+sem_ExpressionDirectionPairList_Cons :: T_ExpressionDirectionPair  ->+                                        T_ExpressionDirectionPairList  ->+                                        T_ExpressionDirectionPairList +sem_ExpressionDirectionPairList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ExpressionDirectionPairList+              _lhsOoriginalTree :: ExpressionDirectionPairList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: ExpressionDirectionPair+              _hdIoriginalTree :: ExpressionDirectionPair+              _tlIannotatedTree :: ExpressionDirectionPairList+              _tlIoriginalTree :: ExpressionDirectionPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 4206 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 4211 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4216 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4221 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4226 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4231 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4236 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4241 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_ExpressionDirectionPairList_Nil :: T_ExpressionDirectionPairList +sem_ExpressionDirectionPairList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ExpressionDirectionPairList+              _lhsOoriginalTree :: ExpressionDirectionPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 4257 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 4262 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4267 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4272 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- ExpressionList ----------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +         typeList             : [Type]+   alternatives:+      alternative Cons:+         child hd             : Expression +         child tl             : ExpressionList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ExpressionList  = [(Expression)]+-- cata+sem_ExpressionList :: ExpressionList  ->+                      T_ExpressionList +sem_ExpressionList list  =+    (Prelude.foldr sem_ExpressionList_Cons sem_ExpressionList_Nil (Prelude.map sem_Expression list) )+-- semantic domain+type T_ExpressionList  = Catalog ->+                         LocalIdentifierBindings ->+                         ( ExpressionList,ExpressionList,([Type]))+data Inh_ExpressionList  = Inh_ExpressionList {cat_Inh_ExpressionList :: Catalog,lib_Inh_ExpressionList :: LocalIdentifierBindings}+data Syn_ExpressionList  = Syn_ExpressionList {annotatedTree_Syn_ExpressionList :: ExpressionList,originalTree_Syn_ExpressionList :: ExpressionList,typeList_Syn_ExpressionList :: [Type]}+wrap_ExpressionList :: T_ExpressionList  ->+                       Inh_ExpressionList  ->+                       Syn_ExpressionList +wrap_ExpressionList sem (Inh_ExpressionList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeList) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ExpressionList _lhsOannotatedTree _lhsOoriginalTree _lhsOtypeList ))+sem_ExpressionList_Cons :: T_Expression  ->+                           T_ExpressionList  ->+                           T_ExpressionList +sem_ExpressionList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOtypeList :: ([Type])+              _lhsOannotatedTree :: ExpressionList+              _lhsOoriginalTree :: ExpressionList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: Expression+              _hdIliftedColumnName :: String+              _hdIoriginalTree :: Expression+              _tlIannotatedTree :: ExpressionList+              _tlIoriginalTree :: ExpressionList+              _tlItypeList :: ([Type])+              -- "./TypeChecking/Misc.ag"(line 52, column 12)+              _lhsOtypeList =+                  {-# LINE 52 "./TypeChecking/Misc.ag" #-}+                  getTypeAnnotation _hdIannotatedTree : _tlItypeList+                  {-# LINE 4338 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 4343 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 4348 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4353 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4358 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4363 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4368 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4373 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4378 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIliftedColumnName,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree,_tlItypeList) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeList)))+sem_ExpressionList_Nil :: T_ExpressionList +sem_ExpressionList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOtypeList :: ([Type])+              _lhsOannotatedTree :: ExpressionList+              _lhsOoriginalTree :: ExpressionList+              -- "./TypeChecking/Misc.ag"(line 53, column 11)+              _lhsOtypeList =+                  {-# LINE 53 "./TypeChecking/Misc.ag" #-}+                  []+                  {-# LINE 4395 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 4400 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 4405 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4410 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4415 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeList)))+-- ExpressionListList ------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +         typeListList         : [[Type]]+   alternatives:+      alternative Cons:+         child hd             : ExpressionList +         child tl             : ExpressionListList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ExpressionListList  = [(ExpressionList)]+-- cata+sem_ExpressionListList :: ExpressionListList  ->+                          T_ExpressionListList +sem_ExpressionListList list  =+    (Prelude.foldr sem_ExpressionListList_Cons sem_ExpressionListList_Nil (Prelude.map sem_ExpressionList list) )+-- semantic domain+type T_ExpressionListList  = Catalog ->+                             LocalIdentifierBindings ->+                             ( ExpressionListList,ExpressionListList,([[Type]]))+data Inh_ExpressionListList  = Inh_ExpressionListList {cat_Inh_ExpressionListList :: Catalog,lib_Inh_ExpressionListList :: LocalIdentifierBindings}+data Syn_ExpressionListList  = Syn_ExpressionListList {annotatedTree_Syn_ExpressionListList :: ExpressionListList,originalTree_Syn_ExpressionListList :: ExpressionListList,typeListList_Syn_ExpressionListList :: [[Type]]}+wrap_ExpressionListList :: T_ExpressionListList  ->+                           Inh_ExpressionListList  ->+                           Syn_ExpressionListList +wrap_ExpressionListList sem (Inh_ExpressionListList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeListList) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ExpressionListList _lhsOannotatedTree _lhsOoriginalTree _lhsOtypeListList ))+sem_ExpressionListList_Cons :: T_ExpressionList  ->+                               T_ExpressionListList  ->+                               T_ExpressionListList +sem_ExpressionListList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOtypeListList :: ([[Type]])+              _lhsOannotatedTree :: ExpressionListList+              _lhsOoriginalTree :: ExpressionListList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: ExpressionList+              _hdIoriginalTree :: ExpressionList+              _hdItypeList :: ([Type])+              _tlIannotatedTree :: ExpressionListList+              _tlIoriginalTree :: ExpressionListList+              _tlItypeListList :: ([[Type]])+              -- "./TypeChecking/Misc.ag"(line 59, column 12)+              _lhsOtypeListList =+                  {-# LINE 59 "./TypeChecking/Misc.ag" #-}+                  _hdItypeList : _tlItypeListList+                  {-# LINE 4481 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 4486 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 4491 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4496 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4501 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4506 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4511 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4516 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4521 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIoriginalTree,_hdItypeList) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree,_tlItypeListList) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeListList)))+sem_ExpressionListList_Nil :: T_ExpressionListList +sem_ExpressionListList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOtypeListList :: ([[Type]])+              _lhsOannotatedTree :: ExpressionListList+              _lhsOoriginalTree :: ExpressionListList+              -- "./TypeChecking/Misc.ag"(line 60, column 11)+              _lhsOtypeListList =+                  {-# LINE 60 "./TypeChecking/Misc.ag" #-}+                  []+                  {-# LINE 4538 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 4543 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 4548 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4553 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4558 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOtypeListList)))+-- ExpressionListStatementListPair -----------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Tuple:+         child x1             : ExpressionList +         child x2             : StatementList +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ExpressionListStatementListPair  = ( (ExpressionList),(StatementList))+-- cata+sem_ExpressionListStatementListPair :: ExpressionListStatementListPair  ->+                                       T_ExpressionListStatementListPair +sem_ExpressionListStatementListPair ( x1,x2)  =+    (sem_ExpressionListStatementListPair_Tuple (sem_ExpressionList x1 ) (sem_StatementList x2 ) )+-- semantic domain+type T_ExpressionListStatementListPair  = Catalog ->+                                          LocalIdentifierBindings ->+                                          ( ExpressionListStatementListPair,ExpressionListStatementListPair)+data Inh_ExpressionListStatementListPair  = Inh_ExpressionListStatementListPair {cat_Inh_ExpressionListStatementListPair :: Catalog,lib_Inh_ExpressionListStatementListPair :: LocalIdentifierBindings}+data Syn_ExpressionListStatementListPair  = Syn_ExpressionListStatementListPair {annotatedTree_Syn_ExpressionListStatementListPair :: ExpressionListStatementListPair,originalTree_Syn_ExpressionListStatementListPair :: ExpressionListStatementListPair}+wrap_ExpressionListStatementListPair :: T_ExpressionListStatementListPair  ->+                                        Inh_ExpressionListStatementListPair  ->+                                        Syn_ExpressionListStatementListPair +wrap_ExpressionListStatementListPair sem (Inh_ExpressionListStatementListPair _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ExpressionListStatementListPair _lhsOannotatedTree _lhsOoriginalTree ))+sem_ExpressionListStatementListPair_Tuple :: T_ExpressionList  ->+                                             T_StatementList  ->+                                             T_ExpressionListStatementListPair +sem_ExpressionListStatementListPair_Tuple x1_ x2_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _x2OcatUpdates :: ([CatalogUpdate])+              _x2OlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: ExpressionListStatementListPair+              _lhsOoriginalTree :: ExpressionListStatementListPair+              _x1Ocat :: Catalog+              _x1Olib :: LocalIdentifierBindings+              _x2Ocat :: Catalog+              _x2Olib :: LocalIdentifierBindings+              _x1IannotatedTree :: ExpressionList+              _x1IoriginalTree :: ExpressionList+              _x1ItypeList :: ([Type])+              _x2IannotatedTree :: StatementList+              _x2IoriginalTree :: StatementList+              _x2IproducedCat :: Catalog+              _x2IproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 94, column 9)+              _x2OcatUpdates =+                  {-# LINE 94 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 4621 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 95, column 9)+              _x2OlibUpdates =+                  {-# LINE 95 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 4626 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (_x1IannotatedTree,_x2IannotatedTree)+                  {-# LINE 4631 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (_x1IoriginalTree,_x2IoriginalTree)+                  {-# LINE 4636 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4641 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4646 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4651 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4656 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4661 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4666 "AstInternal.hs" #-}+              ( _x1IannotatedTree,_x1IoriginalTree,_x1ItypeList) =+                  (x1_ _x1Ocat _x1Olib )+              ( _x2IannotatedTree,_x2IoriginalTree,_x2IproducedCat,_x2IproducedLib) =+                  (x2_ _x2Ocat _x2OcatUpdates _x2Olib _x2OlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- ExpressionListStatementListPairList -------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : ExpressionListStatementListPair +         child tl             : ExpressionListStatementListPairList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ExpressionListStatementListPairList  = [(ExpressionListStatementListPair)]+-- cata+sem_ExpressionListStatementListPairList :: ExpressionListStatementListPairList  ->+                                           T_ExpressionListStatementListPairList +sem_ExpressionListStatementListPairList list  =+    (Prelude.foldr sem_ExpressionListStatementListPairList_Cons sem_ExpressionListStatementListPairList_Nil (Prelude.map sem_ExpressionListStatementListPair list) )+-- semantic domain+type T_ExpressionListStatementListPairList  = Catalog ->+                                              LocalIdentifierBindings ->+                                              ( ExpressionListStatementListPairList,ExpressionListStatementListPairList)+data Inh_ExpressionListStatementListPairList  = Inh_ExpressionListStatementListPairList {cat_Inh_ExpressionListStatementListPairList :: Catalog,lib_Inh_ExpressionListStatementListPairList :: LocalIdentifierBindings}+data Syn_ExpressionListStatementListPairList  = Syn_ExpressionListStatementListPairList {annotatedTree_Syn_ExpressionListStatementListPairList :: ExpressionListStatementListPairList,originalTree_Syn_ExpressionListStatementListPairList :: ExpressionListStatementListPairList}+wrap_ExpressionListStatementListPairList :: T_ExpressionListStatementListPairList  ->+                                            Inh_ExpressionListStatementListPairList  ->+                                            Syn_ExpressionListStatementListPairList +wrap_ExpressionListStatementListPairList sem (Inh_ExpressionListStatementListPairList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ExpressionListStatementListPairList _lhsOannotatedTree _lhsOoriginalTree ))+sem_ExpressionListStatementListPairList_Cons :: T_ExpressionListStatementListPair  ->+                                                T_ExpressionListStatementListPairList  ->+                                                T_ExpressionListStatementListPairList +sem_ExpressionListStatementListPairList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ExpressionListStatementListPairList+              _lhsOoriginalTree :: ExpressionListStatementListPairList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: ExpressionListStatementListPair+              _hdIoriginalTree :: ExpressionListStatementListPair+              _tlIannotatedTree :: ExpressionListStatementListPairList+              _tlIoriginalTree :: ExpressionListStatementListPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 4732 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 4737 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4742 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4747 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4752 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4757 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4762 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4767 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_ExpressionListStatementListPairList_Nil :: T_ExpressionListStatementListPairList +sem_ExpressionListStatementListPairList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ExpressionListStatementListPairList+              _lhsOoriginalTree :: ExpressionListStatementListPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 4783 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 4788 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4793 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4798 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- ExpressionRoot ----------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative ExpressionRoot:+         child expr           : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data ExpressionRoot  = ExpressionRoot (Expression) +                     deriving ( Show)+-- cata+sem_ExpressionRoot :: ExpressionRoot  ->+                      T_ExpressionRoot +sem_ExpressionRoot (ExpressionRoot _expr )  =+    (sem_ExpressionRoot_ExpressionRoot (sem_Expression _expr ) )+-- semantic domain+type T_ExpressionRoot  = Catalog ->+                         LocalIdentifierBindings ->+                         ( ExpressionRoot,ExpressionRoot)+data Inh_ExpressionRoot  = Inh_ExpressionRoot {cat_Inh_ExpressionRoot :: Catalog,lib_Inh_ExpressionRoot :: LocalIdentifierBindings}+data Syn_ExpressionRoot  = Syn_ExpressionRoot {annotatedTree_Syn_ExpressionRoot :: ExpressionRoot,originalTree_Syn_ExpressionRoot :: ExpressionRoot}+wrap_ExpressionRoot :: T_ExpressionRoot  ->+                       Inh_ExpressionRoot  ->+                       Syn_ExpressionRoot +wrap_ExpressionRoot sem (Inh_ExpressionRoot _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ExpressionRoot _lhsOannotatedTree _lhsOoriginalTree ))+sem_ExpressionRoot_ExpressionRoot :: T_Expression  ->+                                     T_ExpressionRoot +sem_ExpressionRoot_ExpressionRoot expr_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ExpressionRoot+              _lhsOoriginalTree :: ExpressionRoot+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _exprIoriginalTree :: Expression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ExpressionRoot _exprIannotatedTree+                  {-# LINE 4852 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ExpressionRoot _exprIoriginalTree+                  {-# LINE 4857 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4862 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4867 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4872 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4877 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- ExpressionStatementListPair ---------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Tuple:+         child x1             : Expression +         child x2             : StatementList +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ExpressionStatementListPair  = ( (Expression),(StatementList))+-- cata+sem_ExpressionStatementListPair :: ExpressionStatementListPair  ->+                                   T_ExpressionStatementListPair +sem_ExpressionStatementListPair ( x1,x2)  =+    (sem_ExpressionStatementListPair_Tuple (sem_Expression x1 ) (sem_StatementList x2 ) )+-- semantic domain+type T_ExpressionStatementListPair  = Catalog ->+                                      LocalIdentifierBindings ->+                                      ( ExpressionStatementListPair,ExpressionStatementListPair)+data Inh_ExpressionStatementListPair  = Inh_ExpressionStatementListPair {cat_Inh_ExpressionStatementListPair :: Catalog,lib_Inh_ExpressionStatementListPair :: LocalIdentifierBindings}+data Syn_ExpressionStatementListPair  = Syn_ExpressionStatementListPair {annotatedTree_Syn_ExpressionStatementListPair :: ExpressionStatementListPair,originalTree_Syn_ExpressionStatementListPair :: ExpressionStatementListPair}+wrap_ExpressionStatementListPair :: T_ExpressionStatementListPair  ->+                                    Inh_ExpressionStatementListPair  ->+                                    Syn_ExpressionStatementListPair +wrap_ExpressionStatementListPair sem (Inh_ExpressionStatementListPair _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ExpressionStatementListPair _lhsOannotatedTree _lhsOoriginalTree ))+sem_ExpressionStatementListPair_Tuple :: T_Expression  ->+                                         T_StatementList  ->+                                         T_ExpressionStatementListPair +sem_ExpressionStatementListPair_Tuple x1_ x2_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _x2OcatUpdates :: ([CatalogUpdate])+              _x2OlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: ExpressionStatementListPair+              _lhsOoriginalTree :: ExpressionStatementListPair+              _x1Ocat :: Catalog+              _x1Olib :: LocalIdentifierBindings+              _x2Ocat :: Catalog+              _x2Olib :: LocalIdentifierBindings+              _x1IannotatedTree :: Expression+              _x1IliftedColumnName :: String+              _x1IoriginalTree :: Expression+              _x2IannotatedTree :: StatementList+              _x2IoriginalTree :: StatementList+              _x2IproducedCat :: Catalog+              _x2IproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 98, column 9)+              _x2OcatUpdates =+                  {-# LINE 98 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 4942 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 99, column 9)+              _x2OlibUpdates =+                  {-# LINE 99 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 4947 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (_x1IannotatedTree,_x2IannotatedTree)+                  {-# LINE 4952 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (_x1IoriginalTree,_x2IoriginalTree)+                  {-# LINE 4957 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 4962 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 4967 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4972 "AstInternal.hs" #-}+              -- copy rule (down)+              _x1Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4977 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 4982 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 4987 "AstInternal.hs" #-}+              ( _x1IannotatedTree,_x1IliftedColumnName,_x1IoriginalTree) =+                  (x1_ _x1Ocat _x1Olib )+              ( _x2IannotatedTree,_x2IoriginalTree,_x2IproducedCat,_x2IproducedLib) =+                  (x2_ _x2Ocat _x2OcatUpdates _x2Olib _x2OlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- ExpressionStatementListPairList -----------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : ExpressionStatementListPair +         child tl             : ExpressionStatementListPairList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ExpressionStatementListPairList  = [(ExpressionStatementListPair)]+-- cata+sem_ExpressionStatementListPairList :: ExpressionStatementListPairList  ->+                                       T_ExpressionStatementListPairList +sem_ExpressionStatementListPairList list  =+    (Prelude.foldr sem_ExpressionStatementListPairList_Cons sem_ExpressionStatementListPairList_Nil (Prelude.map sem_ExpressionStatementListPair list) )+-- semantic domain+type T_ExpressionStatementListPairList  = Catalog ->+                                          LocalIdentifierBindings ->+                                          ( ExpressionStatementListPairList,ExpressionStatementListPairList)+data Inh_ExpressionStatementListPairList  = Inh_ExpressionStatementListPairList {cat_Inh_ExpressionStatementListPairList :: Catalog,lib_Inh_ExpressionStatementListPairList :: LocalIdentifierBindings}+data Syn_ExpressionStatementListPairList  = Syn_ExpressionStatementListPairList {annotatedTree_Syn_ExpressionStatementListPairList :: ExpressionStatementListPairList,originalTree_Syn_ExpressionStatementListPairList :: ExpressionStatementListPairList}+wrap_ExpressionStatementListPairList :: T_ExpressionStatementListPairList  ->+                                        Inh_ExpressionStatementListPairList  ->+                                        Syn_ExpressionStatementListPairList +wrap_ExpressionStatementListPairList sem (Inh_ExpressionStatementListPairList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ExpressionStatementListPairList _lhsOannotatedTree _lhsOoriginalTree ))+sem_ExpressionStatementListPairList_Cons :: T_ExpressionStatementListPair  ->+                                            T_ExpressionStatementListPairList  ->+                                            T_ExpressionStatementListPairList +sem_ExpressionStatementListPairList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ExpressionStatementListPairList+              _lhsOoriginalTree :: ExpressionStatementListPairList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: ExpressionStatementListPair+              _hdIoriginalTree :: ExpressionStatementListPair+              _tlIannotatedTree :: ExpressionStatementListPairList+              _tlIoriginalTree :: ExpressionStatementListPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 5053 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 5058 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5063 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5068 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 5073 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 5078 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 5083 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 5088 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_ExpressionStatementListPairList_Nil :: T_ExpressionStatementListPairList +sem_ExpressionStatementListPairList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: ExpressionStatementListPairList+              _lhsOoriginalTree :: ExpressionStatementListPairList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 5104 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 5109 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5114 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5119 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- FnBody ------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative PlpgsqlFnBody:+         child ann            : {Annotation}+         child vars           : VarDefList +         child sts            : StatementList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative SqlFnBody:+         child ann            : {Annotation}+         child sts            : StatementList +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data FnBody  = PlpgsqlFnBody (Annotation) (VarDefList) (StatementList) +             | SqlFnBody (Annotation) (StatementList) +             deriving ( Data,Eq,Show,Typeable)+-- cata+sem_FnBody :: FnBody  ->+              T_FnBody +sem_FnBody (PlpgsqlFnBody _ann _vars _sts )  =+    (sem_FnBody_PlpgsqlFnBody _ann (sem_VarDefList _vars ) (sem_StatementList _sts ) )+sem_FnBody (SqlFnBody _ann _sts )  =+    (sem_FnBody_SqlFnBody _ann (sem_StatementList _sts ) )+-- semantic domain+type T_FnBody  = Catalog ->+                 LocalIdentifierBindings ->+                 ( FnBody,FnBody)+data Inh_FnBody  = Inh_FnBody {cat_Inh_FnBody :: Catalog,lib_Inh_FnBody :: LocalIdentifierBindings}+data Syn_FnBody  = Syn_FnBody {annotatedTree_Syn_FnBody :: FnBody,originalTree_Syn_FnBody :: FnBody}+wrap_FnBody :: T_FnBody  ->+               Inh_FnBody  ->+               Syn_FnBody +wrap_FnBody sem (Inh_FnBody _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_FnBody _lhsOannotatedTree _lhsOoriginalTree ))+sem_FnBody_PlpgsqlFnBody :: Annotation ->+                            T_VarDefList  ->+                            T_StatementList  ->+                            T_FnBody +sem_FnBody_PlpgsqlFnBody ann_ vars_ sts_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _stsOcatUpdates :: ([CatalogUpdate])+              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _stsOlib :: LocalIdentifierBindings+              _lhsOannotatedTree :: FnBody+              _lhsOoriginalTree :: FnBody+              _varsOcat :: Catalog+              _varsOlib :: LocalIdentifierBindings+              _stsOcat :: Catalog+              _varsIannotatedTree :: VarDefList+              _varsIdefs :: ([(String,Type)])+              _varsIoriginalTree :: VarDefList+              _stsIannotatedTree :: StatementList+              _stsIoriginalTree :: StatementList+              _stsIproducedCat :: Catalog+              _stsIproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 102, column 9)+              _stsOcatUpdates =+                  {-# LINE 102 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 5194 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 103, column 9)+              _stsOlibUpdates =+                  {-# LINE 103 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 5199 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 121, column 9)+              _stsOlib =+                  {-# LINE 121 "./TypeChecking/CreateFunction.ag" #-}+                  fromRight _lhsIlib $+                  updateBindings _lhsIlib _lhsIcat+                                 [LibStackIDs [("", _varsIdefs)]]+                  {-# LINE 5206 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  PlpgsqlFnBody ann_ _varsIannotatedTree _stsIannotatedTree+                  {-# LINE 5211 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  PlpgsqlFnBody ann_ _varsIoriginalTree _stsIoriginalTree+                  {-# LINE 5216 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5221 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5226 "AstInternal.hs" #-}+              -- copy rule (down)+              _varsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 5231 "AstInternal.hs" #-}+              -- copy rule (down)+              _varsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 5236 "AstInternal.hs" #-}+              -- copy rule (down)+              _stsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 5241 "AstInternal.hs" #-}+              ( _varsIannotatedTree,_varsIdefs,_varsIoriginalTree) =+                  (vars_ _varsOcat _varsOlib )+              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedCat,_stsIproducedLib) =+                  (sts_ _stsOcat _stsOcatUpdates _stsOlib _stsOlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_FnBody_SqlFnBody :: Annotation ->+                        T_StatementList  ->+                        T_FnBody +sem_FnBody_SqlFnBody ann_ sts_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _stsOcatUpdates :: ([CatalogUpdate])+              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: FnBody+              _lhsOoriginalTree :: FnBody+              _stsOcat :: Catalog+              _stsOlib :: LocalIdentifierBindings+              _stsIannotatedTree :: StatementList+              _stsIoriginalTree :: StatementList+              _stsIproducedCat :: Catalog+              _stsIproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 102, column 9)+              _stsOcatUpdates =+                  {-# LINE 102 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 5267 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 103, column 9)+              _stsOlibUpdates =+                  {-# LINE 103 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 5272 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SqlFnBody ann_ _stsIannotatedTree+                  {-# LINE 5277 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SqlFnBody ann_ _stsIoriginalTree+                  {-# LINE 5282 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5287 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5292 "AstInternal.hs" #-}+              -- copy rule (down)+              _stsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 5297 "AstInternal.hs" #-}+              -- copy rule (down)+              _stsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 5302 "AstInternal.hs" #-}+              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedCat,_stsIproducedLib) =+                  (sts_ _stsOcat _stsOcatUpdates _stsOlib _stsOlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- FrameClause -------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative FrameRowsUnboundedPreceding:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative FrameUnboundedFull:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative FrameUnboundedPreceding:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data FrameClause  = FrameRowsUnboundedPreceding +                  | FrameUnboundedFull +                  | FrameUnboundedPreceding +                  deriving ( Data,Eq,Show,Typeable)+-- cata+sem_FrameClause :: FrameClause  ->+                   T_FrameClause +sem_FrameClause (FrameRowsUnboundedPreceding )  =+    (sem_FrameClause_FrameRowsUnboundedPreceding )+sem_FrameClause (FrameUnboundedFull )  =+    (sem_FrameClause_FrameUnboundedFull )+sem_FrameClause (FrameUnboundedPreceding )  =+    (sem_FrameClause_FrameUnboundedPreceding )+-- semantic domain+type T_FrameClause  = Catalog ->+                      LocalIdentifierBindings ->+                      ( FrameClause,FrameClause)+data Inh_FrameClause  = Inh_FrameClause {cat_Inh_FrameClause :: Catalog,lib_Inh_FrameClause :: LocalIdentifierBindings}+data Syn_FrameClause  = Syn_FrameClause {annotatedTree_Syn_FrameClause :: FrameClause,originalTree_Syn_FrameClause :: FrameClause}+wrap_FrameClause :: T_FrameClause  ->+                    Inh_FrameClause  ->+                    Syn_FrameClause +wrap_FrameClause sem (Inh_FrameClause _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_FrameClause _lhsOannotatedTree _lhsOoriginalTree ))+sem_FrameClause_FrameRowsUnboundedPreceding :: T_FrameClause +sem_FrameClause_FrameRowsUnboundedPreceding  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: FrameClause+              _lhsOoriginalTree :: FrameClause+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  FrameRowsUnboundedPreceding+                  {-# LINE 5365 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  FrameRowsUnboundedPreceding+                  {-# LINE 5370 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5375 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5380 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_FrameClause_FrameUnboundedFull :: T_FrameClause +sem_FrameClause_FrameUnboundedFull  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: FrameClause+              _lhsOoriginalTree :: FrameClause+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  FrameUnboundedFull+                  {-# LINE 5392 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  FrameUnboundedFull+                  {-# LINE 5397 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5402 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5407 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_FrameClause_FrameUnboundedPreceding :: T_FrameClause +sem_FrameClause_FrameUnboundedPreceding  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: FrameClause+              _lhsOoriginalTree :: FrameClause+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  FrameUnboundedPreceding+                  {-# LINE 5419 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  FrameUnboundedPreceding+                  {-# LINE 5424 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5429 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5434 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- IfExists ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative IfExists:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Require:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data IfExists  = IfExists +               | Require +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_IfExists :: IfExists  ->+                T_IfExists +sem_IfExists (IfExists )  =+    (sem_IfExists_IfExists )+sem_IfExists (Require )  =+    (sem_IfExists_Require )+-- semantic domain+type T_IfExists  = Catalog ->+                   LocalIdentifierBindings ->+                   ( IfExists,IfExists)+data Inh_IfExists  = Inh_IfExists {cat_Inh_IfExists :: Catalog,lib_Inh_IfExists :: LocalIdentifierBindings}+data Syn_IfExists  = Syn_IfExists {annotatedTree_Syn_IfExists :: IfExists,originalTree_Syn_IfExists :: IfExists}+wrap_IfExists :: T_IfExists  ->+                 Inh_IfExists  ->+                 Syn_IfExists +wrap_IfExists sem (Inh_IfExists _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_IfExists _lhsOannotatedTree _lhsOoriginalTree ))+sem_IfExists_IfExists :: T_IfExists +sem_IfExists_IfExists  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: IfExists+              _lhsOoriginalTree :: IfExists+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  IfExists+                  {-# LINE 5488 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  IfExists+                  {-# LINE 5493 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5498 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5503 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_IfExists_Require :: T_IfExists +sem_IfExists_Require  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: IfExists+              _lhsOoriginalTree :: IfExists+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Require+                  {-# LINE 5515 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Require+                  {-# LINE 5520 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5525 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5530 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- InList ------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         listType             : Either [TypeError] Type+         originalTree         : SELF +   alternatives:+      alternative InList:+         child ann            : {Annotation}+         child exprs          : ExpressionList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative InSelect:+         child ann            : {Annotation}+         child sel            : SelectExpression +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data InList  = InList (Annotation) (ExpressionList) +             | InSelect (Annotation) (SelectExpression) +             deriving ( Data,Eq,Show,Typeable)+-- cata+sem_InList :: InList  ->+              T_InList +sem_InList (InList _ann _exprs )  =+    (sem_InList_InList _ann (sem_ExpressionList _exprs ) )+sem_InList (InSelect _ann _sel )  =+    (sem_InList_InSelect _ann (sem_SelectExpression _sel ) )+-- semantic domain+type T_InList  = Catalog ->+                 LocalIdentifierBindings ->+                 ( InList,(Either [TypeError] Type),InList)+data Inh_InList  = Inh_InList {cat_Inh_InList :: Catalog,lib_Inh_InList :: LocalIdentifierBindings}+data Syn_InList  = Syn_InList {annotatedTree_Syn_InList :: InList,listType_Syn_InList :: Either [TypeError] Type,originalTree_Syn_InList :: InList}+wrap_InList :: T_InList  ->+               Inh_InList  ->+               Syn_InList +wrap_InList sem (Inh_InList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_InList _lhsOannotatedTree _lhsOlistType _lhsOoriginalTree ))+sem_InList_InList :: Annotation ->+                     T_ExpressionList  ->+                     T_InList +sem_InList_InList ann_ exprs_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOlistType :: (Either [TypeError] Type)+              _lhsOannotatedTree :: InList+              _lhsOoriginalTree :: InList+              _exprsOcat :: Catalog+              _exprsOlib :: LocalIdentifierBindings+              _exprsIannotatedTree :: ExpressionList+              _exprsIoriginalTree :: ExpressionList+              _exprsItypeList :: ([Type])+              -- "./TypeChecking/Expressions.ag"(line 305, column 9)+              _lhsOlistType =+                  {-# LINE 305 "./TypeChecking/Expressions.ag" #-}+                  resolveResultSetType _lhsIcat _exprsItypeList+                  {-# LINE 5597 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  InList ann_ _exprsIannotatedTree+                  {-# LINE 5602 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  InList ann_ _exprsIoriginalTree+                  {-# LINE 5607 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5612 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5617 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 5622 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 5627 "AstInternal.hs" #-}+              ( _exprsIannotatedTree,_exprsIoriginalTree,_exprsItypeList) =+                  (exprs_ _exprsOcat _exprsOlib )+          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))+sem_InList_InSelect :: Annotation ->+                       T_SelectExpression  ->+                       T_InList +sem_InList_InSelect ann_ sel_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOlistType :: (Either [TypeError] Type)+              _lhsOannotatedTree :: InList+              _lhsOoriginalTree :: InList+              _selOcat :: Catalog+              _selOlib :: LocalIdentifierBindings+              _selIannotatedTree :: SelectExpression+              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _selIoriginalTree :: SelectExpression+              -- "./TypeChecking/Expressions.ag"(line 307, column 9)+              _lhsOlistType =+                  {-# LINE 307 "./TypeChecking/Expressions.ag" #-}+                  do+                  attrs <- map snd <$> (unwrapSetOfComposite $+                                        getTypeAnnotation _selIannotatedTree)+                  typ <- case length attrs of+                            0 -> Left [InternalError+                                       "got subquery with no columns? in inselect"]+                            1 -> Right $ head attrs+                            _ -> Right $ AnonymousRecordType attrs+                  dependsOnRTpe attrs $ Right typ+                  {-# LINE 5657 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  InSelect ann_ _selIannotatedTree+                  {-# LINE 5662 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  InSelect ann_ _selIoriginalTree+                  {-# LINE 5667 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5672 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5677 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 5682 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 5687 "AstInternal.hs" #-}+              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =+                  (sel_ _selOcat _selOlib )+          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))+-- JoinExpression ----------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative JoinOn:+         child ann            : {Annotation}+         child expression     : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative JoinUsing:+         child ann            : {Annotation}+         child stringList     : StringList +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data JoinExpression  = JoinOn (Annotation) (Expression) +                     | JoinUsing (Annotation) (StringList) +                     deriving ( Data,Eq,Show,Typeable)+-- cata+sem_JoinExpression :: JoinExpression  ->+                      T_JoinExpression +sem_JoinExpression (JoinOn _ann _expression )  =+    (sem_JoinExpression_JoinOn _ann (sem_Expression _expression ) )+sem_JoinExpression (JoinUsing _ann _stringList )  =+    (sem_JoinExpression_JoinUsing _ann (sem_StringList _stringList ) )+-- semantic domain+type T_JoinExpression  = Catalog ->+                         LocalIdentifierBindings ->+                         ( JoinExpression,JoinExpression)+data Inh_JoinExpression  = Inh_JoinExpression {cat_Inh_JoinExpression :: Catalog,lib_Inh_JoinExpression :: LocalIdentifierBindings}+data Syn_JoinExpression  = Syn_JoinExpression {annotatedTree_Syn_JoinExpression :: JoinExpression,originalTree_Syn_JoinExpression :: JoinExpression}+wrap_JoinExpression :: T_JoinExpression  ->+                       Inh_JoinExpression  ->+                       Syn_JoinExpression +wrap_JoinExpression sem (Inh_JoinExpression _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_JoinExpression _lhsOannotatedTree _lhsOoriginalTree ))+sem_JoinExpression_JoinOn :: Annotation ->+                             T_Expression  ->+                             T_JoinExpression +sem_JoinExpression_JoinOn ann_ expression_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: JoinExpression+              _lhsOoriginalTree :: JoinExpression+              _expressionOcat :: Catalog+              _expressionOlib :: LocalIdentifierBindings+              _expressionIannotatedTree :: Expression+              _expressionIliftedColumnName :: String+              _expressionIoriginalTree :: Expression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  JoinOn ann_ _expressionIannotatedTree+                  {-# LINE 5754 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  JoinOn ann_ _expressionIoriginalTree+                  {-# LINE 5759 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5764 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5769 "AstInternal.hs" #-}+              -- copy rule (down)+              _expressionOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 5774 "AstInternal.hs" #-}+              -- copy rule (down)+              _expressionOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 5779 "AstInternal.hs" #-}+              ( _expressionIannotatedTree,_expressionIliftedColumnName,_expressionIoriginalTree) =+                  (expression_ _expressionOcat _expressionOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_JoinExpression_JoinUsing :: Annotation ->+                                T_StringList  ->+                                T_JoinExpression +sem_JoinExpression_JoinUsing ann_ stringList_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: JoinExpression+              _lhsOoriginalTree :: JoinExpression+              _stringListOcat :: Catalog+              _stringListOlib :: LocalIdentifierBindings+              _stringListIannotatedTree :: StringList+              _stringListIoriginalTree :: StringList+              _stringListIstrings :: ([String])+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  JoinUsing ann_ _stringListIannotatedTree+                  {-# LINE 5800 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  JoinUsing ann_ _stringListIoriginalTree+                  {-# LINE 5805 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5810 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5815 "AstInternal.hs" #-}+              -- copy rule (down)+              _stringListOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 5820 "AstInternal.hs" #-}+              -- copy rule (down)+              _stringListOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 5825 "AstInternal.hs" #-}+              ( _stringListIannotatedTree,_stringListIoriginalTree,_stringListIstrings) =+                  (stringList_ _stringListOcat _stringListOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- JoinType ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Cross:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative FullOuter:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Inner:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative LeftOuter:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative RightOuter:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data JoinType  = Cross +               | FullOuter +               | Inner +               | LeftOuter +               | RightOuter +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_JoinType :: JoinType  ->+                T_JoinType +sem_JoinType (Cross )  =+    (sem_JoinType_Cross )+sem_JoinType (FullOuter )  =+    (sem_JoinType_FullOuter )+sem_JoinType (Inner )  =+    (sem_JoinType_Inner )+sem_JoinType (LeftOuter )  =+    (sem_JoinType_LeftOuter )+sem_JoinType (RightOuter )  =+    (sem_JoinType_RightOuter )+-- semantic domain+type T_JoinType  = Catalog ->+                   LocalIdentifierBindings ->+                   ( JoinType,JoinType)+data Inh_JoinType  = Inh_JoinType {cat_Inh_JoinType :: Catalog,lib_Inh_JoinType :: LocalIdentifierBindings}+data Syn_JoinType  = Syn_JoinType {annotatedTree_Syn_JoinType :: JoinType,originalTree_Syn_JoinType :: JoinType}+wrap_JoinType :: T_JoinType  ->+                 Inh_JoinType  ->+                 Syn_JoinType +wrap_JoinType sem (Inh_JoinType _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_JoinType _lhsOannotatedTree _lhsOoriginalTree ))+sem_JoinType_Cross :: T_JoinType +sem_JoinType_Cross  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: JoinType+              _lhsOoriginalTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Cross+                  {-# LINE 5902 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Cross+                  {-# LINE 5907 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5912 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5917 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_JoinType_FullOuter :: T_JoinType +sem_JoinType_FullOuter  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: JoinType+              _lhsOoriginalTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  FullOuter+                  {-# LINE 5929 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  FullOuter+                  {-# LINE 5934 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5939 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5944 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_JoinType_Inner :: T_JoinType +sem_JoinType_Inner  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: JoinType+              _lhsOoriginalTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Inner+                  {-# LINE 5956 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Inner+                  {-# LINE 5961 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5966 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5971 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_JoinType_LeftOuter :: T_JoinType +sem_JoinType_LeftOuter  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: JoinType+              _lhsOoriginalTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  LeftOuter+                  {-# LINE 5983 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  LeftOuter+                  {-# LINE 5988 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 5993 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 5998 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_JoinType_RightOuter :: T_JoinType +sem_JoinType_RightOuter  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: JoinType+              _lhsOoriginalTree :: JoinType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RightOuter+                  {-# LINE 6010 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RightOuter+                  {-# LINE 6015 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6020 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6025 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- Language ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Plpgsql:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Sql:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data Language  = Plpgsql +               | Sql +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Language :: Language  ->+                T_Language +sem_Language (Plpgsql )  =+    (sem_Language_Plpgsql )+sem_Language (Sql )  =+    (sem_Language_Sql )+-- semantic domain+type T_Language  = Catalog ->+                   LocalIdentifierBindings ->+                   ( Language,Language)+data Inh_Language  = Inh_Language {cat_Inh_Language :: Catalog,lib_Inh_Language :: LocalIdentifierBindings}+data Syn_Language  = Syn_Language {annotatedTree_Syn_Language :: Language,originalTree_Syn_Language :: Language}+wrap_Language :: T_Language  ->+                 Inh_Language  ->+                 Syn_Language +wrap_Language sem (Inh_Language _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_Language _lhsOannotatedTree _lhsOoriginalTree ))+sem_Language_Plpgsql :: T_Language +sem_Language_Plpgsql  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Language+              _lhsOoriginalTree :: Language+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Plpgsql+                  {-# LINE 6079 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Plpgsql+                  {-# LINE 6084 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6089 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6094 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Language_Sql :: T_Language +sem_Language_Sql  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Language+              _lhsOoriginalTree :: Language+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Sql+                  {-# LINE 6106 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Sql+                  {-# LINE 6111 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6116 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6121 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- LiftFlavour -------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative LiftAll:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative LiftAny:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data LiftFlavour  = LiftAll +                  | LiftAny +                  deriving ( Data,Eq,Show,Typeable)+-- cata+sem_LiftFlavour :: LiftFlavour  ->+                   T_LiftFlavour +sem_LiftFlavour (LiftAll )  =+    (sem_LiftFlavour_LiftAll )+sem_LiftFlavour (LiftAny )  =+    (sem_LiftFlavour_LiftAny )+-- semantic domain+type T_LiftFlavour  = Catalog ->+                      LocalIdentifierBindings ->+                      ( LiftFlavour,LiftFlavour)+data Inh_LiftFlavour  = Inh_LiftFlavour {cat_Inh_LiftFlavour :: Catalog,lib_Inh_LiftFlavour :: LocalIdentifierBindings}+data Syn_LiftFlavour  = Syn_LiftFlavour {annotatedTree_Syn_LiftFlavour :: LiftFlavour,originalTree_Syn_LiftFlavour :: LiftFlavour}+wrap_LiftFlavour :: T_LiftFlavour  ->+                    Inh_LiftFlavour  ->+                    Syn_LiftFlavour +wrap_LiftFlavour sem (Inh_LiftFlavour _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_LiftFlavour _lhsOannotatedTree _lhsOoriginalTree ))+sem_LiftFlavour_LiftAll :: T_LiftFlavour +sem_LiftFlavour_LiftAll  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: LiftFlavour+              _lhsOoriginalTree :: LiftFlavour+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  LiftAll+                  {-# LINE 6175 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  LiftAll+                  {-# LINE 6180 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6185 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6190 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_LiftFlavour_LiftAny :: T_LiftFlavour +sem_LiftFlavour_LiftAny  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: LiftFlavour+              _lhsOoriginalTree :: LiftFlavour+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  LiftAny+                  {-# LINE 6202 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  LiftAny+                  {-# LINE 6207 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6212 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6217 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- MaybeBoolExpression -----------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Just:+         child just           : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nothing:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type MaybeBoolExpression  = (Maybe (Expression))+-- cata+sem_MaybeBoolExpression :: MaybeBoolExpression  ->+                           T_MaybeBoolExpression +sem_MaybeBoolExpression (Prelude.Just x )  =+    (sem_MaybeBoolExpression_Just (sem_Expression x ) )+sem_MaybeBoolExpression Prelude.Nothing  =+    sem_MaybeBoolExpression_Nothing+-- semantic domain+type T_MaybeBoolExpression  = Catalog ->+                              LocalIdentifierBindings ->+                              ( MaybeBoolExpression,MaybeBoolExpression)+data Inh_MaybeBoolExpression  = Inh_MaybeBoolExpression {cat_Inh_MaybeBoolExpression :: Catalog,lib_Inh_MaybeBoolExpression :: LocalIdentifierBindings}+data Syn_MaybeBoolExpression  = Syn_MaybeBoolExpression {annotatedTree_Syn_MaybeBoolExpression :: MaybeBoolExpression,originalTree_Syn_MaybeBoolExpression :: MaybeBoolExpression}+wrap_MaybeBoolExpression :: T_MaybeBoolExpression  ->+                            Inh_MaybeBoolExpression  ->+                            Syn_MaybeBoolExpression +wrap_MaybeBoolExpression sem (Inh_MaybeBoolExpression _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_MaybeBoolExpression _lhsOannotatedTree _lhsOoriginalTree ))+sem_MaybeBoolExpression_Just :: T_Expression  ->+                                T_MaybeBoolExpression +sem_MaybeBoolExpression_Just just_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: MaybeBoolExpression+              _lhsOoriginalTree :: MaybeBoolExpression+              _justOcat :: Catalog+              _justOlib :: LocalIdentifierBindings+              _justIannotatedTree :: Expression+              _justIliftedColumnName :: String+              _justIoriginalTree :: Expression+              -- "./TypeChecking/Misc.ag"(line 74, column 9)+              _lhsOannotatedTree =+                  {-# LINE 74 "./TypeChecking/Misc.ag" #-}+                  if getTypeAnnotation _justIannotatedTree `notElem` [typeBool, TypeCheckFailed]+                    then Just $ updateAnnotation ((TypeErrorA ExpressionMustBeBool) :)+                                  _justIannotatedTree+                    else Just $ _justIannotatedTree+                  {-# LINE 6279 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Just _justIannotatedTree+                  {-# LINE 6284 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Just _justIoriginalTree+                  {-# LINE 6289 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6294 "AstInternal.hs" #-}+              -- copy rule (down)+              _justOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 6299 "AstInternal.hs" #-}+              -- copy rule (down)+              _justOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 6304 "AstInternal.hs" #-}+              ( _justIannotatedTree,_justIliftedColumnName,_justIoriginalTree) =+                  (just_ _justOcat _justOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_MaybeBoolExpression_Nothing :: T_MaybeBoolExpression +sem_MaybeBoolExpression_Nothing  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: MaybeBoolExpression+              _lhsOoriginalTree :: MaybeBoolExpression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 6318 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 6323 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6328 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6333 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- MaybeExpression ---------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Just:+         child just           : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nothing:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type MaybeExpression  = (Maybe (Expression))+-- cata+sem_MaybeExpression :: MaybeExpression  ->+                       T_MaybeExpression +sem_MaybeExpression (Prelude.Just x )  =+    (sem_MaybeExpression_Just (sem_Expression x ) )+sem_MaybeExpression Prelude.Nothing  =+    sem_MaybeExpression_Nothing+-- semantic domain+type T_MaybeExpression  = Catalog ->+                          LocalIdentifierBindings ->+                          ( MaybeExpression,MaybeExpression)+data Inh_MaybeExpression  = Inh_MaybeExpression {cat_Inh_MaybeExpression :: Catalog,lib_Inh_MaybeExpression :: LocalIdentifierBindings}+data Syn_MaybeExpression  = Syn_MaybeExpression {annotatedTree_Syn_MaybeExpression :: MaybeExpression,originalTree_Syn_MaybeExpression :: MaybeExpression}+wrap_MaybeExpression :: T_MaybeExpression  ->+                        Inh_MaybeExpression  ->+                        Syn_MaybeExpression +wrap_MaybeExpression sem (Inh_MaybeExpression _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_MaybeExpression _lhsOannotatedTree _lhsOoriginalTree ))+sem_MaybeExpression_Just :: T_Expression  ->+                            T_MaybeExpression +sem_MaybeExpression_Just just_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: MaybeExpression+              _lhsOoriginalTree :: MaybeExpression+              _justOcat :: Catalog+              _justOlib :: LocalIdentifierBindings+              _justIannotatedTree :: Expression+              _justIliftedColumnName :: String+              _justIoriginalTree :: Expression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Just _justIannotatedTree+                  {-# LINE 6392 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Just _justIoriginalTree+                  {-# LINE 6397 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6402 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6407 "AstInternal.hs" #-}+              -- copy rule (down)+              _justOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 6412 "AstInternal.hs" #-}+              -- copy rule (down)+              _justOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 6417 "AstInternal.hs" #-}+              ( _justIannotatedTree,_justIliftedColumnName,_justIoriginalTree) =+                  (just_ _justOcat _justOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_MaybeExpression_Nothing :: T_MaybeExpression +sem_MaybeExpression_Nothing  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: MaybeExpression+              _lhsOoriginalTree :: MaybeExpression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 6431 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 6436 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6441 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6446 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- MaybeSelectList ---------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         listType             : Maybe [(String,Type)]+         originalTree         : SELF +   alternatives:+      alternative Just:+         child just           : SelectList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nothing:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type MaybeSelectList  = (Maybe (SelectList))+-- cata+sem_MaybeSelectList :: MaybeSelectList  ->+                       T_MaybeSelectList +sem_MaybeSelectList (Prelude.Just x )  =+    (sem_MaybeSelectList_Just (sem_SelectList x ) )+sem_MaybeSelectList Prelude.Nothing  =+    sem_MaybeSelectList_Nothing+-- semantic domain+type T_MaybeSelectList  = Catalog ->+                          LocalIdentifierBindings ->+                          ( MaybeSelectList,(Maybe [(String,Type)]),MaybeSelectList)+data Inh_MaybeSelectList  = Inh_MaybeSelectList {cat_Inh_MaybeSelectList :: Catalog,lib_Inh_MaybeSelectList :: LocalIdentifierBindings}+data Syn_MaybeSelectList  = Syn_MaybeSelectList {annotatedTree_Syn_MaybeSelectList :: MaybeSelectList,listType_Syn_MaybeSelectList :: Maybe [(String,Type)],originalTree_Syn_MaybeSelectList :: MaybeSelectList}+wrap_MaybeSelectList :: T_MaybeSelectList  ->+                        Inh_MaybeSelectList  ->+                        Syn_MaybeSelectList +wrap_MaybeSelectList sem (Inh_MaybeSelectList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_MaybeSelectList _lhsOannotatedTree _lhsOlistType _lhsOoriginalTree ))+sem_MaybeSelectList_Just :: T_SelectList  ->+                            T_MaybeSelectList +sem_MaybeSelectList_Just just_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOlistType :: (Maybe [(String,Type)])+              _lhsOannotatedTree :: MaybeSelectList+              _lhsOoriginalTree :: MaybeSelectList+              _justOcat :: Catalog+              _justOlib :: LocalIdentifierBindings+              _justIannotatedTree :: SelectList+              _justIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _justIlistType :: ([(String,Type)])+              _justIoriginalTree :: SelectList+              -- "./TypeChecking/SelectLists.ag"(line 25, column 12)+              _lhsOlistType =+                  {-# LINE 25 "./TypeChecking/SelectLists.ag" #-}+                  Just _justIlistType+                  {-# LINE 6508 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Just _justIannotatedTree+                  {-# LINE 6513 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Just _justIoriginalTree+                  {-# LINE 6518 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6523 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6528 "AstInternal.hs" #-}+              -- copy rule (down)+              _justOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 6533 "AstInternal.hs" #-}+              -- copy rule (down)+              _justOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 6538 "AstInternal.hs" #-}+              ( _justIannotatedTree,_justIlibUpdates,_justIlistType,_justIoriginalTree) =+                  (just_ _justOcat _justOlib )+          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))+sem_MaybeSelectList_Nothing :: T_MaybeSelectList +sem_MaybeSelectList_Nothing  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOlistType :: (Maybe [(String,Type)])+              _lhsOannotatedTree :: MaybeSelectList+              _lhsOoriginalTree :: MaybeSelectList+              -- "./TypeChecking/SelectLists.ag"(line 26, column 15)+              _lhsOlistType =+                  {-# LINE 26 "./TypeChecking/SelectLists.ag" #-}+                  Nothing+                  {-# LINE 6553 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 6558 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 6563 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6568 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6573 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))+-- Natural -----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Natural:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Unnatural:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data Natural  = Natural +              | Unnatural +              deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Natural :: Natural  ->+               T_Natural +sem_Natural (Natural )  =+    (sem_Natural_Natural )+sem_Natural (Unnatural )  =+    (sem_Natural_Unnatural )+-- semantic domain+type T_Natural  = Catalog ->+                  LocalIdentifierBindings ->+                  ( Natural,Natural)+data Inh_Natural  = Inh_Natural {cat_Inh_Natural :: Catalog,lib_Inh_Natural :: LocalIdentifierBindings}+data Syn_Natural  = Syn_Natural {annotatedTree_Syn_Natural :: Natural,originalTree_Syn_Natural :: Natural}+wrap_Natural :: T_Natural  ->+                Inh_Natural  ->+                Syn_Natural +wrap_Natural sem (Inh_Natural _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_Natural _lhsOannotatedTree _lhsOoriginalTree ))+sem_Natural_Natural :: T_Natural +sem_Natural_Natural  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Natural+              _lhsOoriginalTree :: Natural+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Natural+                  {-# LINE 6627 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Natural+                  {-# LINE 6632 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6637 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6642 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Natural_Unnatural :: T_Natural +sem_Natural_Unnatural  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Natural+              _lhsOoriginalTree :: Natural+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Unnatural+                  {-# LINE 6654 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Unnatural+                  {-# LINE 6659 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6664 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6669 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- OnExpr ------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Just:+         child just           : JoinExpression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nothing:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type OnExpr  = (Maybe (JoinExpression))+-- cata+sem_OnExpr :: OnExpr  ->+              T_OnExpr +sem_OnExpr (Prelude.Just x )  =+    (sem_OnExpr_Just (sem_JoinExpression x ) )+sem_OnExpr Prelude.Nothing  =+    sem_OnExpr_Nothing+-- semantic domain+type T_OnExpr  = Catalog ->+                 LocalIdentifierBindings ->+                 ( OnExpr,OnExpr)+data Inh_OnExpr  = Inh_OnExpr {cat_Inh_OnExpr :: Catalog,lib_Inh_OnExpr :: LocalIdentifierBindings}+data Syn_OnExpr  = Syn_OnExpr {annotatedTree_Syn_OnExpr :: OnExpr,originalTree_Syn_OnExpr :: OnExpr}+wrap_OnExpr :: T_OnExpr  ->+               Inh_OnExpr  ->+               Syn_OnExpr +wrap_OnExpr sem (Inh_OnExpr _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_OnExpr _lhsOannotatedTree _lhsOoriginalTree ))+sem_OnExpr_Just :: T_JoinExpression  ->+                   T_OnExpr +sem_OnExpr_Just just_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: OnExpr+              _lhsOoriginalTree :: OnExpr+              _justOcat :: Catalog+              _justOlib :: LocalIdentifierBindings+              _justIannotatedTree :: JoinExpression+              _justIoriginalTree :: JoinExpression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Just _justIannotatedTree+                  {-# LINE 6727 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Just _justIoriginalTree+                  {-# LINE 6732 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6737 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6742 "AstInternal.hs" #-}+              -- copy rule (down)+              _justOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 6747 "AstInternal.hs" #-}+              -- copy rule (down)+              _justOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 6752 "AstInternal.hs" #-}+              ( _justIannotatedTree,_justIoriginalTree) =+                  (just_ _justOcat _justOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_OnExpr_Nothing :: T_OnExpr +sem_OnExpr_Nothing  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: OnExpr+              _lhsOoriginalTree :: OnExpr+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 6766 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Nothing+                  {-# LINE 6771 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6776 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6781 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- ParamDef ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         namedType            : Type+         originalTree         : SELF +         paramName            : String+   alternatives:+      alternative ParamDef:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative ParamDefTp:+         child ann            : {Annotation}+         child typ            : TypeName +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data ParamDef  = ParamDef (Annotation) (String) (TypeName) +               | ParamDefTp (Annotation) (TypeName) +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_ParamDef :: ParamDef  ->+                T_ParamDef +sem_ParamDef (ParamDef _ann _name _typ )  =+    (sem_ParamDef_ParamDef _ann _name (sem_TypeName _typ ) )+sem_ParamDef (ParamDefTp _ann _typ )  =+    (sem_ParamDef_ParamDefTp _ann (sem_TypeName _typ ) )+-- semantic domain+type T_ParamDef  = Catalog ->+                   LocalIdentifierBindings ->+                   ( ParamDef,Type,ParamDef,String)+data Inh_ParamDef  = Inh_ParamDef {cat_Inh_ParamDef :: Catalog,lib_Inh_ParamDef :: LocalIdentifierBindings}+data Syn_ParamDef  = Syn_ParamDef {annotatedTree_Syn_ParamDef :: ParamDef,namedType_Syn_ParamDef :: Type,originalTree_Syn_ParamDef :: ParamDef,paramName_Syn_ParamDef :: String}+wrap_ParamDef :: T_ParamDef  ->+                 Inh_ParamDef  ->+                 Syn_ParamDef +wrap_ParamDef sem (Inh_ParamDef _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree,_lhsOparamName) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ParamDef _lhsOannotatedTree _lhsOnamedType _lhsOoriginalTree _lhsOparamName ))+sem_ParamDef_ParamDef :: Annotation ->+                         String ->+                         T_TypeName  ->+                         T_ParamDef +sem_ParamDef_ParamDef ann_ name_ typ_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOnamedType :: Type+              _lhsOparamName :: String+              _lhsOannotatedTree :: ParamDef+              _lhsOoriginalTree :: ParamDef+              _typOcat :: Catalog+              _typOlib :: LocalIdentifierBindings+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _typIoriginalTree :: TypeName+              -- "./TypeChecking/CreateFunction.ag"(line 56, column 9)+              _lhsOnamedType =+                  {-# LINE 56 "./TypeChecking/CreateFunction.ag" #-}+                  _typInamedType+                  {-# LINE 6852 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 58, column 9)+              _lhsOparamName =+                  {-# LINE 58 "./TypeChecking/CreateFunction.ag" #-}+                  name_+                  {-# LINE 6857 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ParamDef ann_ name_ _typIannotatedTree+                  {-# LINE 6862 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ParamDef ann_ name_ _typIoriginalTree+                  {-# LINE 6867 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6872 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6877 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 6882 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 6887 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =+                  (typ_ _typOcat _typOlib )+          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree,_lhsOparamName)))+sem_ParamDef_ParamDefTp :: Annotation ->+                           T_TypeName  ->+                           T_ParamDef +sem_ParamDef_ParamDefTp ann_ typ_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOnamedType :: Type+              _lhsOparamName :: String+              _lhsOannotatedTree :: ParamDef+              _lhsOoriginalTree :: ParamDef+              _typOcat :: Catalog+              _typOlib :: LocalIdentifierBindings+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _typIoriginalTree :: TypeName+              -- "./TypeChecking/CreateFunction.ag"(line 56, column 9)+              _lhsOnamedType =+                  {-# LINE 56 "./TypeChecking/CreateFunction.ag" #-}+                  _typInamedType+                  {-# LINE 6910 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 60, column 9)+              _lhsOparamName =+                  {-# LINE 60 "./TypeChecking/CreateFunction.ag" #-}+                  ""+                  {-# LINE 6915 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ParamDefTp ann_ _typIannotatedTree+                  {-# LINE 6920 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ParamDefTp ann_ _typIoriginalTree+                  {-# LINE 6925 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 6930 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 6935 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 6940 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 6945 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =+                  (typ_ _typOcat _typOlib )+          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree,_lhsOparamName)))+-- ParamDefList ------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +         params               : [(String, Type)]+   alternatives:+      alternative Cons:+         child hd             : ParamDef +         child tl             : ParamDefList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type ParamDefList  = [(ParamDef)]+-- cata+sem_ParamDefList :: ParamDefList  ->+                    T_ParamDefList +sem_ParamDefList list  =+    (Prelude.foldr sem_ParamDefList_Cons sem_ParamDefList_Nil (Prelude.map sem_ParamDef list) )+-- semantic domain+type T_ParamDefList  = Catalog ->+                       LocalIdentifierBindings ->+                       ( ParamDefList,ParamDefList,([(String, Type)]))+data Inh_ParamDefList  = Inh_ParamDefList {cat_Inh_ParamDefList :: Catalog,lib_Inh_ParamDefList :: LocalIdentifierBindings}+data Syn_ParamDefList  = Syn_ParamDefList {annotatedTree_Syn_ParamDefList :: ParamDefList,originalTree_Syn_ParamDefList :: ParamDefList,params_Syn_ParamDefList :: [(String, Type)]}+wrap_ParamDefList :: T_ParamDefList  ->+                     Inh_ParamDefList  ->+                     Syn_ParamDefList +wrap_ParamDefList sem (Inh_ParamDefList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOparams) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_ParamDefList _lhsOannotatedTree _lhsOoriginalTree _lhsOparams ))+sem_ParamDefList_Cons :: T_ParamDef  ->+                         T_ParamDefList  ->+                         T_ParamDefList +sem_ParamDefList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOparams :: ([(String, Type)])+              _lhsOannotatedTree :: ParamDefList+              _lhsOoriginalTree :: ParamDefList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: ParamDef+              _hdInamedType :: Type+              _hdIoriginalTree :: ParamDef+              _hdIparamName :: String+              _tlIannotatedTree :: ParamDefList+              _tlIoriginalTree :: ParamDefList+              _tlIparams :: ([(String, Type)])+              -- "./TypeChecking/CreateFunction.ag"(line 64, column 13)+              _lhsOparams =+                  {-# LINE 64 "./TypeChecking/CreateFunction.ag" #-}+                  ((_hdIparamName, _hdInamedType) : _tlIparams)+                  {-# LINE 7014 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 7019 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 7024 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7029 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7034 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 7039 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 7044 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 7049 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 7054 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdInamedType,_hdIoriginalTree,_hdIparamName) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree,_tlIparams) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOparams)))+sem_ParamDefList_Nil :: T_ParamDefList +sem_ParamDefList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOparams :: ([(String, Type)])+              _lhsOannotatedTree :: ParamDefList+              _lhsOoriginalTree :: ParamDefList+              -- "./TypeChecking/CreateFunction.ag"(line 63, column 12)+              _lhsOparams =+                  {-# LINE 63 "./TypeChecking/CreateFunction.ag" #-}+                  []+                  {-# LINE 7071 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 7076 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 7081 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7086 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7091 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOparams)))+-- RaiseType ---------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative RError:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative RException:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative RNotice:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data RaiseType  = RError +                | RException +                | RNotice +                deriving ( Data,Eq,Show,Typeable)+-- cata+sem_RaiseType :: RaiseType  ->+                 T_RaiseType +sem_RaiseType (RError )  =+    (sem_RaiseType_RError )+sem_RaiseType (RException )  =+    (sem_RaiseType_RException )+sem_RaiseType (RNotice )  =+    (sem_RaiseType_RNotice )+-- semantic domain+type T_RaiseType  = Catalog ->+                    LocalIdentifierBindings ->+                    ( RaiseType,RaiseType)+data Inh_RaiseType  = Inh_RaiseType {cat_Inh_RaiseType :: Catalog,lib_Inh_RaiseType :: LocalIdentifierBindings}+data Syn_RaiseType  = Syn_RaiseType {annotatedTree_Syn_RaiseType :: RaiseType,originalTree_Syn_RaiseType :: RaiseType}+wrap_RaiseType :: T_RaiseType  ->+                  Inh_RaiseType  ->+                  Syn_RaiseType +wrap_RaiseType sem (Inh_RaiseType _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_RaiseType _lhsOannotatedTree _lhsOoriginalTree ))+sem_RaiseType_RError :: T_RaiseType +sem_RaiseType_RError  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RaiseType+              _lhsOoriginalTree :: RaiseType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RError+                  {-# LINE 7152 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RError+                  {-# LINE 7157 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7162 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7167 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_RaiseType_RException :: T_RaiseType +sem_RaiseType_RException  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RaiseType+              _lhsOoriginalTree :: RaiseType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RException+                  {-# LINE 7179 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RException+                  {-# LINE 7184 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7189 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7194 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_RaiseType_RNotice :: T_RaiseType +sem_RaiseType_RNotice  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RaiseType+              _lhsOoriginalTree :: RaiseType+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RNotice+                  {-# LINE 7206 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RNotice+                  {-# LINE 7211 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7216 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7221 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- RestartIdentity ---------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative ContinueIdentity:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative RestartIdentity:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data RestartIdentity  = ContinueIdentity +                      | RestartIdentity +                      deriving ( Data,Eq,Show,Typeable)+-- cata+sem_RestartIdentity :: RestartIdentity  ->+                       T_RestartIdentity +sem_RestartIdentity (ContinueIdentity )  =+    (sem_RestartIdentity_ContinueIdentity )+sem_RestartIdentity (RestartIdentity )  =+    (sem_RestartIdentity_RestartIdentity )+-- semantic domain+type T_RestartIdentity  = Catalog ->+                          LocalIdentifierBindings ->+                          ( RestartIdentity,RestartIdentity)+data Inh_RestartIdentity  = Inh_RestartIdentity {cat_Inh_RestartIdentity :: Catalog,lib_Inh_RestartIdentity :: LocalIdentifierBindings}+data Syn_RestartIdentity  = Syn_RestartIdentity {annotatedTree_Syn_RestartIdentity :: RestartIdentity,originalTree_Syn_RestartIdentity :: RestartIdentity}+wrap_RestartIdentity :: T_RestartIdentity  ->+                        Inh_RestartIdentity  ->+                        Syn_RestartIdentity +wrap_RestartIdentity sem (Inh_RestartIdentity _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_RestartIdentity _lhsOannotatedTree _lhsOoriginalTree ))+sem_RestartIdentity_ContinueIdentity :: T_RestartIdentity +sem_RestartIdentity_ContinueIdentity  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RestartIdentity+              _lhsOoriginalTree :: RestartIdentity+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ContinueIdentity+                  {-# LINE 7275 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ContinueIdentity+                  {-# LINE 7280 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7285 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7290 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_RestartIdentity_RestartIdentity :: T_RestartIdentity +sem_RestartIdentity_RestartIdentity  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RestartIdentity+              _lhsOoriginalTree :: RestartIdentity+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RestartIdentity+                  {-# LINE 7302 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RestartIdentity+                  {-# LINE 7307 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7312 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7317 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- Root --------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +         producedCat          : Catalog+         producedLib          : LocalIdentifierBindings+   alternatives:+      alternative Root:+         child statements     : StatementList +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data Root  = Root (StatementList) +           deriving ( Show)+-- cata+sem_Root :: Root  ->+            T_Root +sem_Root (Root _statements )  =+    (sem_Root_Root (sem_StatementList _statements ) )+-- semantic domain+type T_Root  = Catalog ->+               LocalIdentifierBindings ->+               ( Root,Root,Catalog,LocalIdentifierBindings)+data Inh_Root  = Inh_Root {cat_Inh_Root :: Catalog,lib_Inh_Root :: LocalIdentifierBindings}+data Syn_Root  = Syn_Root {annotatedTree_Syn_Root :: Root,originalTree_Syn_Root :: Root,producedCat_Syn_Root :: Catalog,producedLib_Syn_Root :: LocalIdentifierBindings}+wrap_Root :: T_Root  ->+             Inh_Root  ->+             Syn_Root +wrap_Root sem (Inh_Root _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedCat,_lhsOproducedLib) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_Root _lhsOannotatedTree _lhsOoriginalTree _lhsOproducedCat _lhsOproducedLib ))+sem_Root_Root :: T_StatementList  ->+                 T_Root +sem_Root_Root statements_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _statementsOcatUpdates :: ([CatalogUpdate])+              _statementsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Root+              _lhsOoriginalTree :: Root+              _lhsOproducedCat :: Catalog+              _lhsOproducedLib :: LocalIdentifierBindings+              _statementsOcat :: Catalog+              _statementsOlib :: LocalIdentifierBindings+              _statementsIannotatedTree :: StatementList+              _statementsIoriginalTree :: StatementList+              _statementsIproducedCat :: Catalog+              _statementsIproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 80, column 12)+              _statementsOcatUpdates =+                  {-# LINE 80 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 7378 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 81, column 12)+              _statementsOlibUpdates =+                  {-# LINE 81 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 7383 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Root _statementsIannotatedTree+                  {-# LINE 7388 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Root _statementsIoriginalTree+                  {-# LINE 7393 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7398 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7403 "AstInternal.hs" #-}+              -- copy rule (up)+              _lhsOproducedCat =+                  {-# LINE 27 "./TypeChecking/Statements.ag" #-}+                  _statementsIproducedCat+                  {-# LINE 7408 "AstInternal.hs" #-}+              -- copy rule (up)+              _lhsOproducedLib =+                  {-# LINE 28 "./TypeChecking/Statements.ag" #-}+                  _statementsIproducedLib+                  {-# LINE 7413 "AstInternal.hs" #-}+              -- copy rule (down)+              _statementsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 7418 "AstInternal.hs" #-}+              -- copy rule (down)+              _statementsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 7423 "AstInternal.hs" #-}+              ( _statementsIannotatedTree,_statementsIoriginalTree,_statementsIproducedCat,_statementsIproducedLib) =+                  (statements_ _statementsOcat _statementsOcatUpdates _statementsOlib _statementsOlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedCat,_lhsOproducedLib)))+-- RowConstraint -----------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative NotNullConstraint:+         child ann            : {Annotation}+         child name           : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative NullConstraint:+         child ann            : {Annotation}+         child name           : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative RowCheckConstraint:+         child ann            : {Annotation}+         child name           : {String}+         child expression     : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative RowPrimaryKeyConstraint:+         child ann            : {Annotation}+         child name           : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative RowReferenceConstraint:+         child ann            : {Annotation}+         child name           : {String}+         child table          : {String}+         child att            : {Maybe String}+         child onUpdate       : Cascade +         child onDelete       : Cascade +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative RowUniqueConstraint:+         child ann            : {Annotation}+         child name           : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data RowConstraint  = NotNullConstraint (Annotation) (String) +                    | NullConstraint (Annotation) (String) +                    | RowCheckConstraint (Annotation) (String) (Expression) +                    | RowPrimaryKeyConstraint (Annotation) (String) +                    | RowReferenceConstraint (Annotation) (String) (String) (Maybe String) (Cascade) (Cascade) +                    | RowUniqueConstraint (Annotation) (String) +                    deriving ( Data,Eq,Show,Typeable)+-- cata+sem_RowConstraint :: RowConstraint  ->+                     T_RowConstraint +sem_RowConstraint (NotNullConstraint _ann _name )  =+    (sem_RowConstraint_NotNullConstraint _ann _name )+sem_RowConstraint (NullConstraint _ann _name )  =+    (sem_RowConstraint_NullConstraint _ann _name )+sem_RowConstraint (RowCheckConstraint _ann _name _expression )  =+    (sem_RowConstraint_RowCheckConstraint _ann _name (sem_Expression _expression ) )+sem_RowConstraint (RowPrimaryKeyConstraint _ann _name )  =+    (sem_RowConstraint_RowPrimaryKeyConstraint _ann _name )+sem_RowConstraint (RowReferenceConstraint _ann _name _table _att _onUpdate _onDelete )  =+    (sem_RowConstraint_RowReferenceConstraint _ann _name _table _att (sem_Cascade _onUpdate ) (sem_Cascade _onDelete ) )+sem_RowConstraint (RowUniqueConstraint _ann _name )  =+    (sem_RowConstraint_RowUniqueConstraint _ann _name )+-- semantic domain+type T_RowConstraint  = Catalog ->+                        LocalIdentifierBindings ->+                        ( RowConstraint,RowConstraint)+data Inh_RowConstraint  = Inh_RowConstraint {cat_Inh_RowConstraint :: Catalog,lib_Inh_RowConstraint :: LocalIdentifierBindings}+data Syn_RowConstraint  = Syn_RowConstraint {annotatedTree_Syn_RowConstraint :: RowConstraint,originalTree_Syn_RowConstraint :: RowConstraint}+wrap_RowConstraint :: T_RowConstraint  ->+                      Inh_RowConstraint  ->+                      Syn_RowConstraint +wrap_RowConstraint sem (Inh_RowConstraint _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_RowConstraint _lhsOannotatedTree _lhsOoriginalTree ))+sem_RowConstraint_NotNullConstraint :: Annotation ->+                                       String ->+                                       T_RowConstraint +sem_RowConstraint_NotNullConstraint ann_ name_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RowConstraint+              _lhsOoriginalTree :: RowConstraint+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  NotNullConstraint ann_ name_+                  {-# LINE 7526 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  NotNullConstraint ann_ name_+                  {-# LINE 7531 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7536 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7541 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_RowConstraint_NullConstraint :: Annotation ->+                                    String ->+                                    T_RowConstraint +sem_RowConstraint_NullConstraint ann_ name_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RowConstraint+              _lhsOoriginalTree :: RowConstraint+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  NullConstraint ann_ name_+                  {-# LINE 7555 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  NullConstraint ann_ name_+                  {-# LINE 7560 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7565 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7570 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_RowConstraint_RowCheckConstraint :: Annotation ->+                                        String ->+                                        T_Expression  ->+                                        T_RowConstraint +sem_RowConstraint_RowCheckConstraint ann_ name_ expression_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RowConstraint+              _lhsOoriginalTree :: RowConstraint+              _expressionOcat :: Catalog+              _expressionOlib :: LocalIdentifierBindings+              _expressionIannotatedTree :: Expression+              _expressionIliftedColumnName :: String+              _expressionIoriginalTree :: Expression+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RowCheckConstraint ann_ name_ _expressionIannotatedTree+                  {-# LINE 7590 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RowCheckConstraint ann_ name_ _expressionIoriginalTree+                  {-# LINE 7595 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7600 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7605 "AstInternal.hs" #-}+              -- copy rule (down)+              _expressionOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 7610 "AstInternal.hs" #-}+              -- copy rule (down)+              _expressionOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 7615 "AstInternal.hs" #-}+              ( _expressionIannotatedTree,_expressionIliftedColumnName,_expressionIoriginalTree) =+                  (expression_ _expressionOcat _expressionOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_RowConstraint_RowPrimaryKeyConstraint :: Annotation ->+                                             String ->+                                             T_RowConstraint +sem_RowConstraint_RowPrimaryKeyConstraint ann_ name_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RowConstraint+              _lhsOoriginalTree :: RowConstraint+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RowPrimaryKeyConstraint ann_ name_+                  {-# LINE 7631 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RowPrimaryKeyConstraint ann_ name_+                  {-# LINE 7636 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7641 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7646 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_RowConstraint_RowReferenceConstraint :: Annotation ->+                                            String ->+                                            String ->+                                            (Maybe String) ->+                                            T_Cascade  ->+                                            T_Cascade  ->+                                            T_RowConstraint +sem_RowConstraint_RowReferenceConstraint ann_ name_ table_ att_ onUpdate_ onDelete_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RowConstraint+              _lhsOoriginalTree :: RowConstraint+              _onUpdateOcat :: Catalog+              _onUpdateOlib :: LocalIdentifierBindings+              _onDeleteOcat :: Catalog+              _onDeleteOlib :: LocalIdentifierBindings+              _onUpdateIannotatedTree :: Cascade+              _onUpdateIoriginalTree :: Cascade+              _onDeleteIannotatedTree :: Cascade+              _onDeleteIoriginalTree :: Cascade+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RowReferenceConstraint ann_ name_ table_ att_ _onUpdateIannotatedTree _onDeleteIannotatedTree+                  {-# LINE 7672 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RowReferenceConstraint ann_ name_ table_ att_ _onUpdateIoriginalTree _onDeleteIoriginalTree+                  {-# LINE 7677 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7682 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7687 "AstInternal.hs" #-}+              -- copy rule (down)+              _onUpdateOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 7692 "AstInternal.hs" #-}+              -- copy rule (down)+              _onUpdateOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 7697 "AstInternal.hs" #-}+              -- copy rule (down)+              _onDeleteOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 7702 "AstInternal.hs" #-}+              -- copy rule (down)+              _onDeleteOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 7707 "AstInternal.hs" #-}+              ( _onUpdateIannotatedTree,_onUpdateIoriginalTree) =+                  (onUpdate_ _onUpdateOcat _onUpdateOlib )+              ( _onDeleteIannotatedTree,_onDeleteIoriginalTree) =+                  (onDelete_ _onDeleteOcat _onDeleteOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_RowConstraint_RowUniqueConstraint :: Annotation ->+                                         String ->+                                         T_RowConstraint +sem_RowConstraint_RowUniqueConstraint ann_ name_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RowConstraint+              _lhsOoriginalTree :: RowConstraint+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RowUniqueConstraint ann_ name_+                  {-# LINE 7725 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RowUniqueConstraint ann_ name_+                  {-# LINE 7730 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7735 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7740 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- RowConstraintList -------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : RowConstraint +         child tl             : RowConstraintList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type RowConstraintList  = [(RowConstraint)]+-- cata+sem_RowConstraintList :: RowConstraintList  ->+                         T_RowConstraintList +sem_RowConstraintList list  =+    (Prelude.foldr sem_RowConstraintList_Cons sem_RowConstraintList_Nil (Prelude.map sem_RowConstraint list) )+-- semantic domain+type T_RowConstraintList  = Catalog ->+                            LocalIdentifierBindings ->+                            ( RowConstraintList,RowConstraintList)+data Inh_RowConstraintList  = Inh_RowConstraintList {cat_Inh_RowConstraintList :: Catalog,lib_Inh_RowConstraintList :: LocalIdentifierBindings}+data Syn_RowConstraintList  = Syn_RowConstraintList {annotatedTree_Syn_RowConstraintList :: RowConstraintList,originalTree_Syn_RowConstraintList :: RowConstraintList}+wrap_RowConstraintList :: T_RowConstraintList  ->+                          Inh_RowConstraintList  ->+                          Syn_RowConstraintList +wrap_RowConstraintList sem (Inh_RowConstraintList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_RowConstraintList _lhsOannotatedTree _lhsOoriginalTree ))+sem_RowConstraintList_Cons :: T_RowConstraint  ->+                              T_RowConstraintList  ->+                              T_RowConstraintList +sem_RowConstraintList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RowConstraintList+              _lhsOoriginalTree :: RowConstraintList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: RowConstraint+              _hdIoriginalTree :: RowConstraint+              _tlIannotatedTree :: RowConstraintList+              _tlIoriginalTree :: RowConstraintList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 7802 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 7807 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7812 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7817 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 7822 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 7827 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 7832 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 7837 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_RowConstraintList_Nil :: T_RowConstraintList +sem_RowConstraintList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: RowConstraintList+              _lhsOoriginalTree :: RowConstraintList+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 7853 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 7858 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 7863 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 7868 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- SelectExpression --------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         libUpdates           : [LocalIdentifierBindingsUpdate]+         originalTree         : SELF +   alternatives:+      alternative CombineSelect:+         child ann            : {Annotation}+         child ctype          : CombineType +         child sel1           : SelectExpression +         child sel2           : SelectExpression +         visit 0:+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative Select:+         child ann            : {Annotation}+         child selDistinct    : Distinct +         child selSelectList  : SelectList +         child selTref        : TableRefList +         child selWhere       : MaybeBoolExpression +         child selGroupBy     : ExpressionList +         child selHaving      : MaybeBoolExpression +         child selOrderBy     : ExpressionDirectionPairList +         child selLimit       : MaybeExpression +         child selOffset      : MaybeExpression +         visit 0:+            local newLib      : _+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative Values:+         child ann            : {Annotation}+         child vll            : ExpressionListList +         visit 0:+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+-}+data SelectExpression  = CombineSelect (Annotation) (CombineType) (SelectExpression) (SelectExpression) +                       | Select (Annotation) (Distinct) (SelectList) (TableRefList) (MaybeBoolExpression) (ExpressionList) (MaybeBoolExpression) (ExpressionDirectionPairList) (MaybeExpression) (MaybeExpression) +                       | Values (Annotation) (ExpressionListList) +                       deriving ( Data,Eq,Show,Typeable)+-- cata+sem_SelectExpression :: SelectExpression  ->+                        T_SelectExpression +sem_SelectExpression (CombineSelect _ann _ctype _sel1 _sel2 )  =+    (sem_SelectExpression_CombineSelect _ann (sem_CombineType _ctype ) (sem_SelectExpression _sel1 ) (sem_SelectExpression _sel2 ) )+sem_SelectExpression (Select _ann _selDistinct _selSelectList _selTref _selWhere _selGroupBy _selHaving _selOrderBy _selLimit _selOffset )  =+    (sem_SelectExpression_Select _ann (sem_Distinct _selDistinct ) (sem_SelectList _selSelectList ) (sem_TableRefList _selTref ) (sem_MaybeBoolExpression _selWhere ) (sem_ExpressionList _selGroupBy ) (sem_MaybeBoolExpression _selHaving ) (sem_ExpressionDirectionPairList _selOrderBy ) (sem_MaybeExpression _selLimit ) (sem_MaybeExpression _selOffset ) )+sem_SelectExpression (Values _ann _vll )  =+    (sem_SelectExpression_Values _ann (sem_ExpressionListList _vll ) )+-- semantic domain+type T_SelectExpression  = Catalog ->+                           LocalIdentifierBindings ->+                           ( SelectExpression,([LocalIdentifierBindingsUpdate]),SelectExpression)+data Inh_SelectExpression  = Inh_SelectExpression {cat_Inh_SelectExpression :: Catalog,lib_Inh_SelectExpression :: LocalIdentifierBindings}+data Syn_SelectExpression  = Syn_SelectExpression {annotatedTree_Syn_SelectExpression :: SelectExpression,libUpdates_Syn_SelectExpression :: [LocalIdentifierBindingsUpdate],originalTree_Syn_SelectExpression :: SelectExpression}+wrap_SelectExpression :: T_SelectExpression  ->+                         Inh_SelectExpression  ->+                         Syn_SelectExpression +wrap_SelectExpression sem (Inh_SelectExpression _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_SelectExpression _lhsOannotatedTree _lhsOlibUpdates _lhsOoriginalTree ))+sem_SelectExpression_CombineSelect :: Annotation ->+                                      T_CombineType  ->+                                      T_SelectExpression  ->+                                      T_SelectExpression  ->+                                      T_SelectExpression +sem_SelectExpression_CombineSelect ann_ ctype_ sel1_ sel2_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: SelectExpression+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOoriginalTree :: SelectExpression+              _ctypeOcat :: Catalog+              _ctypeOlib :: LocalIdentifierBindings+              _sel1Ocat :: Catalog+              _sel1Olib :: LocalIdentifierBindings+              _sel2Ocat :: Catalog+              _sel2Olib :: LocalIdentifierBindings+              _ctypeIannotatedTree :: CombineType+              _ctypeIoriginalTree :: CombineType+              _sel1IannotatedTree :: SelectExpression+              _sel1IlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _sel1IoriginalTree :: SelectExpression+              _sel2IannotatedTree :: SelectExpression+              _sel2IlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _sel2IoriginalTree :: SelectExpression+              -- "./TypeChecking/SelectStatement.ag"(line 23, column 9)+              _lhsOannotatedTree =+                  {-# LINE 23 "./TypeChecking/SelectStatement.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 7975 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 129, column 9)+              _tpe =+                  {-# LINE 129 "./TypeChecking/SelectStatement.ag" #-}+                  let sel1t = getTypeAnnotation _sel1IannotatedTree+                      sel2t = getTypeAnnotation _sel2IannotatedTree+                  in dependsOnRTpe [sel1t, sel2t] $+                        typeCheckCombineSelect _lhsIcat sel1t sel2t+                  {-# LINE 7983 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 134, column 9)+              _backTree =+                  {-# LINE 134 "./TypeChecking/SelectStatement.ag" #-}+                  CombineSelect ann_ _ctypeIannotatedTree+                                _sel1IannotatedTree+                                _sel2IannotatedTree+                  {-# LINE 7990 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 87, column 11)+              _lhsOlibUpdates =+                  {-# LINE 87 "./TypeChecking/SelectLists.ag" #-}+                  []+                  {-# LINE 7995 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CombineSelect ann_ _ctypeIannotatedTree _sel1IannotatedTree _sel2IannotatedTree+                  {-# LINE 8000 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CombineSelect ann_ _ctypeIoriginalTree _sel1IoriginalTree _sel2IoriginalTree+                  {-# LINE 8005 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8010 "AstInternal.hs" #-}+              -- copy rule (down)+              _ctypeOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8015 "AstInternal.hs" #-}+              -- copy rule (down)+              _ctypeOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8020 "AstInternal.hs" #-}+              -- copy rule (down)+              _sel1Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8025 "AstInternal.hs" #-}+              -- copy rule (down)+              _sel1Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8030 "AstInternal.hs" #-}+              -- copy rule (down)+              _sel2Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8035 "AstInternal.hs" #-}+              -- copy rule (down)+              _sel2Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8040 "AstInternal.hs" #-}+              ( _ctypeIannotatedTree,_ctypeIoriginalTree) =+                  (ctype_ _ctypeOcat _ctypeOlib )+              ( _sel1IannotatedTree,_sel1IlibUpdates,_sel1IoriginalTree) =+                  (sel1_ _sel1Ocat _sel1Olib )+              ( _sel2IannotatedTree,_sel2IlibUpdates,_sel2IoriginalTree) =+                  (sel2_ _sel2Ocat _sel2Olib )+          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_SelectExpression_Select :: Annotation ->+                               T_Distinct  ->+                               T_SelectList  ->+                               T_TableRefList  ->+                               T_MaybeBoolExpression  ->+                               T_ExpressionList  ->+                               T_MaybeBoolExpression  ->+                               T_ExpressionDirectionPairList  ->+                               T_MaybeExpression  ->+                               T_MaybeExpression  ->+                               T_SelectExpression +sem_SelectExpression_Select ann_ selDistinct_ selSelectList_ selTref_ selWhere_ selGroupBy_ selHaving_ selOrderBy_ selLimit_ selOffset_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: SelectExpression+              _selSelectListOlib :: LocalIdentifierBindings+              _selWhereOlib :: LocalIdentifierBindings+              _selGroupByOlib :: LocalIdentifierBindings+              _selOrderByOlib :: LocalIdentifierBindings+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOoriginalTree :: SelectExpression+              _selDistinctOcat :: Catalog+              _selDistinctOlib :: LocalIdentifierBindings+              _selSelectListOcat :: Catalog+              _selTrefOcat :: Catalog+              _selTrefOlib :: LocalIdentifierBindings+              _selWhereOcat :: Catalog+              _selGroupByOcat :: Catalog+              _selHavingOcat :: Catalog+              _selHavingOlib :: LocalIdentifierBindings+              _selOrderByOcat :: Catalog+              _selLimitOcat :: Catalog+              _selLimitOlib :: LocalIdentifierBindings+              _selOffsetOcat :: Catalog+              _selOffsetOlib :: LocalIdentifierBindings+              _selDistinctIannotatedTree :: Distinct+              _selDistinctIoriginalTree :: Distinct+              _selSelectListIannotatedTree :: SelectList+              _selSelectListIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _selSelectListIlistType :: ([(String,Type)])+              _selSelectListIoriginalTree :: SelectList+              _selTrefIannotatedTree :: TableRefList+              _selTrefIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _selTrefIoriginalTree :: TableRefList+              _selWhereIannotatedTree :: MaybeBoolExpression+              _selWhereIoriginalTree :: MaybeBoolExpression+              _selGroupByIannotatedTree :: ExpressionList+              _selGroupByIoriginalTree :: ExpressionList+              _selGroupByItypeList :: ([Type])+              _selHavingIannotatedTree :: MaybeBoolExpression+              _selHavingIoriginalTree :: MaybeBoolExpression+              _selOrderByIannotatedTree :: ExpressionDirectionPairList+              _selOrderByIoriginalTree :: ExpressionDirectionPairList+              _selLimitIannotatedTree :: MaybeExpression+              _selLimitIoriginalTree :: MaybeExpression+              _selOffsetIannotatedTree :: MaybeExpression+              _selOffsetIoriginalTree :: MaybeExpression+              -- "./TypeChecking/SelectStatement.ag"(line 23, column 9)+              _lhsOannotatedTree =+                  {-# LINE 23 "./TypeChecking/SelectStatement.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 8112 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 94, column 10)+              _newLib =+                  {-# LINE 94 "./TypeChecking/SelectStatement.ag" #-}+                  case updateBindings _lhsIlib _lhsIcat _selTrefIlibUpdates of+                    Left x -> error $ show x+                    Right e -> e+                  {-# LINE 8119 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 97, column 10)+              _selSelectListOlib =+                  {-# LINE 97 "./TypeChecking/SelectStatement.ag" #-}+                  _newLib+                  {-# LINE 8124 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 98, column 10)+              _selWhereOlib =+                  {-# LINE 98 "./TypeChecking/SelectStatement.ag" #-}+                  _newLib+                  {-# LINE 8129 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 99, column 10)+              _selGroupByOlib =+                  {-# LINE 99 "./TypeChecking/SelectStatement.ag" #-}+                  _newLib+                  {-# LINE 8134 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 100, column 10)+              _selOrderByOlib =+                  {-# LINE 100 "./TypeChecking/SelectStatement.ag" #-}+                  _newLib+                  {-# LINE 8139 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 111, column 9)+              _tpe =+                  {-# LINE 111 "./TypeChecking/SelectStatement.ag" #-}+                  do+                  Right $ case _selSelectListIlistType of+                            [(_,Pseudo Void)] -> Pseudo Void+                            _ -> SetOfType $ CompositeType _selSelectListIlistType+                  {-# LINE 8147 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 118, column 9)+              _backTree =+                  {-# LINE 118 "./TypeChecking/SelectStatement.ag" #-}+                  Select ann_+                         _selDistinctIannotatedTree+                         _selSelectListIannotatedTree+                         _selTrefIannotatedTree+                         _selWhereIannotatedTree+                         _selGroupByIannotatedTree+                         _selHavingIannotatedTree+                         _selOrderByIannotatedTree+                         _selLimitIannotatedTree+                         _selOffsetIannotatedTree+                  {-# LINE 8161 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 85, column 9)+              _lhsOlibUpdates =+                  {-# LINE 85 "./TypeChecking/SelectLists.ag" #-}+                  _selSelectListIlibUpdates+                  {-# LINE 8166 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Select ann_ _selDistinctIannotatedTree _selSelectListIannotatedTree _selTrefIannotatedTree _selWhereIannotatedTree _selGroupByIannotatedTree _selHavingIannotatedTree _selOrderByIannotatedTree _selLimitIannotatedTree _selOffsetIannotatedTree+                  {-# LINE 8171 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Select ann_ _selDistinctIoriginalTree _selSelectListIoriginalTree _selTrefIoriginalTree _selWhereIoriginalTree _selGroupByIoriginalTree _selHavingIoriginalTree _selOrderByIoriginalTree _selLimitIoriginalTree _selOffsetIoriginalTree+                  {-# LINE 8176 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8181 "AstInternal.hs" #-}+              -- copy rule (down)+              _selDistinctOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8186 "AstInternal.hs" #-}+              -- copy rule (down)+              _selDistinctOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8191 "AstInternal.hs" #-}+              -- copy rule (down)+              _selSelectListOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8196 "AstInternal.hs" #-}+              -- copy rule (down)+              _selTrefOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8201 "AstInternal.hs" #-}+              -- copy rule (down)+              _selTrefOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8206 "AstInternal.hs" #-}+              -- copy rule (down)+              _selWhereOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8211 "AstInternal.hs" #-}+              -- copy rule (down)+              _selGroupByOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8216 "AstInternal.hs" #-}+              -- copy rule (down)+              _selHavingOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8221 "AstInternal.hs" #-}+              -- copy rule (down)+              _selHavingOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8226 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOrderByOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8231 "AstInternal.hs" #-}+              -- copy rule (down)+              _selLimitOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8236 "AstInternal.hs" #-}+              -- copy rule (down)+              _selLimitOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8241 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOffsetOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8246 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOffsetOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8251 "AstInternal.hs" #-}+              ( _selDistinctIannotatedTree,_selDistinctIoriginalTree) =+                  (selDistinct_ _selDistinctOcat _selDistinctOlib )+              ( _selSelectListIannotatedTree,_selSelectListIlibUpdates,_selSelectListIlistType,_selSelectListIoriginalTree) =+                  (selSelectList_ _selSelectListOcat _selSelectListOlib )+              ( _selTrefIannotatedTree,_selTrefIlibUpdates,_selTrefIoriginalTree) =+                  (selTref_ _selTrefOcat _selTrefOlib )+              ( _selWhereIannotatedTree,_selWhereIoriginalTree) =+                  (selWhere_ _selWhereOcat _selWhereOlib )+              ( _selGroupByIannotatedTree,_selGroupByIoriginalTree,_selGroupByItypeList) =+                  (selGroupBy_ _selGroupByOcat _selGroupByOlib )+              ( _selHavingIannotatedTree,_selHavingIoriginalTree) =+                  (selHaving_ _selHavingOcat _selHavingOlib )+              ( _selOrderByIannotatedTree,_selOrderByIoriginalTree) =+                  (selOrderBy_ _selOrderByOcat _selOrderByOlib )+              ( _selLimitIannotatedTree,_selLimitIoriginalTree) =+                  (selLimit_ _selLimitOcat _selLimitOlib )+              ( _selOffsetIannotatedTree,_selOffsetIoriginalTree) =+                  (selOffset_ _selOffsetOcat _selOffsetOlib )+          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_SelectExpression_Values :: Annotation ->+                               T_ExpressionListList  ->+                               T_SelectExpression +sem_SelectExpression_Values ann_ vll_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: SelectExpression+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOoriginalTree :: SelectExpression+              _vllOcat :: Catalog+              _vllOlib :: LocalIdentifierBindings+              _vllIannotatedTree :: ExpressionListList+              _vllIoriginalTree :: ExpressionListList+              _vllItypeListList :: ([[Type]])+              -- "./TypeChecking/SelectStatement.ag"(line 23, column 9)+              _lhsOannotatedTree =+                  {-# LINE 23 "./TypeChecking/SelectStatement.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    Nothing+                  {-# LINE 8292 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 106, column 9)+              _tpe =+                  {-# LINE 106 "./TypeChecking/SelectStatement.ag" #-}+                  typeCheckValuesExpr+                              _lhsIcat+                              _vllItypeListList+                  {-# LINE 8299 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 109, column 9)+              _backTree =+                  {-# LINE 109 "./TypeChecking/SelectStatement.ag" #-}+                  Values ann_ _vllIannotatedTree+                  {-# LINE 8304 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 87, column 11)+              _lhsOlibUpdates =+                  {-# LINE 87 "./TypeChecking/SelectLists.ag" #-}+                  []+                  {-# LINE 8309 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Values ann_ _vllIannotatedTree+                  {-# LINE 8314 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Values ann_ _vllIoriginalTree+                  {-# LINE 8319 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8324 "AstInternal.hs" #-}+              -- copy rule (down)+              _vllOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8329 "AstInternal.hs" #-}+              -- copy rule (down)+              _vllOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8334 "AstInternal.hs" #-}+              ( _vllIannotatedTree,_vllIoriginalTree,_vllItypeListList) =+                  (vll_ _vllOcat _vllOlib )+          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))+-- SelectItem --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         columnName           : String+         itemType             : Type+         originalTree         : SELF +   alternatives:+      alternative SelExp:+         child ann            : {Annotation}+         child ex             : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative SelectItem:+         child ann            : {Annotation}+         child ex             : Expression +         child name           : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data SelectItem  = SelExp (Annotation) (Expression) +                 | SelectItem (Annotation) (Expression) (String) +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_SelectItem :: SelectItem  ->+                  T_SelectItem +sem_SelectItem (SelExp _ann _ex )  =+    (sem_SelectItem_SelExp _ann (sem_Expression _ex ) )+sem_SelectItem (SelectItem _ann _ex _name )  =+    (sem_SelectItem_SelectItem _ann (sem_Expression _ex ) _name )+-- semantic domain+type T_SelectItem  = Catalog ->+                     LocalIdentifierBindings ->+                     ( SelectItem,String,Type,SelectItem)+data Inh_SelectItem  = Inh_SelectItem {cat_Inh_SelectItem :: Catalog,lib_Inh_SelectItem :: LocalIdentifierBindings}+data Syn_SelectItem  = Syn_SelectItem {annotatedTree_Syn_SelectItem :: SelectItem,columnName_Syn_SelectItem :: String,itemType_Syn_SelectItem :: Type,originalTree_Syn_SelectItem :: SelectItem}+wrap_SelectItem :: T_SelectItem  ->+                   Inh_SelectItem  ->+                   Syn_SelectItem +wrap_SelectItem sem (Inh_SelectItem _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_SelectItem _lhsOannotatedTree _lhsOcolumnName _lhsOitemType _lhsOoriginalTree ))+sem_SelectItem_SelExp :: Annotation ->+                         T_Expression  ->+                         T_SelectItem +sem_SelectItem_SelExp ann_ ex_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOitemType :: Type+              _lhsOcolumnName :: String+              _lhsOannotatedTree :: SelectItem+              _lhsOoriginalTree :: SelectItem+              _exOcat :: Catalog+              _exOlib :: LocalIdentifierBindings+              _exIannotatedTree :: Expression+              _exIliftedColumnName :: String+              _exIoriginalTree :: Expression+              -- "./TypeChecking/SelectLists.ag"(line 13, column 9)+              _annotatedTree =+                  {-# LINE 13 "./TypeChecking/SelectLists.ag" #-}+                  SelExp ann_ $ fixStar _exIannotatedTree+                  {-# LINE 8406 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 35, column 9)+              _lhsOitemType =+                  {-# LINE 35 "./TypeChecking/SelectLists.ag" #-}+                  getTypeAnnotation _exIannotatedTree+                  {-# LINE 8411 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 181, column 14)+              _lhsOcolumnName =+                  {-# LINE 181 "./TypeChecking/SelectLists.ag" #-}+                  case _exIliftedColumnName of+                    "" -> "?column?"+                    s -> s+                  {-# LINE 8418 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SelExp ann_ _exIoriginalTree+                  {-# LINE 8423 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8428 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8433 "AstInternal.hs" #-}+              -- copy rule (down)+              _exOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8438 "AstInternal.hs" #-}+              -- copy rule (down)+              _exOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8443 "AstInternal.hs" #-}+              ( _exIannotatedTree,_exIliftedColumnName,_exIoriginalTree) =+                  (ex_ _exOcat _exOlib )+          in  ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType,_lhsOoriginalTree)))+sem_SelectItem_SelectItem :: Annotation ->+                             T_Expression  ->+                             String ->+                             T_SelectItem +sem_SelectItem_SelectItem ann_ ex_ name_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOitemType :: Type+              _lhsOcolumnName :: String+              _lhsOannotatedTree :: SelectItem+              _lhsOoriginalTree :: SelectItem+              _exOcat :: Catalog+              _exOlib :: LocalIdentifierBindings+              _exIannotatedTree :: Expression+              _exIliftedColumnName :: String+              _exIoriginalTree :: Expression+              -- "./TypeChecking/SelectLists.ag"(line 15, column 9)+              _annotatedTree =+                  {-# LINE 15 "./TypeChecking/SelectLists.ag" #-}+                  SelectItem ann_ (fixStar _exIannotatedTree) name_+                  {-# LINE 8467 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 35, column 9)+              _lhsOitemType =+                  {-# LINE 35 "./TypeChecking/SelectLists.ag" #-}+                  getTypeAnnotation _exIannotatedTree+                  {-# LINE 8472 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 184, column 18)+              _lhsOcolumnName =+                  {-# LINE 184 "./TypeChecking/SelectLists.ag" #-}+                  name_+                  {-# LINE 8477 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SelectItem ann_ _exIoriginalTree name_+                  {-# LINE 8482 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8487 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8492 "AstInternal.hs" #-}+              -- copy rule (down)+              _exOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8497 "AstInternal.hs" #-}+              -- copy rule (down)+              _exOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8502 "AstInternal.hs" #-}+              ( _exIannotatedTree,_exIliftedColumnName,_exIoriginalTree) =+                  (ex_ _exOcat _exOlib )+          in  ( _lhsOannotatedTree,_lhsOcolumnName,_lhsOitemType,_lhsOoriginalTree)))+-- SelectItemList ----------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         listType             : [(String,Type)]+         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : SelectItem +         child tl             : SelectItemList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type SelectItemList  = [(SelectItem)]+-- cata+sem_SelectItemList :: SelectItemList  ->+                      T_SelectItemList +sem_SelectItemList list  =+    (Prelude.foldr sem_SelectItemList_Cons sem_SelectItemList_Nil (Prelude.map sem_SelectItem list) )+-- semantic domain+type T_SelectItemList  = Catalog ->+                         LocalIdentifierBindings ->+                         ( SelectItemList,([(String,Type)]),SelectItemList)+data Inh_SelectItemList  = Inh_SelectItemList {cat_Inh_SelectItemList :: Catalog,lib_Inh_SelectItemList :: LocalIdentifierBindings}+data Syn_SelectItemList  = Syn_SelectItemList {annotatedTree_Syn_SelectItemList :: SelectItemList,listType_Syn_SelectItemList :: [(String,Type)],originalTree_Syn_SelectItemList :: SelectItemList}+wrap_SelectItemList :: T_SelectItemList  ->+                       Inh_SelectItemList  ->+                       Syn_SelectItemList +wrap_SelectItemList sem (Inh_SelectItemList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_SelectItemList _lhsOannotatedTree _lhsOlistType _lhsOoriginalTree ))+sem_SelectItemList_Cons :: T_SelectItem  ->+                           T_SelectItemList  ->+                           T_SelectItemList +sem_SelectItemList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOlistType :: ([(String,Type)])+              _lhsOannotatedTree :: SelectItemList+              _lhsOoriginalTree :: SelectItemList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: SelectItem+              _hdIcolumnName :: String+              _hdIitemType :: Type+              _hdIoriginalTree :: SelectItem+              _tlIannotatedTree :: SelectItemList+              _tlIlistType :: ([(String,Type)])+              _tlIoriginalTree :: SelectItemList+              -- "./TypeChecking/SelectLists.ag"(line 29, column 12)+              _lhsOlistType =+                  {-# LINE 29 "./TypeChecking/SelectLists.ag" #-}+                  expandStar _lhsIlib _hdIcolumnName _hdIitemType _tlIlistType+                  {-# LINE 8571 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 8576 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 8581 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8586 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8591 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8596 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8601 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8606 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8611 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIcolumnName,_hdIitemType,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIlistType,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))+sem_SelectItemList_Nil :: T_SelectItemList +sem_SelectItemList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOlistType :: ([(String,Type)])+              _lhsOannotatedTree :: SelectItemList+              _lhsOoriginalTree :: SelectItemList+              -- "./TypeChecking/SelectLists.ag"(line 30, column 11)+              _lhsOlistType =+                  {-# LINE 30 "./TypeChecking/SelectLists.ag" #-}+                  []+                  {-# LINE 8628 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 8633 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 8638 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8643 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8648 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOlistType,_lhsOoriginalTree)))+-- SelectList --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         libUpdates           : [LocalIdentifierBindingsUpdate]+         listType             : [(String,Type)]+         originalTree         : SELF +   alternatives:+      alternative SelectList:+         child ann            : {Annotation}+         child items          : SelectItemList +         child into           : StringList +         visit 0:+            local errs        : _+            local stuff       : _+            local annotatedTree : _+            local originalTree : _+-}+data SelectList  = SelectList (Annotation) (SelectItemList) (StringList) +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_SelectList :: SelectList  ->+                  T_SelectList +sem_SelectList (SelectList _ann _items _into )  =+    (sem_SelectList_SelectList _ann (sem_SelectItemList _items ) (sem_StringList _into ) )+-- semantic domain+type T_SelectList  = Catalog ->+                     LocalIdentifierBindings ->+                     ( SelectList,([LocalIdentifierBindingsUpdate]),([(String,Type)]),SelectList)+data Inh_SelectList  = Inh_SelectList {cat_Inh_SelectList :: Catalog,lib_Inh_SelectList :: LocalIdentifierBindings}+data Syn_SelectList  = Syn_SelectList {annotatedTree_Syn_SelectList :: SelectList,libUpdates_Syn_SelectList :: [LocalIdentifierBindingsUpdate],listType_Syn_SelectList :: [(String,Type)],originalTree_Syn_SelectList :: SelectList}+wrap_SelectList :: T_SelectList  ->+                   Inh_SelectList  ->+                   Syn_SelectList +wrap_SelectList sem (Inh_SelectList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOlistType,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_SelectList _lhsOannotatedTree _lhsOlibUpdates _lhsOlistType _lhsOoriginalTree ))+sem_SelectList_SelectList :: Annotation ->+                             T_SelectItemList  ->+                             T_StringList  ->+                             T_SelectList +sem_SelectList_SelectList ann_ items_ into_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOlistType :: ([(String,Type)])+              _lhsOannotatedTree :: SelectList+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOoriginalTree :: SelectList+              _itemsOcat :: Catalog+              _itemsOlib :: LocalIdentifierBindings+              _intoOcat :: Catalog+              _intoOlib :: LocalIdentifierBindings+              _itemsIannotatedTree :: SelectItemList+              _itemsIlistType :: ([(String,Type)])+              _itemsIoriginalTree :: SelectItemList+              _intoIannotatedTree :: StringList+              _intoIoriginalTree :: StringList+              _intoIstrings :: ([String])+              -- "./TypeChecking/SelectLists.ag"(line 41, column 9)+              _lhsOlistType =+                  {-# LINE 41 "./TypeChecking/SelectLists.ag" #-}+                  _itemsIlistType+                  {-# LINE 8717 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 43, column 9)+              _errs =+                  {-# LINE 43 "./TypeChecking/SelectLists.ag" #-}+                  case _stuff     of+                    (er,_) -> er+                  {-# LINE 8723 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 45, column 9)+              _stuff =+                  {-# LINE 45 "./TypeChecking/SelectLists.ag" #-}+                  case () of+                    _ | null sl -> ([],Nothing)+                      | not (null targetTypeErrs) -> (targetTypeErrs,Nothing)+                      | (case targetTypes of+                           [PgRecord _] -> True+                           _ -> False) -> ([],Just (head sl, CompositeType _itemsIlistType))+                      | matchingComposite /= Left [] -> (fromLeft [] matchingComposite,Nothing)+                      | length sl /= length _itemsIlistType -> ([WrongNumberOfColumns],Nothing)+                      | not (null assignErrs) -> (assignErrs,Nothing)+                      | otherwise -> ([],Nothing)+                  where+                    targetTypeEithers = map (libLookupID _lhsIlib) sl+                    targetTypeErrs = concat $ lefts $ targetTypeEithers+                    targetTypes = rights $ targetTypeEithers+                    typePairs = zip (map snd _itemsIlistType) targetTypes+                    assignErrs = concat $ lefts $ map (uncurry $ checkAssignmentValid _lhsIcat) typePairs+                    sl = _intoIstrings+                    matchingComposite =+                        case targetTypes of+                          [t] | isCompositeType t -> checkAssignmentValid _lhsIcat (AnonymousRecordType (map snd _itemsIlistType)) t+                          _ -> Left []+                  {-# LINE 8748 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 68, column 9)+              _lhsOannotatedTree =+                  {-# LINE 68 "./TypeChecking/SelectLists.ag" #-}+                  SelectList (ann_ ++ map TypeErrorA _errs    )+                             _itemsIannotatedTree+                             _intoIannotatedTree+                  {-# LINE 8755 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 71, column 9)+              _lhsOlibUpdates =+                  {-# LINE 71 "./TypeChecking/SelectLists.ag" #-}+                  case _stuff     of+                    (_,Just r) -> [LibStackIDs [("", [r])]]+                    _ -> []+                  {-# LINE 8762 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SelectList ann_ _itemsIannotatedTree _intoIannotatedTree+                  {-# LINE 8767 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SelectList ann_ _itemsIoriginalTree _intoIoriginalTree+                  {-# LINE 8772 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8777 "AstInternal.hs" #-}+              -- copy rule (down)+              _itemsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8782 "AstInternal.hs" #-}+              -- copy rule (down)+              _itemsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8787 "AstInternal.hs" #-}+              -- copy rule (down)+              _intoOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8792 "AstInternal.hs" #-}+              -- copy rule (down)+              _intoOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8797 "AstInternal.hs" #-}+              ( _itemsIannotatedTree,_itemsIlistType,_itemsIoriginalTree) =+                  (items_ _itemsOcat _itemsOlib )+              ( _intoIannotatedTree,_intoIoriginalTree,_intoIstrings) =+                  (into_ _intoOcat _intoOlib )+          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOlistType,_lhsOoriginalTree)))+-- SetClause ---------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +         pairs                : [(String,Type)]+         rowSetError          : Maybe TypeError+   alternatives:+      alternative RowSetClause:+         child ann            : {Annotation}+         child atts           : StringList +         child vals           : ExpressionList +         visit 0:+            local rowSetError : _+            local annotatedTree : _+            local originalTree : _+      alternative SetClause:+         child ann            : {Annotation}+         child att            : {String}+         child val            : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data SetClause  = RowSetClause (Annotation) (StringList) (ExpressionList) +                | SetClause (Annotation) (String) (Expression) +                deriving ( Data,Eq,Show,Typeable)+-- cata+sem_SetClause :: SetClause  ->+                 T_SetClause +sem_SetClause (RowSetClause _ann _atts _vals )  =+    (sem_SetClause_RowSetClause _ann (sem_StringList _atts ) (sem_ExpressionList _vals ) )+sem_SetClause (SetClause _ann _att _val )  =+    (sem_SetClause_SetClause _ann _att (sem_Expression _val ) )+-- semantic domain+type T_SetClause  = Catalog ->+                    LocalIdentifierBindings ->+                    ( SetClause,SetClause,([(String,Type)]),(Maybe TypeError))+data Inh_SetClause  = Inh_SetClause {cat_Inh_SetClause :: Catalog,lib_Inh_SetClause :: LocalIdentifierBindings}+data Syn_SetClause  = Syn_SetClause {annotatedTree_Syn_SetClause :: SetClause,originalTree_Syn_SetClause :: SetClause,pairs_Syn_SetClause :: [(String,Type)],rowSetError_Syn_SetClause :: Maybe TypeError}+wrap_SetClause :: T_SetClause  ->+                  Inh_SetClause  ->+                  Syn_SetClause +wrap_SetClause sem (Inh_SetClause _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetError) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_SetClause _lhsOannotatedTree _lhsOoriginalTree _lhsOpairs _lhsOrowSetError ))+sem_SetClause_RowSetClause :: Annotation ->+                              T_StringList  ->+                              T_ExpressionList  ->+                              T_SetClause +sem_SetClause_RowSetClause ann_ atts_ vals_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOpairs :: ([(String,Type)])+              _lhsOannotatedTree :: SetClause+              _lhsOoriginalTree :: SetClause+              _lhsOrowSetError :: (Maybe TypeError)+              _attsOcat :: Catalog+              _attsOlib :: LocalIdentifierBindings+              _valsOcat :: Catalog+              _valsOlib :: LocalIdentifierBindings+              _attsIannotatedTree :: StringList+              _attsIoriginalTree :: StringList+              _attsIstrings :: ([String])+              _valsIannotatedTree :: ExpressionList+              _valsIoriginalTree :: ExpressionList+              _valsItypeList :: ([Type])+              -- "./TypeChecking/Dml.ag"(line 155, column 9)+              _rowSetError =+                  {-# LINE 155 "./TypeChecking/Dml.ag" #-}+                  let atts = _attsIstrings+                      types = getRowTypes _valsItypeList+                  in if length atts /= length types+                       then Just WrongNumberOfColumns+                       else Nothing+                  {-# LINE 8883 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 161, column 9)+              _lhsOpairs =+                  {-# LINE 161 "./TypeChecking/Dml.ag" #-}+                  zip _attsIstrings $ getRowTypes _valsItypeList+                  {-# LINE 8888 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  RowSetClause ann_ _attsIannotatedTree _valsIannotatedTree+                  {-# LINE 8893 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  RowSetClause ann_ _attsIoriginalTree _valsIoriginalTree+                  {-# LINE 8898 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8903 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8908 "AstInternal.hs" #-}+              -- copy rule (from local)+              _lhsOrowSetError =+                  {-# LINE 148 "./TypeChecking/Dml.ag" #-}+                  _rowSetError+                  {-# LINE 8913 "AstInternal.hs" #-}+              -- copy rule (down)+              _attsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8918 "AstInternal.hs" #-}+              -- copy rule (down)+              _attsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8923 "AstInternal.hs" #-}+              -- copy rule (down)+              _valsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8928 "AstInternal.hs" #-}+              -- copy rule (down)+              _valsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8933 "AstInternal.hs" #-}+              ( _attsIannotatedTree,_attsIoriginalTree,_attsIstrings) =+                  (atts_ _attsOcat _attsOlib )+              ( _valsIannotatedTree,_valsIoriginalTree,_valsItypeList) =+                  (vals_ _valsOcat _valsOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetError)))+sem_SetClause_SetClause :: Annotation ->+                           String ->+                           T_Expression  ->+                           T_SetClause +sem_SetClause_SetClause ann_ att_ val_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOpairs :: ([(String,Type)])+              _lhsOrowSetError :: (Maybe TypeError)+              _lhsOannotatedTree :: SetClause+              _lhsOoriginalTree :: SetClause+              _valOcat :: Catalog+              _valOlib :: LocalIdentifierBindings+              _valIannotatedTree :: Expression+              _valIliftedColumnName :: String+              _valIoriginalTree :: Expression+              -- "./TypeChecking/Dml.ag"(line 152, column 9)+              _lhsOpairs =+                  {-# LINE 152 "./TypeChecking/Dml.ag" #-}+                  [(att_, getTypeAnnotation _valIannotatedTree)]+                  {-# LINE 8959 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 153, column 9)+              _lhsOrowSetError =+                  {-# LINE 153 "./TypeChecking/Dml.ag" #-}+                  Nothing+                  {-# LINE 8964 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SetClause ann_ att_ _valIannotatedTree+                  {-# LINE 8969 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SetClause ann_ att_ _valIoriginalTree+                  {-# LINE 8974 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 8979 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 8984 "AstInternal.hs" #-}+              -- copy rule (down)+              _valOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 8989 "AstInternal.hs" #-}+              -- copy rule (down)+              _valOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 8994 "AstInternal.hs" #-}+              ( _valIannotatedTree,_valIliftedColumnName,_valIoriginalTree) =+                  (val_ _valOcat _valOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetError)))+-- SetClauseList -----------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +         pairs                : [(String,Type)]+         rowSetErrors         : [TypeError]+   alternatives:+      alternative Cons:+         child hd             : SetClause +         child tl             : SetClauseList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type SetClauseList  = [(SetClause)]+-- cata+sem_SetClauseList :: SetClauseList  ->+                     T_SetClauseList +sem_SetClauseList list  =+    (Prelude.foldr sem_SetClauseList_Cons sem_SetClauseList_Nil (Prelude.map sem_SetClause list) )+-- semantic domain+type T_SetClauseList  = Catalog ->+                        LocalIdentifierBindings ->+                        ( SetClauseList,SetClauseList,([(String,Type)]),([TypeError]))+data Inh_SetClauseList  = Inh_SetClauseList {cat_Inh_SetClauseList :: Catalog,lib_Inh_SetClauseList :: LocalIdentifierBindings}+data Syn_SetClauseList  = Syn_SetClauseList {annotatedTree_Syn_SetClauseList :: SetClauseList,originalTree_Syn_SetClauseList :: SetClauseList,pairs_Syn_SetClauseList :: [(String,Type)],rowSetErrors_Syn_SetClauseList :: [TypeError]}+wrap_SetClauseList :: T_SetClauseList  ->+                      Inh_SetClauseList  ->+                      Syn_SetClauseList +wrap_SetClauseList sem (Inh_SetClauseList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetErrors) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_SetClauseList _lhsOannotatedTree _lhsOoriginalTree _lhsOpairs _lhsOrowSetErrors ))+sem_SetClauseList_Cons :: T_SetClause  ->+                          T_SetClauseList  ->+                          T_SetClauseList +sem_SetClauseList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOpairs :: ([(String,Type)])+              _lhsOrowSetErrors :: ([TypeError])+              _lhsOannotatedTree :: SetClauseList+              _lhsOoriginalTree :: SetClauseList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: SetClause+              _hdIoriginalTree :: SetClause+              _hdIpairs :: ([(String,Type)])+              _hdIrowSetError :: (Maybe TypeError)+              _tlIannotatedTree :: SetClauseList+              _tlIoriginalTree :: SetClauseList+              _tlIpairs :: ([(String,Type)])+              _tlIrowSetErrors :: ([TypeError])+              -- "./TypeChecking/Dml.ag"(line 142, column 10)+              _lhsOpairs =+                  {-# LINE 142 "./TypeChecking/Dml.ag" #-}+                  _hdIpairs ++ _tlIpairs+                  {-# LINE 9066 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 143, column 10)+              _lhsOrowSetErrors =+                  {-# LINE 143 "./TypeChecking/Dml.ag" #-}+                  maybeToList _hdIrowSetError ++ _tlIrowSetErrors+                  {-# LINE 9071 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 9076 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 9081 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 9086 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 9091 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 9096 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 9101 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 9106 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 9111 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIoriginalTree,_hdIpairs,_hdIrowSetError) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree,_tlIpairs,_tlIrowSetErrors) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetErrors)))+sem_SetClauseList_Nil :: T_SetClauseList +sem_SetClauseList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOpairs :: ([(String,Type)])+              _lhsOrowSetErrors :: ([TypeError])+              _lhsOannotatedTree :: SetClauseList+              _lhsOoriginalTree :: SetClauseList+              -- "./TypeChecking/Dml.ag"(line 144, column 9)+              _lhsOpairs =+                  {-# LINE 144 "./TypeChecking/Dml.ag" #-}+                  []+                  {-# LINE 9129 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 145, column 9)+              _lhsOrowSetErrors =+                  {-# LINE 145 "./TypeChecking/Dml.ag" #-}+                  []+                  {-# LINE 9134 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 9139 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 9144 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 9149 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 9154 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOpairs,_lhsOrowSetErrors)))+-- SetValue ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative SetId:+         child ann            : {Annotation}+         child string         : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative SetNum:+         child ann            : {Annotation}+         child double         : {Double}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative SetStr:+         child ann            : {Annotation}+         child string         : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data SetValue  = SetId (Annotation) (String) +               | SetNum (Annotation) (Double) +               | SetStr (Annotation) (String) +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_SetValue :: SetValue  ->+                T_SetValue +sem_SetValue (SetId _ann _string )  =+    (sem_SetValue_SetId _ann _string )+sem_SetValue (SetNum _ann _double )  =+    (sem_SetValue_SetNum _ann _double )+sem_SetValue (SetStr _ann _string )  =+    (sem_SetValue_SetStr _ann _string )+-- semantic domain+type T_SetValue  = Catalog ->+                   LocalIdentifierBindings ->+                   ( SetValue,SetValue)+data Inh_SetValue  = Inh_SetValue {cat_Inh_SetValue :: Catalog,lib_Inh_SetValue :: LocalIdentifierBindings}+data Syn_SetValue  = Syn_SetValue {annotatedTree_Syn_SetValue :: SetValue,originalTree_Syn_SetValue :: SetValue}+wrap_SetValue :: T_SetValue  ->+                 Inh_SetValue  ->+                 Syn_SetValue +wrap_SetValue sem (Inh_SetValue _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_SetValue _lhsOannotatedTree _lhsOoriginalTree ))+sem_SetValue_SetId :: Annotation ->+                      String ->+                      T_SetValue +sem_SetValue_SetId ann_ string_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: SetValue+              _lhsOoriginalTree :: SetValue+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SetId ann_ string_+                  {-# LINE 9223 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SetId ann_ string_+                  {-# LINE 9228 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 9233 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 9238 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_SetValue_SetNum :: Annotation ->+                       Double ->+                       T_SetValue +sem_SetValue_SetNum ann_ double_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: SetValue+              _lhsOoriginalTree :: SetValue+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SetNum ann_ double_+                  {-# LINE 9252 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SetNum ann_ double_+                  {-# LINE 9257 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 9262 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 9267 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_SetValue_SetStr :: Annotation ->+                       String ->+                       T_SetValue +sem_SetValue_SetStr ann_ string_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: SetValue+              _lhsOoriginalTree :: SetValue+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SetStr ann_ string_+                  {-# LINE 9281 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SetStr ann_ string_+                  {-# LINE 9286 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 9291 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 9296 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- Statement ---------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         inProducedCat        : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         catUpdates           : [CatalogUpdate]+         libUpdates           : [LocalIdentifierBindingsUpdate]+         originalTree         : SELF +   alternatives:+      alternative AlterSequence:+         child ann            : {Annotation}+         child name           : {String}+         child ownedBy        : {String}+         visit 0:+            local libUpdates  : _+            local annotatedTree : _+            local originalTree : _+      alternative AlterTable:+         child ann            : {Annotation}+         child name           : {String}+         child actions        : {[AlterTableAction]}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Assignment:+         child ann            : {Annotation}+         child target         : {String}+         child value          : Expression +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local backTree    : _+            local catUpdates  : {[CatalogUpdate]}+            local statementType : _+            local annotatedTree : _+            local originalTree : _+      alternative CaseStatement:+         child ann            : {Annotation}+         child val            : Expression +         child cases          : ExpressionListStatementListPairList +         child els            : StatementList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative ContinueStatement:+         child ann            : {Annotation}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Copy:+         child ann            : {Annotation}+         child table          : {String}+         child targetCols     : StringList +         child source         : CopySource +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative CopyData:+         child ann            : {Annotation}+         child insData        : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative CreateDomain:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         child checkName      : {String}+         child check          : MaybeBoolExpression +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local backTree    : _+            local statementType : _+            local catUpdates  : {[CatalogUpdate]}+            local annotatedTree : _+            local originalTree : _+      alternative CreateFunction:+         child ann            : {Annotation}+         child name           : {String}+         child params         : ParamDefList +         child rettype        : TypeName +         child lang           : Language +         child bodyQuote      : {String}+         child body           : FnBody +         child vol            : Volatility +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local catUpdates  : {[CatalogUpdate]}+            local parameterTypes : _+            local backTree    : _+            local statementType : _+            local annotatedTree : _+            local originalTree : _+      alternative CreateLanguage:+         child ann            : {Annotation}+         child name           : {String}+         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local backTree    : _+            local statementType : _+            local catUpdates  : {[CatalogUpdate]}+            local annotatedTree : _+            local originalTree : _+      alternative CreateSequence:+         child ann            : {Annotation}+         child name           : {String}+         child incr           : {Integer}+         child min            : {Integer}+         child max            : {Integer}+         child start          : {Integer}+         child cache          : {Integer}+         visit 0:+            local libUpdates  : _+            local annotatedTree : _+            local originalTree : _+      alternative CreateTable:+         child ann            : {Annotation}+         child name           : {String}+         child atts           : AttributeDefList +         child cons           : ConstraintList +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local catUpdates  : {[CatalogUpdate]}+            local attrTypes   : {[Type]}+            local statementType : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative CreateTableAs:+         child ann            : {Annotation}+         child name           : {String}+         child expr           : SelectExpression +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local catUpdates  : {[CatalogUpdate]}+            local selType     : _+            local attrs       : _+            local backTree    : _+            local statementType : _+            local annotatedTree : _+            local originalTree : _+      alternative CreateTrigger:+         child ann            : {Annotation}+         child name           : {String}+         child wh             : TriggerWhen +         child events         : {[TriggerEvent]}+         child tbl            : {String}+         child firing         : TriggerFire +         child fnName         : {String}+         child fnArgs         : {[Expression]}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative CreateType:+         child ann            : {Annotation}+         child name           : {String}+         child atts           : TypeAttributeDefList +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local backTree    : _+            local statementType : _+            local catUpdates  : {[CatalogUpdate]}+            local annotatedTree : _+            local originalTree : _+      alternative CreateView:+         child ann            : {Annotation}+         child name           : {String}+         child expr           : SelectExpression +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local backTree    : _+            local attrs       : _+            local catUpdates  : {[CatalogUpdate]}+            local statementType : _+            local annotatedTree : _+            local originalTree : _+      alternative Delete:+         child ann            : {Annotation}+         child table          : {String}+         child whr            : MaybeBoolExpression +         child returning      : MaybeSelectList +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local statementType : _+            local backTree    : _+            local catUpdates  : {[CatalogUpdate]}+            local lib         : _+            local annotatedTree : _+            local originalTree : _+      alternative DropFunction:+         child ann            : {Annotation}+         child ifE            : IfExists +         child sigs           : StringTypeNameListPairList +         child cascade        : Cascade +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local backTree    : _+            local catUpdates  : {[CatalogUpdate]}+            local statementType : _+            local annotatedTree : _+            local originalTree : _+      alternative DropSomething:+         child ann            : {Annotation}+         child dropType       : DropType +         child ifE            : IfExists +         child names          : StringList +         child cascade        : Cascade +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Execute:+         child ann            : {Annotation}+         child expr           : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative ExecuteInto:+         child ann            : {Annotation}+         child expr           : Expression +         child targets        : StringList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative ForIntegerStatement:+         child ann            : {Annotation}+         child var            : {String}+         child from           : Expression +         child to             : Expression +         child sts            : StatementList +         visit 0:+            local libUpdates  : _+            local varTypeE    : _+            local tpe         : {Either [TypeError] Type}+            local backTree    : _+            local catUpdates  : {[CatalogUpdate]}+            local statementType : _+            local annotatedTree : _+            local originalTree : _+      alternative ForSelectStatement:+         child ann            : {Annotation}+         child var            : {String}+         child sel            : SelectExpression +         child sts            : StatementList +         visit 0:+            local libUpdates  : _+            local selType     : _+            local tpe         : {Either [TypeError] Type}+            local backTree    : _+            local catUpdates  : {[CatalogUpdate]}+            local statementType : _+            local annotatedTree : _+            local originalTree : _+      alternative If:+         child ann            : {Annotation}+         child cases          : ExpressionStatementListPairList +         child els            : StatementList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Insert:+         child ann            : {Annotation}+         child table          : {String}+         child targetCols     : StringList +         child insData        : SelectExpression +         child returning      : MaybeSelectList +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local statementType : _+            local columnTypes : _+            local insDataAddedInferredTypes : _+            local backTree    : _+            local catUpdates  : {[CatalogUpdate]}+            local annotatedTree : _+            local originalTree : _+      alternative Notify:+         child ann            : {Annotation}+         child name           : {String}+         visit 0:+            local libUpdates  : _+            local annotatedTree : _+            local originalTree : _+      alternative NullStatement:+         child ann            : {Annotation}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Perform:+         child ann            : {Annotation}+         child expr           : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Raise:+         child ann            : {Annotation}+         child level          : RaiseType +         child message        : {String}+         child args           : ExpressionList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Return:+         child ann            : {Annotation}+         child value          : MaybeExpression +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local backTree    : _+            local catUpdates  : {[CatalogUpdate]}+            local statementType : _+            local annotatedTree : _+            local originalTree : _+      alternative ReturnNext:+         child ann            : {Annotation}+         child expr           : Expression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative ReturnQuery:+         child ann            : {Annotation}+         child sel            : SelectExpression +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative SelectStatement:+         child ann            : {Annotation}+         child ex             : SelectExpression +         visit 0:+            local tpe         : {Either [TypeError] Type}+            local statementType : _+            local backTree    : _+            local catUpdates  : {[CatalogUpdate]}+            local libUpdates  : _+            local annotatedTree : _+            local originalTree : _+      alternative Set:+         child ann            : {Annotation}+         child name           : {String}+         child values         : {[SetValue]}+         visit 0:+            local libUpdates  : _+            local annotatedTree : _+            local originalTree : _+      alternative Truncate:+         child ann            : {Annotation}+         child tables         : StringList +         child restartIdentity : RestartIdentity +         child cascade        : Cascade +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Update:+         child ann            : {Annotation}+         child table          : {String}+         child assigns        : SetClauseList +         child whr            : MaybeBoolExpression +         child returning      : MaybeSelectList +         visit 0:+            local libUpdates  : _+            local tpe         : {Either [TypeError] Type}+            local statementType : _+            local columnTypes : _+            local assignWInferredTypes : {SetClauseList}+            local backTree    : _+            local catUpdates  : {[CatalogUpdate]}+            local lib         : _+            local annotatedTree : _+            local originalTree : _+      alternative WhileStatement:+         child ann            : {Annotation}+         child expr           : Expression +         child sts            : StatementList +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data Statement  = AlterSequence (Annotation) (String) (String) +                | AlterTable (Annotation) (String) ([AlterTableAction]) +                | Assignment (Annotation) (String) (Expression) +                | CaseStatement (Annotation) (Expression) (ExpressionListStatementListPairList) (StatementList) +                | ContinueStatement (Annotation) +                | Copy (Annotation) (String) (StringList) (CopySource) +                | CopyData (Annotation) (String) +                | CreateDomain (Annotation) (String) (TypeName) (String) (MaybeBoolExpression) +                | CreateFunction (Annotation) (String) (ParamDefList) (TypeName) (Language) (String) (FnBody) (Volatility) +                | CreateLanguage (Annotation) (String) +                | CreateSequence (Annotation) (String) (Integer) (Integer) (Integer) (Integer) (Integer) +                | CreateTable (Annotation) (String) (AttributeDefList) (ConstraintList) +                | CreateTableAs (Annotation) (String) (SelectExpression) +                | CreateTrigger (Annotation) (String) (TriggerWhen) ([TriggerEvent]) (String) (TriggerFire) (String) ([Expression]) +                | CreateType (Annotation) (String) (TypeAttributeDefList) +                | CreateView (Annotation) (String) (SelectExpression) +                | Delete (Annotation) (String) (MaybeBoolExpression) (MaybeSelectList) +                | DropFunction (Annotation) (IfExists) (StringTypeNameListPairList) (Cascade) +                | DropSomething (Annotation) (DropType) (IfExists) (StringList) (Cascade) +                | Execute (Annotation) (Expression) +                | ExecuteInto (Annotation) (Expression) (StringList) +                | ForIntegerStatement (Annotation) (String) (Expression) (Expression) (StatementList) +                | ForSelectStatement (Annotation) (String) (SelectExpression) (StatementList) +                | If (Annotation) (ExpressionStatementListPairList) (StatementList) +                | Insert (Annotation) (String) (StringList) (SelectExpression) (MaybeSelectList) +                | Notify (Annotation) (String) +                | NullStatement (Annotation) +                | Perform (Annotation) (Expression) +                | Raise (Annotation) (RaiseType) (String) (ExpressionList) +                | Return (Annotation) (MaybeExpression) +                | ReturnNext (Annotation) (Expression) +                | ReturnQuery (Annotation) (SelectExpression) +                | SelectStatement (Annotation) (SelectExpression) +                | Set (Annotation) (String) ([SetValue]) +                | Truncate (Annotation) (StringList) (RestartIdentity) (Cascade) +                | Update (Annotation) (String) (SetClauseList) (MaybeBoolExpression) (MaybeSelectList) +                | WhileStatement (Annotation) (Expression) (StatementList) +                deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Statement :: Statement  ->+                 T_Statement +sem_Statement (AlterSequence _ann _name _ownedBy )  =+    (sem_Statement_AlterSequence _ann _name _ownedBy )+sem_Statement (AlterTable _ann _name _actions )  =+    (sem_Statement_AlterTable _ann _name _actions )+sem_Statement (Assignment _ann _target _value )  =+    (sem_Statement_Assignment _ann _target (sem_Expression _value ) )+sem_Statement (CaseStatement _ann _val _cases _els )  =+    (sem_Statement_CaseStatement _ann (sem_Expression _val ) (sem_ExpressionListStatementListPairList _cases ) (sem_StatementList _els ) )+sem_Statement (ContinueStatement _ann )  =+    (sem_Statement_ContinueStatement _ann )+sem_Statement (Copy _ann _table _targetCols _source )  =+    (sem_Statement_Copy _ann _table (sem_StringList _targetCols ) (sem_CopySource _source ) )+sem_Statement (CopyData _ann _insData )  =+    (sem_Statement_CopyData _ann _insData )+sem_Statement (CreateDomain _ann _name _typ _checkName _check )  =+    (sem_Statement_CreateDomain _ann _name (sem_TypeName _typ ) _checkName (sem_MaybeBoolExpression _check ) )+sem_Statement (CreateFunction _ann _name _params _rettype _lang _bodyQuote _body _vol )  =+    (sem_Statement_CreateFunction _ann _name (sem_ParamDefList _params ) (sem_TypeName _rettype ) (sem_Language _lang ) _bodyQuote (sem_FnBody _body ) (sem_Volatility _vol ) )+sem_Statement (CreateLanguage _ann _name )  =+    (sem_Statement_CreateLanguage _ann _name )+sem_Statement (CreateSequence _ann _name _incr _min _max _start _cache )  =+    (sem_Statement_CreateSequence _ann _name _incr _min _max _start _cache )+sem_Statement (CreateTable _ann _name _atts _cons )  =+    (sem_Statement_CreateTable _ann _name (sem_AttributeDefList _atts ) (sem_ConstraintList _cons ) )+sem_Statement (CreateTableAs _ann _name _expr )  =+    (sem_Statement_CreateTableAs _ann _name (sem_SelectExpression _expr ) )+sem_Statement (CreateTrigger _ann _name _wh _events _tbl _firing _fnName _fnArgs )  =+    (sem_Statement_CreateTrigger _ann _name (sem_TriggerWhen _wh ) _events _tbl (sem_TriggerFire _firing ) _fnName _fnArgs )+sem_Statement (CreateType _ann _name _atts )  =+    (sem_Statement_CreateType _ann _name (sem_TypeAttributeDefList _atts ) )+sem_Statement (CreateView _ann _name _expr )  =+    (sem_Statement_CreateView _ann _name (sem_SelectExpression _expr ) )+sem_Statement (Delete _ann _table _whr _returning )  =+    (sem_Statement_Delete _ann _table (sem_MaybeBoolExpression _whr ) (sem_MaybeSelectList _returning ) )+sem_Statement (DropFunction _ann _ifE _sigs _cascade )  =+    (sem_Statement_DropFunction _ann (sem_IfExists _ifE ) (sem_StringTypeNameListPairList _sigs ) (sem_Cascade _cascade ) )+sem_Statement (DropSomething _ann _dropType _ifE _names _cascade )  =+    (sem_Statement_DropSomething _ann (sem_DropType _dropType ) (sem_IfExists _ifE ) (sem_StringList _names ) (sem_Cascade _cascade ) )+sem_Statement (Execute _ann _expr )  =+    (sem_Statement_Execute _ann (sem_Expression _expr ) )+sem_Statement (ExecuteInto _ann _expr _targets )  =+    (sem_Statement_ExecuteInto _ann (sem_Expression _expr ) (sem_StringList _targets ) )+sem_Statement (ForIntegerStatement _ann _var _from _to _sts )  =+    (sem_Statement_ForIntegerStatement _ann _var (sem_Expression _from ) (sem_Expression _to ) (sem_StatementList _sts ) )+sem_Statement (ForSelectStatement _ann _var _sel _sts )  =+    (sem_Statement_ForSelectStatement _ann _var (sem_SelectExpression _sel ) (sem_StatementList _sts ) )+sem_Statement (If _ann _cases _els )  =+    (sem_Statement_If _ann (sem_ExpressionStatementListPairList _cases ) (sem_StatementList _els ) )+sem_Statement (Insert _ann _table _targetCols _insData _returning )  =+    (sem_Statement_Insert _ann _table (sem_StringList _targetCols ) (sem_SelectExpression _insData ) (sem_MaybeSelectList _returning ) )+sem_Statement (Notify _ann _name )  =+    (sem_Statement_Notify _ann _name )+sem_Statement (NullStatement _ann )  =+    (sem_Statement_NullStatement _ann )+sem_Statement (Perform _ann _expr )  =+    (sem_Statement_Perform _ann (sem_Expression _expr ) )+sem_Statement (Raise _ann _level _message _args )  =+    (sem_Statement_Raise _ann (sem_RaiseType _level ) _message (sem_ExpressionList _args ) )+sem_Statement (Return _ann _value )  =+    (sem_Statement_Return _ann (sem_MaybeExpression _value ) )+sem_Statement (ReturnNext _ann _expr )  =+    (sem_Statement_ReturnNext _ann (sem_Expression _expr ) )+sem_Statement (ReturnQuery _ann _sel )  =+    (sem_Statement_ReturnQuery _ann (sem_SelectExpression _sel ) )+sem_Statement (SelectStatement _ann _ex )  =+    (sem_Statement_SelectStatement _ann (sem_SelectExpression _ex ) )+sem_Statement (Set _ann _name _values )  =+    (sem_Statement_Set _ann _name _values )+sem_Statement (Truncate _ann _tables _restartIdentity _cascade )  =+    (sem_Statement_Truncate _ann (sem_StringList _tables ) (sem_RestartIdentity _restartIdentity ) (sem_Cascade _cascade ) )+sem_Statement (Update _ann _table _assigns _whr _returning )  =+    (sem_Statement_Update _ann _table (sem_SetClauseList _assigns ) (sem_MaybeBoolExpression _whr ) (sem_MaybeSelectList _returning ) )+sem_Statement (WhileStatement _ann _expr _sts )  =+    (sem_Statement_WhileStatement _ann (sem_Expression _expr ) (sem_StatementList _sts ) )+-- semantic domain+type T_Statement  = Catalog ->+                    Catalog ->+                    LocalIdentifierBindings ->+                    ( Statement,([CatalogUpdate]),([LocalIdentifierBindingsUpdate]),Statement)+data Inh_Statement  = Inh_Statement {cat_Inh_Statement :: Catalog,inProducedCat_Inh_Statement :: Catalog,lib_Inh_Statement :: LocalIdentifierBindings}+data Syn_Statement  = Syn_Statement {annotatedTree_Syn_Statement :: Statement,catUpdates_Syn_Statement :: [CatalogUpdate],libUpdates_Syn_Statement :: [LocalIdentifierBindingsUpdate],originalTree_Syn_Statement :: Statement}+wrap_Statement :: T_Statement  ->+                  Inh_Statement  ->+                  Syn_Statement +wrap_Statement sem (Inh_Statement _lhsIcat _lhsIinProducedCat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIinProducedCat _lhsIlib )+     in  (Syn_Statement _lhsOannotatedTree _lhsOcatUpdates _lhsOlibUpdates _lhsOoriginalTree ))+sem_Statement_AlterSequence :: Annotation ->+                               String ->+                               String ->+                               T_Statement +sem_Statement_AlterSequence ann_ name_ ownedBy_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 9832 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 9837 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 9842 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  AlterSequence ann_ name_ ownedBy_+                  {-# LINE 9847 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  AlterSequence ann_ name_ ownedBy_+                  {-# LINE 9852 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 9857 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 9862 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_AlterTable :: Annotation ->+                            String ->+                            ([AlterTableAction]) ->+                            T_Statement +sem_Statement_AlterTable ann_ name_ actions_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 9880 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 9885 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  AlterTable ann_ name_ actions_+                  {-# LINE 9890 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  AlterTable ann_ name_ actions_+                  {-# LINE 9895 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 9900 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 9905 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Assignment :: Annotation ->+                            String ->+                            T_Expression  ->+                            T_Statement +sem_Statement_Assignment ann_ target_ value_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              _valueOcat :: Catalog+              _valueOlib :: LocalIdentifierBindings+              _valueIannotatedTree :: Expression+              _valueIliftedColumnName :: String+              _valueIoriginalTree :: Expression+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 9934 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 9939 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 9944 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 9949 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 23, column 9)+              _tpe =+                  {-# LINE 23 "./TypeChecking/Plpgsql.ag" #-}+                  do+                  let fromType = getTypeAnnotation _valueIannotatedTree+                  toType <- libLookupID _lhsIlib target_+                  dependsOnRTpe [getTypeAnnotation _valueIannotatedTree, toType] $ do+                  checkAssignmentValid _lhsIcat fromType toType+                  return $ Pseudo Void+                  {-# LINE 9959 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 30, column 9)+              _backTree =+                  {-# LINE 30 "./TypeChecking/Plpgsql.ag" #-}+                  Assignment ann_ target_ _valueIannotatedTree+                  {-# LINE 9964 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 31, column 9)+              _catUpdates =+                  {-# LINE 31 "./TypeChecking/Plpgsql.ag" #-}+                  []+                  {-# LINE 9969 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 32, column 9)+              _statementType =+                  {-# LINE 32 "./TypeChecking/Plpgsql.ag" #-}+                  []+                  {-# LINE 9974 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Assignment ann_ target_ _valueIannotatedTree+                  {-# LINE 9979 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Assignment ann_ target_ _valueIoriginalTree+                  {-# LINE 9984 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 9989 "AstInternal.hs" #-}+              -- copy rule (down)+              _valueOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 9994 "AstInternal.hs" #-}+              -- copy rule (down)+              _valueOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 9999 "AstInternal.hs" #-}+              ( _valueIannotatedTree,_valueIliftedColumnName,_valueIoriginalTree) =+                  (value_ _valueOcat _valueOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CaseStatement :: Annotation ->+                               T_Expression  ->+                               T_ExpressionListStatementListPairList  ->+                               T_StatementList  ->+                               T_Statement +sem_Statement_CaseStatement ann_ val_ cases_ els_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _elsOcatUpdates :: ([CatalogUpdate])+              _elsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _valOcat :: Catalog+              _valOlib :: LocalIdentifierBindings+              _casesOcat :: Catalog+              _casesOlib :: LocalIdentifierBindings+              _elsOcat :: Catalog+              _elsOlib :: LocalIdentifierBindings+              _valIannotatedTree :: Expression+              _valIliftedColumnName :: String+              _valIoriginalTree :: Expression+              _casesIannotatedTree :: ExpressionListStatementListPairList+              _casesIoriginalTree :: ExpressionListStatementListPairList+              _elsIannotatedTree :: StatementList+              _elsIoriginalTree :: StatementList+              _elsIproducedCat :: Catalog+              _elsIproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10037 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10042 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 106, column 9)+              _elsOcatUpdates =+                  {-# LINE 106 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10047 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 107, column 9)+              _elsOlibUpdates =+                  {-# LINE 107 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10052 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CaseStatement ann_ _valIannotatedTree _casesIannotatedTree _elsIannotatedTree+                  {-# LINE 10057 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CaseStatement ann_ _valIoriginalTree _casesIoriginalTree _elsIoriginalTree+                  {-# LINE 10062 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 10067 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10072 "AstInternal.hs" #-}+              -- copy rule (down)+              _valOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10077 "AstInternal.hs" #-}+              -- copy rule (down)+              _valOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10082 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10087 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10092 "AstInternal.hs" #-}+              -- copy rule (down)+              _elsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10097 "AstInternal.hs" #-}+              -- copy rule (down)+              _elsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10102 "AstInternal.hs" #-}+              ( _valIannotatedTree,_valIliftedColumnName,_valIoriginalTree) =+                  (val_ _valOcat _valOlib )+              ( _casesIannotatedTree,_casesIoriginalTree) =+                  (cases_ _casesOcat _casesOlib )+              ( _elsIannotatedTree,_elsIoriginalTree,_elsIproducedCat,_elsIproducedLib) =+                  (els_ _elsOcat _elsOcatUpdates _elsOlib _elsOlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_ContinueStatement :: Annotation ->+                                   T_Statement +sem_Statement_ContinueStatement ann_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10124 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10129 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ContinueStatement ann_+                  {-# LINE 10134 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ContinueStatement ann_+                  {-# LINE 10139 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 10144 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10149 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Copy :: Annotation ->+                      String ->+                      T_StringList  ->+                      T_CopySource  ->+                      T_Statement +sem_Statement_Copy ann_ table_ targetCols_ source_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _targetColsOcat :: Catalog+              _targetColsOlib :: LocalIdentifierBindings+              _sourceOcat :: Catalog+              _sourceOlib :: LocalIdentifierBindings+              _targetColsIannotatedTree :: StringList+              _targetColsIoriginalTree :: StringList+              _targetColsIstrings :: ([String])+              _sourceIannotatedTree :: CopySource+              _sourceIoriginalTree :: CopySource+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10177 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10182 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Copy ann_ table_ _targetColsIannotatedTree _sourceIannotatedTree+                  {-# LINE 10187 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Copy ann_ table_ _targetColsIoriginalTree _sourceIoriginalTree+                  {-# LINE 10192 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 10197 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10202 "AstInternal.hs" #-}+              -- copy rule (down)+              _targetColsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10207 "AstInternal.hs" #-}+              -- copy rule (down)+              _targetColsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10212 "AstInternal.hs" #-}+              -- copy rule (down)+              _sourceOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10217 "AstInternal.hs" #-}+              -- copy rule (down)+              _sourceOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10222 "AstInternal.hs" #-}+              ( _targetColsIannotatedTree,_targetColsIoriginalTree,_targetColsIstrings) =+                  (targetCols_ _targetColsOcat _targetColsOlib )+              ( _sourceIannotatedTree,_sourceIoriginalTree) =+                  (source_ _sourceOcat _sourceOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CopyData :: Annotation ->+                          String ->+                          T_Statement +sem_Statement_CopyData ann_ insData_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10243 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10248 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CopyData ann_ insData_+                  {-# LINE 10253 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CopyData ann_ insData_+                  {-# LINE 10258 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 10263 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10268 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CreateDomain :: Annotation ->+                              String ->+                              T_TypeName  ->+                              String ->+                              T_MaybeBoolExpression  ->+                              T_Statement +sem_Statement_CreateDomain ann_ name_ typ_ checkName_ check_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _checkOlib :: LocalIdentifierBindings+              _lhsOoriginalTree :: Statement+              _typOcat :: Catalog+              _typOlib :: LocalIdentifierBindings+              _checkOcat :: Catalog+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _typIoriginalTree :: TypeName+              _checkIannotatedTree :: MaybeBoolExpression+              _checkIoriginalTree :: MaybeBoolExpression+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 10303 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 10308 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 10313 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10318 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 64, column 9)+              _tpe =+                  {-# LINE 64 "./TypeChecking/MiscCreates.ag" #-}+                  Right $ Pseudo Void+                  {-# LINE 10323 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 65, column 9)+              _backTree =+                  {-# LINE 65 "./TypeChecking/MiscCreates.ag" #-}+                  CreateDomain ann_ name_ _typIannotatedTree checkName_ _checkIannotatedTree+                  {-# LINE 10328 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 66, column 9)+              _statementType =+                  {-# LINE 66 "./TypeChecking/MiscCreates.ag" #-}+                  []+                  {-# LINE 10333 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 67, column 9)+              _catUpdates =+                  {-# LINE 67 "./TypeChecking/MiscCreates.ag" #-}+                  [CatCreateDomain (DomainType name_) _typInamedType]+                  {-# LINE 10338 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 69, column 9)+              _checkOlib =+                  {-# LINE 69 "./TypeChecking/MiscCreates.ag" #-}+                  fromRight _lhsIlib $+                  updateBindings _lhsIlib _lhsIcat+                    [LibStackIDs [("", [("value", _typInamedType)])]]+                  {-# LINE 10345 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CreateDomain ann_ name_ _typIannotatedTree checkName_ _checkIannotatedTree+                  {-# LINE 10350 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CreateDomain ann_ name_ _typIoriginalTree checkName_ _checkIoriginalTree+                  {-# LINE 10355 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10360 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10365 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10370 "AstInternal.hs" #-}+              -- copy rule (down)+              _checkOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10375 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =+                  (typ_ _typOcat _typOlib )+              ( _checkIannotatedTree,_checkIoriginalTree) =+                  (check_ _checkOcat _checkOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CreateFunction :: Annotation ->+                                String ->+                                T_ParamDefList  ->+                                T_TypeName  ->+                                T_Language  ->+                                String ->+                                T_FnBody  ->+                                T_Volatility  ->+                                T_Statement +sem_Statement_CreateFunction ann_ name_ params_ rettype_ lang_ bodyQuote_ body_ vol_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _bodyOcat :: Catalog+              _bodyOlib :: LocalIdentifierBindings+              _lhsOoriginalTree :: Statement+              _paramsOcat :: Catalog+              _paramsOlib :: LocalIdentifierBindings+              _rettypeOcat :: Catalog+              _rettypeOlib :: LocalIdentifierBindings+              _langOcat :: Catalog+              _langOlib :: LocalIdentifierBindings+              _volOcat :: Catalog+              _volOlib :: LocalIdentifierBindings+              _paramsIannotatedTree :: ParamDefList+              _paramsIoriginalTree :: ParamDefList+              _paramsIparams :: ([(String, Type)])+              _rettypeIannotatedTree :: TypeName+              _rettypeInamedType :: Type+              _rettypeIoriginalTree :: TypeName+              _langIannotatedTree :: Language+              _langIoriginalTree :: Language+              _bodyIannotatedTree :: FnBody+              _bodyIoriginalTree :: FnBody+              _volIannotatedTree :: Volatility+              _volIoriginalTree :: Volatility+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 10430 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 10435 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 10440 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10445 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 23, column 9)+              _tpe =+                  {-# LINE 23 "./TypeChecking/CreateFunction.ag" #-}+                  dependsOnRTpe+                    (_rettypeInamedType : _parameterTypes    ) $+                    Right $ Pseudo Void+                  {-# LINE 10452 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 26, column 9)+              _catUpdates =+                  {-# LINE 26 "./TypeChecking/CreateFunction.ag" #-}+                  dependsOn [tpeToT _tpe    ] []+                            [CatCreateFunction FunName+                                               (map toLower name_)+                                               _parameterTypes+                                               _rettypeInamedType+                                               False]+                  {-# LINE 10462 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 32, column 9)+              _parameterTypes =+                  {-# LINE 32 "./TypeChecking/CreateFunction.ag" #-}+                  (map snd _paramsIparams)+                  {-# LINE 10467 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 34, column 9)+              _backTree =+                  {-# LINE 34 "./TypeChecking/CreateFunction.ag" #-}+                  CreateFunction ann_+                                 name_+                                 _paramsIannotatedTree+                                 _rettypeIannotatedTree+                                 _langIannotatedTree+                                 bodyQuote_+                                 _bodyIannotatedTree+                                 _volIannotatedTree+                  {-# LINE 10479 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 42, column 9)+              _statementType =+                  {-# LINE 42 "./TypeChecking/CreateFunction.ag" #-}+                  []+                  {-# LINE 10484 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 43, column 9)+              _bodyOcat =+                  {-# LINE 43 "./TypeChecking/CreateFunction.ag" #-}+                  _lhsIinProducedCat+                  {-# LINE 10489 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateFunction.ag"(line 99, column 9)+              _bodyOlib =+                  {-# LINE 99 "./TypeChecking/CreateFunction.ag" #-}+                  let p = _paramsIparams+                          ++ (zip posNames $ map snd _paramsIparams)+                  in fromRight _lhsIlib $+                     updateBindings _lhsIlib _lhsIcat+                                    [LibStackIDs [("", p)+                                                 ,(name_, _paramsIparams)]]+                  where+                    posNames :: [String]+                    posNames = map (\l -> '$':show l) [1..]+                  {-# LINE 10502 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CreateFunction ann_ name_ _paramsIannotatedTree _rettypeIannotatedTree _langIannotatedTree bodyQuote_ _bodyIannotatedTree _volIannotatedTree+                  {-# LINE 10507 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CreateFunction ann_ name_ _paramsIoriginalTree _rettypeIoriginalTree _langIoriginalTree bodyQuote_ _bodyIoriginalTree _volIoriginalTree+                  {-# LINE 10512 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10517 "AstInternal.hs" #-}+              -- copy rule (down)+              _paramsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10522 "AstInternal.hs" #-}+              -- copy rule (down)+              _paramsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10527 "AstInternal.hs" #-}+              -- copy rule (down)+              _rettypeOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10532 "AstInternal.hs" #-}+              -- copy rule (down)+              _rettypeOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10537 "AstInternal.hs" #-}+              -- copy rule (down)+              _langOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10542 "AstInternal.hs" #-}+              -- copy rule (down)+              _langOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10547 "AstInternal.hs" #-}+              -- copy rule (down)+              _volOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10552 "AstInternal.hs" #-}+              -- copy rule (down)+              _volOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10557 "AstInternal.hs" #-}+              ( _paramsIannotatedTree,_paramsIoriginalTree,_paramsIparams) =+                  (params_ _paramsOcat _paramsOlib )+              ( _rettypeIannotatedTree,_rettypeInamedType,_rettypeIoriginalTree) =+                  (rettype_ _rettypeOcat _rettypeOlib )+              ( _langIannotatedTree,_langIoriginalTree) =+                  (lang_ _langOcat _langOlib )+              ( _bodyIannotatedTree,_bodyIoriginalTree) =+                  (body_ _bodyOcat _bodyOlib )+              ( _volIannotatedTree,_volIoriginalTree) =+                  (vol_ _volOcat _volOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CreateLanguage :: Annotation ->+                                String ->+                                T_Statement +sem_Statement_CreateLanguage ann_ name_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 10590 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 10595 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 10600 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10605 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 75, column 9)+              _tpe =+                  {-# LINE 75 "./TypeChecking/MiscCreates.ag" #-}+                  Right $ Pseudo Void+                  {-# LINE 10610 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 76, column 9)+              _backTree =+                  {-# LINE 76 "./TypeChecking/MiscCreates.ag" #-}+                  CreateLanguage ann_ name_+                  {-# LINE 10615 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 77, column 9)+              _statementType =+                  {-# LINE 77 "./TypeChecking/MiscCreates.ag" #-}+                  []+                  {-# LINE 10620 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 78, column 9)+              _catUpdates =+                  {-# LINE 78 "./TypeChecking/MiscCreates.ag" #-}+                  [CatCreateFunction FunName "plpgsql_call_handler" [] (Pseudo LanguageHandler) False+                  ,CatCreateFunction FunName "plpgsql_validator" [ScalarType "oid"] (Pseudo Void) False]+                  {-# LINE 10626 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CreateLanguage ann_ name_+                  {-# LINE 10631 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CreateLanguage ann_ name_+                  {-# LINE 10636 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10641 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CreateSequence :: Annotation ->+                                String ->+                                Integer ->+                                Integer ->+                                Integer ->+                                Integer ->+                                Integer ->+                                T_Statement +sem_Statement_CreateSequence ann_ name_ incr_ min_ max_ start_ cache_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10663 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10668 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10673 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CreateSequence ann_ name_ incr_ min_ max_ start_ cache_+                  {-# LINE 10678 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CreateSequence ann_ name_ incr_ min_ max_ start_ cache_+                  {-# LINE 10683 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 10688 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10693 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CreateTable :: Annotation ->+                             String ->+                             T_AttributeDefList  ->+                             T_ConstraintList  ->+                             T_Statement +sem_Statement_CreateTable ann_ name_ atts_ cons_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _attrTypes :: ([Type])+              _consOlib :: LocalIdentifierBindings+              _lhsOoriginalTree :: Statement+              _attsOcat :: Catalog+              _attsOlib :: LocalIdentifierBindings+              _consOcat :: Catalog+              _attsIannotatedTree :: AttributeDefList+              _attsIattrs :: ([(String, Type)])+              _attsIoriginalTree :: AttributeDefList+              _consIannotatedTree :: ConstraintList+              _consIoriginalTree :: ConstraintList+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 10728 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 10733 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 10738 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10743 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 25, column 9)+              _tpe =+                  {-# LINE 25 "./TypeChecking/CreateTable.ag" #-}+                  dependsOnRTpe _attrTypes     $ Right $ Pseudo Void+                  {-# LINE 10748 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 26, column 9)+              _catUpdates =+                  {-# LINE 26 "./TypeChecking/CreateTable.ag" #-}+                  dependsOn _attrTypes     []+                    [CatCreateTable name_ _attsIattrs defaultSystemColumns]+                  {-# LINE 10754 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 29, column 9)+              _attrTypes =+                  {-# LINE 29 "./TypeChecking/CreateTable.ag" #-}+                  map snd _attsIattrs+                  {-# LINE 10759 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 31, column 9)+              _statementType =+                  {-# LINE 31 "./TypeChecking/CreateTable.ag" #-}+                  []+                  {-# LINE 10764 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 32, column 9)+              _backTree =+                  {-# LINE 32 "./TypeChecking/CreateTable.ag" #-}+                  CreateTable ann_+                              name_+                              _attsIannotatedTree+                              _consIannotatedTree+                  {-# LINE 10772 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 36, column 9)+              _consOlib =+                  {-# LINE 36 "./TypeChecking/CreateTable.ag" #-}+                  case updateBindings _lhsIlib _lhsIcat+                    [LibStackIDs [("", _attsIattrs)]] of+                     Left x -> error $ show x+                     Right e -> e+                  {-# LINE 10780 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CreateTable ann_ name_ _attsIannotatedTree _consIannotatedTree+                  {-# LINE 10785 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CreateTable ann_ name_ _attsIoriginalTree _consIoriginalTree+                  {-# LINE 10790 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10795 "AstInternal.hs" #-}+              -- copy rule (down)+              _attsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10800 "AstInternal.hs" #-}+              -- copy rule (down)+              _attsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10805 "AstInternal.hs" #-}+              -- copy rule (down)+              _consOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10810 "AstInternal.hs" #-}+              ( _attsIannotatedTree,_attsIattrs,_attsIoriginalTree) =+                  (atts_ _attsOcat _attsOlib )+              ( _consIannotatedTree,_consIoriginalTree) =+                  (cons_ _consOcat _consOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CreateTableAs :: Annotation ->+                               String ->+                               T_SelectExpression  ->+                               T_Statement +sem_Statement_CreateTableAs ann_ name_ expr_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: SelectExpression+              _exprIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _exprIoriginalTree :: SelectExpression+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 10843 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 10848 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 10853 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10858 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 53, column 9)+              _tpe =+                  {-# LINE 53 "./TypeChecking/CreateTable.ag" #-}+                  dependsOnRTpe [_selType    ] $ do+                    _attrs+                    Right _selType+                  {-# LINE 10865 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 57, column 9)+              _catUpdates =+                  {-# LINE 57 "./TypeChecking/CreateTable.ag" #-}+                  leftToEmpty (\as -> [CatCreateTable name_ as defaultSystemColumns]) $ do+                     ats <- _attrs+                     return $ dependsOn (tpeToT _tpe     :+                                         (map snd ats)) [] ats+                  {-# LINE 10873 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 63, column 9)+              _selType =+                  {-# LINE 63 "./TypeChecking/CreateTable.ag" #-}+                  getTypeAnnotation _exprIannotatedTree+                  {-# LINE 10878 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 65, column 9)+              _attrs =+                  {-# LINE 65 "./TypeChecking/CreateTable.ag" #-}+                  unwrapSetOfComposite _selType+                  {-# LINE 10883 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 67, column 9)+              _backTree =+                  {-# LINE 67 "./TypeChecking/CreateTable.ag" #-}+                  CreateTableAs ann_ name_ _exprIannotatedTree+                  {-# LINE 10888 "AstInternal.hs" #-}+              -- "./TypeChecking/CreateTable.ag"(line 68, column 9)+              _statementType =+                  {-# LINE 68 "./TypeChecking/CreateTable.ag" #-}+                  []+                  {-# LINE 10893 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CreateTableAs ann_ name_ _exprIannotatedTree+                  {-# LINE 10898 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CreateTableAs ann_ name_ _exprIoriginalTree+                  {-# LINE 10903 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10908 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10913 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10918 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIlibUpdates,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CreateTrigger :: Annotation ->+                               String ->+                               T_TriggerWhen  ->+                               ([TriggerEvent]) ->+                               String ->+                               T_TriggerFire  ->+                               String ->+                               ([Expression]) ->+                               T_Statement +sem_Statement_CreateTrigger ann_ name_ wh_ events_ tbl_ firing_ fnName_ fnArgs_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _whOcat :: Catalog+              _whOlib :: LocalIdentifierBindings+              _firingOcat :: Catalog+              _firingOlib :: LocalIdentifierBindings+              _whIannotatedTree :: TriggerWhen+              _whIoriginalTree :: TriggerWhen+              _firingIannotatedTree :: TriggerFire+              _firingIoriginalTree :: TriggerFire+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10951 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 10956 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CreateTrigger ann_ name_ _whIannotatedTree events_ tbl_ _firingIannotatedTree fnName_ fnArgs_+                  {-# LINE 10961 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CreateTrigger ann_ name_ _whIoriginalTree events_ tbl_ _firingIoriginalTree fnName_ fnArgs_+                  {-# LINE 10966 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 10971 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 10976 "AstInternal.hs" #-}+              -- copy rule (down)+              _whOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10981 "AstInternal.hs" #-}+              -- copy rule (down)+              _whOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10986 "AstInternal.hs" #-}+              -- copy rule (down)+              _firingOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 10991 "AstInternal.hs" #-}+              -- copy rule (down)+              _firingOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 10996 "AstInternal.hs" #-}+              ( _whIannotatedTree,_whIoriginalTree) =+                  (wh_ _whOcat _whOlib )+              ( _firingIannotatedTree,_firingIoriginalTree) =+                  (firing_ _firingOcat _firingOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CreateType :: Annotation ->+                            String ->+                            T_TypeAttributeDefList  ->+                            T_Statement +sem_Statement_CreateType ann_ name_ atts_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              _attsOcat :: Catalog+              _attsOlib :: LocalIdentifierBindings+              _attsIannotatedTree :: TypeAttributeDefList+              _attsIattrs :: ([(String, Type)])+              _attsIoriginalTree :: TypeAttributeDefList+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 11029 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 11034 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 11039 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11044 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 51, column 9)+              _tpe =+                  {-# LINE 51 "./TypeChecking/MiscCreates.ag" #-}+                  Right $ Pseudo Void+                  {-# LINE 11049 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 52, column 9)+              _backTree =+                  {-# LINE 52 "./TypeChecking/MiscCreates.ag" #-}+                  CreateType ann_ name_ _attsIannotatedTree+                  {-# LINE 11054 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 53, column 9)+              _statementType =+                  {-# LINE 53 "./TypeChecking/MiscCreates.ag" #-}+                  []+                  {-# LINE 11059 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 54, column 9)+              _catUpdates =+                  {-# LINE 54 "./TypeChecking/MiscCreates.ag" #-}+                  [CatCreateComposite name_ _attsIattrs]+                  {-# LINE 11064 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CreateType ann_ name_ _attsIannotatedTree+                  {-# LINE 11069 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CreateType ann_ name_ _attsIoriginalTree+                  {-# LINE 11074 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 11079 "AstInternal.hs" #-}+              -- copy rule (down)+              _attsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11084 "AstInternal.hs" #-}+              -- copy rule (down)+              _attsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11089 "AstInternal.hs" #-}+              ( _attsIannotatedTree,_attsIattrs,_attsIoriginalTree) =+                  (atts_ _attsOcat _attsOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_CreateView :: Annotation ->+                            String ->+                            T_SelectExpression  ->+                            T_Statement +sem_Statement_CreateView ann_ name_ expr_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: SelectExpression+              _exprIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _exprIoriginalTree :: SelectExpression+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 11120 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 11125 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 11130 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11135 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 15, column 9)+              _tpe =+                  {-# LINE 15 "./TypeChecking/MiscCreates.ag" #-}+                  dependsOnRTpe [getTypeAnnotation _exprIannotatedTree] $+                    Right $ Pseudo Void+                  {-# LINE 11141 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 17, column 9)+              _backTree =+                  {-# LINE 17 "./TypeChecking/MiscCreates.ag" #-}+                  CreateView ann_ name_ _exprIannotatedTree+                  {-# LINE 11146 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 18, column 9)+              _attrs =+                  {-# LINE 18 "./TypeChecking/MiscCreates.ag" #-}+                  case getTypeAnnotation _exprIannotatedTree of+                    SetOfType (CompositeType c) -> c+                    _ -> []+                  {-# LINE 11153 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 21, column 9)+              _catUpdates =+                  {-# LINE 21 "./TypeChecking/MiscCreates.ag" #-}+                  [CatCreateView name_ _attrs    ]+                  {-# LINE 11158 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 22, column 9)+              _statementType =+                  {-# LINE 22 "./TypeChecking/MiscCreates.ag" #-}+                  []+                  {-# LINE 11163 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  CreateView ann_ name_ _exprIannotatedTree+                  {-# LINE 11168 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  CreateView ann_ name_ _exprIoriginalTree+                  {-# LINE 11173 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 11178 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11183 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11188 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIlibUpdates,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Delete :: Annotation ->+                        String ->+                        T_MaybeBoolExpression  ->+                        T_MaybeSelectList  ->+                        T_Statement +sem_Statement_Delete ann_ table_ whr_ returning_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _whrOlib :: LocalIdentifierBindings+              _returningOlib :: LocalIdentifierBindings+              _lhsOoriginalTree :: Statement+              _whrOcat :: Catalog+              _returningOcat :: Catalog+              _whrIannotatedTree :: MaybeBoolExpression+              _whrIoriginalTree :: MaybeBoolExpression+              _returningIannotatedTree :: MaybeSelectList+              _returningIlistType :: (Maybe [(String,Type)])+              _returningIoriginalTree :: MaybeSelectList+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 11224 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 11229 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 11234 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11239 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 180, column 9)+              _tpe =+                  {-# LINE 180 "./TypeChecking/Dml.ag" #-}+                  checkRelationExists _lhsIcat table_ >>+                  Right (Pseudo Void)+                  {-# LINE 11245 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 183, column 9)+              _statementType =+                  {-# LINE 183 "./TypeChecking/Dml.ag" #-}+                  [StatementType (getPlaceholderTypes _whrIannotatedTree)+                                 (fromMaybe [] _returningIlistType)]+                  {-# LINE 11251 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 186, column 9)+              _backTree =+                  {-# LINE 186 "./TypeChecking/Dml.ag" #-}+                  Delete ann_ table_ _whrIannotatedTree _returningIannotatedTree+                  {-# LINE 11256 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 187, column 9)+              _catUpdates =+                  {-# LINE 187 "./TypeChecking/Dml.ag" #-}+                  []+                  {-# LINE 11261 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 192, column 9)+              _lib =+                  {-# LINE 192 "./TypeChecking/Dml.ag" #-}+                  fromRight _lhsIlib $ do+                  columnTypes <- catCompositeAttrs _lhsIcat relationComposites table_+                  updateBindings _lhsIlib _lhsIcat [LibStackIDs [("", columnTypes)]]+                  {-# LINE 11268 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 196, column 9)+              _whrOlib =+                  {-# LINE 196 "./TypeChecking/Dml.ag" #-}+                  _lib+                  {-# LINE 11273 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 197, column 9)+              _returningOlib =+                  {-# LINE 197 "./TypeChecking/Dml.ag" #-}+                  _lib+                  {-# LINE 11278 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Delete ann_ table_ _whrIannotatedTree _returningIannotatedTree+                  {-# LINE 11283 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Delete ann_ table_ _whrIoriginalTree _returningIoriginalTree+                  {-# LINE 11288 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 11293 "AstInternal.hs" #-}+              -- copy rule (down)+              _whrOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11298 "AstInternal.hs" #-}+              -- copy rule (down)+              _returningOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11303 "AstInternal.hs" #-}+              ( _whrIannotatedTree,_whrIoriginalTree) =+                  (whr_ _whrOcat _whrOlib )+              ( _returningIannotatedTree,_returningIlistType,_returningIoriginalTree) =+                  (returning_ _returningOcat _returningOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_DropFunction :: Annotation ->+                              T_IfExists  ->+                              T_StringTypeNameListPairList  ->+                              T_Cascade  ->+                              T_Statement +sem_Statement_DropFunction ann_ ifE_ sigs_ cascade_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              _ifEOcat :: Catalog+              _ifEOlib :: LocalIdentifierBindings+              _sigsOcat :: Catalog+              _sigsOlib :: LocalIdentifierBindings+              _cascadeOcat :: Catalog+              _cascadeOlib :: LocalIdentifierBindings+              _ifEIannotatedTree :: IfExists+              _ifEIoriginalTree :: IfExists+              _sigsIannotatedTree :: StringTypeNameListPairList+              _sigsIfnSigs :: ([(String,[Type])])+              _sigsIoriginalTree :: StringTypeNameListPairList+              _cascadeIannotatedTree :: Cascade+              _cascadeIoriginalTree :: Cascade+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 11345 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 11350 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 11355 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11360 "AstInternal.hs" #-}+              -- "./TypeChecking/Drops.ag"(line 10, column 9)+              _tpe =+                  {-# LINE 10 "./TypeChecking/Drops.ag" #-}+                  Right $ Pseudo Void+                  {-# LINE 11365 "AstInternal.hs" #-}+              -- "./TypeChecking/Drops.ag"(line 11, column 9)+              _backTree =+                  {-# LINE 11 "./TypeChecking/Drops.ag" #-}+                  DropFunction ann_ _ifEIannotatedTree _sigsIannotatedTree _cascadeIannotatedTree+                  {-# LINE 11370 "AstInternal.hs" #-}+              -- "./TypeChecking/Drops.ag"(line 12, column 9)+              _catUpdates =+                  {-# LINE 12 "./TypeChecking/Drops.ag" #-}+                  flip map _sigsIfnSigs $ \(nm,args) ->+                        CatDropFunction ifE nm args+                  where+                    ifE = _ifEIannotatedTree == IfExists+                  {-# LINE 11378 "AstInternal.hs" #-}+              -- "./TypeChecking/Drops.ag"(line 16, column 9)+              _statementType =+                  {-# LINE 16 "./TypeChecking/Drops.ag" #-}+                  []+                  {-# LINE 11383 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  DropFunction ann_ _ifEIannotatedTree _sigsIannotatedTree _cascadeIannotatedTree+                  {-# LINE 11388 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  DropFunction ann_ _ifEIoriginalTree _sigsIoriginalTree _cascadeIoriginalTree+                  {-# LINE 11393 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 11398 "AstInternal.hs" #-}+              -- copy rule (down)+              _ifEOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11403 "AstInternal.hs" #-}+              -- copy rule (down)+              _ifEOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11408 "AstInternal.hs" #-}+              -- copy rule (down)+              _sigsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11413 "AstInternal.hs" #-}+              -- copy rule (down)+              _sigsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11418 "AstInternal.hs" #-}+              -- copy rule (down)+              _cascadeOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11423 "AstInternal.hs" #-}+              -- copy rule (down)+              _cascadeOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11428 "AstInternal.hs" #-}+              ( _ifEIannotatedTree,_ifEIoriginalTree) =+                  (ifE_ _ifEOcat _ifEOlib )+              ( _sigsIannotatedTree,_sigsIfnSigs,_sigsIoriginalTree) =+                  (sigs_ _sigsOcat _sigsOlib )+              ( _cascadeIannotatedTree,_cascadeIoriginalTree) =+                  (cascade_ _cascadeOcat _cascadeOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_DropSomething :: Annotation ->+                               T_DropType  ->+                               T_IfExists  ->+                               T_StringList  ->+                               T_Cascade  ->+                               T_Statement +sem_Statement_DropSomething ann_ dropType_ ifE_ names_ cascade_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _dropTypeOcat :: Catalog+              _dropTypeOlib :: LocalIdentifierBindings+              _ifEOcat :: Catalog+              _ifEOlib :: LocalIdentifierBindings+              _namesOcat :: Catalog+              _namesOlib :: LocalIdentifierBindings+              _cascadeOcat :: Catalog+              _cascadeOlib :: LocalIdentifierBindings+              _dropTypeIannotatedTree :: DropType+              _dropTypeIoriginalTree :: DropType+              _ifEIannotatedTree :: IfExists+              _ifEIoriginalTree :: IfExists+              _namesIannotatedTree :: StringList+              _namesIoriginalTree :: StringList+              _namesIstrings :: ([String])+              _cascadeIannotatedTree :: Cascade+              _cascadeIoriginalTree :: Cascade+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11471 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11476 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  DropSomething ann_ _dropTypeIannotatedTree _ifEIannotatedTree _namesIannotatedTree _cascadeIannotatedTree+                  {-# LINE 11481 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  DropSomething ann_ _dropTypeIoriginalTree _ifEIoriginalTree _namesIoriginalTree _cascadeIoriginalTree+                  {-# LINE 11486 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 11491 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 11496 "AstInternal.hs" #-}+              -- copy rule (down)+              _dropTypeOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11501 "AstInternal.hs" #-}+              -- copy rule (down)+              _dropTypeOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11506 "AstInternal.hs" #-}+              -- copy rule (down)+              _ifEOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11511 "AstInternal.hs" #-}+              -- copy rule (down)+              _ifEOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11516 "AstInternal.hs" #-}+              -- copy rule (down)+              _namesOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11521 "AstInternal.hs" #-}+              -- copy rule (down)+              _namesOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11526 "AstInternal.hs" #-}+              -- copy rule (down)+              _cascadeOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11531 "AstInternal.hs" #-}+              -- copy rule (down)+              _cascadeOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11536 "AstInternal.hs" #-}+              ( _dropTypeIannotatedTree,_dropTypeIoriginalTree) =+                  (dropType_ _dropTypeOcat _dropTypeOlib )+              ( _ifEIannotatedTree,_ifEIoriginalTree) =+                  (ifE_ _ifEOcat _ifEOlib )+              ( _namesIannotatedTree,_namesIoriginalTree,_namesIstrings) =+                  (names_ _namesOcat _namesOlib )+              ( _cascadeIannotatedTree,_cascadeIoriginalTree) =+                  (cascade_ _cascadeOcat _cascadeOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Execute :: Annotation ->+                         T_Expression  ->+                         T_Statement +sem_Statement_Execute ann_ expr_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _exprIoriginalTree :: Expression+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11566 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11571 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Execute ann_ _exprIannotatedTree+                  {-# LINE 11576 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Execute ann_ _exprIoriginalTree+                  {-# LINE 11581 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 11586 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 11591 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11596 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11601 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_ExecuteInto :: Annotation ->+                             T_Expression  ->+                             T_StringList  ->+                             T_Statement +sem_Statement_ExecuteInto ann_ expr_ targets_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _targetsOcat :: Catalog+              _targetsOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _exprIoriginalTree :: Expression+              _targetsIannotatedTree :: StringList+              _targetsIoriginalTree :: StringList+              _targetsIstrings :: ([String])+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11631 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11636 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ExecuteInto ann_ _exprIannotatedTree _targetsIannotatedTree+                  {-# LINE 11641 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ExecuteInto ann_ _exprIoriginalTree _targetsIoriginalTree+                  {-# LINE 11646 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 11651 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 11656 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11661 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11666 "AstInternal.hs" #-}+              -- copy rule (down)+              _targetsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11671 "AstInternal.hs" #-}+              -- copy rule (down)+              _targetsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11676 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+              ( _targetsIannotatedTree,_targetsIoriginalTree,_targetsIstrings) =+                  (targets_ _targetsOcat _targetsOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_ForIntegerStatement :: Annotation ->+                                     String ->+                                     T_Expression  ->+                                     T_Expression  ->+                                     T_StatementList  ->+                                     T_Statement +sem_Statement_ForIntegerStatement ann_ var_ from_ to_ sts_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _stsOcatUpdates :: ([CatalogUpdate])+              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _stsOlib :: LocalIdentifierBindings+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              _fromOcat :: Catalog+              _fromOlib :: LocalIdentifierBindings+              _toOcat :: Catalog+              _toOlib :: LocalIdentifierBindings+              _stsOcat :: Catalog+              _fromIannotatedTree :: Expression+              _fromIliftedColumnName :: String+              _fromIoriginalTree :: Expression+              _toIannotatedTree :: Expression+              _toIliftedColumnName :: String+              _toIoriginalTree :: Expression+              _stsIannotatedTree :: StatementList+              _stsIoriginalTree :: StatementList+              _stsIproducedCat :: Catalog+              _stsIproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 11724 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 11729 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 11734 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11739 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 110, column 9)+              _stsOcatUpdates =+                  {-# LINE 110 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11744 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 111, column 9)+              _stsOlibUpdates =+                  {-# LINE 111 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11749 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 36, column 9)+              _varTypeE =+                  {-# LINE 36 "./TypeChecking/Plpgsql.ag" #-}+                  libLookupID _lhsIlib var_+                  {-# LINE 11754 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 37, column 9)+              _tpe =+                  {-# LINE 37 "./TypeChecking/Plpgsql.ag" #-}+                  do+                  let fromType = getTypeAnnotation _fromIannotatedTree+                      toType = getTypeAnnotation _toIannotatedTree+                  dependsOnRTpe [fromType,toType] $ do+                  errorWhen (fromType /= toType) [FromToTypesNotSame fromType toType]+                  case _varTypeE     of+                    Right t -> checkAssignmentValid _lhsIcat fromType t+                    Left _ -> return ()+                  return $ Pseudo Void+                  {-# LINE 11767 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 48, column 9)+              _stsOlib =+                  {-# LINE 48 "./TypeChecking/Plpgsql.ag" #-}+                  case _varTypeE     of+                    Left [UnrecognisedIdentifier var_] ->+                        fromRight _lhsIlib $+                        updateBindings _lhsIlib _lhsIcat+                                       [LibStackIDs [("", [(var_,getTypeAnnotation _fromIannotatedTree)])]]+                    _ -> _lhsIlib+                  {-# LINE 11777 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 56, column 9)+              _backTree =+                  {-# LINE 56 "./TypeChecking/Plpgsql.ag" #-}+                  ForIntegerStatement ann_ var_ _fromIannotatedTree _toIannotatedTree _stsIannotatedTree+                  {-# LINE 11782 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 57, column 9)+              _catUpdates =+                  {-# LINE 57 "./TypeChecking/Plpgsql.ag" #-}+                  []+                  {-# LINE 11787 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 58, column 9)+              _statementType =+                  {-# LINE 58 "./TypeChecking/Plpgsql.ag" #-}+                  []+                  {-# LINE 11792 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ForIntegerStatement ann_ var_ _fromIannotatedTree _toIannotatedTree _stsIannotatedTree+                  {-# LINE 11797 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ForIntegerStatement ann_ var_ _fromIoriginalTree _toIoriginalTree _stsIoriginalTree+                  {-# LINE 11802 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 11807 "AstInternal.hs" #-}+              -- copy rule (down)+              _fromOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11812 "AstInternal.hs" #-}+              -- copy rule (down)+              _fromOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11817 "AstInternal.hs" #-}+              -- copy rule (down)+              _toOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11822 "AstInternal.hs" #-}+              -- copy rule (down)+              _toOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11827 "AstInternal.hs" #-}+              -- copy rule (down)+              _stsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11832 "AstInternal.hs" #-}+              ( _fromIannotatedTree,_fromIliftedColumnName,_fromIoriginalTree) =+                  (from_ _fromOcat _fromOlib )+              ( _toIannotatedTree,_toIliftedColumnName,_toIoriginalTree) =+                  (to_ _toOcat _toOlib )+              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedCat,_stsIproducedLib) =+                  (sts_ _stsOcat _stsOcatUpdates _stsOlib _stsOlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_ForSelectStatement :: Annotation ->+                                    String ->+                                    T_SelectExpression  ->+                                    T_StatementList  ->+                                    T_Statement +sem_Statement_ForSelectStatement ann_ var_ sel_ sts_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _stsOcatUpdates :: ([CatalogUpdate])+              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _stsOlib :: LocalIdentifierBindings+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              _selOcat :: Catalog+              _selOlib :: LocalIdentifierBindings+              _stsOcat :: Catalog+              _selIannotatedTree :: SelectExpression+              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _selIoriginalTree :: SelectExpression+              _stsIannotatedTree :: StatementList+              _stsIoriginalTree :: StatementList+              _stsIproducedCat :: Catalog+              _stsIproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 11876 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 11881 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 11886 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11891 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 110, column 9)+              _stsOcatUpdates =+                  {-# LINE 110 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11896 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 111, column 9)+              _stsOlibUpdates =+                  {-# LINE 111 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 11901 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 63, column 9)+              _selType =+                  {-# LINE 63 "./TypeChecking/Plpgsql.ag" #-}+                  getTypeAnnotation _selIannotatedTree+                  {-# LINE 11906 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 64, column 9)+              _tpe =+                  {-# LINE 64 "./TypeChecking/Plpgsql.ag" #-}+                  do+                  dependsOnRTpe [_selType    ] $ do+                  toType <- libLookupID _lhsIlib var_+                  dependsOnRTpe [toType] $ do+                  checkAssignmentValid _lhsIcat _selType     toType+                  return $ Pseudo Void+                  {-# LINE 11916 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 75, column 9)+              _stsOlib =+                  {-# LINE 75 "./TypeChecking/Plpgsql.ag" #-}+                  if okToUpdate+                    then fromRight _lhsIlib $+                         updateBindings _lhsIlib _lhsIcat [LibStackIDs [("", [(var_,_selType    )])]]+                    else _lhsIlib+                  where+                    okToUpdate = isRight _tpe     && _selType     /= TypeCheckFailed+                  {-# LINE 11926 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 84, column 9)+              _backTree =+                  {-# LINE 84 "./TypeChecking/Plpgsql.ag" #-}+                  ForSelectStatement ann_ var_ _selIannotatedTree _stsIannotatedTree+                  {-# LINE 11931 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 85, column 9)+              _catUpdates =+                  {-# LINE 85 "./TypeChecking/Plpgsql.ag" #-}+                  []+                  {-# LINE 11936 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 86, column 9)+              _statementType =+                  {-# LINE 86 "./TypeChecking/Plpgsql.ag" #-}+                  []+                  {-# LINE 11941 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ForSelectStatement ann_ var_ _selIannotatedTree _stsIannotatedTree+                  {-# LINE 11946 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ForSelectStatement ann_ var_ _selIoriginalTree _stsIoriginalTree+                  {-# LINE 11951 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 11956 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11961 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 11966 "AstInternal.hs" #-}+              -- copy rule (down)+              _stsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 11971 "AstInternal.hs" #-}+              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =+                  (sel_ _selOcat _selOlib )+              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedCat,_stsIproducedLib) =+                  (sts_ _stsOcat _stsOcatUpdates _stsOlib _stsOlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_If :: Annotation ->+                    T_ExpressionStatementListPairList  ->+                    T_StatementList  ->+                    T_Statement +sem_Statement_If ann_ cases_ els_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _elsOcatUpdates :: ([CatalogUpdate])+              _elsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _casesOcat :: Catalog+              _casesOlib :: LocalIdentifierBindings+              _elsOcat :: Catalog+              _elsOlib :: LocalIdentifierBindings+              _casesIannotatedTree :: ExpressionStatementListPairList+              _casesIoriginalTree :: ExpressionStatementListPairList+              _elsIannotatedTree :: StatementList+              _elsIoriginalTree :: StatementList+              _elsIproducedCat :: Catalog+              _elsIproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12005 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12010 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 106, column 9)+              _elsOcatUpdates =+                  {-# LINE 106 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12015 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 107, column 9)+              _elsOlibUpdates =+                  {-# LINE 107 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12020 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  If ann_ _casesIannotatedTree _elsIannotatedTree+                  {-# LINE 12025 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  If ann_ _casesIoriginalTree _elsIoriginalTree+                  {-# LINE 12030 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 12035 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12040 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12045 "AstInternal.hs" #-}+              -- copy rule (down)+              _casesOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12050 "AstInternal.hs" #-}+              -- copy rule (down)+              _elsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12055 "AstInternal.hs" #-}+              -- copy rule (down)+              _elsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12060 "AstInternal.hs" #-}+              ( _casesIannotatedTree,_casesIoriginalTree) =+                  (cases_ _casesOcat _casesOlib )+              ( _elsIannotatedTree,_elsIoriginalTree,_elsIproducedCat,_elsIproducedLib) =+                  (els_ _elsOcat _elsOcatUpdates _elsOlib _elsOlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Insert :: Annotation ->+                        String ->+                        T_StringList  ->+                        T_SelectExpression  ->+                        T_MaybeSelectList  ->+                        T_Statement +sem_Statement_Insert ann_ table_ targetCols_ insData_ returning_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _returningOlib :: LocalIdentifierBindings+              _lhsOoriginalTree :: Statement+              _targetColsOcat :: Catalog+              _targetColsOlib :: LocalIdentifierBindings+              _insDataOcat :: Catalog+              _insDataOlib :: LocalIdentifierBindings+              _returningOcat :: Catalog+              _targetColsIannotatedTree :: StringList+              _targetColsIoriginalTree :: StringList+              _targetColsIstrings :: ([String])+              _insDataIannotatedTree :: SelectExpression+              _insDataIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _insDataIoriginalTree :: SelectExpression+              _returningIannotatedTree :: MaybeSelectList+              _returningIlistType :: (Maybe [(String,Type)])+              _returningIoriginalTree :: MaybeSelectList+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 12105 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 12110 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 12115 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12120 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 18, column 9)+              _tpe =+                  {-# LINE 18 "./TypeChecking/Dml.ag" #-}+                  dependsOnRTpe [getTypeAnnotation _insDataIannotatedTree] $ do+                    _columnTypes+                    Right $ Pseudo Void+                  {-# LINE 12127 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 22, column 9)+              _statementType =+                  {-# LINE 22 "./TypeChecking/Dml.ag" #-}+                  leftToEmpty (\ct -> [StatementType (getPlaceholderTypes _insDataAddedInferredTypes    ) (fromMaybe [] _returningIlistType)]) _columnTypes+                  {-# LINE 12132 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 25, column 9)+              _columnTypes =+                  {-# LINE 25 "./TypeChecking/Dml.ag" #-}+                  do+                  tys <- unwrapSetOfComposite $+                         getTypeAnnotation _insDataIannotatedTree+                  checkColumnConsistency _lhsIcat+                                         table_+                                         _targetColsIstrings+                                         tys+                  {-# LINE 12143 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 33, column 9)+              _insDataAddedInferredTypes =+                  {-# LINE 33 "./TypeChecking/Dml.ag" #-}+                  case _insDataIannotatedTree of+                    Values ann [exl] ->+                        let fargs = map snd (fromRight [] _columnTypes    ) ++ repeat TypeCheckFailed+                            newExl = map (\(ex,ty) -> updateAnnotation (++ [InferredType ty]) ex) $ zip exl fargs+                        in Values ann [newExl]+                    x -> x+                  {-# LINE 12153 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 41, column 9)+              _backTree =+                  {-# LINE 41 "./TypeChecking/Dml.ag" #-}+                  Insert ann_ table_ _targetColsIannotatedTree+                         _insDataAddedInferredTypes     _returningIannotatedTree+                  {-# LINE 12159 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 43, column 9)+              _catUpdates =+                  {-# LINE 43 "./TypeChecking/Dml.ag" #-}+                  []+                  {-# LINE 12164 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 49, column 9)+              _returningOlib =+                  {-# LINE 49 "./TypeChecking/Dml.ag" #-}+                  fromRight _lhsIlib $ do+                    atts <- catCompositeAttrs _lhsIcat relationComposites table_+                    updateBindings _lhsIlib _lhsIcat [LibStackIDs [("", atts)]]+                  {-# LINE 12171 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Insert ann_ table_ _targetColsIannotatedTree _insDataIannotatedTree _returningIannotatedTree+                  {-# LINE 12176 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Insert ann_ table_ _targetColsIoriginalTree _insDataIoriginalTree _returningIoriginalTree+                  {-# LINE 12181 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12186 "AstInternal.hs" #-}+              -- copy rule (down)+              _targetColsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12191 "AstInternal.hs" #-}+              -- copy rule (down)+              _targetColsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12196 "AstInternal.hs" #-}+              -- copy rule (down)+              _insDataOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12201 "AstInternal.hs" #-}+              -- copy rule (down)+              _insDataOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12206 "AstInternal.hs" #-}+              -- copy rule (down)+              _returningOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12211 "AstInternal.hs" #-}+              ( _targetColsIannotatedTree,_targetColsIoriginalTree,_targetColsIstrings) =+                  (targetCols_ _targetColsOcat _targetColsOlib )+              ( _insDataIannotatedTree,_insDataIlibUpdates,_insDataIoriginalTree) =+                  (insData_ _insDataOcat _insDataOlib )+              ( _returningIannotatedTree,_returningIlistType,_returningIoriginalTree) =+                  (returning_ _returningOcat _returningOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Notify :: Annotation ->+                        String ->+                        T_Statement +sem_Statement_Notify ann_ name_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12234 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12239 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12244 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Notify ann_ name_+                  {-# LINE 12249 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Notify ann_ name_+                  {-# LINE 12254 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 12259 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12264 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_NullStatement :: Annotation ->+                               T_Statement +sem_Statement_NullStatement ann_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12280 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12285 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  NullStatement ann_+                  {-# LINE 12290 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  NullStatement ann_+                  {-# LINE 12295 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 12300 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12305 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Perform :: Annotation ->+                         T_Expression  ->+                         T_Statement +sem_Statement_Perform ann_ expr_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _exprIoriginalTree :: Expression+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12327 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12332 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Perform ann_ _exprIannotatedTree+                  {-# LINE 12337 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Perform ann_ _exprIoriginalTree+                  {-# LINE 12342 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 12347 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12352 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12357 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12362 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Raise :: Annotation ->+                       T_RaiseType  ->+                       String ->+                       T_ExpressionList  ->+                       T_Statement +sem_Statement_Raise ann_ level_ message_ args_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _levelOcat :: Catalog+              _levelOlib :: LocalIdentifierBindings+              _argsOcat :: Catalog+              _argsOlib :: LocalIdentifierBindings+              _levelIannotatedTree :: RaiseType+              _levelIoriginalTree :: RaiseType+              _argsIannotatedTree :: ExpressionList+              _argsIoriginalTree :: ExpressionList+              _argsItypeList :: ([Type])+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12392 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12397 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Raise ann_ _levelIannotatedTree message_ _argsIannotatedTree+                  {-# LINE 12402 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Raise ann_ _levelIoriginalTree message_ _argsIoriginalTree+                  {-# LINE 12407 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 12412 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12417 "AstInternal.hs" #-}+              -- copy rule (down)+              _levelOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12422 "AstInternal.hs" #-}+              -- copy rule (down)+              _levelOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12427 "AstInternal.hs" #-}+              -- copy rule (down)+              _argsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12432 "AstInternal.hs" #-}+              -- copy rule (down)+              _argsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12437 "AstInternal.hs" #-}+              ( _levelIannotatedTree,_levelIoriginalTree) =+                  (level_ _levelOcat _levelOlib )+              ( _argsIannotatedTree,_argsIoriginalTree,_argsItypeList) =+                  (args_ _argsOcat _argsOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Return :: Annotation ->+                        T_MaybeExpression  ->+                        T_Statement +sem_Statement_Return ann_ value_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              _valueOcat :: Catalog+              _valueOlib :: LocalIdentifierBindings+              _valueIannotatedTree :: MaybeExpression+              _valueIoriginalTree :: MaybeExpression+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 12468 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 12473 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 12478 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12483 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 12, column 9)+              _tpe =+                  {-# LINE 12 "./TypeChecking/Plpgsql.ag" #-}+                  dependsOnRTpe [maybe typeBool+                                      getTypeAnnotation+                                      _valueIannotatedTree] $ Right $ Pseudo Void+                  {-# LINE 12490 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 16, column 9)+              _backTree =+                  {-# LINE 16 "./TypeChecking/Plpgsql.ag" #-}+                  Return ann_ _valueIannotatedTree+                  {-# LINE 12495 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 17, column 9)+              _catUpdates =+                  {-# LINE 17 "./TypeChecking/Plpgsql.ag" #-}+                  []+                  {-# LINE 12500 "AstInternal.hs" #-}+              -- "./TypeChecking/Plpgsql.ag"(line 18, column 9)+              _statementType =+                  {-# LINE 18 "./TypeChecking/Plpgsql.ag" #-}+                  []+                  {-# LINE 12505 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Return ann_ _valueIannotatedTree+                  {-# LINE 12510 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Return ann_ _valueIoriginalTree+                  {-# LINE 12515 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12520 "AstInternal.hs" #-}+              -- copy rule (down)+              _valueOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12525 "AstInternal.hs" #-}+              -- copy rule (down)+              _valueOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12530 "AstInternal.hs" #-}+              ( _valueIannotatedTree,_valueIoriginalTree) =+                  (value_ _valueOcat _valueOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_ReturnNext :: Annotation ->+                            T_Expression  ->+                            T_Statement +sem_Statement_ReturnNext ann_ expr_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _exprIoriginalTree :: Expression+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12554 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12559 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ReturnNext ann_ _exprIannotatedTree+                  {-# LINE 12564 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ReturnNext ann_ _exprIoriginalTree+                  {-# LINE 12569 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 12574 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12579 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12584 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12589 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_ReturnQuery :: Annotation ->+                             T_SelectExpression  ->+                             T_Statement +sem_Statement_ReturnQuery ann_ sel_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _selOcat :: Catalog+              _selOlib :: LocalIdentifierBindings+              _selIannotatedTree :: SelectExpression+              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _selIoriginalTree :: SelectExpression+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12613 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12618 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ReturnQuery ann_ _selIannotatedTree+                  {-# LINE 12623 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ReturnQuery ann_ _selIoriginalTree+                  {-# LINE 12628 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 12633 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12638 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12643 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12648 "AstInternal.hs" #-}+              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =+                  (sel_ _selOcat _selOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_SelectStatement :: Annotation ->+                                 T_SelectExpression  ->+                                 T_Statement +sem_Statement_SelectStatement ann_ ex_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _catUpdates :: ([CatalogUpdate])+              _lhsOoriginalTree :: Statement+              _exOcat :: Catalog+              _exOlib :: LocalIdentifierBindings+              _exIannotatedTree :: SelectExpression+              _exIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _exIoriginalTree :: SelectExpression+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 12678 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 12683 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 12688 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 14, column 9)+              _tpe =+                  {-# LINE 14 "./TypeChecking/SelectStatement.ag" #-}+                  dependsOnRTpe [getTypeAnnotation _exIannotatedTree] $ Right $ Pseudo Void+                  {-# LINE 12693 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 15, column 9)+              _statementType =+                  {-# LINE 15 "./TypeChecking/SelectStatement.ag" #-}+                  [StatementType (getPlaceholderTypes _exIannotatedTree) $ leftToEmpty id  $+                                      unwrapSetOfComposite $+                                      getTypeAnnotation _exIannotatedTree]+                  {-# LINE 12700 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 18, column 9)+              _backTree =+                  {-# LINE 18 "./TypeChecking/SelectStatement.ag" #-}+                  SelectStatement ann_ _exIannotatedTree+                  {-# LINE 12705 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectStatement.ag"(line 19, column 9)+              _catUpdates =+                  {-# LINE 19 "./TypeChecking/SelectStatement.ag" #-}+                  []+                  {-# LINE 12710 "AstInternal.hs" #-}+              -- "./TypeChecking/SelectLists.ag"(line 79, column 9)+              _libUpdates =+                  {-# LINE 79 "./TypeChecking/SelectLists.ag" #-}+                  _exIlibUpdates+                  {-# LINE 12715 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SelectStatement ann_ _exIannotatedTree+                  {-# LINE 12720 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SelectStatement ann_ _exIoriginalTree+                  {-# LINE 12725 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12730 "AstInternal.hs" #-}+              -- copy rule (down)+              _exOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12735 "AstInternal.hs" #-}+              -- copy rule (down)+              _exOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12740 "AstInternal.hs" #-}+              ( _exIannotatedTree,_exIlibUpdates,_exIoriginalTree) =+                  (ex_ _exOcat _exOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Set :: Annotation ->+                     String ->+                     ([SetValue]) ->+                     T_Statement +sem_Statement_Set ann_ name_ values_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12760 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12765 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12770 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Set ann_ name_ values_+                  {-# LINE 12775 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Set ann_ name_ values_+                  {-# LINE 12780 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 12785 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12790 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Truncate :: Annotation ->+                          T_StringList  ->+                          T_RestartIdentity  ->+                          T_Cascade  ->+                          T_Statement +sem_Statement_Truncate ann_ tables_ restartIdentity_ cascade_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _tablesOcat :: Catalog+              _tablesOlib :: LocalIdentifierBindings+              _restartIdentityOcat :: Catalog+              _restartIdentityOlib :: LocalIdentifierBindings+              _cascadeOcat :: Catalog+              _cascadeOlib :: LocalIdentifierBindings+              _tablesIannotatedTree :: StringList+              _tablesIoriginalTree :: StringList+              _tablesIstrings :: ([String])+              _restartIdentityIannotatedTree :: RestartIdentity+              _restartIdentityIoriginalTree :: RestartIdentity+              _cascadeIannotatedTree :: Cascade+              _cascadeIoriginalTree :: Cascade+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12822 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12827 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Truncate ann_ _tablesIannotatedTree _restartIdentityIannotatedTree _cascadeIannotatedTree+                  {-# LINE 12832 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Truncate ann_ _tablesIoriginalTree _restartIdentityIoriginalTree _cascadeIoriginalTree+                  {-# LINE 12837 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 12842 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 12847 "AstInternal.hs" #-}+              -- copy rule (down)+              _tablesOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12852 "AstInternal.hs" #-}+              -- copy rule (down)+              _tablesOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12857 "AstInternal.hs" #-}+              -- copy rule (down)+              _restartIdentityOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12862 "AstInternal.hs" #-}+              -- copy rule (down)+              _restartIdentityOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12867 "AstInternal.hs" #-}+              -- copy rule (down)+              _cascadeOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 12872 "AstInternal.hs" #-}+              -- copy rule (down)+              _cascadeOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 12877 "AstInternal.hs" #-}+              ( _tablesIannotatedTree,_tablesIoriginalTree,_tablesIstrings) =+                  (tables_ _tablesOcat _tablesOlib )+              ( _restartIdentityIannotatedTree,_restartIdentityIoriginalTree) =+                  (restartIdentity_ _restartIdentityOcat _restartIdentityOlib )+              ( _cascadeIannotatedTree,_cascadeIoriginalTree) =+                  (cascade_ _cascadeOcat _cascadeOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_Update :: Annotation ->+                        String ->+                        T_SetClauseList  ->+                        T_MaybeBoolExpression  ->+                        T_MaybeSelectList  ->+                        T_Statement +sem_Statement_Update ann_ table_ assigns_ whr_ returning_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Statement+              _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tpe :: (Either [TypeError] Type)+              _assignWInferredTypes :: SetClauseList+              _catUpdates :: ([CatalogUpdate])+              _whrOlib :: LocalIdentifierBindings+              _assignsOlib :: LocalIdentifierBindings+              _returningOlib :: LocalIdentifierBindings+              _lhsOoriginalTree :: Statement+              _assignsOcat :: Catalog+              _whrOcat :: Catalog+              _returningOcat :: Catalog+              _assignsIannotatedTree :: SetClauseList+              _assignsIoriginalTree :: SetClauseList+              _assignsIpairs :: ([(String,Type)])+              _assignsIrowSetErrors :: ([TypeError])+              _whrIannotatedTree :: MaybeBoolExpression+              _whrIoriginalTree :: MaybeBoolExpression+              _returningIannotatedTree :: MaybeSelectList+              _returningIlistType :: (Maybe [(String,Type)])+              _returningIoriginalTree :: MaybeSelectList+              -- "./TypeChecking/Statements.ag"(line 61, column 9)+              _lhsOannotatedTree =+                  {-# LINE 61 "./TypeChecking/Statements.ag" #-}+                  annTypesAndErrors _backTree+                    (tpeToT _tpe    )+                    (getErrors _tpe    )+                    $ Just (map StatementTypeA _statementType     +++                            [CatUpdates _catUpdates    ])+                  {-# LINE 12925 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 67, column 9)+              _lhsOcatUpdates =+                  {-# LINE 67 "./TypeChecking/Statements.ag" #-}+                  _catUpdates+                  {-# LINE 12930 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 68, column 9)+              _lhsOlibUpdates =+                  {-# LINE 68 "./TypeChecking/Statements.ag" #-}+                  _libUpdates+                  {-# LINE 12935 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 73, column 9)+              _libUpdates =+                  {-# LINE 73 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 12940 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 65, column 9)+              _tpe =+                  {-# LINE 65 "./TypeChecking/Dml.ag" #-}+                  do+                  checkRelationExists _lhsIcat table_+                  dependsOnRTpe (map snd _assignsIpairs) $ do+                    _columnTypes+                    liftErrors _assignsIrowSetErrors+                    return $ Pseudo Void+                  {-# LINE 12950 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 72, column 9)+              _statementType =+                  {-# LINE 72 "./TypeChecking/Dml.ag" #-}+                  leftToEmpty (\ct -> [StatementType (getPlaceholderTypes _assignWInferredTypes+                                                      ++ getPlaceholderTypes _whrIannotatedTree)+                                                     (fromMaybe [] _returningIlistType)])+                     _columnTypes+                  {-# LINE 12958 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 78, column 9)+              _columnTypes =+                  {-# LINE 78 "./TypeChecking/Dml.ag" #-}+                  checkColumnConsistency _lhsIcat+                                         table_+                                         (map fst _assignsIpairs)+                                         _assignsIpairs+                  {-# LINE 12966 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 84, column 9)+              _assignWInferredTypes =+                  {-# LINE 84 "./TypeChecking/Dml.ag" #-}+                  let colTypes :: [Type]+                      colTypes = (map snd $ fromRight [] _columnTypes    )+                  in setInferredTypesG colTypes _assignsIannotatedTree+                  {-# LINE 12973 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 89, column 9)+              _backTree =+                  {-# LINE 89 "./TypeChecking/Dml.ag" #-}+                  Update ann_+                         table_+                         _assignWInferredTypes+                         _whrIannotatedTree+                         _returningIannotatedTree+                  {-# LINE 12982 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 94, column 9)+              _catUpdates =+                  {-# LINE 94 "./TypeChecking/Dml.ag" #-}+                  []+                  {-# LINE 12987 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 114, column 9)+              _lib =+                  {-# LINE 114 "./TypeChecking/Dml.ag" #-}+                  fromRight _lhsIlib $ do+                  ct <- catCompositeAttrs _lhsIcat+                                          relationComposites+                                          table_+                  updateBindings _lhsIlib _lhsIcat [LibStackIDs [("", ct)]]+                  {-# LINE 12996 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 120, column 9)+              _whrOlib =+                  {-# LINE 120 "./TypeChecking/Dml.ag" #-}+                  _lib+                  {-# LINE 13001 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 121, column 9)+              _assignsOlib =+                  {-# LINE 121 "./TypeChecking/Dml.ag" #-}+                  _lib+                  {-# LINE 13006 "AstInternal.hs" #-}+              -- "./TypeChecking/Dml.ag"(line 122, column 9)+              _returningOlib =+                  {-# LINE 122 "./TypeChecking/Dml.ag" #-}+                  _lib+                  {-# LINE 13011 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Update ann_ table_ _assignsIannotatedTree _whrIannotatedTree _returningIannotatedTree+                  {-# LINE 13016 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Update ann_ table_ _assignsIoriginalTree _whrIoriginalTree _returningIoriginalTree+                  {-# LINE 13021 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13026 "AstInternal.hs" #-}+              -- copy rule (down)+              _assignsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 13031 "AstInternal.hs" #-}+              -- copy rule (down)+              _whrOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 13036 "AstInternal.hs" #-}+              -- copy rule (down)+              _returningOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 13041 "AstInternal.hs" #-}+              ( _assignsIannotatedTree,_assignsIoriginalTree,_assignsIpairs,_assignsIrowSetErrors) =+                  (assigns_ _assignsOcat _assignsOlib )+              ( _whrIannotatedTree,_whrIoriginalTree) =+                  (whr_ _whrOcat _whrOlib )+              ( _returningIannotatedTree,_returningIlistType,_returningIoriginalTree) =+                  (returning_ _returningOcat _returningOlib )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_Statement_WhileStatement :: Annotation ->+                                T_Expression  ->+                                T_StatementList  ->+                                T_Statement +sem_Statement_WhileStatement ann_ expr_ sts_  =+    (\ _lhsIcat+       _lhsIinProducedCat+       _lhsIlib ->+         (let _lhsOcatUpdates :: ([CatalogUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _stsOcatUpdates :: ([CatalogUpdate])+              _stsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: Statement+              _lhsOoriginalTree :: Statement+              _exprOcat :: Catalog+              _exprOlib :: LocalIdentifierBindings+              _stsOcat :: Catalog+              _stsOlib :: LocalIdentifierBindings+              _exprIannotatedTree :: Expression+              _exprIliftedColumnName :: String+              _exprIoriginalTree :: Expression+              _stsIannotatedTree :: StatementList+              _stsIoriginalTree :: StatementList+              _stsIproducedCat :: Catalog+              _stsIproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 89, column 9)+              _lhsOcatUpdates =+                  {-# LINE 89 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 13078 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 90, column 9)+              _lhsOlibUpdates =+                  {-# LINE 90 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 13083 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 110, column 9)+              _stsOcatUpdates =+                  {-# LINE 110 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 13088 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 111, column 9)+              _stsOlibUpdates =+                  {-# LINE 111 "./TypeChecking/Statements.ag" #-}+                  []+                  {-# LINE 13093 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  WhileStatement ann_ _exprIannotatedTree _stsIannotatedTree+                  {-# LINE 13098 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  WhileStatement ann_ _exprIoriginalTree _stsIoriginalTree+                  {-# LINE 13103 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13108 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13113 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 13118 "AstInternal.hs" #-}+              -- copy rule (down)+              _exprOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 13123 "AstInternal.hs" #-}+              -- copy rule (down)+              _stsOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 13128 "AstInternal.hs" #-}+              -- copy rule (down)+              _stsOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 13133 "AstInternal.hs" #-}+              ( _exprIannotatedTree,_exprIliftedColumnName,_exprIoriginalTree) =+                  (expr_ _exprOcat _exprOlib )+              ( _stsIannotatedTree,_stsIoriginalTree,_stsIproducedCat,_stsIproducedLib) =+                  (sts_ _stsOcat _stsOcatUpdates _stsOlib _stsOlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOcatUpdates,_lhsOlibUpdates,_lhsOoriginalTree)))+-- StatementList -----------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         catUpdates           : [CatalogUpdate]+         lib                  : LocalIdentifierBindings+         libUpdates           : [LocalIdentifierBindingsUpdate]+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +         producedCat          : Catalog+         producedLib          : LocalIdentifierBindings+   alternatives:+      alternative Cons:+         child hd             : Statement +         child tl             : StatementList +         visit 0:+            local newCat      : _+            local newLib      : _+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local newCat      : _+            local newLib      : _+            local annotatedTree : _+            local originalTree : _+-}+type StatementList  = [(Statement)]+-- cata+sem_StatementList :: StatementList  ->+                     T_StatementList +sem_StatementList list  =+    (Prelude.foldr sem_StatementList_Cons sem_StatementList_Nil (Prelude.map sem_Statement list) )+-- semantic domain+type T_StatementList  = Catalog ->+                        ([CatalogUpdate]) ->+                        LocalIdentifierBindings ->+                        ([LocalIdentifierBindingsUpdate]) ->+                        ( StatementList,StatementList,Catalog,LocalIdentifierBindings)+data Inh_StatementList  = Inh_StatementList {cat_Inh_StatementList :: Catalog,catUpdates_Inh_StatementList :: [CatalogUpdate],lib_Inh_StatementList :: LocalIdentifierBindings,libUpdates_Inh_StatementList :: [LocalIdentifierBindingsUpdate]}+data Syn_StatementList  = Syn_StatementList {annotatedTree_Syn_StatementList :: StatementList,originalTree_Syn_StatementList :: StatementList,producedCat_Syn_StatementList :: Catalog,producedLib_Syn_StatementList :: LocalIdentifierBindings}+wrap_StatementList :: T_StatementList  ->+                      Inh_StatementList  ->+                      Syn_StatementList +wrap_StatementList sem (Inh_StatementList _lhsIcat _lhsIcatUpdates _lhsIlib _lhsIlibUpdates )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedCat,_lhsOproducedLib) =+             (sem _lhsIcat _lhsIcatUpdates _lhsIlib _lhsIlibUpdates )+     in  (Syn_StatementList _lhsOannotatedTree _lhsOoriginalTree _lhsOproducedCat _lhsOproducedLib ))+sem_StatementList_Cons :: T_Statement  ->+                          T_StatementList  ->+                          T_StatementList +sem_StatementList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIcatUpdates+       _lhsIlib+       _lhsIlibUpdates ->+         (let _hdOcat :: Catalog+              _tlOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOlib :: LocalIdentifierBindings+              _lhsOproducedCat :: Catalog+              _lhsOproducedLib :: LocalIdentifierBindings+              _tlOcatUpdates :: ([CatalogUpdate])+              _tlOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _hdOinProducedCat :: Catalog+              _lhsOannotatedTree :: StatementList+              _lhsOoriginalTree :: StatementList+              _hdIannotatedTree :: Statement+              _hdIcatUpdates :: ([CatalogUpdate])+              _hdIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _hdIoriginalTree :: Statement+              _tlIannotatedTree :: StatementList+              _tlIoriginalTree :: StatementList+              _tlIproducedCat :: Catalog+              _tlIproducedLib :: LocalIdentifierBindings+              -- "./TypeChecking/Statements.ag"(line 36, column 9)+              _newCat =+                  {-# LINE 36 "./TypeChecking/Statements.ag" #-}+                  fromRight _lhsIcat $ updateCatalog _lhsIcat _lhsIcatUpdates+                  {-# LINE 13220 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 37, column 9)+              _newLib =+                  {-# LINE 37 "./TypeChecking/Statements.ag" #-}+                  fromRight _lhsIlib $ updateBindings _lhsIlib _lhsIcat _lhsIlibUpdates+                  {-# LINE 13225 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 39, column 9)+              _hdOcat =+                  {-# LINE 39 "./TypeChecking/Statements.ag" #-}+                  _newCat+                  {-# LINE 13230 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 40, column 9)+              _tlOcat =+                  {-# LINE 40 "./TypeChecking/Statements.ag" #-}+                  _newCat+                  {-# LINE 13235 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 41, column 9)+              _hdOlib =+                  {-# LINE 41 "./TypeChecking/Statements.ag" #-}+                  _newLib+                  {-# LINE 13240 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 42, column 9)+              _tlOlib =+                  {-# LINE 42 "./TypeChecking/Statements.ag" #-}+                  _newLib+                  {-# LINE 13245 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 46, column 9)+              _lhsOproducedCat =+                  {-# LINE 46 "./TypeChecking/Statements.ag" #-}+                  _tlIproducedCat+                  {-# LINE 13250 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 47, column 9)+              _lhsOproducedLib =+                  {-# LINE 47 "./TypeChecking/Statements.ag" #-}+                  _tlIproducedLib+                  {-# LINE 13255 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 50, column 9)+              _tlOcatUpdates =+                  {-# LINE 50 "./TypeChecking/Statements.ag" #-}+                  _hdIcatUpdates+                  {-# LINE 13260 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 51, column 9)+              _tlOlibUpdates =+                  {-# LINE 51 "./TypeChecking/Statements.ag" #-}+                  _hdIlibUpdates+                  {-# LINE 13265 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 76, column 12)+              _hdOinProducedCat =+                  {-# LINE 76 "./TypeChecking/Statements.ag" #-}+                  _tlIproducedCat+                  {-# LINE 13270 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 13275 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 13280 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13285 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13290 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIcatUpdates,_hdIlibUpdates,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOinProducedCat _hdOlib )+              ( _tlIannotatedTree,_tlIoriginalTree,_tlIproducedCat,_tlIproducedLib) =+                  (tl_ _tlOcat _tlOcatUpdates _tlOlib _tlOlibUpdates )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedCat,_lhsOproducedLib)))+sem_StatementList_Nil :: T_StatementList +sem_StatementList_Nil  =+    (\ _lhsIcat+       _lhsIcatUpdates+       _lhsIlib+       _lhsIlibUpdates ->+         (let _lhsOproducedCat :: Catalog+              _lhsOproducedLib :: LocalIdentifierBindings+              _lhsOannotatedTree :: StatementList+              _lhsOoriginalTree :: StatementList+              -- "./TypeChecking/Statements.ag"(line 36, column 9)+              _newCat =+                  {-# LINE 36 "./TypeChecking/Statements.ag" #-}+                  fromRight _lhsIcat $ updateCatalog _lhsIcat _lhsIcatUpdates+                  {-# LINE 13310 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 37, column 9)+              _newLib =+                  {-# LINE 37 "./TypeChecking/Statements.ag" #-}+                  fromRight _lhsIlib $ updateBindings _lhsIlib _lhsIcat _lhsIlibUpdates+                  {-# LINE 13315 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 53, column 9)+              _lhsOproducedCat =+                  {-# LINE 53 "./TypeChecking/Statements.ag" #-}+                  _newCat+                  {-# LINE 13320 "AstInternal.hs" #-}+              -- "./TypeChecking/Statements.ag"(line 54, column 9)+              _lhsOproducedLib =+                  {-# LINE 54 "./TypeChecking/Statements.ag" #-}+                  _newLib+                  {-# LINE 13325 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 13330 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 13335 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13340 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13345 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOproducedCat,_lhsOproducedLib)))+-- StringList --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +         strings              : [String]+   alternatives:+      alternative Cons:+         child hd             : {String}+         child tl             : StringList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type StringList  = [(String)]+-- cata+sem_StringList :: StringList  ->+                  T_StringList +sem_StringList list  =+    (Prelude.foldr sem_StringList_Cons sem_StringList_Nil list )+-- semantic domain+type T_StringList  = Catalog ->+                     LocalIdentifierBindings ->+                     ( StringList,StringList,([String]))+data Inh_StringList  = Inh_StringList {cat_Inh_StringList :: Catalog,lib_Inh_StringList :: LocalIdentifierBindings}+data Syn_StringList  = Syn_StringList {annotatedTree_Syn_StringList :: StringList,originalTree_Syn_StringList :: StringList,strings_Syn_StringList :: [String]}+wrap_StringList :: T_StringList  ->+                   Inh_StringList  ->+                   Syn_StringList +wrap_StringList sem (Inh_StringList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOstrings) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_StringList _lhsOannotatedTree _lhsOoriginalTree _lhsOstrings ))+sem_StringList_Cons :: String ->+                       T_StringList  ->+                       T_StringList +sem_StringList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOstrings :: ([String])+              _lhsOannotatedTree :: StringList+              _lhsOoriginalTree :: StringList+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _tlIannotatedTree :: StringList+              _tlIoriginalTree :: StringList+              _tlIstrings :: ([String])+              -- "./TypeChecking/Misc.ag"(line 67, column 10)+              _lhsOstrings =+                  {-# LINE 67 "./TypeChecking/Misc.ag" #-}+                  hd_ : _tlIstrings+                  {-# LINE 13406 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) hd_ _tlIannotatedTree+                  {-# LINE 13411 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) hd_ _tlIoriginalTree+                  {-# LINE 13416 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13421 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13426 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 13431 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 13436 "AstInternal.hs" #-}+              ( _tlIannotatedTree,_tlIoriginalTree,_tlIstrings) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOstrings)))+sem_StringList_Nil :: T_StringList +sem_StringList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOstrings :: ([String])+              _lhsOannotatedTree :: StringList+              _lhsOoriginalTree :: StringList+              -- "./TypeChecking/Misc.ag"(line 68, column 9)+              _lhsOstrings =+                  {-# LINE 68 "./TypeChecking/Misc.ag" #-}+                  []+                  {-# LINE 13451 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 13456 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 13461 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13466 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13471 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree,_lhsOstrings)))+-- StringTypeNameListPair --------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         fnSig                : (String,[Type])+         originalTree         : SELF +   alternatives:+      alternative Tuple:+         child x1             : {String}+         child x2             : TypeNameList +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type StringTypeNameListPair  = ( (String),(TypeNameList))+-- cata+sem_StringTypeNameListPair :: StringTypeNameListPair  ->+                              T_StringTypeNameListPair +sem_StringTypeNameListPair ( x1,x2)  =+    (sem_StringTypeNameListPair_Tuple x1 (sem_TypeNameList x2 ) )+-- semantic domain+type T_StringTypeNameListPair  = Catalog ->+                                 LocalIdentifierBindings ->+                                 ( StringTypeNameListPair,((String,[Type])),StringTypeNameListPair)+data Inh_StringTypeNameListPair  = Inh_StringTypeNameListPair {cat_Inh_StringTypeNameListPair :: Catalog,lib_Inh_StringTypeNameListPair :: LocalIdentifierBindings}+data Syn_StringTypeNameListPair  = Syn_StringTypeNameListPair {annotatedTree_Syn_StringTypeNameListPair :: StringTypeNameListPair,fnSig_Syn_StringTypeNameListPair :: (String,[Type]),originalTree_Syn_StringTypeNameListPair :: StringTypeNameListPair}+wrap_StringTypeNameListPair :: T_StringTypeNameListPair  ->+                               Inh_StringTypeNameListPair  ->+                               Syn_StringTypeNameListPair +wrap_StringTypeNameListPair sem (Inh_StringTypeNameListPair _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOfnSig,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_StringTypeNameListPair _lhsOannotatedTree _lhsOfnSig _lhsOoriginalTree ))+sem_StringTypeNameListPair_Tuple :: String ->+                                    T_TypeNameList  ->+                                    T_StringTypeNameListPair +sem_StringTypeNameListPair_Tuple x1_ x2_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOfnSig :: ((String,[Type]))+              _lhsOannotatedTree :: StringTypeNameListPair+              _lhsOoriginalTree :: StringTypeNameListPair+              _x2Ocat :: Catalog+              _x2Olib :: LocalIdentifierBindings+              _x2IannotatedTree :: TypeNameList+              _x2InamedTypes :: ([Type])+              _x2IoriginalTree :: TypeNameList+              -- "./TypeChecking/Drops.ag"(line 25, column 13)+              _lhsOfnSig =+                  {-# LINE 25 "./TypeChecking/Drops.ag" #-}+                  (x1_, _x2InamedTypes)+                  {-# LINE 13528 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (x1_,_x2IannotatedTree)+                  {-# LINE 13533 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (x1_,_x2IoriginalTree)+                  {-# LINE 13538 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13543 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13548 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 13553 "AstInternal.hs" #-}+              -- copy rule (down)+              _x2Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 13558 "AstInternal.hs" #-}+              ( _x2IannotatedTree,_x2InamedTypes,_x2IoriginalTree) =+                  (x2_ _x2Ocat _x2Olib )+          in  ( _lhsOannotatedTree,_lhsOfnSig,_lhsOoriginalTree)))+-- StringTypeNameListPairList ----------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         fnSigs               : [(String,[Type])]+         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : StringTypeNameListPair +         child tl             : StringTypeNameListPairList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type StringTypeNameListPairList  = [(StringTypeNameListPair)]+-- cata+sem_StringTypeNameListPairList :: StringTypeNameListPairList  ->+                                  T_StringTypeNameListPairList +sem_StringTypeNameListPairList list  =+    (Prelude.foldr sem_StringTypeNameListPairList_Cons sem_StringTypeNameListPairList_Nil (Prelude.map sem_StringTypeNameListPair list) )+-- semantic domain+type T_StringTypeNameListPairList  = Catalog ->+                                     LocalIdentifierBindings ->+                                     ( StringTypeNameListPairList,([(String,[Type])]),StringTypeNameListPairList)+data Inh_StringTypeNameListPairList  = Inh_StringTypeNameListPairList {cat_Inh_StringTypeNameListPairList :: Catalog,lib_Inh_StringTypeNameListPairList :: LocalIdentifierBindings}+data Syn_StringTypeNameListPairList  = Syn_StringTypeNameListPairList {annotatedTree_Syn_StringTypeNameListPairList :: StringTypeNameListPairList,fnSigs_Syn_StringTypeNameListPairList :: [(String,[Type])],originalTree_Syn_StringTypeNameListPairList :: StringTypeNameListPairList}+wrap_StringTypeNameListPairList :: T_StringTypeNameListPairList  ->+                                   Inh_StringTypeNameListPairList  ->+                                   Syn_StringTypeNameListPairList +wrap_StringTypeNameListPairList sem (Inh_StringTypeNameListPairList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOfnSigs,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_StringTypeNameListPairList _lhsOannotatedTree _lhsOfnSigs _lhsOoriginalTree ))+sem_StringTypeNameListPairList_Cons :: T_StringTypeNameListPair  ->+                                       T_StringTypeNameListPairList  ->+                                       T_StringTypeNameListPairList +sem_StringTypeNameListPairList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOfnSigs :: ([(String,[Type])])+              _lhsOannotatedTree :: StringTypeNameListPairList+              _lhsOoriginalTree :: StringTypeNameListPairList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: StringTypeNameListPair+              _hdIfnSig :: ((String,[Type]))+              _hdIoriginalTree :: StringTypeNameListPair+              _tlIannotatedTree :: StringTypeNameListPairList+              _tlIfnSigs :: ([(String,[Type])])+              _tlIoriginalTree :: StringTypeNameListPairList+              -- "./TypeChecking/Drops.ag"(line 20, column 12)+              _lhsOfnSigs =+                  {-# LINE 20 "./TypeChecking/Drops.ag" #-}+                  _hdIfnSig : _tlIfnSigs+                  {-# LINE 13626 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 13631 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 13636 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13641 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13646 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 13651 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 13656 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 13661 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 13666 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIfnSig,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIfnSigs,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOfnSigs,_lhsOoriginalTree)))+sem_StringTypeNameListPairList_Nil :: T_StringTypeNameListPairList +sem_StringTypeNameListPairList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOfnSigs :: ([(String,[Type])])+              _lhsOannotatedTree :: StringTypeNameListPairList+              _lhsOoriginalTree :: StringTypeNameListPairList+              -- "./TypeChecking/Drops.ag"(line 21, column 11)+              _lhsOfnSigs =+                  {-# LINE 21 "./TypeChecking/Drops.ag" #-}+                  []+                  {-# LINE 13683 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 13688 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 13693 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13698 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13703 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOfnSigs,_lhsOoriginalTree)))+-- TableAlias --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative FullAlias:+         child alias          : {String}+         child cols           : {[String]}+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative NoAlias:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative TableAlias:+         child alias          : {String}+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data TableAlias  = FullAlias (String) ([String]) +                 | NoAlias +                 | TableAlias (String) +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TableAlias :: TableAlias  ->+                  T_TableAlias +sem_TableAlias (FullAlias _alias _cols )  =+    (sem_TableAlias_FullAlias _alias _cols )+sem_TableAlias (NoAlias )  =+    (sem_TableAlias_NoAlias )+sem_TableAlias (TableAlias _alias )  =+    (sem_TableAlias_TableAlias _alias )+-- semantic domain+type T_TableAlias  = Catalog ->+                     LocalIdentifierBindings ->+                     ( TableAlias,TableAlias)+data Inh_TableAlias  = Inh_TableAlias {cat_Inh_TableAlias :: Catalog,lib_Inh_TableAlias :: LocalIdentifierBindings}+data Syn_TableAlias  = Syn_TableAlias {annotatedTree_Syn_TableAlias :: TableAlias,originalTree_Syn_TableAlias :: TableAlias}+wrap_TableAlias :: T_TableAlias  ->+                   Inh_TableAlias  ->+                   Syn_TableAlias +wrap_TableAlias sem (Inh_TableAlias _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_TableAlias _lhsOannotatedTree _lhsOoriginalTree ))+sem_TableAlias_FullAlias :: String ->+                            ([String]) ->+                            T_TableAlias +sem_TableAlias_FullAlias alias_ cols_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TableAlias+              _lhsOoriginalTree :: TableAlias+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  FullAlias alias_ cols_+                  {-# LINE 13769 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  FullAlias alias_ cols_+                  {-# LINE 13774 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13779 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13784 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_TableAlias_NoAlias :: T_TableAlias +sem_TableAlias_NoAlias  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TableAlias+              _lhsOoriginalTree :: TableAlias+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  NoAlias+                  {-# LINE 13796 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  NoAlias+                  {-# LINE 13801 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13806 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13811 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_TableAlias_TableAlias :: String ->+                             T_TableAlias +sem_TableAlias_TableAlias alias_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TableAlias+              _lhsOoriginalTree :: TableAlias+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  TableAlias alias_+                  {-# LINE 13824 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  TableAlias alias_+                  {-# LINE 13829 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 13834 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 13839 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- TableRef ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         jlibUpdates          : [LocalIdentifierBindingsUpdate]+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         idLookups            : [(String,Type)]+         libUpdates           : [LocalIdentifierBindingsUpdate]+         originalTree         : SELF +         qidLookups           : [(String,[(String,Type)])]+         qstarExpansion       : [(String,[(String,Type)])]+         starExpansion        : [(String,Type)]+   alternatives:+      alternative JoinedTref:+         child ann            : {Annotation}+         child tbl            : TableRef +         child nat            : Natural +         child joinType       : JoinType +         child tbl1           : TableRef +         child onExpr         : OnExpr +         child alias          : TableAlias +         visit 0:+            local libUpdates  : _+            local errs        : _+            local removeJoinAttrs : _+            local ejoinAttrs  : {Either [TypeError] [(String,Type)]}+            local joinNames   : _+            local joinAttrs   : _+            local idLookups   : {[(String,Type)]}+            local qidLookups  : {[(String,[(String,Type)])]}+            local starExpansion : {[(String,Type)]}+            local qstarExpansion : {[(String,[(String,Type)])]}+            local newLib      : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative SubTref:+         child ann            : {Annotation}+         child sel            : SelectExpression +         child alias          : TableAlias +         visit 0:+            local libUpdates  : _+            local errs        : _+            local selectAttrs : {Either [TypeError] [(String,Type)]}+            local idLookups   : {[(String,Type)]}+            local qidLookups  : {[(String,[(String,Type)])]}+            local starExpansion : {[(String,Type)]}+            local qstarExpansion : {[(String,[(String,Type)])]}+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative Tref:+         child ann            : {Annotation}+         child tbl            : {String}+         child alias          : TableAlias +         visit 0:+            local libUpdates  : _+            local errs        : _+            local relType     : {Either [TypeError] ([(String, Type)], [(String, Type)])}+            local relType1    : _+            local pAttrs      : _+            local sAttrs      : _+            local idLookups   : {[(String,Type)]}+            local alias       : _+            local qidLookups  : {[(String,[(String,Type)])]}+            local starExpansion : {[(String,Type)]}+            local qstarExpansion : {[(String,[(String,Type)])]}+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative TrefFun:+         child ann            : {Annotation}+         child fn             : Expression +         child alias          : TableAlias +         visit 0:+            local libUpdates  : _+            local errs        : _+            local eqfunIdens  : {Either [TypeError] (String,[(String,Type)])}+            local qfunIdens   : _+            local alias2      : _+            local funIdens    : _+            local alias       : _+            local idLookups   : {[(String,Type)]}+            local qidLookups  : {[(String,[(String,Type)])]}+            local starExpansion : {[(String,Type)]}+            local qstarExpansion : {[(String,[(String,Type)])]}+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+-}+data TableRef  = JoinedTref (Annotation) (TableRef) (Natural) (JoinType) (TableRef) (OnExpr) (TableAlias) +               | SubTref (Annotation) (SelectExpression) (TableAlias) +               | Tref (Annotation) (String) (TableAlias) +               | TrefFun (Annotation) (Expression) (TableAlias) +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TableRef :: TableRef  ->+                T_TableRef +sem_TableRef (JoinedTref _ann _tbl _nat _joinType _tbl1 _onExpr _alias )  =+    (sem_TableRef_JoinedTref _ann (sem_TableRef _tbl ) (sem_Natural _nat ) (sem_JoinType _joinType ) (sem_TableRef _tbl1 ) (sem_OnExpr _onExpr ) (sem_TableAlias _alias ) )+sem_TableRef (SubTref _ann _sel _alias )  =+    (sem_TableRef_SubTref _ann (sem_SelectExpression _sel ) (sem_TableAlias _alias ) )+sem_TableRef (Tref _ann _tbl _alias )  =+    (sem_TableRef_Tref _ann _tbl (sem_TableAlias _alias ) )+sem_TableRef (TrefFun _ann _fn _alias )  =+    (sem_TableRef_TrefFun _ann (sem_Expression _fn ) (sem_TableAlias _alias ) )+-- semantic domain+type T_TableRef  = Catalog ->+                   ([LocalIdentifierBindingsUpdate]) ->+                   LocalIdentifierBindings ->+                   ( TableRef,([(String,Type)]),([LocalIdentifierBindingsUpdate]),TableRef,([(String,[(String,Type)])]),([(String,[(String,Type)])]),([(String,Type)]))+data Inh_TableRef  = Inh_TableRef {cat_Inh_TableRef :: Catalog,jlibUpdates_Inh_TableRef :: [LocalIdentifierBindingsUpdate],lib_Inh_TableRef :: LocalIdentifierBindings}+data Syn_TableRef  = Syn_TableRef {annotatedTree_Syn_TableRef :: TableRef,idLookups_Syn_TableRef :: [(String,Type)],libUpdates_Syn_TableRef :: [LocalIdentifierBindingsUpdate],originalTree_Syn_TableRef :: TableRef,qidLookups_Syn_TableRef :: [(String,[(String,Type)])],qstarExpansion_Syn_TableRef :: [(String,[(String,Type)])],starExpansion_Syn_TableRef :: [(String,Type)]}+wrap_TableRef :: T_TableRef  ->+                 Inh_TableRef  ->+                 Syn_TableRef +wrap_TableRef sem (Inh_TableRef _lhsIcat _lhsIjlibUpdates _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion) =+             (sem _lhsIcat _lhsIjlibUpdates _lhsIlib )+     in  (Syn_TableRef _lhsOannotatedTree _lhsOidLookups _lhsOlibUpdates _lhsOoriginalTree _lhsOqidLookups _lhsOqstarExpansion _lhsOstarExpansion ))+sem_TableRef_JoinedTref :: Annotation ->+                           T_TableRef  ->+                           T_Natural  ->+                           T_JoinType  ->+                           T_TableRef  ->+                           T_OnExpr  ->+                           T_TableAlias  ->+                           T_TableRef +sem_TableRef_JoinedTref ann_ tbl_ nat_ joinType_ tbl1_ onExpr_ alias_  =+    (\ _lhsIcat+       _lhsIjlibUpdates+       _lhsIlib ->+         (let _lhsOannotatedTree :: TableRef+              _ejoinAttrs :: (Either [TypeError] [(String,Type)])+              _idLookups :: ([(String,Type)])+              _qidLookups :: ([(String,[(String,Type)])])+              _starExpansion :: ([(String,Type)])+              _qstarExpansion :: ([(String,[(String,Type)])])+              _onExprOlib :: LocalIdentifierBindings+              _tblOjlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tbl1OjlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOidLookups :: ([(String,Type)])+              _lhsOqidLookups :: ([(String,[(String,Type)])])+              _lhsOstarExpansion :: ([(String,Type)])+              _lhsOqstarExpansion :: ([(String,[(String,Type)])])+              _lhsOoriginalTree :: TableRef+              _tblOcat :: Catalog+              _tblOlib :: LocalIdentifierBindings+              _natOcat :: Catalog+              _natOlib :: LocalIdentifierBindings+              _joinTypeOcat :: Catalog+              _joinTypeOlib :: LocalIdentifierBindings+              _tbl1Ocat :: Catalog+              _tbl1Olib :: LocalIdentifierBindings+              _onExprOcat :: Catalog+              _aliasOcat :: Catalog+              _aliasOlib :: LocalIdentifierBindings+              _tblIannotatedTree :: TableRef+              _tblIidLookups :: ([(String,Type)])+              _tblIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tblIoriginalTree :: TableRef+              _tblIqidLookups :: ([(String,[(String,Type)])])+              _tblIqstarExpansion :: ([(String,[(String,Type)])])+              _tblIstarExpansion :: ([(String,Type)])+              _natIannotatedTree :: Natural+              _natIoriginalTree :: Natural+              _joinTypeIannotatedTree :: JoinType+              _joinTypeIoriginalTree :: JoinType+              _tbl1IannotatedTree :: TableRef+              _tbl1IidLookups :: ([(String,Type)])+              _tbl1IlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tbl1IoriginalTree :: TableRef+              _tbl1IqidLookups :: ([(String,[(String,Type)])])+              _tbl1IqstarExpansion :: ([(String,[(String,Type)])])+              _tbl1IstarExpansion :: ([(String,Type)])+              _onExprIannotatedTree :: OnExpr+              _onExprIoriginalTree :: OnExpr+              _aliasIannotatedTree :: TableAlias+              _aliasIoriginalTree :: TableAlias+              -- "./TypeChecking/TableRefs.ag"(line 33, column 9)+              _lhsOannotatedTree =+                  {-# LINE 33 "./TypeChecking/TableRefs.ag" #-}+                  updateAnnotation (map TypeErrorA _errs     ++) _backTree+                  {-# LINE 14028 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 75, column 9)+              _libUpdates =+                  {-# LINE 75 "./TypeChecking/TableRefs.ag" #-}+                  if null _errs+                    then [LibStackIDs $ ("", _idLookups    ): _qidLookups+                         ,LibSetStarExpansion $ ("", _starExpansion    ): _qstarExpansion    ]+                    else []+                  {-# LINE 14036 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 135, column 9)+              _errs =+                  {-# LINE 135 "./TypeChecking/TableRefs.ag" #-}+                  fromLeft [] _ejoinAttrs+                  {-# LINE 14041 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 136, column 9)+              _removeJoinAttrs =+                  {-# LINE 136 "./TypeChecking/TableRefs.ag" #-}+                  filter (\(n,_) -> n `notElem` _joinNames    )+                  {-# LINE 14046 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 146, column 9)+              _ejoinAttrs =+                  {-# LINE 146 "./TypeChecking/TableRefs.ag" #-}+                  do+                  let jns = case (_natIannotatedTree, _onExprIoriginalTree) of+                                (Natural, _) -> commonFieldNames+                                (_,Just (JoinUsing _ s)) -> s+                                _ -> []+                      tjtsm = map (flip lookup _tblIidLookups) jns+                      t1jtsm = map (flip lookup _tbl1IidLookups) jns+                  errorWhen (not $ null $ filter (==Nothing) $ tjtsm ++ t1jtsm)+                            [MissingJoinAttribute]+                  let tjts = catMaybes tjtsm+                      t1jts = catMaybes t1jtsm+                      resolvedTypes :: [Either [TypeError] Type]+                      resolvedTypes = map (\(a,b) -> resolveResultSetType _lhsIcat [a,b]) $ zip tjts t1jts+                  liftErrors $ concat $ lefts resolvedTypes+                  return $ zip jns $ rights resolvedTypes+                  where+                    commonFieldNames = intersect (f _tblIstarExpansion) (f _tbl1IstarExpansion)+                                       where f = map fst+                  {-# LINE 14068 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 170, column 9)+              _joinNames =+                  {-# LINE 170 "./TypeChecking/TableRefs.ag" #-}+                  map fst _joinAttrs+                  {-# LINE 14073 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 171, column 9)+              _joinAttrs =+                  {-# LINE 171 "./TypeChecking/TableRefs.ag" #-}+                  fromRight [] _ejoinAttrs+                  {-# LINE 14078 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 176, column 9)+              _idLookups =+                  {-# LINE 176 "./TypeChecking/TableRefs.ag" #-}+                  _joinAttrs     +++                    _removeJoinAttrs     _tblIidLookups +++                    _removeJoinAttrs     _tbl1IidLookups+                  {-# LINE 14085 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 179, column 9)+              _qidLookups =+                  {-# LINE 179 "./TypeChecking/TableRefs.ag" #-}+                  _tblIqidLookups ++ _tbl1IqidLookups+                  {-# LINE 14090 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 180, column 9)+              _starExpansion =+                  {-# LINE 180 "./TypeChecking/TableRefs.ag" #-}+                  _joinAttrs     +++                    _removeJoinAttrs     _tblIstarExpansion +++                    _removeJoinAttrs     _tbl1IstarExpansion+                  {-# LINE 14097 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 183, column 9)+              _qstarExpansion =+                  {-# LINE 183 "./TypeChecking/TableRefs.ag" #-}+                  _tblIqstarExpansion ++ _tbl1IqstarExpansion+                  {-# LINE 14102 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 187, column 9)+              _newLib =+                  {-# LINE 187 "./TypeChecking/TableRefs.ag" #-}+                  case updateBindings _lhsIlib _lhsIcat (_libUpdates     ++ _lhsIjlibUpdates) of+                    Left x -> error $ show x+                    Right e ->                                      e+                  {-# LINE 14109 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 190, column 9)+              _onExprOlib =+                  {-# LINE 190 "./TypeChecking/TableRefs.ag" #-}+                  _newLib+                  {-# LINE 14114 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 192, column 9)+              _tblOjlibUpdates =+                  {-# LINE 192 "./TypeChecking/TableRefs.ag" #-}+                  _libUpdates+                  {-# LINE 14119 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 193, column 9)+              _tbl1OjlibUpdates =+                  {-# LINE 193 "./TypeChecking/TableRefs.ag" #-}+                  _libUpdates+                  {-# LINE 14124 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 248, column 9)+              _lhsOlibUpdates =+                  {-# LINE 248 "./TypeChecking/TableRefs.ag" #-}+                  _libUpdates+                  {-# LINE 14129 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 249, column 9)+              _lhsOidLookups =+                  {-# LINE 249 "./TypeChecking/TableRefs.ag" #-}+                  _idLookups+                  {-# LINE 14134 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 250, column 9)+              _lhsOqidLookups =+                  {-# LINE 250 "./TypeChecking/TableRefs.ag" #-}+                  _qidLookups+                  {-# LINE 14139 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 251, column 9)+              _lhsOstarExpansion =+                  {-# LINE 251 "./TypeChecking/TableRefs.ag" #-}+                  _starExpansion+                  {-# LINE 14144 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 252, column 9)+              _lhsOqstarExpansion =+                  {-# LINE 252 "./TypeChecking/TableRefs.ag" #-}+                  _qstarExpansion+                  {-# LINE 14149 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 264, column 9)+              _backTree =+                  {-# LINE 264 "./TypeChecking/TableRefs.ag" #-}+                  JoinedTref ann_+                             _tblIannotatedTree+                             _natIannotatedTree+                             _joinTypeIannotatedTree+                             _tbl1IannotatedTree+                             _onExprIannotatedTree+                             _aliasIannotatedTree+                  {-# LINE 14160 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  JoinedTref ann_ _tblIannotatedTree _natIannotatedTree _joinTypeIannotatedTree _tbl1IannotatedTree _onExprIannotatedTree _aliasIannotatedTree+                  {-# LINE 14165 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  JoinedTref ann_ _tblIoriginalTree _natIoriginalTree _joinTypeIoriginalTree _tbl1IoriginalTree _onExprIoriginalTree _aliasIoriginalTree+                  {-# LINE 14170 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 14175 "AstInternal.hs" #-}+              -- copy rule (down)+              _tblOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14180 "AstInternal.hs" #-}+              -- copy rule (down)+              _tblOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14185 "AstInternal.hs" #-}+              -- copy rule (down)+              _natOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14190 "AstInternal.hs" #-}+              -- copy rule (down)+              _natOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14195 "AstInternal.hs" #-}+              -- copy rule (down)+              _joinTypeOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14200 "AstInternal.hs" #-}+              -- copy rule (down)+              _joinTypeOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14205 "AstInternal.hs" #-}+              -- copy rule (down)+              _tbl1Ocat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14210 "AstInternal.hs" #-}+              -- copy rule (down)+              _tbl1Olib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14215 "AstInternal.hs" #-}+              -- copy rule (down)+              _onExprOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14220 "AstInternal.hs" #-}+              -- copy rule (down)+              _aliasOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14225 "AstInternal.hs" #-}+              -- copy rule (down)+              _aliasOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14230 "AstInternal.hs" #-}+              ( _tblIannotatedTree,_tblIidLookups,_tblIlibUpdates,_tblIoriginalTree,_tblIqidLookups,_tblIqstarExpansion,_tblIstarExpansion) =+                  (tbl_ _tblOcat _tblOjlibUpdates _tblOlib )+              ( _natIannotatedTree,_natIoriginalTree) =+                  (nat_ _natOcat _natOlib )+              ( _joinTypeIannotatedTree,_joinTypeIoriginalTree) =+                  (joinType_ _joinTypeOcat _joinTypeOlib )+              ( _tbl1IannotatedTree,_tbl1IidLookups,_tbl1IlibUpdates,_tbl1IoriginalTree,_tbl1IqidLookups,_tbl1IqstarExpansion,_tbl1IstarExpansion) =+                  (tbl1_ _tbl1Ocat _tbl1OjlibUpdates _tbl1Olib )+              ( _onExprIannotatedTree,_onExprIoriginalTree) =+                  (onExpr_ _onExprOcat _onExprOlib )+              ( _aliasIannotatedTree,_aliasIoriginalTree) =+                  (alias_ _aliasOcat _aliasOlib )+          in  ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion)))+sem_TableRef_SubTref :: Annotation ->+                        T_SelectExpression  ->+                        T_TableAlias  ->+                        T_TableRef +sem_TableRef_SubTref ann_ sel_ alias_  =+    (\ _lhsIcat+       _lhsIjlibUpdates+       _lhsIlib ->+         (let _lhsOannotatedTree :: TableRef+              _selectAttrs :: (Either [TypeError] [(String,Type)])+              _idLookups :: ([(String,Type)])+              _qidLookups :: ([(String,[(String,Type)])])+              _starExpansion :: ([(String,Type)])+              _qstarExpansion :: ([(String,[(String,Type)])])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOidLookups :: ([(String,Type)])+              _lhsOqidLookups :: ([(String,[(String,Type)])])+              _lhsOstarExpansion :: ([(String,Type)])+              _lhsOqstarExpansion :: ([(String,[(String,Type)])])+              _lhsOoriginalTree :: TableRef+              _selOcat :: Catalog+              _selOlib :: LocalIdentifierBindings+              _aliasOcat :: Catalog+              _aliasOlib :: LocalIdentifierBindings+              _selIannotatedTree :: SelectExpression+              _selIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _selIoriginalTree :: SelectExpression+              _aliasIannotatedTree :: TableAlias+              _aliasIoriginalTree :: TableAlias+              -- "./TypeChecking/TableRefs.ag"(line 33, column 9)+              _lhsOannotatedTree =+                  {-# LINE 33 "./TypeChecking/TableRefs.ag" #-}+                  updateAnnotation (map TypeErrorA _errs     ++) _backTree+                  {-# LINE 14277 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 75, column 9)+              _libUpdates =+                  {-# LINE 75 "./TypeChecking/TableRefs.ag" #-}+                  if null _errs+                    then [LibStackIDs $ ("", _idLookups    ): _qidLookups+                         ,LibSetStarExpansion $ ("", _starExpansion    ): _qstarExpansion    ]+                    else []+                  {-# LINE 14285 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 92, column 9)+              _errs =+                  {-# LINE 92 "./TypeChecking/TableRefs.ag" #-}+                  case _selectAttrs     of+                          Left e -> e+                          Right _ -> []+                  {-# LINE 14292 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 96, column 9)+              _selectAttrs =+                  {-# LINE 96 "./TypeChecking/TableRefs.ag" #-}+                  unwrapSetOfComposite (getTypeAnnotation _selIannotatedTree)+                  {-# LINE 14297 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 98, column 9)+              _idLookups =+                  {-# LINE 98 "./TypeChecking/TableRefs.ag" #-}+                  fromRight [] _selectAttrs+                  {-# LINE 14302 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 99, column 9)+              _qidLookups =+                  {-# LINE 99 "./TypeChecking/TableRefs.ag" #-}+                  [(getAlias "" _aliasIannotatedTree, _idLookups    )]+                  {-# LINE 14307 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 100, column 9)+              _starExpansion =+                  {-# LINE 100 "./TypeChecking/TableRefs.ag" #-}+                  _idLookups+                  {-# LINE 14312 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 101, column 9)+              _qstarExpansion =+                  {-# LINE 101 "./TypeChecking/TableRefs.ag" #-}+                  _qidLookups+                  {-# LINE 14317 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 248, column 9)+              _lhsOlibUpdates =+                  {-# LINE 248 "./TypeChecking/TableRefs.ag" #-}+                  _libUpdates+                  {-# LINE 14322 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 249, column 9)+              _lhsOidLookups =+                  {-# LINE 249 "./TypeChecking/TableRefs.ag" #-}+                  _idLookups+                  {-# LINE 14327 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 250, column 9)+              _lhsOqidLookups =+                  {-# LINE 250 "./TypeChecking/TableRefs.ag" #-}+                  _qidLookups+                  {-# LINE 14332 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 251, column 9)+              _lhsOstarExpansion =+                  {-# LINE 251 "./TypeChecking/TableRefs.ag" #-}+                  _starExpansion+                  {-# LINE 14337 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 252, column 9)+              _lhsOqstarExpansion =+                  {-# LINE 252 "./TypeChecking/TableRefs.ag" #-}+                  _qstarExpansion+                  {-# LINE 14342 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 258, column 9)+              _backTree =+                  {-# LINE 258 "./TypeChecking/TableRefs.ag" #-}+                  SubTref ann_ _selIannotatedTree _aliasIannotatedTree+                  {-# LINE 14347 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SubTref ann_ _selIannotatedTree _aliasIannotatedTree+                  {-# LINE 14352 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SubTref ann_ _selIoriginalTree _aliasIoriginalTree+                  {-# LINE 14357 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 14362 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14367 "AstInternal.hs" #-}+              -- copy rule (down)+              _selOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14372 "AstInternal.hs" #-}+              -- copy rule (down)+              _aliasOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14377 "AstInternal.hs" #-}+              -- copy rule (down)+              _aliasOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14382 "AstInternal.hs" #-}+              ( _selIannotatedTree,_selIlibUpdates,_selIoriginalTree) =+                  (sel_ _selOcat _selOlib )+              ( _aliasIannotatedTree,_aliasIoriginalTree) =+                  (alias_ _aliasOcat _aliasOlib )+          in  ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion)))+sem_TableRef_Tref :: Annotation ->+                     String ->+                     T_TableAlias  ->+                     T_TableRef +sem_TableRef_Tref ann_ tbl_ alias_  =+    (\ _lhsIcat+       _lhsIjlibUpdates+       _lhsIlib ->+         (let _lhsOannotatedTree :: TableRef+              _relType :: (Either [TypeError] ([(String, Type)], [(String, Type)]))+              _idLookups :: ([(String,Type)])+              _qidLookups :: ([(String,[(String,Type)])])+              _starExpansion :: ([(String,Type)])+              _qstarExpansion :: ([(String,[(String,Type)])])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOidLookups :: ([(String,Type)])+              _lhsOqidLookups :: ([(String,[(String,Type)])])+              _lhsOstarExpansion :: ([(String,Type)])+              _lhsOqstarExpansion :: ([(String,[(String,Type)])])+              _lhsOoriginalTree :: TableRef+              _aliasOcat :: Catalog+              _aliasOlib :: LocalIdentifierBindings+              _aliasIannotatedTree :: TableAlias+              _aliasIoriginalTree :: TableAlias+              -- "./TypeChecking/TableRefs.ag"(line 33, column 9)+              _lhsOannotatedTree =+                  {-# LINE 33 "./TypeChecking/TableRefs.ag" #-}+                  updateAnnotation (map TypeErrorA _errs     ++) _backTree+                  {-# LINE 14416 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 75, column 9)+              _libUpdates =+                  {-# LINE 75 "./TypeChecking/TableRefs.ag" #-}+                  if null _errs+                    then [LibStackIDs $ ("", _idLookups    ): _qidLookups+                         ,LibSetStarExpansion $ ("", _starExpansion    ): _qstarExpansion    ]+                    else []+                  {-# LINE 14424 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 104, column 9)+              _errs =+                  {-# LINE 104 "./TypeChecking/TableRefs.ag" #-}+                  case _relType     of+                    Left e -> e+                    Right _ -> []+                  {-# LINE 14431 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 108, column 9)+              _relType =+                  {-# LINE 108 "./TypeChecking/TableRefs.ag" #-}+                  catCompositeAttrsPair _lhsIcat [] tbl_+                  {-# LINE 14436 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 109, column 9)+              _relType1 =+                  {-# LINE 109 "./TypeChecking/TableRefs.ag" #-}+                  fromRight ([],[]) _relType+                  {-# LINE 14441 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 110, column 9)+              _pAttrs =+                  {-# LINE 110 "./TypeChecking/TableRefs.ag" #-}+                  fst _relType1+                  {-# LINE 14446 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 111, column 9)+              _sAttrs =+                  {-# LINE 111 "./TypeChecking/TableRefs.ag" #-}+                  snd _relType1+                  {-# LINE 14451 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 113, column 9)+              _idLookups =+                  {-# LINE 113 "./TypeChecking/TableRefs.ag" #-}+                  _pAttrs     ++ _sAttrs+                  {-# LINE 14456 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 114, column 9)+              _alias =+                  {-# LINE 114 "./TypeChecking/TableRefs.ag" #-}+                  getAlias tbl_ _aliasIannotatedTree+                  {-# LINE 14461 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 115, column 9)+              _qidLookups =+                  {-# LINE 115 "./TypeChecking/TableRefs.ag" #-}+                  [(_alias    , _idLookups    )]+                  {-# LINE 14466 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 116, column 9)+              _starExpansion =+                  {-# LINE 116 "./TypeChecking/TableRefs.ag" #-}+                  _pAttrs+                  {-# LINE 14471 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 117, column 9)+              _qstarExpansion =+                  {-# LINE 117 "./TypeChecking/TableRefs.ag" #-}+                  [(_alias    , _pAttrs    )]+                  {-# LINE 14476 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 248, column 9)+              _lhsOlibUpdates =+                  {-# LINE 248 "./TypeChecking/TableRefs.ag" #-}+                  _libUpdates+                  {-# LINE 14481 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 249, column 9)+              _lhsOidLookups =+                  {-# LINE 249 "./TypeChecking/TableRefs.ag" #-}+                  _idLookups+                  {-# LINE 14486 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 250, column 9)+              _lhsOqidLookups =+                  {-# LINE 250 "./TypeChecking/TableRefs.ag" #-}+                  _qidLookups+                  {-# LINE 14491 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 251, column 9)+              _lhsOstarExpansion =+                  {-# LINE 251 "./TypeChecking/TableRefs.ag" #-}+                  _starExpansion+                  {-# LINE 14496 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 252, column 9)+              _lhsOqstarExpansion =+                  {-# LINE 252 "./TypeChecking/TableRefs.ag" #-}+                  _qstarExpansion+                  {-# LINE 14501 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 260, column 9)+              _backTree =+                  {-# LINE 260 "./TypeChecking/TableRefs.ag" #-}+                  Tref ann_ tbl_ _aliasIannotatedTree+                  {-# LINE 14506 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Tref ann_ tbl_ _aliasIannotatedTree+                  {-# LINE 14511 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Tref ann_ tbl_ _aliasIoriginalTree+                  {-# LINE 14516 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 14521 "AstInternal.hs" #-}+              -- copy rule (down)+              _aliasOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14526 "AstInternal.hs" #-}+              -- copy rule (down)+              _aliasOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14531 "AstInternal.hs" #-}+              ( _aliasIannotatedTree,_aliasIoriginalTree) =+                  (alias_ _aliasOcat _aliasOlib )+          in  ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion)))+sem_TableRef_TrefFun :: Annotation ->+                        T_Expression  ->+                        T_TableAlias  ->+                        T_TableRef +sem_TableRef_TrefFun ann_ fn_ alias_  =+    (\ _lhsIcat+       _lhsIjlibUpdates+       _lhsIlib ->+         (let _lhsOannotatedTree :: TableRef+              _eqfunIdens :: (Either [TypeError] (String,[(String,Type)]))+              _idLookups :: ([(String,Type)])+              _qidLookups :: ([(String,[(String,Type)])])+              _starExpansion :: ([(String,Type)])+              _qstarExpansion :: ([(String,[(String,Type)])])+              _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOidLookups :: ([(String,Type)])+              _lhsOqidLookups :: ([(String,[(String,Type)])])+              _lhsOstarExpansion :: ([(String,Type)])+              _lhsOqstarExpansion :: ([(String,[(String,Type)])])+              _lhsOoriginalTree :: TableRef+              _fnOcat :: Catalog+              _fnOlib :: LocalIdentifierBindings+              _aliasOcat :: Catalog+              _aliasOlib :: LocalIdentifierBindings+              _fnIannotatedTree :: Expression+              _fnIliftedColumnName :: String+              _fnIoriginalTree :: Expression+              _aliasIannotatedTree :: TableAlias+              _aliasIoriginalTree :: TableAlias+              -- "./TypeChecking/TableRefs.ag"(line 33, column 9)+              _lhsOannotatedTree =+                  {-# LINE 33 "./TypeChecking/TableRefs.ag" #-}+                  updateAnnotation (map TypeErrorA _errs     ++) _backTree+                  {-# LINE 14568 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 75, column 9)+              _libUpdates =+                  {-# LINE 75 "./TypeChecking/TableRefs.ag" #-}+                  if null _errs+                    then [LibStackIDs $ ("", _idLookups    ): _qidLookups+                         ,LibSetStarExpansion $ ("", _starExpansion    ): _qstarExpansion    ]+                    else []+                  {-# LINE 14576 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 120, column 9)+              _errs =+                  {-# LINE 120 "./TypeChecking/TableRefs.ag" #-}+                  case _eqfunIdens of+                    Left e -> e+                    Right _ -> []+                  {-# LINE 14583 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 124, column 9)+              _eqfunIdens =+                  {-# LINE 124 "./TypeChecking/TableRefs.ag" #-}+                  funIdens _lhsIcat _alias     _fnIannotatedTree+                  {-# LINE 14588 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 125, column 9)+              _qfunIdens =+                  {-# LINE 125 "./TypeChecking/TableRefs.ag" #-}+                  fromRight ("",[]) _eqfunIdens+                  {-# LINE 14593 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 126, column 9)+              _alias2 =+                  {-# LINE 126 "./TypeChecking/TableRefs.ag" #-}+                  fst _qfunIdens+                  {-# LINE 14598 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 127, column 9)+              _funIdens =+                  {-# LINE 127 "./TypeChecking/TableRefs.ag" #-}+                  snd _qfunIdens+                  {-# LINE 14603 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 128, column 9)+              _alias =+                  {-# LINE 128 "./TypeChecking/TableRefs.ag" #-}+                  getAlias "" _aliasIannotatedTree+                  {-# LINE 14608 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 130, column 9)+              _idLookups =+                  {-# LINE 130 "./TypeChecking/TableRefs.ag" #-}+                  _funIdens+                  {-# LINE 14613 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 131, column 9)+              _qidLookups =+                  {-# LINE 131 "./TypeChecking/TableRefs.ag" #-}+                  [(_alias2, _idLookups    )]+                  {-# LINE 14618 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 132, column 9)+              _starExpansion =+                  {-# LINE 132 "./TypeChecking/TableRefs.ag" #-}+                  _idLookups+                  {-# LINE 14623 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 133, column 9)+              _qstarExpansion =+                  {-# LINE 133 "./TypeChecking/TableRefs.ag" #-}+                  _qidLookups+                  {-# LINE 14628 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 248, column 9)+              _lhsOlibUpdates =+                  {-# LINE 248 "./TypeChecking/TableRefs.ag" #-}+                  _libUpdates+                  {-# LINE 14633 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 249, column 9)+              _lhsOidLookups =+                  {-# LINE 249 "./TypeChecking/TableRefs.ag" #-}+                  _idLookups+                  {-# LINE 14638 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 250, column 9)+              _lhsOqidLookups =+                  {-# LINE 250 "./TypeChecking/TableRefs.ag" #-}+                  _qidLookups+                  {-# LINE 14643 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 251, column 9)+              _lhsOstarExpansion =+                  {-# LINE 251 "./TypeChecking/TableRefs.ag" #-}+                  _starExpansion+                  {-# LINE 14648 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 252, column 9)+              _lhsOqstarExpansion =+                  {-# LINE 252 "./TypeChecking/TableRefs.ag" #-}+                  _qstarExpansion+                  {-# LINE 14653 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 262, column 9)+              _backTree =+                  {-# LINE 262 "./TypeChecking/TableRefs.ag" #-}+                  TrefFun ann_ _fnIannotatedTree _aliasIannotatedTree+                  {-# LINE 14658 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  TrefFun ann_ _fnIannotatedTree _aliasIannotatedTree+                  {-# LINE 14663 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  TrefFun ann_ _fnIoriginalTree _aliasIoriginalTree+                  {-# LINE 14668 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 14673 "AstInternal.hs" #-}+              -- copy rule (down)+              _fnOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14678 "AstInternal.hs" #-}+              -- copy rule (down)+              _fnOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14683 "AstInternal.hs" #-}+              -- copy rule (down)+              _aliasOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14688 "AstInternal.hs" #-}+              -- copy rule (down)+              _aliasOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14693 "AstInternal.hs" #-}+              ( _fnIannotatedTree,_fnIliftedColumnName,_fnIoriginalTree) =+                  (fn_ _fnOcat _fnOlib )+              ( _aliasIannotatedTree,_aliasIoriginalTree) =+                  (alias_ _aliasOcat _aliasOlib )+          in  ( _lhsOannotatedTree,_lhsOidLookups,_lhsOlibUpdates,_lhsOoriginalTree,_lhsOqidLookups,_lhsOqstarExpansion,_lhsOstarExpansion)))+-- TableRefList ------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         libUpdates           : [LocalIdentifierBindingsUpdate]+         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : TableRef +         child tl             : TableRefList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type TableRefList  = [(TableRef)]+-- cata+sem_TableRefList :: TableRefList  ->+                    T_TableRefList +sem_TableRefList list  =+    (Prelude.foldr sem_TableRefList_Cons sem_TableRefList_Nil (Prelude.map sem_TableRef list) )+-- semantic domain+type T_TableRefList  = Catalog ->+                       LocalIdentifierBindings ->+                       ( TableRefList,([LocalIdentifierBindingsUpdate]),TableRefList)+data Inh_TableRefList  = Inh_TableRefList {cat_Inh_TableRefList :: Catalog,lib_Inh_TableRefList :: LocalIdentifierBindings}+data Syn_TableRefList  = Syn_TableRefList {annotatedTree_Syn_TableRefList :: TableRefList,libUpdates_Syn_TableRefList :: [LocalIdentifierBindingsUpdate],originalTree_Syn_TableRefList :: TableRefList}+wrap_TableRefList :: T_TableRefList  ->+                     Inh_TableRefList  ->+                     Syn_TableRefList +wrap_TableRefList sem (Inh_TableRefList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_TableRefList _lhsOannotatedTree _lhsOlibUpdates _lhsOoriginalTree ))+sem_TableRefList_Cons :: T_TableRef  ->+                         T_TableRefList  ->+                         T_TableRefList +sem_TableRefList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _hdOjlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: TableRefList+              _lhsOoriginalTree :: TableRefList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: TableRef+              _hdIidLookups :: ([(String,Type)])+              _hdIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _hdIoriginalTree :: TableRef+              _hdIqidLookups :: ([(String,[(String,Type)])])+              _hdIqstarExpansion :: ([(String,[(String,Type)])])+              _hdIstarExpansion :: ([(String,Type)])+              _tlIannotatedTree :: TableRefList+              _tlIlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _tlIoriginalTree :: TableRefList+              -- "./TypeChecking/TableRefs.ag"(line 40, column 9)+              _lhsOlibUpdates =+                  {-# LINE 40 "./TypeChecking/TableRefs.ag" #-}+                  _hdIlibUpdates+                  {-# LINE 14768 "AstInternal.hs" #-}+              -- "./TypeChecking/TableRefs.ag"(line 197, column 12)+              _hdOjlibUpdates =+                  {-# LINE 197 "./TypeChecking/TableRefs.ag" #-}+                  []+                  {-# LINE 14773 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 14778 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 14783 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 14788 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 14793 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14798 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14803 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 14808 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 14813 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIidLookups,_hdIlibUpdates,_hdIoriginalTree,_hdIqidLookups,_hdIqstarExpansion,_hdIstarExpansion) =+                  (hd_ _hdOcat _hdOjlibUpdates _hdOlib )+              ( _tlIannotatedTree,_tlIlibUpdates,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))+sem_TableRefList_Nil :: T_TableRefList +sem_TableRefList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOlibUpdates :: ([LocalIdentifierBindingsUpdate])+              _lhsOannotatedTree :: TableRefList+              _lhsOoriginalTree :: TableRefList+              -- "./TypeChecking/TableRefs.ag"(line 38, column 9)+              _lhsOlibUpdates =+                  {-# LINE 38 "./TypeChecking/TableRefs.ag" #-}+                  []+                  {-# LINE 14830 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 14835 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 14840 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 14845 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 14850 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOlibUpdates,_lhsOoriginalTree)))+-- TriggerEvent ------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative TDelete:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative TInsert:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative TUpdate:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data TriggerEvent  = TDelete +                   | TInsert +                   | TUpdate +                   deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TriggerEvent :: TriggerEvent  ->+                    T_TriggerEvent +sem_TriggerEvent (TDelete )  =+    (sem_TriggerEvent_TDelete )+sem_TriggerEvent (TInsert )  =+    (sem_TriggerEvent_TInsert )+sem_TriggerEvent (TUpdate )  =+    (sem_TriggerEvent_TUpdate )+-- semantic domain+type T_TriggerEvent  = Catalog ->+                       LocalIdentifierBindings ->+                       ( TriggerEvent,TriggerEvent)+data Inh_TriggerEvent  = Inh_TriggerEvent {cat_Inh_TriggerEvent :: Catalog,lib_Inh_TriggerEvent :: LocalIdentifierBindings}+data Syn_TriggerEvent  = Syn_TriggerEvent {annotatedTree_Syn_TriggerEvent :: TriggerEvent,originalTree_Syn_TriggerEvent :: TriggerEvent}+wrap_TriggerEvent :: T_TriggerEvent  ->+                     Inh_TriggerEvent  ->+                     Syn_TriggerEvent +wrap_TriggerEvent sem (Inh_TriggerEvent _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_TriggerEvent _lhsOannotatedTree _lhsOoriginalTree ))+sem_TriggerEvent_TDelete :: T_TriggerEvent +sem_TriggerEvent_TDelete  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TriggerEvent+              _lhsOoriginalTree :: TriggerEvent+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  TDelete+                  {-# LINE 14911 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  TDelete+                  {-# LINE 14916 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 14921 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 14926 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_TriggerEvent_TInsert :: T_TriggerEvent +sem_TriggerEvent_TInsert  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TriggerEvent+              _lhsOoriginalTree :: TriggerEvent+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  TInsert+                  {-# LINE 14938 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  TInsert+                  {-# LINE 14943 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 14948 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 14953 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_TriggerEvent_TUpdate :: T_TriggerEvent +sem_TriggerEvent_TUpdate  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TriggerEvent+              _lhsOoriginalTree :: TriggerEvent+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  TUpdate+                  {-# LINE 14965 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  TUpdate+                  {-# LINE 14970 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 14975 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 14980 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- TriggerFire -------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative EachRow:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative EachStatement:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data TriggerFire  = EachRow +                  | EachStatement +                  deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TriggerFire :: TriggerFire  ->+                   T_TriggerFire +sem_TriggerFire (EachRow )  =+    (sem_TriggerFire_EachRow )+sem_TriggerFire (EachStatement )  =+    (sem_TriggerFire_EachStatement )+-- semantic domain+type T_TriggerFire  = Catalog ->+                      LocalIdentifierBindings ->+                      ( TriggerFire,TriggerFire)+data Inh_TriggerFire  = Inh_TriggerFire {cat_Inh_TriggerFire :: Catalog,lib_Inh_TriggerFire :: LocalIdentifierBindings}+data Syn_TriggerFire  = Syn_TriggerFire {annotatedTree_Syn_TriggerFire :: TriggerFire,originalTree_Syn_TriggerFire :: TriggerFire}+wrap_TriggerFire :: T_TriggerFire  ->+                    Inh_TriggerFire  ->+                    Syn_TriggerFire +wrap_TriggerFire sem (Inh_TriggerFire _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_TriggerFire _lhsOannotatedTree _lhsOoriginalTree ))+sem_TriggerFire_EachRow :: T_TriggerFire +sem_TriggerFire_EachRow  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TriggerFire+              _lhsOoriginalTree :: TriggerFire+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  EachRow+                  {-# LINE 15034 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  EachRow+                  {-# LINE 15039 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15044 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15049 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_TriggerFire_EachStatement :: T_TriggerFire +sem_TriggerFire_EachStatement  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TriggerFire+              _lhsOoriginalTree :: TriggerFire+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  EachStatement+                  {-# LINE 15061 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  EachStatement+                  {-# LINE 15066 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15071 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15076 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- TriggerWhen -------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative TriggerAfter:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative TriggerBefore:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data TriggerWhen  = TriggerAfter +                  | TriggerBefore +                  deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TriggerWhen :: TriggerWhen  ->+                   T_TriggerWhen +sem_TriggerWhen (TriggerAfter )  =+    (sem_TriggerWhen_TriggerAfter )+sem_TriggerWhen (TriggerBefore )  =+    (sem_TriggerWhen_TriggerBefore )+-- semantic domain+type T_TriggerWhen  = Catalog ->+                      LocalIdentifierBindings ->+                      ( TriggerWhen,TriggerWhen)+data Inh_TriggerWhen  = Inh_TriggerWhen {cat_Inh_TriggerWhen :: Catalog,lib_Inh_TriggerWhen :: LocalIdentifierBindings}+data Syn_TriggerWhen  = Syn_TriggerWhen {annotatedTree_Syn_TriggerWhen :: TriggerWhen,originalTree_Syn_TriggerWhen :: TriggerWhen}+wrap_TriggerWhen :: T_TriggerWhen  ->+                    Inh_TriggerWhen  ->+                    Syn_TriggerWhen +wrap_TriggerWhen sem (Inh_TriggerWhen _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_TriggerWhen _lhsOannotatedTree _lhsOoriginalTree ))+sem_TriggerWhen_TriggerAfter :: T_TriggerWhen +sem_TriggerWhen_TriggerAfter  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TriggerWhen+              _lhsOoriginalTree :: TriggerWhen+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  TriggerAfter+                  {-# LINE 15130 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  TriggerAfter+                  {-# LINE 15135 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15140 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15145 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_TriggerWhen_TriggerBefore :: T_TriggerWhen +sem_TriggerWhen_TriggerBefore  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: TriggerWhen+              _lhsOoriginalTree :: TriggerWhen+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  TriggerBefore+                  {-# LINE 15157 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  TriggerBefore+                  {-# LINE 15162 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15167 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15172 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+-- TypeAttributeDef --------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         attrName             : String+         namedType            : Type+         originalTree         : SELF +   alternatives:+      alternative TypeAttDef:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data TypeAttributeDef  = TypeAttDef (Annotation) (String) (TypeName) +                       deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TypeAttributeDef :: TypeAttributeDef  ->+                        T_TypeAttributeDef +sem_TypeAttributeDef (TypeAttDef _ann _name _typ )  =+    (sem_TypeAttributeDef_TypeAttDef _ann _name (sem_TypeName _typ ) )+-- semantic domain+type T_TypeAttributeDef  = Catalog ->+                           LocalIdentifierBindings ->+                           ( TypeAttributeDef,String,Type,TypeAttributeDef)+data Inh_TypeAttributeDef  = Inh_TypeAttributeDef {cat_Inh_TypeAttributeDef :: Catalog,lib_Inh_TypeAttributeDef :: LocalIdentifierBindings}+data Syn_TypeAttributeDef  = Syn_TypeAttributeDef {annotatedTree_Syn_TypeAttributeDef :: TypeAttributeDef,attrName_Syn_TypeAttributeDef :: String,namedType_Syn_TypeAttributeDef :: Type,originalTree_Syn_TypeAttributeDef :: TypeAttributeDef}+wrap_TypeAttributeDef :: T_TypeAttributeDef  ->+                         Inh_TypeAttributeDef  ->+                         Syn_TypeAttributeDef +wrap_TypeAttributeDef sem (Inh_TypeAttributeDef _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_TypeAttributeDef _lhsOannotatedTree _lhsOattrName _lhsOnamedType _lhsOoriginalTree ))+sem_TypeAttributeDef_TypeAttDef :: Annotation ->+                                   String ->+                                   T_TypeName  ->+                                   T_TypeAttributeDef +sem_TypeAttributeDef_TypeAttDef ann_ name_ typ_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOattrName :: String+              _lhsOnamedType :: Type+              _lhsOannotatedTree :: TypeAttributeDef+              _lhsOoriginalTree :: TypeAttributeDef+              _typOcat :: Catalog+              _typOlib :: LocalIdentifierBindings+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _typIoriginalTree :: TypeName+              -- "./TypeChecking/MiscCreates.ag"(line 40, column 9)+              _lhsOattrName =+                  {-# LINE 40 "./TypeChecking/MiscCreates.ag" #-}+                  name_+                  {-# LINE 15234 "AstInternal.hs" #-}+              -- "./TypeChecking/MiscCreates.ag"(line 41, column 9)+              _lhsOnamedType =+                  {-# LINE 41 "./TypeChecking/MiscCreates.ag" #-}+                  _typInamedType+                  {-# LINE 15239 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  TypeAttDef ann_ name_ _typIannotatedTree+                  {-# LINE 15244 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  TypeAttDef ann_ name_ _typIoriginalTree+                  {-# LINE 15249 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15254 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15259 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 15264 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 15269 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =+                  (typ_ _typOcat _typOlib )+          in  ( _lhsOannotatedTree,_lhsOattrName,_lhsOnamedType,_lhsOoriginalTree)))+-- TypeAttributeDefList ----------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         attrs                : [(String, Type)]+         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : TypeAttributeDef +         child tl             : TypeAttributeDefList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type TypeAttributeDefList  = [(TypeAttributeDef)]+-- cata+sem_TypeAttributeDefList :: TypeAttributeDefList  ->+                            T_TypeAttributeDefList +sem_TypeAttributeDefList list  =+    (Prelude.foldr sem_TypeAttributeDefList_Cons sem_TypeAttributeDefList_Nil (Prelude.map sem_TypeAttributeDef list) )+-- semantic domain+type T_TypeAttributeDefList  = Catalog ->+                               LocalIdentifierBindings ->+                               ( TypeAttributeDefList,([(String, Type)]),TypeAttributeDefList)+data Inh_TypeAttributeDefList  = Inh_TypeAttributeDefList {cat_Inh_TypeAttributeDefList :: Catalog,lib_Inh_TypeAttributeDefList :: LocalIdentifierBindings}+data Syn_TypeAttributeDefList  = Syn_TypeAttributeDefList {annotatedTree_Syn_TypeAttributeDefList :: TypeAttributeDefList,attrs_Syn_TypeAttributeDefList :: [(String, Type)],originalTree_Syn_TypeAttributeDefList :: TypeAttributeDefList}+wrap_TypeAttributeDefList :: T_TypeAttributeDefList  ->+                             Inh_TypeAttributeDefList  ->+                             Syn_TypeAttributeDefList +wrap_TypeAttributeDefList sem (Inh_TypeAttributeDefList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_TypeAttributeDefList _lhsOannotatedTree _lhsOattrs _lhsOoriginalTree ))+sem_TypeAttributeDefList_Cons :: T_TypeAttributeDef  ->+                                 T_TypeAttributeDefList  ->+                                 T_TypeAttributeDefList +sem_TypeAttributeDefList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOattrs :: ([(String, Type)])+              _lhsOannotatedTree :: TypeAttributeDefList+              _lhsOoriginalTree :: TypeAttributeDefList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: TypeAttributeDef+              _hdIattrName :: String+              _hdInamedType :: Type+              _hdIoriginalTree :: TypeAttributeDef+              _tlIannotatedTree :: TypeAttributeDefList+              _tlIattrs :: ([(String, Type)])+              _tlIoriginalTree :: TypeAttributeDefList+              -- "./TypeChecking/MiscCreates.ag"(line 46, column 12)+              _lhsOattrs =+                  {-# LINE 46 "./TypeChecking/MiscCreates.ag" #-}+                  (_hdIattrName, _hdInamedType) : _tlIattrs+                  {-# LINE 15338 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 15343 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 15348 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15353 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15358 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 15363 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 15368 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 15373 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 15378 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIattrName,_hdInamedType,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIattrs,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree)))+sem_TypeAttributeDefList_Nil :: T_TypeAttributeDefList +sem_TypeAttributeDefList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOattrs :: ([(String, Type)])+              _lhsOannotatedTree :: TypeAttributeDefList+              _lhsOoriginalTree :: TypeAttributeDefList+              -- "./TypeChecking/MiscCreates.ag"(line 47, column 11)+              _lhsOattrs =+                  {-# LINE 47 "./TypeChecking/MiscCreates.ag" #-}+                  []+                  {-# LINE 15395 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 15400 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 15405 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15410 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15415 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOattrs,_lhsOoriginalTree)))+-- TypeName ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         namedType            : Type+         originalTree         : SELF +   alternatives:+      alternative ArrayTypeName:+         child ann            : {Annotation}+         child typ            : TypeName +         visit 0:+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative PrecTypeName:+         child ann            : {Annotation}+         child tn             : {String}+         child prec           : {Integer}+         visit 0:+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative SetOfTypeName:+         child ann            : {Annotation}+         child typ            : TypeName +         visit 0:+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+      alternative SimpleTypeName:+         child ann            : {Annotation}+         child tn             : {String}+         visit 0:+            local tpe         : _+            local backTree    : _+            local annotatedTree : _+            local originalTree : _+-}+data TypeName  = ArrayTypeName (Annotation) (TypeName) +               | PrecTypeName (Annotation) (String) (Integer) +               | SetOfTypeName (Annotation) (TypeName) +               | SimpleTypeName (Annotation) (String) +               deriving ( Data,Eq,Show,Typeable)+-- cata+sem_TypeName :: TypeName  ->+                T_TypeName +sem_TypeName (ArrayTypeName _ann _typ )  =+    (sem_TypeName_ArrayTypeName _ann (sem_TypeName _typ ) )+sem_TypeName (PrecTypeName _ann _tn _prec )  =+    (sem_TypeName_PrecTypeName _ann _tn _prec )+sem_TypeName (SetOfTypeName _ann _typ )  =+    (sem_TypeName_SetOfTypeName _ann (sem_TypeName _typ ) )+sem_TypeName (SimpleTypeName _ann _tn )  =+    (sem_TypeName_SimpleTypeName _ann _tn )+-- semantic domain+type T_TypeName  = Catalog ->+                   LocalIdentifierBindings ->+                   ( TypeName,Type,TypeName)+data Inh_TypeName  = Inh_TypeName {cat_Inh_TypeName :: Catalog,lib_Inh_TypeName :: LocalIdentifierBindings}+data Syn_TypeName  = Syn_TypeName {annotatedTree_Syn_TypeName :: TypeName,namedType_Syn_TypeName :: Type,originalTree_Syn_TypeName :: TypeName}+wrap_TypeName :: T_TypeName  ->+                 Inh_TypeName  ->+                 Syn_TypeName +wrap_TypeName sem (Inh_TypeName _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_TypeName _lhsOannotatedTree _lhsOnamedType _lhsOoriginalTree ))+sem_TypeName_ArrayTypeName :: Annotation ->+                              T_TypeName  ->+                              T_TypeName +sem_TypeName_ArrayTypeName ann_ typ_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOnamedType :: Type+              _lhsOannotatedTree :: TypeName+              _lhsOoriginalTree :: TypeName+              _typOcat :: Catalog+              _typOlib :: LocalIdentifierBindings+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _typIoriginalTree :: TypeName+              -- "./TypeChecking/Misc.ag"(line 19, column 10)+              _lhsOnamedType =+                  {-# LINE 19 "./TypeChecking/Misc.ag" #-}+                  tpeToT _tpe+                  {-# LINE 15509 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 20, column 10)+              _lhsOannotatedTree =+                  {-# LINE 20 "./TypeChecking/Misc.ag" #-}+                  updateAnnotation+                    ((map TypeErrorA $ getErrors _tpe    ) ++)+                    _backTree+                  {-# LINE 15516 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 30, column 9)+              _tpe =+                  {-# LINE 30 "./TypeChecking/Misc.ag" #-}+                  dependsOnRTpe [_typInamedType] $ Right $ ArrayType _typInamedType+                  {-# LINE 15521 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 31, column 9)+              _backTree =+                  {-# LINE 31 "./TypeChecking/Misc.ag" #-}+                  ArrayTypeName ann_ _typIannotatedTree+                  {-# LINE 15526 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  ArrayTypeName ann_ _typIannotatedTree+                  {-# LINE 15531 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  ArrayTypeName ann_ _typIoriginalTree+                  {-# LINE 15536 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15541 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 15546 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 15551 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =+                  (typ_ _typOcat _typOlib )+          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree)))+sem_TypeName_PrecTypeName :: Annotation ->+                             String ->+                             Integer ->+                             T_TypeName +sem_TypeName_PrecTypeName ann_ tn_ prec_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOnamedType :: Type+              _lhsOannotatedTree :: TypeName+              _lhsOoriginalTree :: TypeName+              -- "./TypeChecking/Misc.ag"(line 19, column 10)+              _lhsOnamedType =+                  {-# LINE 19 "./TypeChecking/Misc.ag" #-}+                  tpeToT _tpe+                  {-# LINE 15569 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 20, column 10)+              _lhsOannotatedTree =+                  {-# LINE 20 "./TypeChecking/Misc.ag" #-}+                  updateAnnotation+                    ((map TypeErrorA $ getErrors _tpe    ) ++)+                    _backTree+                  {-# LINE 15576 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 36, column 9)+              _tpe =+                  {-# LINE 36 "./TypeChecking/Misc.ag" #-}+                  catLookupType _lhsIcat $ canonicalizeTypeName tn_+                  {-# LINE 15581 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 37, column 9)+              _backTree =+                  {-# LINE 37 "./TypeChecking/Misc.ag" #-}+                  PrecTypeName ann_ tn_ prec_+                  {-# LINE 15586 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  PrecTypeName ann_ tn_ prec_+                  {-# LINE 15591 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  PrecTypeName ann_ tn_ prec_+                  {-# LINE 15596 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15601 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree)))+sem_TypeName_SetOfTypeName :: Annotation ->+                              T_TypeName  ->+                              T_TypeName +sem_TypeName_SetOfTypeName ann_ typ_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOnamedType :: Type+              _lhsOannotatedTree :: TypeName+              _lhsOoriginalTree :: TypeName+              _typOcat :: Catalog+              _typOlib :: LocalIdentifierBindings+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _typIoriginalTree :: TypeName+              -- "./TypeChecking/Misc.ag"(line 19, column 10)+              _lhsOnamedType =+                  {-# LINE 19 "./TypeChecking/Misc.ag" #-}+                  tpeToT _tpe+                  {-# LINE 15621 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 20, column 10)+              _lhsOannotatedTree =+                  {-# LINE 20 "./TypeChecking/Misc.ag" #-}+                  updateAnnotation+                    ((map TypeErrorA $ getErrors _tpe    ) ++)+                    _backTree+                  {-# LINE 15628 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 33, column 9)+              _tpe =+                  {-# LINE 33 "./TypeChecking/Misc.ag" #-}+                  dependsOnRTpe [_typInamedType] $ Right $ SetOfType _typInamedType+                  {-# LINE 15633 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 34, column 9)+              _backTree =+                  {-# LINE 34 "./TypeChecking/Misc.ag" #-}+                  SetOfTypeName ann_ _typIannotatedTree+                  {-# LINE 15638 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SetOfTypeName ann_ _typIannotatedTree+                  {-# LINE 15643 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SetOfTypeName ann_ _typIoriginalTree+                  {-# LINE 15648 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15653 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 15658 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 15663 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =+                  (typ_ _typOcat _typOlib )+          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree)))+sem_TypeName_SimpleTypeName :: Annotation ->+                               String ->+                               T_TypeName +sem_TypeName_SimpleTypeName ann_ tn_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOnamedType :: Type+              _lhsOannotatedTree :: TypeName+              _lhsOoriginalTree :: TypeName+              -- "./TypeChecking/Misc.ag"(line 19, column 10)+              _lhsOnamedType =+                  {-# LINE 19 "./TypeChecking/Misc.ag" #-}+                  tpeToT _tpe+                  {-# LINE 15680 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 20, column 10)+              _lhsOannotatedTree =+                  {-# LINE 20 "./TypeChecking/Misc.ag" #-}+                  updateAnnotation+                    ((map TypeErrorA $ getErrors _tpe    ) ++)+                    _backTree+                  {-# LINE 15687 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 27, column 9)+              _tpe =+                  {-# LINE 27 "./TypeChecking/Misc.ag" #-}+                  catLookupType _lhsIcat $ canonicalizeTypeName tn_+                  {-# LINE 15692 "AstInternal.hs" #-}+              -- "./TypeChecking/Misc.ag"(line 28, column 9)+              _backTree =+                  {-# LINE 28 "./TypeChecking/Misc.ag" #-}+                  SimpleTypeName ann_ tn_+                  {-# LINE 15697 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  SimpleTypeName ann_ tn_+                  {-# LINE 15702 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  SimpleTypeName ann_ tn_+                  {-# LINE 15707 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15712 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOnamedType,_lhsOoriginalTree)))+-- TypeNameList ------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         namedTypes           : [Type]+         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : TypeName +         child tl             : TypeNameList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type TypeNameList  = [(TypeName)]+-- cata+sem_TypeNameList :: TypeNameList  ->+                    T_TypeNameList +sem_TypeNameList list  =+    (Prelude.foldr sem_TypeNameList_Cons sem_TypeNameList_Nil (Prelude.map sem_TypeName list) )+-- semantic domain+type T_TypeNameList  = Catalog ->+                       LocalIdentifierBindings ->+                       ( TypeNameList,([Type]),TypeNameList)+data Inh_TypeNameList  = Inh_TypeNameList {cat_Inh_TypeNameList :: Catalog,lib_Inh_TypeNameList :: LocalIdentifierBindings}+data Syn_TypeNameList  = Syn_TypeNameList {annotatedTree_Syn_TypeNameList :: TypeNameList,namedTypes_Syn_TypeNameList :: [Type],originalTree_Syn_TypeNameList :: TypeNameList}+wrap_TypeNameList :: T_TypeNameList  ->+                     Inh_TypeNameList  ->+                     Syn_TypeNameList +wrap_TypeNameList sem (Inh_TypeNameList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOnamedTypes,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_TypeNameList _lhsOannotatedTree _lhsOnamedTypes _lhsOoriginalTree ))+sem_TypeNameList_Cons :: T_TypeName  ->+                         T_TypeNameList  ->+                         T_TypeNameList +sem_TypeNameList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOnamedTypes :: ([Type])+              _lhsOannotatedTree :: TypeNameList+              _lhsOoriginalTree :: TypeNameList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: TypeName+              _hdInamedType :: Type+              _hdIoriginalTree :: TypeName+              _tlIannotatedTree :: TypeNameList+              _tlInamedTypes :: ([Type])+              _tlIoriginalTree :: TypeNameList+              -- "./TypeChecking/Drops.ag"(line 30, column 12)+              _lhsOnamedTypes =+                  {-# LINE 30 "./TypeChecking/Drops.ag" #-}+                  _hdInamedType : _tlInamedTypes+                  {-# LINE 15778 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 15783 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 15788 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15793 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15798 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 15803 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 15808 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 15813 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 15818 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdInamedType,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlInamedTypes,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOnamedTypes,_lhsOoriginalTree)))+sem_TypeNameList_Nil :: T_TypeNameList +sem_TypeNameList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOnamedTypes :: ([Type])+              _lhsOannotatedTree :: TypeNameList+              _lhsOoriginalTree :: TypeNameList+              -- "./TypeChecking/Drops.ag"(line 31, column 11)+              _lhsOnamedTypes =+                  {-# LINE 31 "./TypeChecking/Drops.ag" #-}+                  []+                  {-# LINE 15835 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 15840 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 15845 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15850 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15855 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOnamedTypes,_lhsOoriginalTree)))+-- VarDef ------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         def                  : (String,Type)+         originalTree         : SELF +   alternatives:+      alternative VarDef:+         child ann            : {Annotation}+         child name           : {String}+         child typ            : TypeName +         child value          : {Maybe Expression}+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data VarDef  = VarDef (Annotation) (String) (TypeName) (Maybe Expression) +             deriving ( Data,Eq,Show,Typeable)+-- cata+sem_VarDef :: VarDef  ->+              T_VarDef +sem_VarDef (VarDef _ann _name _typ _value )  =+    (sem_VarDef_VarDef _ann _name (sem_TypeName _typ ) _value )+-- semantic domain+type T_VarDef  = Catalog ->+                 LocalIdentifierBindings ->+                 ( VarDef,((String,Type)),VarDef)+data Inh_VarDef  = Inh_VarDef {cat_Inh_VarDef :: Catalog,lib_Inh_VarDef :: LocalIdentifierBindings}+data Syn_VarDef  = Syn_VarDef {annotatedTree_Syn_VarDef :: VarDef,def_Syn_VarDef :: (String,Type),originalTree_Syn_VarDef :: VarDef}+wrap_VarDef :: T_VarDef  ->+               Inh_VarDef  ->+               Syn_VarDef +wrap_VarDef sem (Inh_VarDef _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOdef,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_VarDef _lhsOannotatedTree _lhsOdef _lhsOoriginalTree ))+sem_VarDef_VarDef :: Annotation ->+                     String ->+                     T_TypeName  ->+                     (Maybe Expression) ->+                     T_VarDef +sem_VarDef_VarDef ann_ name_ typ_ value_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOdef :: ((String,Type))+              _lhsOannotatedTree :: VarDef+              _lhsOoriginalTree :: VarDef+              _typOcat :: Catalog+              _typOlib :: LocalIdentifierBindings+              _typIannotatedTree :: TypeName+              _typInamedType :: Type+              _typIoriginalTree :: TypeName+              -- "./TypeChecking/CreateFunction.ag"(line 131, column 14)+              _lhsOdef =+                  {-# LINE 131 "./TypeChecking/CreateFunction.ag" #-}+                  (name_, if _typInamedType == Pseudo Record then PgRecord Nothing else _typInamedType)+                  {-# LINE 15917 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  VarDef ann_ name_ _typIannotatedTree value_+                  {-# LINE 15922 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  VarDef ann_ name_ _typIoriginalTree value_+                  {-# LINE 15927 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 15932 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 15937 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 15942 "AstInternal.hs" #-}+              -- copy rule (down)+              _typOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 15947 "AstInternal.hs" #-}+              ( _typIannotatedTree,_typInamedType,_typIoriginalTree) =+                  (typ_ _typOcat _typOlib )+          in  ( _lhsOannotatedTree,_lhsOdef,_lhsOoriginalTree)))+-- VarDefList --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         defs                 : [(String,Type)]+         originalTree         : SELF +   alternatives:+      alternative Cons:+         child hd             : VarDef +         child tl             : VarDefList +         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Nil:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+type VarDefList  = [(VarDef)]+-- cata+sem_VarDefList :: VarDefList  ->+                  T_VarDefList +sem_VarDefList list  =+    (Prelude.foldr sem_VarDefList_Cons sem_VarDefList_Nil (Prelude.map sem_VarDef list) )+-- semantic domain+type T_VarDefList  = Catalog ->+                     LocalIdentifierBindings ->+                     ( VarDefList,([(String,Type)]),VarDefList)+data Inh_VarDefList  = Inh_VarDefList {cat_Inh_VarDefList :: Catalog,lib_Inh_VarDefList :: LocalIdentifierBindings}+data Syn_VarDefList  = Syn_VarDefList {annotatedTree_Syn_VarDefList :: VarDefList,defs_Syn_VarDefList :: [(String,Type)],originalTree_Syn_VarDefList :: VarDefList}+wrap_VarDefList :: T_VarDefList  ->+                   Inh_VarDefList  ->+                   Syn_VarDefList +wrap_VarDefList sem (Inh_VarDefList _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOdefs,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_VarDefList _lhsOannotatedTree _lhsOdefs _lhsOoriginalTree ))+sem_VarDefList_Cons :: T_VarDef  ->+                       T_VarDefList  ->+                       T_VarDefList +sem_VarDefList_Cons hd_ tl_  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOdefs :: ([(String,Type)])+              _lhsOannotatedTree :: VarDefList+              _lhsOoriginalTree :: VarDefList+              _hdOcat :: Catalog+              _hdOlib :: LocalIdentifierBindings+              _tlOcat :: Catalog+              _tlOlib :: LocalIdentifierBindings+              _hdIannotatedTree :: VarDef+              _hdIdef :: ((String,Type))+              _hdIoriginalTree :: VarDef+              _tlIannotatedTree :: VarDefList+              _tlIdefs :: ([(String,Type)])+              _tlIoriginalTree :: VarDefList+              -- "./TypeChecking/CreateFunction.ag"(line 134, column 12)+              _lhsOdefs =+                  {-# LINE 134 "./TypeChecking/CreateFunction.ag" #-}+                  _hdIdef : _tlIdefs+                  {-# LINE 16015 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIannotatedTree _tlIannotatedTree+                  {-# LINE 16020 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  (:) _hdIoriginalTree _tlIoriginalTree+                  {-# LINE 16025 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 16030 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 16035 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 16040 "AstInternal.hs" #-}+              -- copy rule (down)+              _hdOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 16045 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOcat =+                  {-# LINE 56 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIcat+                  {-# LINE 16050 "AstInternal.hs" #-}+              -- copy rule (down)+              _tlOlib =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _lhsIlib+                  {-# LINE 16055 "AstInternal.hs" #-}+              ( _hdIannotatedTree,_hdIdef,_hdIoriginalTree) =+                  (hd_ _hdOcat _hdOlib )+              ( _tlIannotatedTree,_tlIdefs,_tlIoriginalTree) =+                  (tl_ _tlOcat _tlOlib )+          in  ( _lhsOannotatedTree,_lhsOdefs,_lhsOoriginalTree)))+sem_VarDefList_Nil :: T_VarDefList +sem_VarDefList_Nil  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOdefs :: ([(String,Type)])+              _lhsOannotatedTree :: VarDefList+              _lhsOoriginalTree :: VarDefList+              -- "./TypeChecking/CreateFunction.ag"(line 135, column 11)+              _lhsOdefs =+                  {-# LINE 135 "./TypeChecking/CreateFunction.ag" #-}+                  []+                  {-# LINE 16072 "AstInternal.hs" #-}+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 16077 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  []+                  {-# LINE 16082 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 16087 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 16092 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOdefs,_lhsOoriginalTree)))+-- Volatility --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         cat                  : Catalog+         lib                  : LocalIdentifierBindings+      synthesized attributes:+         annotatedTree        : SELF +         originalTree         : SELF +   alternatives:+      alternative Immutable:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Stable:+         visit 0:+            local annotatedTree : _+            local originalTree : _+      alternative Volatile:+         visit 0:+            local annotatedTree : _+            local originalTree : _+-}+data Volatility  = Immutable +                 | Stable +                 | Volatile +                 deriving ( Data,Eq,Show,Typeable)+-- cata+sem_Volatility :: Volatility  ->+                  T_Volatility +sem_Volatility (Immutable )  =+    (sem_Volatility_Immutable )+sem_Volatility (Stable )  =+    (sem_Volatility_Stable )+sem_Volatility (Volatile )  =+    (sem_Volatility_Volatile )+-- semantic domain+type T_Volatility  = Catalog ->+                     LocalIdentifierBindings ->+                     ( Volatility,Volatility)+data Inh_Volatility  = Inh_Volatility {cat_Inh_Volatility :: Catalog,lib_Inh_Volatility :: LocalIdentifierBindings}+data Syn_Volatility  = Syn_Volatility {annotatedTree_Syn_Volatility :: Volatility,originalTree_Syn_Volatility :: Volatility}+wrap_Volatility :: T_Volatility  ->+                   Inh_Volatility  ->+                   Syn_Volatility +wrap_Volatility sem (Inh_Volatility _lhsIcat _lhsIlib )  =+    (let ( _lhsOannotatedTree,_lhsOoriginalTree) =+             (sem _lhsIcat _lhsIlib )+     in  (Syn_Volatility _lhsOannotatedTree _lhsOoriginalTree ))+sem_Volatility_Immutable :: T_Volatility +sem_Volatility_Immutable  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Volatility+              _lhsOoriginalTree :: Volatility+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Immutable+                  {-# LINE 16153 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Immutable+                  {-# LINE 16158 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 16163 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 16168 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Volatility_Stable :: T_Volatility +sem_Volatility_Stable  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Volatility+              _lhsOoriginalTree :: Volatility+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Stable+                  {-# LINE 16180 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Stable+                  {-# LINE 16185 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 16190 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 16195 "AstInternal.hs" #-}+          in  ( _lhsOannotatedTree,_lhsOoriginalTree)))+sem_Volatility_Volatile :: T_Volatility +sem_Volatility_Volatile  =+    (\ _lhsIcat+       _lhsIlib ->+         (let _lhsOannotatedTree :: Volatility+              _lhsOoriginalTree :: Volatility+              -- self rule+              _annotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  Volatile+                  {-# LINE 16207 "AstInternal.hs" #-}+              -- self rule+              _originalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  Volatile+                  {-# LINE 16212 "AstInternal.hs" #-}+              -- self rule+              _lhsOannotatedTree =+                  {-# LINE 57 "./TypeChecking/TypeChecking.ag" #-}+                  _annotatedTree+                  {-# LINE 16217 "AstInternal.hs" #-}+              -- self rule+              _lhsOoriginalTree =+                  {-# LINE 63 "./TypeChecking/TypeChecking.ag" #-}+                  _originalTree+                  {-# LINE 16222 "AstInternal.hs" #-}           in  ( _lhsOannotatedTree,_lhsOoriginalTree)))
+ Database/HsSqlPpp/AstInternals/Catalog/CatalogInternal.lhs view
@@ -0,0 +1,492 @@+Copyright 2009 Jake Wheat++This module contains the implementation of the Catalog data types+and functions, and provides the api for the other type checking+modules.++> {-# LANGUAGE DeriveDataTypeable #-}+> {-# OPTIONS_HADDOCK hide  #-}++> module Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal+>     (+>      Catalog+>     ,CastContext(..)+>     ,CompositeFlavour(..)+>     ,relationComposites+>     ,CompositeDef+>     ,FunctionPrototype+>     ,DomainDefinition+>     ,FunFlav(..)+>     ,emptyCatalog+>     ,defaultCatalog+>     ,CatalogUpdate(..)+>     ,ppCatUpdate+>     ,updateCatalog+>     ,deconstructCatalog+>     -- type checker stuff+>     ,catCompositeDef+>     ,catCompositeAttrsPair+>     ,catCompositeAttrs+>     ,catCompositePublicAttrs+>     ,catTypeCategory+>     ,catPreferredType+>     ,catCast+>     ,catDomainBaseType+>     ,catLookupFns+>     ,catTypeExists+>     ,catLookupType+>     ,OperatorType(..)+>     ,getOperatorType+>     ,isOperatorName+>     -- comparing catalogs+>     ,CatalogDiff(..)+>     ,compareCatalogs+>     ,ppCatDiff+>     ) where++> import Control.Monad+> import Data.List+> import Data.Generics+> -- import Debug.Trace+> import Data.Char++> import Database.HsSqlPpp.AstInternals.TypeType+> import Database.HsSqlPpp.Utils++> -- | The main datatype, this holds the catalog and context+> -- information to type check against.+> data Catalog = Catalog+>                    {catTypeNames :: [(String, Type)]+>                    ,catDomainDefs :: [DomainDefinition]+>                    ,catCasts :: [(Type,Type,CastContext)]+>                    ,catTypeCategories :: [(Type,String,Bool)]+>                    ,catPrefixOperators :: [FunctionPrototype]+>                    ,catPostfixOperators :: [FunctionPrototype]+>                    ,catBinaryOperators :: [FunctionPrototype]+>                    ,catFunctions :: [FunctionPrototype]+>                    ,catAggregates :: [FunctionPrototype]+>                    ,catWindowFunctions :: [FunctionPrototype]+>                    ,catAttrDefs :: [CompositeDef]+>                    ,catUpdates :: [CatalogUpdate]}+>                    deriving Show++> -- | Represents an empty catalog. This doesn't contain things+> -- like the \'and\' operator, 'defaultCatalog' contains these.+> emptyCatalog :: Catalog+> emptyCatalog = Catalog [] [] [] [] [] [] [] [] [] [] [] []++> -- | Represents what you probably want to use as a starting point if+> -- you are building an catalog from scratch. It contains+> -- information on built in function like things that aren't in the+> -- PostgreSQL catalog, such as greatest, coalesce, keyword operators+> -- like \'and\', etc..+> defaultCatalog :: Catalog+> defaultCatalog = emptyCatalog {+>                       catTypeNames = pseudoTypes+>                      ,catBinaryOperators = ("=",[Pseudo AnyElement+>                                                 ,Pseudo AnyElement],+>                                             typeBool, False):keywordOperatorTypes+>                      ,catFunctions = specialFunctionTypes}+++> -- | Use to note what the flavour of a cast is, i.e. if/when it can+> -- be used implicitly.+> data CastContext = ImplicitCastContext+>                  | AssignmentCastContext+>                  | ExplicitCastContext+>                    deriving (Eq,Show,Ord,Typeable,Data)++> -- | Used to distinguish between standalone composite types, and+> -- automatically generated ones, generated from a table or view+> -- respectively.+> data CompositeFlavour = Composite | TableComposite | ViewComposite+>                         deriving (Eq,Ord,Show)++> relationComposites :: [CompositeFlavour]+> relationComposites = [TableComposite,ViewComposite]+++> -- | Provides the definition of a composite type. The components are+> -- composite (or table or view) name, the flavour of the composite,+> -- the types of the composite attributes, and the types of the+> -- system columns iff the composite represents a table type (the+> -- third and fourth components are always 'CompositeType's).+> type CompositeDef = (String, CompositeFlavour, Type, Type)++> -- | The components are: function (or operator) name, argument+> -- types, return type and is variadic.+> type FunctionPrototype = (String, [Type], Type, Bool)++> -- | The components are domain type, base type (todo: add check+> -- constraint).+> type DomainDefinition = (Type,Type)++> data CatalogUpdate =+>     -- | add a new scalar type with the name given, also creates+>     -- an array type automatically+>     CatCreateScalar Type String Bool+>   | CatCreateDomain Type Type+>   | CatCreateComposite String [(String,Type)]+>   | CatCreateCast Type Type CastContext+>   | CatCreateTable String [(String,Type)] [(String,Type)]+>   | CatCreateView String [(String,Type)]+>   | CatCreateFunction FunFlav String [Type] Type Bool+>   | CatDropFunction Bool String [Type]+>     deriving (Eq,Ord,Typeable,Data,Show)++> ppCatUpdate :: CatalogUpdate -> String+> ppCatUpdate (CatCreateScalar t c p) = "CatCreateScalar " ++ show t ++ "(" ++ c ++ "," ++ show p ++ ")"+> ppCatUpdate (CatCreateDomain t b) = "CatCreateDomain " ++ show t ++ " as " ++ show b+> ppCatUpdate (CatCreateComposite nm flds) = "CatCreateComposite " ++ nm ++ showFlds flds+> ppCatUpdate (CatCreateCast s t ctx) = "CatCreateCast " ++ show s ++ "->" ++ show t ++ " " ++ show ctx+> ppCatUpdate (CatCreateTable nm flds1 flds2) = "CatCreateTable " ++ nm ++ showFlds flds1 ++ showFlds flds2+> ppCatUpdate (CatCreateView nm flds) = "CatCreateView " ++ nm ++ showFlds flds+> ppCatUpdate (CatCreateFunction flav nm args ret vdc) =+>     "CatCreateFunction " ++ show flav ++ " " ++ nm ++ " returns " ++ show ret +++>     "(" ++ intercalate "," (map show args) ++ ")" ++ if vdc then " variadic" else ""+> ppCatUpdate (CatDropFunction _ nm args) = "CatDropFunction " ++ nm ++ "(" ++ show args ++ ")"++> showFlds :: [(String,Type)] -> String+> showFlds flds = "(\n" ++ sfs flds ++ ")"+>                 where+>                   sfs ((nm,t):fs) = "    " ++ show nm ++ " " ++ show t ++ "\n" ++ sfs fs+>                   sfs [] = ""++> data FunFlav = FunPrefix | FunPostfix | FunBinary+>              | FunName | FunAgg | FunWindow+>                deriving (Eq,Show,Ord,Typeable,Data)++> -- | Applies a list of 'CatalogUpdate's to an 'Catalog' value+> -- to produce a new Catalog value.+> updateCatalog :: Catalog+>                   -> [CatalogUpdate]+>                   -> Either [TypeError] Catalog+> updateCatalog cat' eus =+>   foldM updateCat' (cat' {catUpdates = catUpdates cat' ++ eus}) eus+>   where+>     updateCat' cat eu =+>       case eu of+>         CatCreateScalar ty catl pref -> do+>                 errorWhen (not allowed)+>                   [BadCatalogUpdate $ "can only add scalar types\+>                                       \this way, got " ++ show ty]+>                 let ScalarType nm = ty+>                 return $ addTypeWithArray cat nm ty catl pref+>                 where+>                   allowed = case ty of+>                                     ScalarType _ -> True+>                                     _ -> False+>         CatCreateDomain ty baseTy -> do+>                 errorWhen (not allowed)+>                   [BadCatalogUpdate $ "can only add domain types\+>                                       \this way, got " ++ show ty]+>                 errorWhen (not baseAllowed)+>                   [BadCatalogUpdate $ "can only add domain types\+>                                           \based on scalars, got "+>                                           ++ show baseTy]+>                 let DomainType nm = ty+>                 catl <- catTypeCategory cat baseTy+>                 return (addTypeWithArray cat nm ty catl False) {+>                                        catDomainDefs =+>                                          (ty,baseTy):catDomainDefs cat+>                                        ,catCasts =+>                                          (ty,baseTy,ImplicitCastContext):catCasts cat}+>                 where+>                   allowed = case ty of+>                                             DomainType _ -> True+>                                             _ -> False+>                   baseAllowed = case baseTy of+>                                                     ScalarType _ -> True+>                                                     _ -> False++>         CatCreateComposite nm flds ->+>                 return $ (addTypeWithArray cat nm (NamedCompositeType nm) "C" False) {+>                             catAttrDefs =+>                               (nm,Composite,CompositeType flds, CompositeType [])+>                               : catAttrDefs cat}+>         CatCreateCast src tgt ctx -> return $ cat {catCasts = (src,tgt,ctx):catCasts cat}+>         CatCreateTable nm attrs sysAttrs -> do+>                 checkTypeDoesntExist cat nm (NamedCompositeType nm)+>                 return $ (addTypeWithArray cat nm+>                             (NamedCompositeType nm) "C" False) {+>                             catAttrDefs =+>                               (nm,TableComposite,CompositeType attrs, CompositeType sysAttrs)+>                               : catAttrDefs cat}+>         CatCreateView nm attrs -> {-trace ("create view:" ++ show nm) $-} do+>                 checkTypeDoesntExist cat nm (NamedCompositeType nm)+>                 return $ (addTypeWithArray cat nm+>                             (NamedCompositeType nm) "C" False) {+>                             catAttrDefs =+>                               (nm,ViewComposite,CompositeType attrs, CompositeType [])+>                               : catAttrDefs cat}+>         CatCreateFunction f nm args ret vdc ->+>             return $ case f of+>               FunPrefix -> cat {catPrefixOperators=(nm,args,ret,vdc):catPrefixOperators cat}+>               FunPostfix -> cat {catPostfixOperators=(nm,args,ret,vdc):catPostfixOperators cat}+>               FunBinary -> cat {catBinaryOperators=(nm,args,ret,vdc):catBinaryOperators cat}+>               FunAgg -> cat {catAggregates=(nm,args,ret,vdc):catAggregates cat}+>               FunWindow -> cat {catWindowFunctions=(nm,args,ret,vdc):catWindowFunctions cat}+>               FunName -> cat {catFunctions=(nm,args,ret,vdc):catFunctions cat}+>         CatDropFunction ifexists nm args -> do+>             let matches =  filter matchingFn (catFunctions cat)+>             errorWhen (null matches) [BadCatalogUpdate $+>                                         "couldn't find function to drop " +++>                                         show nm ++ "(" ++ show args++")"]+>             errorWhen (length matches > 1) [BadCatalogUpdate $+>                                               "multiple matching functions to drop " +++>                                               show nm ++ "(" ++ show args++")"]+>             return cat {catFunctions = filter (not . matchingFn) (catFunctions cat)+>                        ,catUpdates = filter (not.matchingUpdate) (catUpdates cat)}+>             where+>               matchingFn (nm1,a1,_,_) = map toLower nm == map toLower nm1 && args == a1+>               matchingUpdate (CatDropFunction _ nm2 a2) | map toLower nm2 == map toLower nm+>                                                           && a2 == args = True+>               matchingUpdate (CatCreateFunction _ nm2 a2 _ _) | map toLower nm2 == map toLower nm+>                                                           && a2 == args = True+>               matchingUpdate _ = False++todo:+look for matching function in list, if not found then error+remove from list, and remove from update list+++>     addTypeWithArray cat nm ty catl pref =+>       cat {catTypeNames =+>                ('_':nm,ArrayType ty)+>                : (nm,ty)+>                : catTypeNames cat+>           ,catTypeCategories =+>                (ArrayType ty,"A",False)+>                : (ty,catl,pref)+>                : catTypeCategories cat}+>     checkTypeDoesntExist cat nm ty = do+>         errorWhen (any (==nm) $ map fst $ catTypeNames cat)+>             [TypeAlreadyExists ty]+>         errorWhen (any (==ty) $ map snd $ catTypeNames cat)+>             [TypeAlreadyExists ty]+>         return ()+++> {-+>  | Takes part an 'Catalog' value to produce a list of 'CatalogUpdate's.+>  You can use this to look inside the Catalog data type e.g. if you want to+>  examine a catalog. It should be the case that:+>  @+>   updateCatalog emptyCatalog (deconstructCatalog cat) = cat+>  @ -}+> deconstructCatalog :: Catalog -> [CatalogUpdate]+> deconstructCatalog = catUpdates+++================================================================================++= type checking stuff++> catCompositeDef :: Catalog -> [CompositeFlavour] -> String -> Either [TypeError] (CompositeDef)+> catCompositeDef cat flvs nm = do+>   let c = filter (\(n,t,_,_) -> n == nm && (null flvs || t `elem` flvs)) $ catAttrDefs cat+>   errorWhen (null c)+>             [UnrecognisedRelation nm]+>   case c of+>     (_,fl1,r,s):[] -> return (nm,fl1,r,s)+>     _ -> Left [InternalError $ "problem getting attributes for: " ++ show nm ++ ", " ++ show c]++> catCompositeAttrsPair :: Catalog -> [CompositeFlavour] -> String+>                       -> Either [TypeError] ([(String,Type)],[(String,Type)])+> catCompositeAttrsPair cat flvs ty = do+>    (_,_,CompositeType a,CompositeType b) <- catCompositeDef cat flvs ty+>    return (a,b)++> catCompositeAttrs :: Catalog -> [CompositeFlavour] -> String+>                   -> Either [TypeError] [(String,Type)]+> catCompositeAttrs cat flvs ty = do+>   (a,b) <- catCompositeAttrsPair cat flvs ty+>   return $ a ++ b++> catCompositePublicAttrs :: Catalog -> [CompositeFlavour] -> String+>                   -> Either [TypeError] [(String,Type)]+> catCompositePublicAttrs cat flvs ty = do+>   (a,_) <- catCompositeAttrsPair cat flvs ty+>   return a+++> catTypeCategory :: Catalog -> Type -> Either [TypeError] String+> catTypeCategory cat ty =+>   fmap fst $ catGetCategoryInfo cat ty++> catPreferredType :: Catalog -> Type -> Either [TypeError] Bool+> catPreferredType cat ty =+>   fmap snd $ catGetCategoryInfo cat ty++> catCast :: Catalog -> CastContext -> Type -> Type -> Either [TypeError] Bool+> catCast cat ctx from to = {-trace ("check cast " ++ show from ++ show to) $-}+>     case from of+>       t@(DomainType _) -> do+>                 baseType <- catDomainBaseType cat t+>                 cc <- catCast cat ctx baseType to+>                 return $ (baseType == to) ||+>                                (cc ||+>                                   any (== (from, to, ctx)) (catCasts cat))+>       _ -> Right $ any (==(from,to,ctx)) (catCasts cat)+++> catDomainBaseType :: Catalog -> Type -> Either [TypeError] Type+> catDomainBaseType cat ty =+>   --check type is domain, check it exists in main list+>   case lookup ty (catDomainDefs cat) of+>       Nothing -> Left [DomainDefNotFound ty]+>       Just t -> Right t+++> catLookupFns :: Catalog -> String -> [FunctionPrototype]+> catLookupFns cat name =+>     filter (\(nm,_,_,_) -> map toLower nm == map toLower name) catGetAllFns+>     where+>     catGetAllFns =+>         concat [catPrefixOperators cat+>                ,catPostfixOperators cat+>                ,catBinaryOperators cat+>                ,catFunctions cat+>                ,catAggregates cat+>                ,catWindowFunctions cat]++== internal support for type checker fns above++> catGetCategoryInfo :: Catalog -> Type -> Either [TypeError] (String, Bool)+> catGetCategoryInfo cat ty =+>   case ty of+>     SetOfType _ -> Right ("", False)+>     AnonymousRecordType _ -> Right ("", False)+>     ArrayType (Pseudo _) -> Right ("A",False)+>     Pseudo _ -> Right ("P",False)+>     _ -> let l = filter (\(t,_,_) -> ty == t) $ catTypeCategories cat+>          in if null l+>               then Left [InternalError $ "no type category for " ++ show ty]+>               else let (_,c,p):_ =l+>                    in Right (c,p)++> catTypeExists :: Catalog -> Type -> Either [TypeError] Type+> catTypeExists cat t =+>     errorWhen (t `notElem` map snd (catTypeNames cat))+>               [UnknownTypeError t] >>+>     Right t++> catLookupType :: Catalog -> String -> Either [TypeError] Type+> catLookupType cat name =+>     liftME [UnknownTypeName name] $+>       lookup name (catTypeNames cat)+++================================================================================++= built in stuff++keyword operators, all of these are built in and don't appear in any+postgresql catalog++This is wrong, these need to be separated into prefix, postfix, binary++> keywordOperatorTypes :: [FunctionPrototype]+> keywordOperatorTypes = [+>   ("!and", [typeBool, typeBool], typeBool, False)+>  ,("!or", [typeBool, typeBool], typeBool, False)+>  ,("!like", [ScalarType "text", ScalarType "text"], typeBool, False)+>  ,("!not", [typeBool], typeBool, False)+>  ,("!isnull", [Pseudo AnyElement], typeBool, False)+>  ,("!isnotnull", [Pseudo AnyElement], typeBool, False)+>  ,("!arrayctor", [ArrayType $ Pseudo AnyElement], Pseudo AnyArray, True)+>  ,("!between", [Pseudo AnyElement+>                ,Pseudo AnyElement+>                ,Pseudo AnyElement], Pseudo AnyElement, False)+>  ,("!substring", [ScalarType "text",typeInt,typeInt], ScalarType "text", False)+>  ,("!arraysub", [Pseudo AnyArray,typeInt], Pseudo AnyElement, False)+>  ]++these look like functions, but don't appear in the postgresql catalog.++> specialFunctionTypes :: [FunctionPrototype]+> specialFunctionTypes = [+>   ("coalesce", [ArrayType $ Pseudo AnyElement], Pseudo AnyElement, True)+>  ,("nullif", [Pseudo AnyElement, Pseudo AnyElement], Pseudo AnyElement,False)+>  ,("greatest", [ArrayType $ Pseudo AnyElement], Pseudo AnyElement,True)+>  ,("least", [ArrayType $ Pseudo AnyElement], Pseudo AnyElement,True)+>  ]++> pseudoTypes :: [(String, Type)]+> pseudoTypes =+>     [("any",Pseudo Any)+>     ,("anyarray",Pseudo AnyArray)+>     ,("anyelement",Pseudo AnyElement)+>     ,("anyenum",Pseudo AnyEnum)+>     ,("anynonarray",Pseudo AnyNonArray)+>     ,("cstring",Pseudo Cstring)+>     ,("record",Pseudo Record)+>     ,("trigger",Pseudo Trigger)+>     ,("void",Pseudo Void)+>     ,("_cstring",ArrayType $ Pseudo Cstring)+>     ,("_record",ArrayType $ Pseudo Record)+>     --,Pseudo Internal+>     --,Pseudo LanguageHandler+>     --,Pseudo Opaque+>     ]++================================================================================++= getOperatorType++used by the pretty printer, not sure this is a very good design++for now, assume that all the overloaded operators that have the+same name are all either binary, prefix or postfix, otherwise the+getoperatortype would need the types of the arguments to determine+the operator type, and the parser would have to be a lot cleverer+although, parsec handles - being unary and binary without breaking+a sweat, so maybe this isn't too difficult?++this is why binary @ operator isn't currently supported++> data OperatorType = BinaryOp | PrefixOp | PostfixOp+>                   deriving (Eq,Show)++> getOperatorType :: Catalog -> String -> Either [TypeError] OperatorType+> getOperatorType cat s = case () of+>                       _ | s `elem` ["!and", "!or","!like"] -> Right BinaryOp+>                         | s `elem` ["!not"] -> Right PrefixOp+>                         | s `elem` ["!isnull", "!isnotnull"] -> Right PostfixOp+>                         | any (\(x,_,_,_) -> x == s) (catBinaryOperators cat) ->+>                             Right BinaryOp+>                         | any (\(x,_,_,_) -> x == s ||+>                                            (x=="-" && s=="u-"))+>                               (catPrefixOperators cat) ->+>                             Right PrefixOp+>                         | any (\(x,_,_,_) -> x == s) (catPostfixOperators cat) ->+>                             Right PostfixOp+>                         | otherwise ->+>                             Left [InternalError $ "don't know flavour of operator " ++ s]++> isOperatorName :: String -> Bool+> isOperatorName = any (`elem` "+-*/<>=~!@#%^&|`?")++================================================================================++> -- | items in first catalog and not second, items in second and not first.+> data CatalogDiff = CatalogDiff [CatalogUpdate] [CatalogUpdate]+>                deriving Show++> -- | find differences between two catalogs+> compareCatalogs :: Catalog -> Catalog -> Catalog -> CatalogDiff+> compareCatalogs base start end =+>         let baseCatBits = deconstructCatalog base+>             startCatBits = deconstructCatalog start \\ baseCatBits+>             endCatBits = deconstructCatalog end \\ baseCatBits+>             missing = sort $ endCatBits \\ startCatBits+>             extras = sort $ startCatBits \\ endCatBits+>         in CatalogDiff missing extras++> -- | print a catdiff in a more human readable way than show.+> ppCatDiff :: CatalogDiff -> String+> ppCatDiff (CatalogDiff missing extr) =+>     "\nmissing:\n"+>     ++ intercalate "\n" (map ppCatUpdate missing)+>     ++ "\nextra:\n"+>     ++ intercalate "\n" (map ppCatUpdate extr)
+ Database/HsSqlPpp/AstInternals/Catalog/CatalogReader.lhs view
@@ -0,0 +1,258 @@+Copyright 2009 Jake Wheat++This module contains the code to read a set of catalog updates+from a database.++The code here hasn't been tidied up since the Catalog data type+was heavily changed so it's a bit messy.++> {-# OPTIONS_HADDOCK hide  #-}++> module Database.HsSqlPpp.AstInternals.Catalog.CatalogReader+>     (readCatalogFromDatabase) where++> import qualified Data.Map as M+> import Data.Maybe+> import Control.Applicative+> --import Debug.Trace++> import Database.HsSqlPpp.Dbms.DBAccess+> import Database.HsSqlPpp.AstInternals.TypeType+> import Database.HsSqlPpp.Utils+> import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal++> -- | Creates an 'CatalogUpdate' list by reading the database given.+> -- To create an Catalog value from this, use+> --+> -- @+> -- cat <- readCatalogFromDatabase 'something'+> -- let newCat = updateCatalog defaultCatalog cat+> -- @+> readCatalogFromDatabase :: String -- ^ name of the database to read+>                             -> IO [CatalogUpdate]+> readCatalogFromDatabase dbName = withConn ("dbname=" ++ dbName) $ \conn -> do+>    typeInfo <- selectRelation conn+>                  "select t.oid as oid,\n\+>                  \       t.typtype,\n\+>                  \       case nspname\n\+>                  \         when 'public' then t.typname\n\+>                  \         when 'pg_catalog' then t.typname\n\+>                  \         else nspname || '.' || t.typname\n\+>                  \       end as typname,\n\+>                  \       t.typarray,\n\+>                  \       coalesce(e.typtype,'0') as atyptype,\n\+>                  \       e.oid as aoid,\n\+>                  \       e.typname as atypname\n\+>                  \  from pg_catalog.pg_type t\n\+>                  \  left outer join pg_type e\n\+>                  \    on t.typarray = e.oid\n\+>                  \   inner join pg_namespace ns\n\+>                  \      on t.typnamespace = ns.oid\n\+>                   \         and ns.nspname in ('pg_catalog', 'public', 'information_schema')\n\+>                  \  where /*pg_catalog.pg_type_is_visible(t.oid)\n\+>                  \   and */not exists(select 1 from pg_catalog.pg_type el\n\+>                  \                       where el.typarray = t.oid)\n\+>                  \  order by t.typname;" []+>    let typeStuff = concatMap convTypeInfoRow typeInfo+>        typeAssoc = map (\(a,b,_) -> (a,b)) typeStuff+>        typeMap = M.fromList typeAssoc+>    cts <- map (\(nm:cat:pref:[]) ->+>                CatCreateScalar (ScalarType nm) cat ( read pref :: Bool)) <$>+>           selectRelation conn+>                        "select t.typname,typcategory,typispreferred\n\+>                        \from pg_type t\n\+>                        \   inner join pg_namespace ns\n\+>                        \      on t.typnamespace = ns.oid\n\+>                        \         and ns.nspname in ('pg_catalog', 'public', 'information_schema')\n\+>                        \where t.typarray<>0 and\n\+>                        \    typtype='b' /*and\n\+>                        \    pg_catalog.pg_type_is_visible(t.oid)*/;" []+>    domainDefInfo <- selectRelation conn+>                       "select pg_type.oid, typbasetype\n\+>                       \  from pg_type\n\+>                       \  inner join pg_namespace ns\n\+>                       \      on pg_type.typnamespace = ns.oid\n\+>                       \         and ns.nspname in ('pg_catalog', 'public', 'information_schema')\n\+>                       \ where typtype = 'd'\n\+>                       \     /*and  pg_catalog.pg_type_is_visible(oid)*/;" []+>    let jlt k = fromJust $ M.lookup k typeMap+>    let domainDefs = map (\l -> (jlt (l!!0),  jlt (l!!1))) domainDefInfo+>    --let domainCasts = map (\(t,b) ->(t,b,ImplicitCastContext)) domainDefs+>    castInfo <- selectRelation conn+>                  "select castsource,casttarget,castcontext from pg_cast;" []+>    let casts = {- domainCasts ++ -}  flip map castInfo+>                  (\l -> (jlt (l!!0), jlt (l!!1),+>                          case (l!!2) of+>                                      "a" -> AssignmentCastContext+>                                      "i" -> ImplicitCastContext+>                                      "e" -> ExplicitCastContext+>                                      _ -> error $ "internal error: unknown cast context " ++ (l!!2)))+>    operatorInfo <- selectRelation conn+>                        "select oprname,\n\+>                        \       oprleft,\n\+>                        \       oprright,\n\+>                        \       oprresult\n\+>                        \from pg_operator\n\+>                        \      where not (oprleft <> 0 and oprright <> 0\n\+>                        \         and oprname = '@') --hack for now\n\+>                        \      order by oprname;" []+>    let getOps a b c [] = (a,b,c)+>        getOps pref post bin (l:ls) =+>          let bit = (\a -> (l!!0, a, jlt(l!!3)))+>          in case () of+>                   _ | l!!1 == "0" -> getOps (bit [jlt (l!!2)]:pref) post bin ls+>                     | l!!2 == "0" -> getOps pref (bit [jlt (l!!1)]:post) bin ls+>                     | otherwise -> getOps pref post (bit [jlt (l!!1), jlt (l!!2)]:bin) ls+>    let (prefixOps, postfixOps, binaryOps) = getOps [] [] [] operatorInfo+>    functionInfo <- selectRelation conn+>                       "select proname,\n\+>                       \       array_to_string(proargtypes,','),\n\+>                       \       proretset,\n\+>                       \       prorettype\n\+>                       \from pg_proc\n\+>                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\+>                       \      and provariadic = 0\n\+>                       \      and not proisagg\n\+>                       \      and not proiswindow\n\+>                       \order by proname,proargtypes;" []+>    let fnProts = map (convFnRow jlt) functionInfo++>    aggregateInfo <- selectRelation conn+>                       "select proname,\n\+>                       \       array_to_string(proargtypes,','),\n\+>                       \       proretset,\n\+>                       \       prorettype\n\+>                       \from pg_proc\n\+>                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\+>                       \      and provariadic = 0\n\+>                       \      and proisagg\n\+>                       \order by proname,proargtypes;" []+>    let aggProts = map (convFnRow jlt) aggregateInfo++>    windowInfo <- selectRelation conn+>                       "select proname,\n\+>                       \       array_to_string(proargtypes,','),\n\+>                       \       proretset,\n\+>                       \       prorettype\n\+>                       \from pg_proc\n\+>                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\+>                       \      and provariadic = 0\n\+>                       \      and proiswindow\n\+>                       \order by proname,proargtypes;" []+>    let winProts = map (convFnRow jlt) windowInfo+++>    comps <- map (\(kind:nm:atts:sysatts:nsp:[]) ->+>              let nm1 = case nsp of+>                                 "pg_catalog" -> nm+>                                 "public" -> nm+>                                 n -> n ++ "." ++ nm+>              in case kind of+>                     "c" -> CatCreateComposite nm1 (convertAttString jlt atts)+>                     "r" -> CatCreateTable nm1 (convertAttString jlt atts) (convertAttString jlt sysatts)+>                     "v" -> CatCreateView nm1 (convertAttString jlt atts)+>                     _ -> error $ "unrecognised relkind: " ++ kind) <$>+>                 selectRelation conn+>                   "with att1 as (\n\+>                   \ select\n\+>                   \     attrelid,\n\+>                   \     attname,\n\+>                   \     attnum,\n\+>                   \     atttypid\n\+>                   \   from pg_attribute\n\+>                   \   inner join pg_class cls\n\+>                   \      on cls.oid = attrelid\n\+>                   \   inner join pg_namespace ns\n\+>                   \      on cls.relnamespace = ns.oid\n\+>                   \         and ns.nspname in ('pg_catalog', 'public', 'information_schema')\n\+>                   \   where /*pg_catalog.pg_table_is_visible(cls.oid)\n\+>                   \      and*/ cls.relkind in ('r','v','c')\n\+>                   \      and not attisdropped),\n\+>                   \ sysAtt as (\n\+>                   \ select attrelid,\n\+>                   \     array_to_string(\n\+>                   \       array_agg(attname || ';' || atttypid)\n\+>                   \         over (partition by attrelid order by attnum\n\+>                   \               range between unbounded preceding\n\+>                   \               and unbounded following)\n\+>                   \       ,',') as sysAtts\n\+>                   \   from att1\n\+>                   \   where attnum < 0),\n\+>                   \ att as (\n\+>                   \ select attrelid,\n\+>                   \     array_to_string(\n\+>                   \       array_agg(attname || ';' || atttypid)\n\+>                   \          over (partition by attrelid order by attnum\n\+>                   \                range between unbounded preceding\n\+>                   \                and unbounded following)\n\+>                   \       ,',') as atts\n\+>                   \   from att1\n\+>                   \   where attnum > 0)\n\+>                   \ select distinct\n\+>                   \     cls.relkind,\n\+>                   \     cls.relname,\n\+>                   \     atts,\n\+>                   \     coalesce(sysAtts,''),\n\+>                   \     nspname\n\+>                   \   from att left outer join sysAtt using (attrelid)\n\+>                   \   inner join pg_class cls\n\+>                   \     on cls.oid = attrelid\n\+>                   \   inner join pg_namespace ns\n\+>                   \      on cls.relnamespace = ns.oid\n\+>                   \   order by relkind,relname;" []+++>    return $ concat [+>                cts+>               ,map (uncurry CatCreateDomain) domainDefs+>               ,map (\(a,b,c) -> CatCreateCast a b c) casts+>               ,map (\(a,b,c) -> CatCreateFunction FunPrefix a b c False) prefixOps+>               ,map (\(a,b,c) -> CatCreateFunction FunPostfix a b c False) postfixOps+>               ,map (\(a,b,c) -> CatCreateFunction FunBinary a b c False) binaryOps+>               ,map (\(a,b,c) -> CatCreateFunction FunName a b c False) fnProts+>               ,map (\(a,b,c) -> CatCreateFunction FunAgg a b c False) aggProts+>               ,map (\(a,b,c) -> CatCreateFunction FunWindow a b c False) winProts+>               ,comps]+>    where+>      convertAttString jlt s =+>          let ps = split ',' s+>              ps1 = map (split ';') ps+>          in map (\pl -> (head pl, jlt (pl!!1))) ps1+>      convFnRow jlt l =+>         (head l,fnArgs,fnRet)+>         where+>           fnRet = let rt1 = jlt (l!!3)+>                   in if read (l!!2)::Bool+>                        then SetOfType rt1+>                        else rt1+>           fnArgs = if (l!!1) == ""+>                      then []+>                      else let a = split ',' (l!!1)+>                           in map jlt a+>      convTypeInfoRow l =+>        let name = canonicalizeTypeName (l!!2)+>            ctor = case (l!!1) of+>                     "b" -> ScalarType+>                     "c" -> NamedCompositeType+>                     "d" -> DomainType+>                     "e" -> EnumType+>                     "p" -> (\t -> Pseudo (case t of+>                                                  "any" -> Any+>                                                  "anyarray" -> AnyArray+>                                                  "anyelement" -> AnyElement+>                                                  "anyenum" -> AnyEnum+>                                                  "anynonarray" -> AnyNonArray+>                                                  "cstring" -> Cstring+>                                                  "internal" -> Internal+>                                                  "language_handler" -> LanguageHandler+>                                                  "opaque" -> Opaque+>                                                  "record" -> Record+>                                                  "trigger" -> Trigger+>                                                  "void" -> Void+>                                                  _ -> error $ "internal error: unknown pseudo " ++ t))+>                     _ -> error $ "internal error: unknown type type: " ++ (l !! 1)+>            scType = (head l, ctor name, name)+>        in if (l!!4) /= "0"+>           then [(l!!5,ArrayType $ ctor name, '_':name), scType]+>           else [scType]+
+ Database/HsSqlPpp/AstInternals/Catalog/DefaultTemplate1Catalog.lhs view
@@ -0,0 +1,29023 @@+> {-# OPTIONS_HADDOCK hide  #-}++> module Database.HsSqlPpp.AstInternals.Catalog.DefaultTemplate1Catalog+>     (defaultTemplate1Catalog+>      ) where++> import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal+> import Database.HsSqlPpp.AstInternals.TypeType++> defaultTemplate1Catalog :: Catalog+> defaultTemplate1Catalog =+>    (\l -> case l of+>             Left x -> error $ show x+>             Right e -> e) $+>     updateCatalog defaultCatalog++>        [ CatCreateScalar (+>            ScalarType "bool" )+>            "B"+>            True+>        , CatCreateScalar (+>            ScalarType "bytea" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "char" )+>            "S"+>            False+>        , CatCreateScalar (+>            ScalarType "name" )+>            "S"+>            False+>        , CatCreateScalar (+>            ScalarType "int8" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "int2" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "int2vector" )+>            "A"+>            False+>        , CatCreateScalar (+>            ScalarType "int4" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "regproc" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "text" )+>            "S"+>            True+>        , CatCreateScalar (+>            ScalarType "oid" )+>            "N"+>            True+>        , CatCreateScalar (+>            ScalarType "tid" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "xid" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "cid" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "oidvector" )+>            "A"+>            False+>        , CatCreateScalar (+>            ScalarType "xml" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "point" )+>            "G"+>            False+>        , CatCreateScalar (+>            ScalarType "lseg" )+>            "G"+>            False+>        , CatCreateScalar (+>            ScalarType "path" )+>            "G"+>            False+>        , CatCreateScalar (+>            ScalarType "box" )+>            "G"+>            False+>        , CatCreateScalar (+>            ScalarType "polygon" )+>            "G"+>            False+>        , CatCreateScalar (+>            ScalarType "line" )+>            "G"+>            False+>        , CatCreateScalar (+>            ScalarType "float4" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "float8" )+>            "N"+>            True+>        , CatCreateScalar (+>            ScalarType "abstime" )+>            "D"+>            False+>        , CatCreateScalar (+>            ScalarType "reltime" )+>            "T"+>            False+>        , CatCreateScalar (+>            ScalarType "tinterval" )+>            "T"+>            False+>        , CatCreateScalar (+>            ScalarType "circle" )+>            "G"+>            False+>        , CatCreateScalar (+>            ScalarType "money" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "macaddr" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "inet" )+>            "I"+>            True+>        , CatCreateScalar (+>            ScalarType "cidr" )+>            "I"+>            False+>        , CatCreateScalar (+>            ScalarType "aclitem" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "bpchar" )+>            "S"+>            False+>        , CatCreateScalar (+>            ScalarType "varchar" )+>            "S"+>            False+>        , CatCreateScalar (+>            ScalarType "date" )+>            "D"+>            False+>        , CatCreateScalar (+>            ScalarType "time" )+>            "D"+>            False+>        , CatCreateScalar (+>            ScalarType "timestamp" )+>            "D"+>            False+>        , CatCreateScalar (+>            ScalarType "timestamptz" )+>            "D"+>            True+>        , CatCreateScalar (+>            ScalarType "interval" )+>            "T"+>            True+>        , CatCreateScalar (+>            ScalarType "timetz" )+>            "D"+>            False+>        , CatCreateScalar (+>            ScalarType "bit" )+>            "V"+>            False+>        , CatCreateScalar (+>            ScalarType "varbit" )+>            "V"+>            True+>        , CatCreateScalar (+>            ScalarType "numeric" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "refcursor" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "regprocedure" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "regoper" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "regoperator" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "regclass" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "regtype" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "uuid" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "tsvector" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "gtsvector" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "tsquery" )+>            "U"+>            False+>        , CatCreateScalar (+>            ScalarType "regconfig" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "regdictionary" )+>            "N"+>            False+>        , CatCreateScalar (+>            ScalarType "txid_snapshot" )+>            "U"+>            False+>        , CatCreateDomain (+>            DomainType "information_schema.cardinal_number" ) (+>            ScalarType "int4" )+>        , CatCreateDomain (+>            DomainType "information_schema.character_data" ) (+>            ScalarType "varchar" )+>        , CatCreateDomain (+>            DomainType "information_schema.sql_identifier" ) (+>            ScalarType "varchar" )+>        , CatCreateDomain (+>            DomainType "information_schema.time_stamp" ) (+>            ScalarType "timestamptz" )+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "int2" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "float4" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "float8" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "numeric" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "int8" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "int4" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "float4" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "float8" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "numeric" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "int8" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "int2" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "float4" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "float8" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "numeric" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "float4" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "float4" ) (+>            ScalarType "int2" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "float4" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "float4" ) (+>            ScalarType "float8" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "float4" ) (+>            ScalarType "numeric" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "float8" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "float8" ) (+>            ScalarType "int2" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "float8" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "float8" ) (+>            ScalarType "float4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "float8" ) (+>            ScalarType "numeric" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "numeric" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "numeric" ) (+>            ScalarType "int2" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "numeric" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "numeric" ) (+>            ScalarType "float4" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "numeric" ) (+>            ScalarType "float8" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "bool" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "bool" ) (+>            ScalarType "int4" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "regproc" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regproc" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "regproc" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "regproc" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "regproc" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regproc" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regproc" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regproc" ) (+>            ScalarType "regprocedure" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regprocedure" ) (+>            ScalarType "regproc" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "regprocedure" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regprocedure" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "regprocedure" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "regprocedure" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "regprocedure" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regprocedure" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regprocedure" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "regoper" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regoper" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "regoper" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "regoper" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "regoper" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regoper" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regoper" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regoper" ) (+>            ScalarType "regoperator" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regoperator" ) (+>            ScalarType "regoper" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "regoperator" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regoperator" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "regoperator" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "regoperator" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "regoperator" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regoperator" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regoperator" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "regclass" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regclass" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "regclass" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "regclass" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "regclass" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regclass" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regclass" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "regtype" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regtype" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "regtype" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "regtype" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "regtype" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regtype" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regtype" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "regconfig" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regconfig" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "regconfig" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "regconfig" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "regconfig" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regconfig" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regconfig" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "oid" ) (+>            ScalarType "regdictionary" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regdictionary" ) (+>            ScalarType "oid" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "regdictionary" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int2" ) (+>            ScalarType "regdictionary" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "regdictionary" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "regdictionary" ) (+>            ScalarType "int8" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "regdictionary" ) (+>            ScalarType "int4" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "text" ) (+>            ScalarType "regclass" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "varchar" ) (+>            ScalarType "regclass" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "text" ) (+>            ScalarType "bpchar" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "text" ) (+>            ScalarType "varchar" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "bpchar" ) (+>            ScalarType "text" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "bpchar" ) (+>            ScalarType "varchar" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "varchar" ) (+>            ScalarType "text" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "varchar" ) (+>            ScalarType "bpchar" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "char" ) (+>            ScalarType "text" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "char" ) (+>            ScalarType "bpchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "char" ) (+>            ScalarType "varchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "name" ) (+>            ScalarType "text" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "name" ) (+>            ScalarType "bpchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "name" ) (+>            ScalarType "varchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "text" ) (+>            ScalarType "char" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "bpchar" ) (+>            ScalarType "char" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "varchar" ) (+>            ScalarType "char" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "text" ) (+>            ScalarType "name" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "bpchar" ) (+>            ScalarType "name" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "varchar" ) (+>            ScalarType "name" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "char" ) (+>            ScalarType "int4" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "char" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "abstime" ) (+>            ScalarType "date" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "abstime" ) (+>            ScalarType "time" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "abstime" ) (+>            ScalarType "timestamp" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "abstime" ) (+>            ScalarType "timestamptz" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "reltime" ) (+>            ScalarType "interval" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "date" ) (+>            ScalarType "timestamp" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "date" ) (+>            ScalarType "timestamptz" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "time" ) (+>            ScalarType "interval" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "time" ) (+>            ScalarType "timetz" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "timestamp" ) (+>            ScalarType "abstime" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "timestamp" ) (+>            ScalarType "date" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "timestamp" ) (+>            ScalarType "time" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "timestamp" ) (+>            ScalarType "timestamptz" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "timestamptz" ) (+>            ScalarType "abstime" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "timestamptz" ) (+>            ScalarType "date" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "timestamptz" ) (+>            ScalarType "time" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "timestamptz" ) (+>            ScalarType "timestamp" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "timestamptz" ) (+>            ScalarType "timetz" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "interval" ) (+>            ScalarType "reltime" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "interval" ) (+>            ScalarType "time" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "timetz" ) (+>            ScalarType "time" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "abstime" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "abstime" ) (+>            ScalarType "int4" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "reltime" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "reltime" ) (+>            ScalarType "int4" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "lseg" ) (+>            ScalarType "point" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "path" ) (+>            ScalarType "point" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "path" ) (+>            ScalarType "polygon" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "box" ) (+>            ScalarType "point" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "box" ) (+>            ScalarType "lseg" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "box" ) (+>            ScalarType "polygon" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "box" ) (+>            ScalarType "circle" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "polygon" ) (+>            ScalarType "point" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "polygon" ) (+>            ScalarType "path" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "polygon" ) (+>            ScalarType "box" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "polygon" ) (+>            ScalarType "circle" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "circle" ) (+>            ScalarType "point" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "circle" ) (+>            ScalarType "box" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "circle" ) (+>            ScalarType "polygon" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "cidr" ) (+>            ScalarType "inet" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "inet" ) (+>            ScalarType "cidr" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "bit" ) (+>            ScalarType "varbit" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "varbit" ) (+>            ScalarType "bit" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "int8" ) (+>            ScalarType "bit" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "int4" ) (+>            ScalarType "bit" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "bit" ) (+>            ScalarType "int8" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "bit" ) (+>            ScalarType "int4" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "cidr" ) (+>            ScalarType "text" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "inet" ) (+>            ScalarType "text" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "bool" ) (+>            ScalarType "text" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "xml" ) (+>            ScalarType "text" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "text" ) (+>            ScalarType "xml" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "cidr" ) (+>            ScalarType "varchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "inet" ) (+>            ScalarType "varchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "bool" ) (+>            ScalarType "varchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "xml" ) (+>            ScalarType "varchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "varchar" ) (+>            ScalarType "xml" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "cidr" ) (+>            ScalarType "bpchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "inet" ) (+>            ScalarType "bpchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "bool" ) (+>            ScalarType "bpchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "xml" ) (+>            ScalarType "bpchar" )+>            AssignmentCastContext+>        , CatCreateCast (+>            ScalarType "bpchar" ) (+>            ScalarType "xml" )+>            ExplicitCastContext+>        , CatCreateCast (+>            ScalarType "bpchar" ) (+>            ScalarType "bpchar" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "varchar" ) (+>            ScalarType "varchar" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "time" ) (+>            ScalarType "time" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "timestamp" ) (+>            ScalarType "timestamp" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "timestamptz" ) (+>            ScalarType "timestamptz" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "interval" ) (+>            ScalarType "interval" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "timetz" ) (+>            ScalarType "timetz" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "bit" ) (+>            ScalarType "bit" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "varbit" ) (+>            ScalarType "varbit" )+>            ImplicitCastContext+>        , CatCreateCast (+>            ScalarType "numeric" ) (+>            ScalarType "numeric" )+>            ImplicitCastContext+>        , CatCreateFunction+>            FunPrefix+>            "~"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "~"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "~"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "~"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "~"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "||/"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "|/"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "|"+>            [ ScalarType "tinterval"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@@"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@@"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@@"+>            [ ScalarType "path"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@@"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@@"+>            [ ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@-@"+>            [ ScalarType "path"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@-@"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "@"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "?|"+>            [ ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "?|"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "?-"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "?-"+>            [ ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "-"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "-"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "-"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "-"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "-"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "-"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "-"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "+"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "+"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "+"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "+"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "+"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "+"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "#"+>            [ ScalarType "path"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "#"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "!!"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunPrefix+>            "!!"+>            [ ScalarType "tsquery"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunPostfix+>            "!"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~~*"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~~*"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~~*"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~~"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~~"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~~"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~~"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~>~"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~>~"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~>=~"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~>=~"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~="+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~="+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~="+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~="+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~="+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~<~"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~<~"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~<=~"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~<=~"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~*"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~*"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~*"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ArrayType ( ScalarType "aclitem" )+>            , ScalarType "aclitem"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ScalarType "polygon"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "~"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "varbit" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ Pseudo AnyElement+>            , Pseudo AnyArray+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ Pseudo AnyNonArray+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "tsvector" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ Pseudo AnyArray+>            , Pseudo AnyElement+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunBinary+>            "||"+>            [ ScalarType "text"+>            , Pseudo AnyNonArray+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|>>"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|>>"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|>>"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|&>"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|&>"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|&>"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "|"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "^"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "^"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@@@"+>            [ ScalarType "tsquery"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@@@"+>            [ ScalarType "tsvector"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@@"+>            [ ScalarType "text"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@@"+>            [ ScalarType "tsquery"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@@"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@@"+>            [ ScalarType "tsvector"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@>"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@>"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@>"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@>"+>            [ ScalarType "polygon"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@>"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@>"+>            [ ArrayType ( ScalarType "aclitem" )+>            , ScalarType "aclitem"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@>"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@>"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "@>"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?||"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?||"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?|"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?-|"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?-|"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?-"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?#"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?#"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?#"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?#"+>            [ ScalarType "lseg"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?#"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?#"+>            [ ScalarType "lseg"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "?#"+>            [ ScalarType "line"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">^"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">^"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>="+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">>"+>            [ ScalarType "bit"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">="+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            ">"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "aclitem"+>            , ScalarType "aclitem"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int2vector"+>            , ScalarType "int2vector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "cid"+>            , ScalarType "cid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "xid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "xid"+>            , ScalarType "xid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "="+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<^"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<^"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "lseg"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "lseg"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "point"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "point"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "point"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "point"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "point"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<@"+>            [ ScalarType "point"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<?>"+>            [ ScalarType "abstime"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<>"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<="+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<|"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<|"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<|"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<="+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "bit"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<<"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "circle"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "point"+>            , ScalarType "line"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "point"+>            , ScalarType "path"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "point"+>            , ScalarType "circle"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "lseg"+>            , ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "point"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "lseg"+>            , ScalarType "line"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "point"+>            , ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<->"+>            [ ScalarType "line"+>            , ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<#>"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "tinterval" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "<"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "money"+>            , ScalarType "float4"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "money"+>            , ScalarType "int4"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "interval"+>            , ScalarType "float8"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "money"+>            , ScalarType "int2"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "money"+>            , ScalarType "float8"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "/"+>            [ ScalarType "box"+>            , ScalarType "point"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "timestamptz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "date"+>            , ScalarType "int4"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "date"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ArrayType ( ScalarType "aclitem" )+>            , ScalarType "aclitem"+>            ] (+>            ArrayType ( ScalarType "aclitem" ) )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "inet"+>            , ScalarType "int8"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "box"+>            , ScalarType "point"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "time"+>            , ScalarType "interval"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "timetz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "abstime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "timestamp"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "-"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "date"+>            , ScalarType "time"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "timetz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "time"+>            , ScalarType "interval"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "timestamp"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "time"+>            , ScalarType "date"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "date"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "box"+>            , ScalarType "point"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int8"+>            , ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ArrayType ( ScalarType "aclitem" )+>            , ScalarType "aclitem"+>            ] (+>            ArrayType ( ScalarType "aclitem" ) )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "inet"+>            , ScalarType "int8"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "interval"+>            , ScalarType "date"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "date"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "timetz"+>            , ScalarType "date"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "interval"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "interval"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "date"+>            , ScalarType "int4"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "interval"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "int4"+>            , ScalarType "date"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "timestamptz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "abstime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "+"+>            [ ScalarType "interval"+>            , ScalarType "time"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "box"+>            , ScalarType "point"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "money"+>            , ScalarType "float4"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "float4"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "money"+>            , ScalarType "float8"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "money"+>            , ScalarType "int4"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "money"+>            , ScalarType "int2"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "float8"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int4"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int2"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "float8"+>            , ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "interval"+>            , ScalarType "float8"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "*"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&>"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&>"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&>"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&<|"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&<|"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&<|"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&<"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&<"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&<"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&&"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&&"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&&"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&&"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&&"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&&"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "&"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "%"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "%"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "%"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "%"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#>="+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#>"+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#="+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#<>"+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#<="+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#<"+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "##"+>            [ ScalarType "line"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "##"+>            [ ScalarType "lseg"+>            , ScalarType "line"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "##"+>            [ ScalarType "point"+>            , ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "##"+>            [ ScalarType "lseg"+>            , ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "##"+>            [ ScalarType "line"+>            , ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "##"+>            [ ScalarType "point"+>            , ScalarType "line"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "##"+>            [ ScalarType "point"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "##"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "#"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~~*"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~~*"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~~*"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~~"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~~"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~~"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~~"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~*"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~*"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~*"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunBinary+>            "!~"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_cascade_del"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_cascade_upd"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_check_ins"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_check_upd"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_noaction_del"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_noaction_upd"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_restrict_del"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_restrict_upd"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_setdefault_del"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_setdefault_upd"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_setnull_del"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "RI_FKey_setnull_upd"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "abbrev"+>            [ ScalarType "cidr"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "abbrev"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "abs"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "abs"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "abs"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "abs"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "abs"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "abs"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstime"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstime"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimeeq"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimege"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimegt"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimein"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimele"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimelt"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimene"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimeout"+>            [ ScalarType "abstime"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimerecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunName+>            "abstimesend"+>            [ ScalarType "abstime"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "aclcontains"+>            [ ArrayType ( ScalarType "aclitem" )+>            , ScalarType "aclitem"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "aclinsert"+>            [ ArrayType ( ScalarType "aclitem" )+>            , ScalarType "aclitem"+>            ] (+>            ArrayType ( ScalarType "aclitem" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "aclitemeq"+>            [ ScalarType "aclitem"+>            , ScalarType "aclitem"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "aclitemin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "aclitem" )+>            False+>        , CatCreateFunction+>            FunName+>            "aclitemout"+>            [ ScalarType "aclitem"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "aclremove"+>            [ ArrayType ( ScalarType "aclitem" )+>            , ScalarType "aclitem"+>            ] (+>            ArrayType ( ScalarType "aclitem" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "acos"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "age"+>            [ ScalarType "xid"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "age"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "age"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "age"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "age"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "any_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo Any )+>            False+>        , CatCreateFunction+>            FunName+>            "any_out"+>            [ Pseudo Any+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "anyarray_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "anyarray_out"+>            [ Pseudo AnyArray+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "anyarray_recv"+>            [ Pseudo Internal+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "anyarray_send"+>            [ Pseudo AnyArray+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "anyelement_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunName+>            "anyelement_out"+>            [ Pseudo AnyElement+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "anyenum_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo AnyEnum )+>            False+>        , CatCreateFunction+>            FunName+>            "anyenum_out"+>            [ Pseudo AnyEnum+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "anynonarray_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo AnyNonArray )+>            False+>        , CatCreateFunction+>            FunName+>            "anynonarray_out"+>            [ Pseudo AnyNonArray+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "anytextcat"+>            [ Pseudo AnyNonArray+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "area"+>            [ ScalarType "path"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "area"+>            [ ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "area"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "areajoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "areasel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_agg_finalfn"+>            [ Pseudo Internal+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_agg_transfn"+>            [ Pseudo Internal+>            , Pseudo AnyElement+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "array_append"+>            [ Pseudo AnyArray+>            , Pseudo AnyElement+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_cat"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_dims"+>            [ Pseudo AnyArray+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_eq"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_fill"+>            [ Pseudo AnyElement+>            , ArrayType ( ScalarType "int4" )+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_fill"+>            [ Pseudo AnyElement+>            , ArrayType ( ScalarType "int4" )+>            , ArrayType ( ScalarType "int4" )+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_ge"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_gt"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_larger"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_le"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_length"+>            [ Pseudo AnyArray+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_lower"+>            [ Pseudo AnyArray+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_lt"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_ndims"+>            [ Pseudo AnyArray+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_ne"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_out"+>            [ Pseudo AnyArray+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "array_prepend"+>            [ Pseudo AnyElement+>            , Pseudo AnyArray+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_send"+>            [ Pseudo AnyArray+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_smaller"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "array_to_string"+>            [ Pseudo AnyArray+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "array_upper"+>            [ Pseudo AnyArray+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "arraycontained"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "arraycontains"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "arrayoverlap"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ascii"+>            [ ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "ascii_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "ascii_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "asin"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "atan"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "atan2"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "big5_to_euc_tw"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "big5_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "big5_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "bit"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bit"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bit"+>            [ ScalarType "bit"+>            , ScalarType "int4"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bit_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bit_length"+>            [ ScalarType "bytea"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "bit_length"+>            [ ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "bit_length"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "bit_out"+>            [ ScalarType "bit"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "bit_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bit_send"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitand"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitcat"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "varbit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitcmp"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "biteq"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitge"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitgt"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitle"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitlt"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitne"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitnot"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitor"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitshiftleft"+>            [ ScalarType "bit"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bitshiftright"+>            [ ScalarType "bit"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bittypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "bittypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "bitxor"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "bool"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "booland_statefunc"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "booleq"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "boolge"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "boolgt"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "boolin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "boolle"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "boollt"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "boolne"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "boolor_statefunc"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "boolout"+>            [ ScalarType "bool"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "boolrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "boolsend"+>            [ ScalarType "bool"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "box"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "box"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "box"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_above"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_above_eq"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_add"+>            [ ScalarType "box"+>            , ScalarType "point"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_below"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_below_eq"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_center"+>            [ ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_contain"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_contained"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_distance"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_div"+>            [ ScalarType "box"+>            , ScalarType "point"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_eq"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_ge"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_gt"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_intersect"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_le"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_left"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_lt"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_mul"+>            [ ScalarType "box"+>            , ScalarType "point"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_out"+>            [ ScalarType "box"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "box_overabove"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_overbelow"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_overlap"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_overleft"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_overright"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_right"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_same"+>            [ ScalarType "box"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_send"+>            [ ScalarType "box"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "box_sub"+>            [ ScalarType "box"+>            , ScalarType "point"+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchar"+>            [ ScalarType "char"+>            ] (+>            ScalarType "bpchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchar"+>            [ ScalarType "name"+>            ] (+>            ScalarType "bpchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchar"+>            [ ScalarType "bpchar"+>            , ScalarType "int4"+>            , ScalarType "bool"+>            ] (+>            ScalarType "bpchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchar_larger"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bpchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchar_pattern_ge"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchar_pattern_gt"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchar_pattern_le"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchar_pattern_lt"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchar_smaller"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bpchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharcmp"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchareq"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharge"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchargt"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchariclike"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharicnlike"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharicregexeq"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharicregexne"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharin"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bpchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharle"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharlike"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharlt"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharne"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharnlike"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharout"+>            [ ScalarType "bpchar"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharrecv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bpchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharregexeq"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharregexne"+>            [ ScalarType "bpchar"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpcharsend"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchartypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "bpchartypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "broadcast"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "btabstimecmp"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btarraycmp"+>            [ Pseudo AnyArray+>            , Pseudo AnyArray+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btbeginscan"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "btboolcmp"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btbpchar_pattern_cmp"+>            [ ScalarType "bpchar"+>            , ScalarType "bpchar"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btbuild"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "btbulkdelete"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "btcharcmp"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btcostestimate"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "btendscan"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "btfloat48cmp"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btfloat4cmp"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btfloat84cmp"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btfloat8cmp"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btgetbitmap"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "btgettuple"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "btinsert"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "btint24cmp"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btint28cmp"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btint2cmp"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btint42cmp"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btint48cmp"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btint4cmp"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btint82cmp"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btint84cmp"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btint8cmp"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btmarkpos"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "btnamecmp"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btoidcmp"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btoidvectorcmp"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btoptions"+>            [ ArrayType ( ScalarType "text" )+>            , ScalarType "bool"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "btrecordcmp"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btreltimecmp"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btrescan"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "btrestrpos"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "btrim"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "btrim"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "btrim"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "bttext_pattern_cmp"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "bttextcmp"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "bttidcmp"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "bttintervalcmp"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "btvacuumcleanup"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "byteacat"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteacmp"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteaeq"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteage"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteagt"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteain"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteale"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bytealike"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "bytealt"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteane"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteanlike"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteaout"+>            [ ScalarType "bytea"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "bytearecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "byteasend"+>            [ ScalarType "bytea"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_cmp"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_div_flt4"+>            [ ScalarType "money"+>            , ScalarType "float4"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_div_flt8"+>            [ ScalarType "money"+>            , ScalarType "float8"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_div_int2"+>            [ ScalarType "money"+>            , ScalarType "int2"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_div_int4"+>            [ ScalarType "money"+>            , ScalarType "int4"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_eq"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_ge"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_gt"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_le"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_lt"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_mi"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_mul_flt4"+>            [ ScalarType "money"+>            , ScalarType "float4"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_mul_flt8"+>            [ ScalarType "money"+>            , ScalarType "float8"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_mul_int2"+>            [ ScalarType "money"+>            , ScalarType "int2"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_mul_int4"+>            [ ScalarType "money"+>            , ScalarType "int4"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_ne"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_out"+>            [ ScalarType "money"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_pl"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_send"+>            [ ScalarType "money"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "cash_words"+>            [ ScalarType "money"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "cashlarger"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cashsmaller"+>            [ ScalarType "money"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "cbrt"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "ceil"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "ceil"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "ceiling"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "ceiling"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "center"+>            [ ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "center"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "char"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "char" )+>            False+>        , CatCreateFunction+>            FunName+>            "char"+>            [ ScalarType "text"+>            ] (+>            ScalarType "char" )+>            False+>        , CatCreateFunction+>            FunName+>            "char_length"+>            [ ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "char_length"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "character_length"+>            [ ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "character_length"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "chareq"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "charge"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "chargt"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "charin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "char" )+>            False+>        , CatCreateFunction+>            FunName+>            "charle"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "charlt"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "charne"+>            [ ScalarType "char"+>            , ScalarType "char"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "charout"+>            [ ScalarType "char"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "charrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "char" )+>            False+>        , CatCreateFunction+>            FunName+>            "charsend"+>            [ ScalarType "char"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "chr"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "cideq"+>            [ ScalarType "cid"+>            , ScalarType "cid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "cidin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "cid" )+>            False+>        , CatCreateFunction+>            FunName+>            "cidout"+>            [ ScalarType "cid"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "cidr"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "cidr" )+>            False+>        , CatCreateFunction+>            FunName+>            "cidr_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "cidr" )+>            False+>        , CatCreateFunction+>            FunName+>            "cidr_out"+>            [ ScalarType "cidr"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "cidr_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "cidr" )+>            False+>        , CatCreateFunction+>            FunName+>            "cidr_send"+>            [ ScalarType "cidr"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "cidrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "cid" )+>            False+>        , CatCreateFunction+>            FunName+>            "cidsend"+>            [ ScalarType "cid"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle"+>            [ ScalarType "box"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle"+>            [ ScalarType "point"+>            , ScalarType "float8"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_above"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_add_pt"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_below"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_center"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_contain"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_contain_pt"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_contained"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_distance"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_div_pt"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_eq"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_ge"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_gt"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_le"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_left"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_lt"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_mul_pt"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_ne"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_out"+>            [ ScalarType "circle"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_overabove"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_overbelow"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_overlap"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_overleft"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_overright"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_right"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_same"+>            [ ScalarType "circle"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_send"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "circle_sub_pt"+>            [ ScalarType "circle"+>            , ScalarType "point"+>            ] (+>            ScalarType "circle" )+>            False+>        , CatCreateFunction+>            FunName+>            "clock_timestamp"+>            [] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "close_lb"+>            [ ScalarType "line"+>            , ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "close_ls"+>            [ ScalarType "line"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "close_lseg"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "close_pb"+>            [ ScalarType "point"+>            , ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "close_pl"+>            [ ScalarType "point"+>            , ScalarType "line"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "close_ps"+>            [ ScalarType "point"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "close_sb"+>            [ ScalarType "lseg"+>            , ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "close_sl"+>            [ ScalarType "lseg"+>            , ScalarType "line"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "col_description"+>            [ ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "contjoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "contsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "convert"+>            [ ScalarType "bytea"+>            , ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "convert_from"+>            [ ScalarType "bytea"+>            , ScalarType "name"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "convert_to"+>            [ ScalarType "text"+>            , ScalarType "name"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "cos"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "cot"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "cstring_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "cstring_out"+>            [ Pseudo Cstring+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "cstring_recv"+>            [ Pseudo Internal+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "cstring_send"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "current_database"+>            [] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "current_query"+>            [] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "current_schema"+>            [] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "current_schemas"+>            [ ScalarType "bool"+>            ] (+>            ArrayType ( ScalarType "name" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "current_setting"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "current_user"+>            [] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "currtid"+>            [ ScalarType "oid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "tid" )+>            False+>        , CatCreateFunction+>            FunName+>            "currtid2"+>            [ ScalarType "text"+>            , ScalarType "tid"+>            ] (+>            ScalarType "tid" )+>            False+>        , CatCreateFunction+>            FunName+>            "currval"+>            [ ScalarType "regclass"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "cursor_to_xml"+>            [ ScalarType "refcursor"+>            , ScalarType "int4"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "cursor_to_xmlschema"+>            [ ScalarType "refcursor"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "database_to_xml"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "database_to_xml_and_xmlschema"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "database_to_xmlschema"+>            [ ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "date"+>            [ ScalarType "abstime"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "date"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "date"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_cmp"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_cmp_timestamp"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_cmp_timestamptz"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_eq"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_eq_timestamp"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_eq_timestamptz"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_ge"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_ge_timestamp"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_ge_timestamptz"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_gt"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_gt_timestamp"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_gt_timestamptz"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_larger"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_le"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_le_timestamp"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_le_timestamptz"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_lt"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_lt_timestamp"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_lt_timestamptz"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_mi"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_mi_interval"+>            [ ScalarType "date"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_mii"+>            [ ScalarType "date"+>            , ScalarType "int4"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_ne"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_ne_timestamp"+>            [ ScalarType "date"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_ne_timestamptz"+>            [ ScalarType "date"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_out"+>            [ ScalarType "date"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "date_part"+>            [ ScalarType "text"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_part"+>            [ ScalarType "text"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_part"+>            [ ScalarType "text"+>            , ScalarType "date"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_part"+>            [ ScalarType "text"+>            , ScalarType "time"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_part"+>            [ ScalarType "text"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_part"+>            [ ScalarType "text"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_part"+>            [ ScalarType "text"+>            , ScalarType "interval"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_part"+>            [ ScalarType "text"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_pl_interval"+>            [ ScalarType "date"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_pli"+>            [ ScalarType "date"+>            , ScalarType "int4"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_send"+>            [ ScalarType "date"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_smaller"+>            [ ScalarType "date"+>            , ScalarType "date"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_trunc"+>            [ ScalarType "text"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_trunc"+>            [ ScalarType "text"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "date_trunc"+>            [ ScalarType "text"+>            , ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "datetime_pl"+>            [ ScalarType "date"+>            , ScalarType "time"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "datetimetz_pl"+>            [ ScalarType "date"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "dcbrt"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "decode"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "degrees"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dexp"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "diagonal"+>            [ ScalarType "box"+>            ] (+>            ScalarType "lseg" )+>            False+>        , CatCreateFunction+>            FunName+>            "diameter"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dispell_init"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "dispell_lexize"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "dist_cpoly"+>            [ ScalarType "circle"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dist_lb"+>            [ ScalarType "line"+>            , ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dist_pb"+>            [ ScalarType "point"+>            , ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dist_pc"+>            [ ScalarType "point"+>            , ScalarType "circle"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dist_pl"+>            [ ScalarType "point"+>            , ScalarType "line"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dist_ppath"+>            [ ScalarType "point"+>            , ScalarType "path"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dist_ps"+>            [ ScalarType "point"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dist_sb"+>            [ ScalarType "lseg"+>            , ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dist_sl"+>            [ ScalarType "lseg"+>            , ScalarType "line"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "div"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "dlog1"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dlog10"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "domain_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            Pseudo Any )+>            False+>        , CatCreateFunction+>            FunName+>            "domain_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            Pseudo Any )+>            False+>        , CatCreateFunction+>            FunName+>            "dpow"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dround"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dsimple_init"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "dsimple_lexize"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "dsnowball_init"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "dsnowball_lexize"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "dsqrt"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "dsynonym_init"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "dsynonym_lexize"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "dtrunc"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "encode"+>            [ ScalarType "bytea"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_cmp"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_eq"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_first"+>            [ Pseudo AnyEnum+>            ] (+>            Pseudo AnyEnum )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_ge"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_gt"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            ] (+>            Pseudo AnyEnum )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_larger"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            Pseudo AnyEnum )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_last"+>            [ Pseudo AnyEnum+>            ] (+>            Pseudo AnyEnum )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_le"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_lt"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_ne"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_out"+>            [ Pseudo AnyEnum+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_range"+>            [ Pseudo AnyEnum+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_range"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_recv"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            ] (+>            Pseudo AnyEnum )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_send"+>            [ Pseudo AnyEnum+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "enum_smaller"+>            [ Pseudo AnyEnum+>            , Pseudo AnyEnum+>            ] (+>            Pseudo AnyEnum )+>            False+>        , CatCreateFunction+>            FunName+>            "eqjoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "eqsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_cn_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_cn_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_jis_2004_to_shift_jis_2004"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_jis_2004_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_jp_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_jp_to_sjis"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_jp_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_kr_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_kr_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_tw_to_big5"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_tw_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "euc_tw_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "exp"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "exp"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "factorial"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "family"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "flatfile_update_trigger"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "float4"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48div"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48eq"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48ge"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48gt"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48le"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48lt"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48mi"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48mul"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48ne"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float48pl"+>            [ ScalarType "float4"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4_accum"+>            [ ArrayType ( ScalarType "float8" )+>            , ScalarType "float4"+>            ] (+>            ArrayType ( ScalarType "float8" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "float4abs"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4div"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4eq"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4ge"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4gt"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4larger"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4le"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4lt"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4mi"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4mul"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4ne"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4out"+>            [ ScalarType "float4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "float4pl"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4send"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4smaller"+>            [ ScalarType "float4"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4um"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float4up"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84div"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84eq"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84ge"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84gt"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84le"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84lt"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84mi"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84mul"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84ne"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float84pl"+>            [ ScalarType "float8"+>            , ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_accum"+>            [ ArrayType ( ScalarType "float8" )+>            , ScalarType "float8"+>            ] (+>            ArrayType ( ScalarType "float8" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_avg"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_corr"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_covar_pop"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_covar_samp"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_regr_accum"+>            [ ArrayType ( ScalarType "float8" )+>            , ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ArrayType ( ScalarType "float8" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_regr_avgx"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_regr_avgy"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_regr_intercept"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_regr_r2"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_regr_slope"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_regr_sxx"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_regr_sxy"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_regr_syy"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_stddev_pop"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_stddev_samp"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_var_pop"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8_var_samp"+>            [ ArrayType ( ScalarType "float8" )+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8abs"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8div"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8eq"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8ge"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8gt"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8larger"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8le"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8lt"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8mi"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8mul"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8ne"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8out"+>            [ ScalarType "float8"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "float8pl"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8send"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8smaller"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8um"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "float8up"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "floor"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "floor"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "flt4_mul_cash"+>            [ ScalarType "float4"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "flt8_mul_cash"+>            [ ScalarType "float8"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "fmgr_c_validator"+>            [ ScalarType "oid"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "fmgr_internal_validator"+>            [ ScalarType "oid"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "fmgr_sql_validator"+>            [ ScalarType "oid"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "format_type"+>            [ ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "gb18030_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "gbk_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "generate_series"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            SetOfType ( ScalarType "int8" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "generate_series"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            SetOfType ( ScalarType "int4" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "generate_series"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            SetOfType ( ScalarType "int8" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "generate_series"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            SetOfType ( ScalarType "int4" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "generate_series"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            , ScalarType "interval"+>            ] (+>            SetOfType ( ScalarType "timestamp" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "generate_series"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            , ScalarType "interval"+>            ] (+>            SetOfType ( ScalarType "timestamptz" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "generate_subscripts"+>            [ Pseudo AnyArray+>            , ScalarType "int4"+>            ] (+>            SetOfType ( ScalarType "int4" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "generate_subscripts"+>            [ Pseudo AnyArray+>            , ScalarType "int4"+>            , ScalarType "bool"+>            ] (+>            SetOfType ( ScalarType "int4" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "get_bit"+>            [ ScalarType "bytea"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "get_byte"+>            [ ScalarType "bytea"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "get_current_ts_config"+>            [] (+>            ScalarType "regconfig" )+>            False+>        , CatCreateFunction+>            FunName+>            "getdatabaseencoding"+>            [] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "getpgusername"+>            [] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "gin_cmp_prefix"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "gin_cmp_tslexeme"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "gin_extract_tsquery"+>            [ ScalarType "tsquery"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gin_extract_tsvector"+>            [ ScalarType "tsvector"+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gin_tsquery_consistent"+>            [ Pseudo Internal+>            , ScalarType "int2"+>            , ScalarType "tsquery"+>            , ScalarType "int4"+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ginarrayconsistent"+>            [ Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo AnyArray+>            , ScalarType "int4"+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ginarrayextract"+>            [ Pseudo AnyArray+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "ginbeginscan"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "ginbuild"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "ginbulkdelete"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gincostestimate"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "ginendscan"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "gingetbitmap"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "gininsert"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ginmarkpos"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "ginoptions"+>            [ ArrayType ( ScalarType "text" )+>            , ScalarType "bool"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "ginqueryarrayextract"+>            [ Pseudo AnyArray+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "ginrescan"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "ginrestrpos"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "ginvacuumcleanup"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_box_compress"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_box_consistent"+>            [ Pseudo Internal+>            , ScalarType "box"+>            , ScalarType "int4"+>            , ScalarType "oid"+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_box_decompress"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_box_penalty"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_box_picksplit"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_box_same"+>            [ ScalarType "box"+>            , ScalarType "box"+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_box_union"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "box" )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_circle_compress"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_circle_consistent"+>            [ Pseudo Internal+>            , ScalarType "circle"+>            , ScalarType "int4"+>            , ScalarType "oid"+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_poly_compress"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gist_poly_consistent"+>            [ Pseudo Internal+>            , ScalarType "polygon"+>            , ScalarType "int4"+>            , ScalarType "oid"+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "gistbeginscan"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gistbuild"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gistbulkdelete"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gistcostestimate"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "gistendscan"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "gistgetbitmap"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "gistgettuple"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "gistinsert"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "gistmarkpos"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "gistoptions"+>            [ ArrayType ( ScalarType "text" )+>            , ScalarType "bool"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "gistrescan"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "gistrestrpos"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "gistvacuumcleanup"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsquery_compress"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsquery_consistent"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , ScalarType "int4"+>            , ScalarType "oid"+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsquery_decompress"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsquery_penalty"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsquery_picksplit"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsquery_same"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsquery_union"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsvector_compress"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsvector_consistent"+>            [ Pseudo Internal+>            , ScalarType "gtsvector"+>            , ScalarType "int4"+>            , ScalarType "oid"+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsvector_decompress"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsvector_penalty"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsvector_picksplit"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsvector_same"+>            [ ScalarType "gtsvector"+>            , ScalarType "gtsvector"+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsvector_union"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsvectorin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "gtsvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "gtsvectorout"+>            [ ScalarType "gtsvector"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "has_any_column_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_any_column_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_any_column_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_any_column_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_any_column_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_any_column_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "text"+>            , ScalarType "int2"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "oid"+>            , ScalarType "int2"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "int2"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "int2"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "int2"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "int2"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_column_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_database_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_database_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_database_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_database_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_database_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_database_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_foreign_data_wrapper_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_foreign_data_wrapper_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_foreign_data_wrapper_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_foreign_data_wrapper_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_foreign_data_wrapper_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_foreign_data_wrapper_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_function_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_function_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_function_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_function_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_function_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_function_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_language_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_language_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_language_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_language_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_language_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_language_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_schema_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_schema_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_schema_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_schema_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_schema_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_schema_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_server_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_server_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_server_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_server_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_server_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_server_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_table_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_table_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_table_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_table_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_table_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_table_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_tablespace_privilege"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_tablespace_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_tablespace_privilege"+>            [ ScalarType "name"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_tablespace_privilege"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_tablespace_privilege"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "has_tablespace_privilege"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "hash_aclitem"+>            [ ScalarType "aclitem"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hash_numeric"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashbeginscan"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "hashbpchar"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashbuild"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "hashbulkdelete"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "hashchar"+>            [ ScalarType "char"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashcostestimate"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "hashendscan"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "hashenum"+>            [ Pseudo AnyEnum+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashfloat4"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashfloat8"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashgetbitmap"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashgettuple"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashinet"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashinsert"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashint2"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashint2vector"+>            [ ScalarType "int2vector"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashint4"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashint8"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashmacaddr"+>            [ ScalarType "macaddr"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashmarkpos"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "hashname"+>            [ ScalarType "name"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashoid"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashoidvector"+>            [ ScalarType "oidvector"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashoptions"+>            [ ArrayType ( ScalarType "text" )+>            , ScalarType "bool"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashrescan"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "hashrestrpos"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "hashtext"+>            [ ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "hashvacuumcleanup"+>            [ Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "hashvarlena"+>            [ Pseudo Internal+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "height"+>            [ ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "host"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "hostmask"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "iclikejoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "iclikesel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "icnlikejoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "icnlikesel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "icregexeqjoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "icregexeqsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "icregexnejoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "icregexnesel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "inet_client_addr"+>            [] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "inet_client_port"+>            [] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "inet_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "inet_out"+>            [ ScalarType "inet"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "inet_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "inet_send"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "inet_server_addr"+>            [] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "inet_server_port"+>            [] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "inetand"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "inetmi"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "inetmi_int8"+>            [ ScalarType "inet"+>            , ScalarType "int8"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "inetnot"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "inetor"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "inetpl"+>            [ ScalarType "inet"+>            , ScalarType "int8"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "initcap"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24div"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24eq"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24ge"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24gt"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24le"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24lt"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24mi"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24mul"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24ne"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int24pl"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28div"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28eq"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28ge"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28gt"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28le"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28lt"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28mi"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28mul"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28ne"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int28pl"+>            [ ScalarType "int2"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2_accum"+>            [ ArrayType ( ScalarType "numeric" )+>            , ScalarType "int2"+>            ] (+>            ArrayType ( ScalarType "numeric" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "int2_avg_accum"+>            [ ArrayType ( ScalarType "int8" )+>            , ScalarType "int2"+>            ] (+>            ArrayType ( ScalarType "int8" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "int2_mul_cash"+>            [ ScalarType "int2"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2_sum"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2abs"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2and"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2div"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2eq"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2ge"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2gt"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2larger"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2le"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2lt"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2mi"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2mod"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2mul"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2ne"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2not"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2or"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2out"+>            [ ScalarType "int2"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "int2pl"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2send"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2shl"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2shr"+>            [ ScalarType "int2"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2smaller"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2um"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2up"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2vectoreq"+>            [ ScalarType "int2vector"+>            , ScalarType "int2vector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2vectorin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "int2vector" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2vectorout"+>            [ ScalarType "int2vector"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "int2vectorrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "int2vector" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2vectorsend"+>            [ ScalarType "int2vector"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "int2xor"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4"+>            [ ScalarType "bool"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4"+>            [ ScalarType "char"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42div"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42eq"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42ge"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42gt"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42le"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42lt"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42mi"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42mul"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42ne"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int42pl"+>            [ ScalarType "int4"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48div"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48eq"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48ge"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48gt"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48le"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48lt"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48mi"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48mul"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48ne"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int48pl"+>            [ ScalarType "int4"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4_accum"+>            [ ArrayType ( ScalarType "numeric" )+>            , ScalarType "int4"+>            ] (+>            ArrayType ( ScalarType "numeric" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "int4_avg_accum"+>            [ ArrayType ( ScalarType "int8" )+>            , ScalarType "int4"+>            ] (+>            ArrayType ( ScalarType "int8" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "int4_mul_cash"+>            [ ScalarType "int4"+>            , ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4_sum"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4abs"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4and"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4div"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4eq"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4ge"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4gt"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4inc"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4larger"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4le"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4lt"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4mi"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4mod"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4mul"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4ne"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4not"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4or"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4out"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "int4pl"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4send"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4shl"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4shr"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4smaller"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4um"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4up"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int4xor"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82div"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82eq"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82ge"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82gt"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82le"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82lt"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82mi"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82mul"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82ne"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int82pl"+>            [ ScalarType "int8"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84div"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84eq"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84ge"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84gt"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84le"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84lt"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84mi"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84mul"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84ne"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int84pl"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8_accum"+>            [ ArrayType ( ScalarType "numeric" )+>            , ScalarType "int8"+>            ] (+>            ArrayType ( ScalarType "numeric" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "int8_avg"+>            [ ArrayType ( ScalarType "int8" )+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8_avg_accum"+>            [ ArrayType ( ScalarType "numeric" )+>            , ScalarType "int8"+>            ] (+>            ArrayType ( ScalarType "numeric" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "int8_sum"+>            [ ScalarType "numeric"+>            , ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8abs"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8and"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8div"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8eq"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8ge"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8gt"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8inc"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8inc_any"+>            [ ScalarType "int8"+>            , Pseudo Any+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8inc_float8_float8"+>            [ ScalarType "int8"+>            , ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8larger"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8le"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8lt"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8mi"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8mod"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8mul"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8ne"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8not"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8or"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8out"+>            [ ScalarType "int8"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "int8pl"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8pl_inet"+>            [ ScalarType "int8"+>            , ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8send"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8shl"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8shr"+>            [ ScalarType "int8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8smaller"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8um"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8up"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "int8xor"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "integer_pl_date"+>            [ ScalarType "int4"+>            , ScalarType "date"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "inter_lb"+>            [ ScalarType "line"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "inter_sb"+>            [ ScalarType "lseg"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "inter_sl"+>            [ ScalarType "lseg"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "internal_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "internal_out"+>            [ Pseudo Internal+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "interval"+>            [ ScalarType "reltime"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval"+>            [ ScalarType "time"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval"+>            [ ScalarType "interval"+>            , ScalarType "int4"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_accum"+>            [ ArrayType ( ScalarType "interval" )+>            , ScalarType "interval"+>            ] (+>            ArrayType ( ScalarType "interval" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_avg"+>            [ ArrayType ( ScalarType "interval" )+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_cmp"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_div"+>            [ ScalarType "interval"+>            , ScalarType "float8"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_eq"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_ge"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_gt"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_hash"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_larger"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_le"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_lt"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_mi"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_mul"+>            [ ScalarType "interval"+>            , ScalarType "float8"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_ne"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_out"+>            [ ScalarType "interval"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_pl"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_pl_date"+>            [ ScalarType "interval"+>            , ScalarType "date"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_pl_time"+>            [ ScalarType "interval"+>            , ScalarType "time"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_pl_timestamp"+>            [ ScalarType "interval"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_pl_timestamptz"+>            [ ScalarType "interval"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_pl_timetz"+>            [ ScalarType "interval"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_send"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_smaller"+>            [ ScalarType "interval"+>            , ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "interval_um"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "intervaltypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "intervaltypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "intinterval"+>            [ ScalarType "abstime"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isclosed"+>            [ ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isfinite"+>            [ ScalarType "abstime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isfinite"+>            [ ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isfinite"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isfinite"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isfinite"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ishorizontal"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ishorizontal"+>            [ ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ishorizontal"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "iso8859_1_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "iso8859_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "iso_to_koi8r"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "iso_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "iso_to_win1251"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "iso_to_win866"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "isopen"+>            [ ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isparallel"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isparallel"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isperp"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isperp"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isvertical"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isvertical"+>            [ ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "isvertical"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "johab_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "justify_days"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "justify_hours"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "justify_interval"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "koi8r_to_iso"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "koi8r_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "koi8r_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "koi8r_to_win1251"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "koi8r_to_win866"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "koi8u_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "language_handler_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo LanguageHandler )+>            False+>        , CatCreateFunction+>            FunName+>            "language_handler_out"+>            [ Pseudo LanguageHandler+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "lastval"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "latin1_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "latin2_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "latin2_to_win1250"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "latin3_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "latin4_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "length"+>            [ ScalarType "bytea"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "length"+>            [ ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "length"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "length"+>            [ ScalarType "path"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "length"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "length"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "length"+>            [ ScalarType "tsvector"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "length"+>            [ ScalarType "bytea"+>            , ScalarType "name"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "like"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "like"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "like"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "like_escape"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "like_escape"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "likejoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "likesel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "line"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "line" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_distance"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_eq"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_horizontal"+>            [ ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "line" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_interpt"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_intersect"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_out"+>            [ ScalarType "line"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "line_parallel"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_perp"+>            [ ScalarType "line"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "line" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_send"+>            [ ScalarType "line"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "line_vertical"+>            [ ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ln"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "ln"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_close"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_creat"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_create"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_export"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_import"+>            [ ScalarType "text"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_import"+>            [ ScalarType "text"+>            , ScalarType "oid"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_lseek"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_open"+>            [ ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_tell"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_truncate"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "lo_unlink"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "log"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "log"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "log"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "loread"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "lower"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "lowrite"+>            [ ScalarType "int4"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "lpad"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "lpad"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg"+>            [ ScalarType "box"+>            ] (+>            ScalarType "lseg" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "lseg" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_center"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_distance"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_eq"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_ge"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_gt"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_horizontal"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "lseg" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_interpt"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_intersect"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_le"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_length"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_lt"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_ne"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_out"+>            [ ScalarType "lseg"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_parallel"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_perp"+>            [ ScalarType "lseg"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "lseg" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_send"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "lseg_vertical"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ltrim"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "ltrim"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_cmp"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_eq"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_ge"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_gt"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "macaddr" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_le"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_lt"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_ne"+>            [ ScalarType "macaddr"+>            , ScalarType "macaddr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_out"+>            [ ScalarType "macaddr"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "macaddr" )+>            False+>        , CatCreateFunction+>            FunName+>            "macaddr_send"+>            [ ScalarType "macaddr"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "makeaclitem"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            , ScalarType "bool"+>            ] (+>            ScalarType "aclitem" )+>            False+>        , CatCreateFunction+>            FunName+>            "masklen"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "md5"+>            [ ScalarType "bytea"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "md5"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_ascii"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_big5"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_euc_cn"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_euc_jp"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_euc_kr"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_euc_tw"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_iso"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_koi8r"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_latin1"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_latin2"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_latin3"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_latin4"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_sjis"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_win1250"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_win1251"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mic_to_win866"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "mktinterval"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "tinterval" )+>            False+>        , CatCreateFunction+>            FunName+>            "mod"+>            [ ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "mod"+>            [ ScalarType "int2"+>            , ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunName+>            "mod"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "mod"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "mul_d_interval"+>            [ ScalarType "float8"+>            , ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "name"+>            [ ScalarType "text"+>            ] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "name"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "name"+>            [ ScalarType "varchar"+>            ] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "nameeq"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "namege"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "namegt"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "nameiclike"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "nameicnlike"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "nameicregexeq"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "nameicregexne"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "namein"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "namele"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "namelike"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "namelt"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "namene"+>            [ ScalarType "name"+>            , ScalarType "name"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "namenlike"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "nameout"+>            [ ScalarType "name"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "namerecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "nameregexeq"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "nameregexne"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "namesend"+>            [ ScalarType "name"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "neqjoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "neqsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "netmask"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "network"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "cidr" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_cmp"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_eq"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_ge"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_gt"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_le"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_lt"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_ne"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_sub"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_subeq"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_sup"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "network_supeq"+>            [ ScalarType "inet"+>            , ScalarType "inet"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "nextval"+>            [ ScalarType "regclass"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "nlikejoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "nlikesel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "notlike"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "notlike"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "notlike"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "now"+>            [] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "npoints"+>            [ ScalarType "path"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "npoints"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric"+>            [ ScalarType "numeric"+>            , ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_abs"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_accum"+>            [ ArrayType ( ScalarType "numeric" )+>            , ScalarType "numeric"+>            ] (+>            ArrayType ( ScalarType "numeric" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_add"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_avg"+>            [ ArrayType ( ScalarType "numeric" )+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_avg_accum"+>            [ ArrayType ( ScalarType "numeric" )+>            , ScalarType "numeric"+>            ] (+>            ArrayType ( ScalarType "numeric" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_cmp"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_div"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_div_trunc"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_eq"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_exp"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_fac"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_ge"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_gt"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_inc"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_larger"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_le"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_ln"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_log"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_lt"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_mod"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_mul"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_ne"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_out"+>            [ ScalarType "numeric"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_power"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_send"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_smaller"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_sqrt"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_stddev_pop"+>            [ ArrayType ( ScalarType "numeric" )+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_stddev_samp"+>            [ ArrayType ( ScalarType "numeric" )+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_sub"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_uminus"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_uplus"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_var_pop"+>            [ ArrayType ( ScalarType "numeric" )+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numeric_var_samp"+>            [ ArrayType ( ScalarType "numeric" )+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "numerictypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "numerictypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "numnode"+>            [ ScalarType "tsquery"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "obj_description"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "obj_description"+>            [ ScalarType "oid"+>            , ScalarType "name"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "octet_length"+>            [ ScalarType "bytea"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "octet_length"+>            [ ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "octet_length"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "octet_length"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "oid"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "oideq"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidge"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidgt"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidlarger"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidle"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidlt"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidne"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidout"+>            [ ScalarType "oid"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "oidrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidsend"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidsmaller"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectoreq"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectorge"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectorgt"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectorin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "oidvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectorle"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectorlt"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectorne"+>            [ ScalarType "oidvector"+>            , ScalarType "oidvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectorout"+>            [ ScalarType "oidvector"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectorrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "oidvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectorsend"+>            [ ScalarType "oidvector"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "oidvectortypes"+>            [ ScalarType "oidvector"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "on_pb"+>            [ ScalarType "point"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "on_pl"+>            [ ScalarType "point"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "on_ppath"+>            [ ScalarType "point"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "on_ps"+>            [ ScalarType "point"+>            , ScalarType "lseg"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "on_sb"+>            [ ScalarType "lseg"+>            , ScalarType "box"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "on_sl"+>            [ ScalarType "lseg"+>            , ScalarType "line"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "opaque_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo Opaque )+>            False+>        , CatCreateFunction+>            FunName+>            "opaque_out"+>            [ Pseudo Opaque+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "time"+>            , ScalarType "time"+>            , ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "time"+>            , ScalarType "time"+>            , ScalarType "time"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "time"+>            , ScalarType "interval"+>            , ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "time"+>            , ScalarType "interval"+>            , ScalarType "time"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            , ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            , ScalarType "timestamp"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "timestamp"+>            , ScalarType "interval"+>            , ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "timestamp"+>            , ScalarType "interval"+>            , ScalarType "timestamp"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "timestamptz"+>            , ScalarType "interval"+>            , ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "timestamptz"+>            , ScalarType "interval"+>            , ScalarType "timestamptz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlaps"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            , ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlay"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "overlay"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "path"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_add"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_add_pt"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_center"+>            [ ScalarType "path"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_contain_pt"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_distance"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_div_pt"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_inter"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_length"+>            [ ScalarType "path"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_mul_pt"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_n_eq"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_n_ge"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_n_gt"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_n_le"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_n_lt"+>            [ ScalarType "path"+>            , ScalarType "path"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_npoints"+>            [ ScalarType "path"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_out"+>            [ ScalarType "path"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "path_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_send"+>            [ ScalarType "path"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "path_sub_pt"+>            [ ScalarType "path"+>            , ScalarType "point"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "pclose"+>            [ ScalarType "path"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_advisory_lock"+>            [ ScalarType "int8"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_advisory_lock"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_advisory_lock_shared"+>            [ ScalarType "int8"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_advisory_lock_shared"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_advisory_unlock"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_advisory_unlock"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_advisory_unlock_all"+>            [] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_advisory_unlock_shared"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_advisory_unlock_shared"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_backend_pid"+>            [] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_cancel_backend"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_char_to_encoding"+>            [ ScalarType "name"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_client_encoding"+>            [] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_column_size"+>            [ Pseudo Any+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_conf_load_time"+>            [] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_conversion_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_current_xlog_insert_location"+>            [] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_current_xlog_location"+>            [] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_cursor"+>            [] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_database_size"+>            [ ScalarType "name"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_database_size"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_encoding_to_char"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_function_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_constraintdef"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_constraintdef"+>            [ ScalarType "oid"+>            , ScalarType "bool"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_expr"+>            [ ScalarType "text"+>            , ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_expr"+>            [ ScalarType "text"+>            , ScalarType "oid"+>            , ScalarType "bool"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_function_arguments"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_function_identity_arguments"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_function_result"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_functiondef"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_indexdef"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_indexdef"+>            [ ScalarType "oid"+>            , ScalarType "int4"+>            , ScalarType "bool"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_keywords"+>            [] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_ruledef"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_ruledef"+>            [ ScalarType "oid"+>            , ScalarType "bool"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_serial_sequence"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_triggerdef"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_userbyid"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_viewdef"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_viewdef"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_viewdef"+>            [ ScalarType "text"+>            , ScalarType "bool"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_get_viewdef"+>            [ ScalarType "oid"+>            , ScalarType "bool"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_has_role"+>            [ ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_has_role"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_has_role"+>            [ ScalarType "name"+>            , ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_has_role"+>            [ ScalarType "name"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_has_role"+>            [ ScalarType "oid"+>            , ScalarType "name"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_has_role"+>            [ ScalarType "oid"+>            , ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_is_other_temp_schema"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_lock_status"+>            [] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_ls_dir"+>            [ ScalarType "text"+>            ] (+>            SetOfType ( ScalarType "text" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_my_temp_schema"+>            [] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_opclass_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_operator_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_options_to_table"+>            [ ArrayType ( ScalarType "text" )+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_postmaster_start_time"+>            [] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_prepared_statement"+>            [] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_prepared_xact"+>            [] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_read_file"+>            [ ScalarType "text"+>            , ScalarType "int8"+>            , ScalarType "int8"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_relation_size"+>            [ ScalarType "regclass"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_relation_size"+>            [ ScalarType "regclass"+>            , ScalarType "text"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_reload_conf"+>            [] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_rotate_logfile"+>            [] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_show_all_settings"+>            [] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_size_pretty"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_sleep"+>            [ ScalarType "float8"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_start_backup"+>            [ ScalarType "text"+>            , ScalarType "bool"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_clear_snapshot"+>            [] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_file"+>            [ ScalarType "text"+>            ] (+>            Pseudo Record )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_activity"+>            [ ScalarType "int4"+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_activity"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_activity_start"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_client_addr"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_client_port"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_dbid"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_idset"+>            [] (+>            SetOfType ( ScalarType "int4" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_pid"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_start"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_userid"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_waiting"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_backend_xact_start"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_bgwriter_buf_written_checkpoints"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_bgwriter_buf_written_clean"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_bgwriter_maxwritten_clean"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_bgwriter_requested_checkpoints"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_bgwriter_timed_checkpoints"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_blocks_fetched"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_blocks_hit"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_buf_alloc"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_buf_written_backend"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_blocks_fetched"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_blocks_hit"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_numbackends"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_tuples_deleted"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_tuples_fetched"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_tuples_inserted"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_tuples_returned"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_tuples_updated"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_xact_commit"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_db_xact_rollback"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_dead_tuples"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_function_calls"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_function_self_time"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_function_time"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_last_analyze_time"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_last_autoanalyze_time"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_last_autovacuum_time"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_last_vacuum_time"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_live_tuples"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_numscans"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_tuples_deleted"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_tuples_fetched"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_tuples_hot_updated"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_tuples_inserted"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_tuples_returned"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_get_tuples_updated"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stat_reset"+>            [] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_stop_backup"+>            [] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_switch_xlog"+>            [] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_table_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_tablespace_databases"+>            [ ScalarType "oid"+>            ] (+>            SetOfType ( ScalarType "oid" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_tablespace_size"+>            [ ScalarType "name"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_tablespace_size"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_terminate_backend"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_timezone_abbrevs"+>            [] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_timezone_names"+>            [] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_total_relation_size"+>            [ ScalarType "regclass"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_try_advisory_lock"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_try_advisory_lock"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_try_advisory_lock_shared"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_try_advisory_lock_shared"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_ts_config_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_ts_dict_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_ts_parser_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_ts_template_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_type_is_visible"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_typeof"+>            [ Pseudo Any+>            ] (+>            ScalarType "regtype" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_xlogfile_name"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "pg_xlogfile_name_offset"+>            [ ScalarType "text"+>            ] (+>            Pseudo Record )+>            False+>        , CatCreateFunction+>            FunName+>            "pi"+>            [] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "plainto_tsquery"+>            [ ScalarType "text"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "plainto_tsquery"+>            [ ScalarType "regconfig"+>            , ScalarType "text"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "point"+>            [ ScalarType "lseg"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point"+>            [ ScalarType "path"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point"+>            [ ScalarType "box"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_above"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_add"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_below"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_distance"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_div"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_eq"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_horiz"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_left"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_mul"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_ne"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_out"+>            [ ScalarType "point"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "point_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_right"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_send"+>            [ ScalarType "point"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_sub"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "point_vert"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_above"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_below"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_center"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "point" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_contain"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_contain_pt"+>            [ ScalarType "polygon"+>            , ScalarType "point"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_contained"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_distance"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "polygon" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_left"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_npoints"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_out"+>            [ ScalarType "polygon"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_overabove"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_overbelow"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_overlap"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_overleft"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_overright"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "polygon" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_right"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_same"+>            [ ScalarType "polygon"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "poly_send"+>            [ ScalarType "polygon"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "polygon"+>            [ ScalarType "path"+>            ] (+>            ScalarType "polygon" )+>            False+>        , CatCreateFunction+>            FunName+>            "polygon"+>            [ ScalarType "box"+>            ] (+>            ScalarType "polygon" )+>            False+>        , CatCreateFunction+>            FunName+>            "polygon"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "polygon" )+>            False+>        , CatCreateFunction+>            FunName+>            "polygon"+>            [ ScalarType "int4"+>            , ScalarType "circle"+>            ] (+>            ScalarType "polygon" )+>            False+>        , CatCreateFunction+>            FunName+>            "popen"+>            [ ScalarType "path"+>            ] (+>            ScalarType "path" )+>            False+>        , CatCreateFunction+>            FunName+>            "position"+>            [ ScalarType "bytea"+>            , ScalarType "bytea"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "position"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "position"+>            [ ScalarType "bit"+>            , ScalarType "bit"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "positionjoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "positionsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "postgresql_fdw_validator"+>            [ ArrayType ( ScalarType "text" )+>            , ScalarType "oid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pow"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "pow"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "power"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "power"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "prsd_end"+>            [ Pseudo Internal+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "prsd_headline"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , ScalarType "tsquery"+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "prsd_lextype"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "prsd_nexttoken"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "prsd_start"+>            [ Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "pt_contained_circle"+>            [ ScalarType "point"+>            , ScalarType "circle"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "pt_contained_poly"+>            [ ScalarType "point"+>            , ScalarType "polygon"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "query_to_xml"+>            [ ScalarType "text"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "query_to_xml_and_xmlschema"+>            [ ScalarType "text"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "query_to_xmlschema"+>            [ ScalarType "text"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "querytree"+>            [ ScalarType "tsquery"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "quote_ident"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "quote_literal"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "quote_literal"+>            [ Pseudo AnyElement+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "quote_nullable"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "quote_nullable"+>            [ Pseudo AnyElement+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "radians"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "radius"+>            [ ScalarType "circle"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "random"+>            [] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "record_eq"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "record_ge"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "record_gt"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "record_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            Pseudo Record )+>            False+>        , CatCreateFunction+>            FunName+>            "record_le"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "record_lt"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "record_ne"+>            [ Pseudo Record+>            , Pseudo Record+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "record_out"+>            [ Pseudo Record+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "record_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            Pseudo Record )+>            False+>        , CatCreateFunction+>            FunName+>            "record_send"+>            [ Pseudo Record+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "regclass"+>            [ ScalarType "text"+>            ] (+>            ScalarType "regclass" )+>            False+>        , CatCreateFunction+>            FunName+>            "regclassin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "regclass" )+>            False+>        , CatCreateFunction+>            FunName+>            "regclassout"+>            [ ScalarType "regclass"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "regclassrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "regclass" )+>            False+>        , CatCreateFunction+>            FunName+>            "regclasssend"+>            [ ScalarType "regclass"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "regconfigin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "regconfig" )+>            False+>        , CatCreateFunction+>            FunName+>            "regconfigout"+>            [ ScalarType "regconfig"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "regconfigrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "regconfig" )+>            False+>        , CatCreateFunction+>            FunName+>            "regconfigsend"+>            [ ScalarType "regconfig"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "regdictionaryin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "regdictionary" )+>            False+>        , CatCreateFunction+>            FunName+>            "regdictionaryout"+>            [ ScalarType "regdictionary"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "regdictionaryrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "regdictionary" )+>            False+>        , CatCreateFunction+>            FunName+>            "regdictionarysend"+>            [ ScalarType "regdictionary"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "regexeqjoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "regexeqsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "regexnejoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "regexnesel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "regexp_matches"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            SetOfType ( ArrayType ( ScalarType "text" ) ) )+>            False+>        , CatCreateFunction+>            FunName+>            "regexp_matches"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            SetOfType ( ArrayType ( ScalarType "text" ) ) )+>            False+>        , CatCreateFunction+>            FunName+>            "regexp_replace"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "regexp_replace"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "regexp_split_to_array"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ArrayType ( ScalarType "text" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "regexp_split_to_array"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ArrayType ( ScalarType "text" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "regexp_split_to_table"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            SetOfType ( ScalarType "text" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "regexp_split_to_table"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            SetOfType ( ScalarType "text" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "regoperatorin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "regoperator" )+>            False+>        , CatCreateFunction+>            FunName+>            "regoperatorout"+>            [ ScalarType "regoperator"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "regoperatorrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "regoperator" )+>            False+>        , CatCreateFunction+>            FunName+>            "regoperatorsend"+>            [ ScalarType "regoperator"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "regoperin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "regoper" )+>            False+>        , CatCreateFunction+>            FunName+>            "regoperout"+>            [ ScalarType "regoper"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "regoperrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "regoper" )+>            False+>        , CatCreateFunction+>            FunName+>            "regopersend"+>            [ ScalarType "regoper"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "regprocedurein"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "regprocedure" )+>            False+>        , CatCreateFunction+>            FunName+>            "regprocedureout"+>            [ ScalarType "regprocedure"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "regprocedurerecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "regprocedure" )+>            False+>        , CatCreateFunction+>            FunName+>            "regproceduresend"+>            [ ScalarType "regprocedure"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "regprocin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "regproc" )+>            False+>        , CatCreateFunction+>            FunName+>            "regprocout"+>            [ ScalarType "regproc"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "regprocrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "regproc" )+>            False+>        , CatCreateFunction+>            FunName+>            "regprocsend"+>            [ ScalarType "regproc"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "regtypein"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "regtype" )+>            False+>        , CatCreateFunction+>            FunName+>            "regtypeout"+>            [ ScalarType "regtype"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "regtyperecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "regtype" )+>            False+>        , CatCreateFunction+>            FunName+>            "regtypesend"+>            [ ScalarType "regtype"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltime"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "reltime" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimeeq"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimege"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimegt"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimein"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "reltime" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimele"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimelt"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimene"+>            [ ScalarType "reltime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimeout"+>            [ ScalarType "reltime"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimerecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "reltime" )+>            False+>        , CatCreateFunction+>            FunName+>            "reltimesend"+>            [ ScalarType "reltime"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "repeat"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "replace"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "round"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "round"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "round"+>            [ ScalarType "numeric"+>            , ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "rpad"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "rpad"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "rtrim"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "rtrim"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "scalargtjoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "scalargtsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "scalarltjoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "scalarltsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "schema_to_xml"+>            [ ScalarType "name"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "schema_to_xml_and_xmlschema"+>            [ ScalarType "name"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "schema_to_xmlschema"+>            [ ScalarType "name"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "session_user"+>            [] (+>            ScalarType "name" )+>            False+>        , CatCreateFunction+>            FunName+>            "set_bit"+>            [ ScalarType "bytea"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "set_byte"+>            [ ScalarType "bytea"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "set_config"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "bool"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "set_masklen"+>            [ ScalarType "cidr"+>            , ScalarType "int4"+>            ] (+>            ScalarType "cidr" )+>            False+>        , CatCreateFunction+>            FunName+>            "set_masklen"+>            [ ScalarType "inet"+>            , ScalarType "int4"+>            ] (+>            ScalarType "inet" )+>            False+>        , CatCreateFunction+>            FunName+>            "setseed"+>            [ ScalarType "float8"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "setval"+>            [ ScalarType "regclass"+>            , ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "setval"+>            [ ScalarType "regclass"+>            , ScalarType "int8"+>            , ScalarType "bool"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "setweight"+>            [ ScalarType "tsvector"+>            , ScalarType "char"+>            ] (+>            ScalarType "tsvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "shell_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo Opaque )+>            False+>        , CatCreateFunction+>            FunName+>            "shell_out"+>            [ Pseudo Opaque+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "shift_jis_2004_to_euc_jis_2004"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "shift_jis_2004_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "shobj_description"+>            [ ScalarType "oid"+>            , ScalarType "name"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "sign"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "sign"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "similar_escape"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "sin"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "sjis_to_euc_jp"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "sjis_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "sjis_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "slope"+>            [ ScalarType "point"+>            , ScalarType "point"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "smgreq"+>            [ ScalarType "smgr"+>            , ScalarType "smgr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "smgrin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "smgr" )+>            False+>        , CatCreateFunction+>            FunName+>            "smgrne"+>            [ ScalarType "smgr"+>            , ScalarType "smgr"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "smgrout"+>            [ ScalarType "smgr"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "split_part"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "sqrt"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "sqrt"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "statement_timestamp"+>            [] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "string_to_array"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ArrayType ( ScalarType "text" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "strip"+>            [ ScalarType "tsvector"+>            ] (+>            ScalarType "tsvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "strpos"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "substr"+>            [ ScalarType "bytea"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "substr"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "substr"+>            [ ScalarType "bytea"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "substr"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "substring"+>            [ ScalarType "bytea"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "substring"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "substring"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "substring"+>            [ ScalarType "bit"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "substring"+>            [ ScalarType "bytea"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "substring"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "substring"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "substring"+>            [ ScalarType "bit"+>            , ScalarType "int4"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunName+>            "suppress_redundant_updates_trigger"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "table_to_xml"+>            [ ScalarType "regclass"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "table_to_xml_and_xmlschema"+>            [ ScalarType "regclass"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "table_to_xmlschema"+>            [ ScalarType "regclass"+>            , ScalarType "bool"+>            , ScalarType "bool"+>            , ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "tan"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "text"+>            [ ScalarType "bool"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "text"+>            [ ScalarType "char"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "text"+>            [ ScalarType "name"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "text"+>            [ ScalarType "xml"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "text"+>            [ ScalarType "inet"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "text"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_ge"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_gt"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_larger"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_le"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_lt"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_pattern_ge"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_pattern_gt"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_pattern_le"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_pattern_lt"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "text_smaller"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "textanycat"+>            [ ScalarType "text"+>            , Pseudo AnyNonArray+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "textcat"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "texteq"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "texticlike"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "texticnlike"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "texticregexeq"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "texticregexne"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "textin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "textlen"+>            [ ScalarType "text"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "textlike"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "textne"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "textnlike"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "textout"+>            [ ScalarType "text"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "textrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "textregexeq"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "textregexne"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "textsend"+>            [ ScalarType "text"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "thesaurus_init"+>            [ Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "thesaurus_lexize"+>            [ Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            , Pseudo Internal+>            ] (+>            Pseudo Internal )+>            False+>        , CatCreateFunction+>            FunName+>            "tideq"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidge"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidgt"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "tid" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidlarger"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "tid" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidle"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidlt"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidne"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidout"+>            [ ScalarType "tid"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "tidrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "tid" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidsend"+>            [ ScalarType "tid"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "tidsmaller"+>            [ ScalarType "tid"+>            , ScalarType "tid"+>            ] (+>            ScalarType "tid" )+>            False+>        , CatCreateFunction+>            FunName+>            "time"+>            [ ScalarType "abstime"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time"+>            [ ScalarType "timetz"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time"+>            [ ScalarType "time"+>            , ScalarType "int4"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_cmp"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_eq"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_ge"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_gt"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_hash"+>            [ ScalarType "time"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_larger"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_le"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_lt"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_mi_interval"+>            [ ScalarType "time"+>            , ScalarType "interval"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_mi_time"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_ne"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_out"+>            [ ScalarType "time"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "time_pl_interval"+>            [ ScalarType "time"+>            , ScalarType "interval"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_send"+>            [ ScalarType "time"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "time_smaller"+>            [ ScalarType "time"+>            , ScalarType "time"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunName+>            "timedate_pl"+>            [ ScalarType "time"+>            , ScalarType "date"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timemi"+>            [ ScalarType "abstime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunName+>            "timenow"+>            [] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunName+>            "timeofday"+>            [] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "timepl"+>            [ ScalarType "abstime"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp"+>            [ ScalarType "abstime"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp"+>            [ ScalarType "date"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp"+>            [ ScalarType "date"+>            , ScalarType "time"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp"+>            [ ScalarType "timestamp"+>            , ScalarType "int4"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_cmp"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_cmp_date"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_cmp_timestamptz"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_eq"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_eq_date"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_eq_timestamptz"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_ge"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_ge_date"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_ge_timestamptz"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_gt"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_gt_date"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_gt_timestamptz"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_hash"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_larger"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_le"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_le_date"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_le_timestamptz"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_lt"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_lt_date"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_lt_timestamptz"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_mi"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_mi_interval"+>            [ ScalarType "timestamp"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_ne"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_ne_date"+>            [ ScalarType "timestamp"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_ne_timestamptz"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_out"+>            [ ScalarType "timestamp"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_pl_interval"+>            [ ScalarType "timestamp"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_send"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamp_smaller"+>            [ ScalarType "timestamp"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz"+>            [ ScalarType "abstime"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz"+>            [ ScalarType "date"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz"+>            [ ScalarType "date"+>            , ScalarType "time"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz"+>            [ ScalarType "date"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz"+>            [ ScalarType "timestamptz"+>            , ScalarType "int4"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_cmp"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_cmp_date"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_cmp_timestamp"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_eq"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_eq_date"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_eq_timestamp"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_ge"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_ge_date"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_ge_timestamp"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_gt"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_gt_date"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_gt_timestamp"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_larger"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_le"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_le_date"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_le_timestamp"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_lt"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_lt_date"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_lt_timestamp"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_mi"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_mi_interval"+>            [ ScalarType "timestamptz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_ne"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_ne_date"+>            [ ScalarType "timestamptz"+>            , ScalarType "date"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_ne_timestamp"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_out"+>            [ ScalarType "timestamptz"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_pl_interval"+>            [ ScalarType "timestamptz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_send"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptz_smaller"+>            [ ScalarType "timestamptz"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptztypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timestamptztypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "timetypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz"+>            [ ScalarType "time"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz"+>            [ ScalarType "timetz"+>            , ScalarType "int4"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_cmp"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_eq"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_ge"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_gt"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_hash"+>            [ ScalarType "timetz"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_larger"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_le"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_lt"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_mi_interval"+>            [ ScalarType "timetz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_ne"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_out"+>            [ ScalarType "timetz"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_pl_interval"+>            [ ScalarType "timetz"+>            , ScalarType "interval"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_send"+>            [ ScalarType "timetz"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetz_smaller"+>            [ ScalarType "timetz"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetzdate_pl"+>            [ ScalarType "timetz"+>            , ScalarType "date"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetztypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "timetztypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "timezone"+>            [ ScalarType "text"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timezone"+>            [ ScalarType "text"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timezone"+>            [ ScalarType "text"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timezone"+>            [ ScalarType "interval"+>            , ScalarType "timestamp"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "timezone"+>            [ ScalarType "interval"+>            , ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunName+>            "timezone"+>            [ ScalarType "interval"+>            , ScalarType "timetz"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunName+>            "tinterval"+>            [ ScalarType "abstime"+>            , ScalarType "abstime"+>            ] (+>            ScalarType "tinterval" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalct"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalend"+>            [ ScalarType "tinterval"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervaleq"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalge"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalgt"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "tinterval" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalle"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalleneq"+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervallenge"+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervallengt"+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervallenle"+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervallenlt"+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervallenne"+>            [ ScalarType "tinterval"+>            , ScalarType "reltime"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervallt"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalne"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalout"+>            [ ScalarType "tinterval"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalov"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "tinterval" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalrel"+>            [ ScalarType "tinterval"+>            ] (+>            ScalarType "reltime" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalsame"+>            [ ScalarType "tinterval"+>            , ScalarType "tinterval"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalsend"+>            [ ScalarType "tinterval"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "tintervalstart"+>            [ ScalarType "tinterval"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_ascii"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_ascii"+>            [ ScalarType "text"+>            , ScalarType "name"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_ascii"+>            [ ScalarType "text"+>            , ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_char"+>            [ ScalarType "int8"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_char"+>            [ ScalarType "int4"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_char"+>            [ ScalarType "float4"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_char"+>            [ ScalarType "float8"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_char"+>            [ ScalarType "timestamp"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_char"+>            [ ScalarType "timestamptz"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_char"+>            [ ScalarType "interval"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_char"+>            [ ScalarType "numeric"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_date"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_hex"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_hex"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_number"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_timestamp"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_timestamp"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_tsquery"+>            [ ScalarType "text"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_tsquery"+>            [ ScalarType "regconfig"+>            , ScalarType "text"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_tsvector"+>            [ ScalarType "text"+>            ] (+>            ScalarType "tsvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "to_tsvector"+>            [ ScalarType "regconfig"+>            , ScalarType "text"+>            ] (+>            ScalarType "tsvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "transaction_timestamp"+>            [] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunName+>            "translate"+>            [ ScalarType "text"+>            , ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "trigger_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "trigger_out"+>            [ Pseudo Trigger+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "trunc"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "trunc"+>            [ ScalarType "macaddr"+>            ] (+>            ScalarType "macaddr" )+>            False+>        , CatCreateFunction+>            FunName+>            "trunc"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "trunc"+>            [ ScalarType "numeric"+>            , ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_debug"+>            [ ScalarType "text"+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_debug"+>            [ ScalarType "regconfig"+>            , ScalarType "text"+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_headline"+>            [ ScalarType "text"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_headline"+>            [ ScalarType "text"+>            , ScalarType "tsquery"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_headline"+>            [ ScalarType "regconfig"+>            , ScalarType "text"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_headline"+>            [ ScalarType "regconfig"+>            , ScalarType "text"+>            , ScalarType "tsquery"+>            , ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_lexize"+>            [ ScalarType "regdictionary"+>            , ScalarType "text"+>            ] (+>            ArrayType ( ScalarType "text" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_match_qv"+>            [ ScalarType "tsquery"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_match_tq"+>            [ ScalarType "text"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_match_tt"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_match_vq"+>            [ ScalarType "tsvector"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_parse"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_parse"+>            [ ScalarType "oid"+>            , ScalarType "text"+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rank"+>            [ ScalarType "tsvector"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rank"+>            [ ArrayType ( ScalarType "float4" )+>            , ScalarType "tsvector"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rank"+>            [ ScalarType "tsvector"+>            , ScalarType "tsquery"+>            , ScalarType "int4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rank"+>            [ ArrayType ( ScalarType "float4" )+>            , ScalarType "tsvector"+>            , ScalarType "tsquery"+>            , ScalarType "int4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rank_cd"+>            [ ScalarType "tsvector"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rank_cd"+>            [ ArrayType ( ScalarType "float4" )+>            , ScalarType "tsvector"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rank_cd"+>            [ ScalarType "tsvector"+>            , ScalarType "tsquery"+>            , ScalarType "int4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rank_cd"+>            [ ArrayType ( ScalarType "float4" )+>            , ScalarType "tsvector"+>            , ScalarType "tsquery"+>            , ScalarType "int4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rewrite"+>            [ ScalarType "tsquery"+>            , ScalarType "text"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_rewrite"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_stat"+>            [ ScalarType "text"+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_stat"+>            [ ScalarType "text"+>            , ScalarType "text"+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_token_type"+>            [ ScalarType "text"+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_token_type"+>            [ ScalarType "oid"+>            ] (+>            SetOfType ( Pseudo Record ) )+>            False+>        , CatCreateFunction+>            FunName+>            "ts_typanalyze"+>            [ Pseudo Internal+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsmatchjoinsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int2"+>            , Pseudo Internal+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsmatchsel"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsq_mcontained"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsq_mcontains"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_and"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_cmp"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_eq"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_ge"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_gt"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_le"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_lt"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_ne"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_not"+>            [ ScalarType "tsquery"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquery_or"+>            [ ScalarType "tsquery"+>            , ScalarType "tsquery"+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsqueryin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsqueryout"+>            [ ScalarType "tsquery"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "tsqueryrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "tsquery" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsquerysend"+>            [ ScalarType "tsquery"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_cmp"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_concat"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "tsvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_eq"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_ge"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_gt"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_le"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_lt"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_ne"+>            [ ScalarType "tsvector"+>            , ScalarType "tsvector"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_update_trigger"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvector_update_trigger_column"+>            [] (+>            Pseudo Trigger )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvectorin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "tsvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvectorout"+>            [ ScalarType "tsvector"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvectorrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "tsvector" )+>            False+>        , CatCreateFunction+>            FunName+>            "tsvectorsend"+>            [ ScalarType "tsvector"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_current"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_current_snapshot"+>            [] (+>            ScalarType "txid_snapshot" )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_snapshot_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "txid_snapshot" )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_snapshot_out"+>            [ ScalarType "txid_snapshot"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_snapshot_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "txid_snapshot" )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_snapshot_send"+>            [ ScalarType "txid_snapshot"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_snapshot_xip"+>            [ ScalarType "txid_snapshot"+>            ] (+>            SetOfType ( ScalarType "int8" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_snapshot_xmax"+>            [ ScalarType "txid_snapshot"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_snapshot_xmin"+>            [ ScalarType "txid_snapshot"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunName+>            "txid_visible_in_snapshot"+>            [ ScalarType "int8"+>            , ScalarType "txid_snapshot"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "uhc_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "unknownin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "unknown" )+>            False+>        , CatCreateFunction+>            FunName+>            "unknownout"+>            [ ScalarType "unknown"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "unknownrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "unknown" )+>            False+>        , CatCreateFunction+>            FunName+>            "unknownsend"+>            [ ScalarType "unknown"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "unnest"+>            [ Pseudo AnyArray+>            ] (+>            SetOfType ( Pseudo AnyElement ) )+>            False+>        , CatCreateFunction+>            FunName+>            "upper"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_ascii"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_big5"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_euc_cn"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_euc_jis_2004"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_euc_jp"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_euc_kr"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_euc_tw"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_gb18030"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_gbk"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_iso8859"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_iso8859_1"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_johab"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_koi8r"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_koi8u"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_shift_jis_2004"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_sjis"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_uhc"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "utf8_to_win"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_cmp"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_eq"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_ge"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_gt"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_hash"+>            [ ScalarType "uuid"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "uuid" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_le"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_lt"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_ne"+>            [ ScalarType "uuid"+>            , ScalarType "uuid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_out"+>            [ ScalarType "uuid"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "uuid" )+>            False+>        , CatCreateFunction+>            FunName+>            "uuid_send"+>            [ ScalarType "uuid"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbit"+>            [ ScalarType "varbit"+>            , ScalarType "int4"+>            , ScalarType "bool"+>            ] (+>            ScalarType "varbit" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbit_in"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "varbit" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbit_out"+>            [ ScalarType "varbit"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "varbit_recv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "varbit" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbit_send"+>            [ ScalarType "varbit"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbitcmp"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbiteq"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbitge"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbitgt"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbitle"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbitlt"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbitne"+>            [ ScalarType "varbit"+>            , ScalarType "varbit"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbittypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "varbittypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "varchar"+>            [ ScalarType "name"+>            ] (+>            ScalarType "varchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "varchar"+>            [ ScalarType "varchar"+>            , ScalarType "int4"+>            , ScalarType "bool"+>            ] (+>            ScalarType "varchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "varcharin"+>            [ Pseudo Cstring+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "varchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "varcharout"+>            [ ScalarType "varchar"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "varcharrecv"+>            [ Pseudo Internal+>            , ScalarType "oid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "varchar" )+>            False+>        , CatCreateFunction+>            FunName+>            "varcharsend"+>            [ ScalarType "varchar"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "varchartypmodin"+>            [ ArrayType ( Pseudo Cstring )+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "varchartypmodout"+>            [ ScalarType "int4"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "version"+>            [] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunName+>            "void_in"+>            [ Pseudo Cstring+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "void_out"+>            [ Pseudo Void+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "width"+>            [ ScalarType "box"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunName+>            "width_bucket"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            , ScalarType "float8"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "width_bucket"+>            [ ScalarType "numeric"+>            , ScalarType "numeric"+>            , ScalarType "numeric"+>            , ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunName+>            "win1250_to_latin2"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win1250_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win1251_to_iso"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win1251_to_koi8r"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win1251_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win1251_to_win866"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win866_to_iso"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win866_to_koi8r"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win866_to_mic"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win866_to_win1251"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "win_to_utf8"+>            [ ScalarType "int4"+>            , ScalarType "int4"+>            , Pseudo Cstring+>            , Pseudo Internal+>            , ScalarType "int4"+>            ] (+>            Pseudo Void )+>            False+>        , CatCreateFunction+>            FunName+>            "xideq"+>            [ ScalarType "xid"+>            , ScalarType "xid"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "xideqint4"+>            [ ScalarType "xid"+>            , ScalarType "int4"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "xidin"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "xid" )+>            False+>        , CatCreateFunction+>            FunName+>            "xidout"+>            [ ScalarType "xid"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "xidrecv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "xid" )+>            False+>        , CatCreateFunction+>            FunName+>            "xidsend"+>            [ ScalarType "xid"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "xml"+>            [ ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "xml_in"+>            [ Pseudo Cstring+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "xml_out"+>            [ ScalarType "xml"+>            ] (+>            Pseudo Cstring )+>            False+>        , CatCreateFunction+>            FunName+>            "xml_recv"+>            [ Pseudo Internal+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "xml_send"+>            [ ScalarType "xml"+>            ] (+>            ScalarType "bytea" )+>            False+>        , CatCreateFunction+>            FunName+>            "xmlcomment"+>            [ ScalarType "text"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "xmlconcat2"+>            [ ScalarType "xml"+>            , ScalarType "xml"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunName+>            "xmlvalidate"+>            [ ScalarType "xml"+>            , ScalarType "text"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunName+>            "xpath"+>            [ ScalarType "text"+>            , ScalarType "xml"+>            ] (+>            ArrayType ( ScalarType "xml" ) )+>            False+>        , CatCreateFunction+>            FunName+>            "xpath"+>            [ ScalarType "text"+>            , ScalarType "xml"+>            , ArrayType ( ScalarType "text" )+>            ] (+>            ArrayType ( ScalarType "xml" ) )+>            False+>        , CatCreateFunction+>            FunAgg+>            "array_agg"+>            [ Pseudo AnyElement+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunAgg+>            "avg"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "avg"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "avg"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "avg"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "avg"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "avg"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "avg"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bit_and"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bit_and"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bit_and"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bit_and"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bit_or"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bit_or"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bit_or"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bit_or"+>            [ ScalarType "bit"+>            ] (+>            ScalarType "bit" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bool_and"+>            [ ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "bool_or"+>            [ ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "corr"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "count"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "count"+>            [ Pseudo Any+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "covar_pop"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "covar_samp"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "every"+>            [ ScalarType "bool"+>            ] (+>            ScalarType "bool" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "tid"+>            ] (+>            ScalarType "tid" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "abstime"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "bpchar" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "date"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "time"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "timetz"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ Pseudo AnyArray+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunAgg+>            "max"+>            [ Pseudo AnyEnum+>            ] (+>            Pseudo AnyEnum )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int2" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "text"+>            ] (+>            ScalarType "text" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "oid"+>            ] (+>            ScalarType "oid" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "tid"+>            ] (+>            ScalarType "tid" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "abstime"+>            ] (+>            ScalarType "abstime" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "bpchar"+>            ] (+>            ScalarType "bpchar" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "date"+>            ] (+>            ScalarType "date" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "time"+>            ] (+>            ScalarType "time" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "timestamp"+>            ] (+>            ScalarType "timestamp" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "timestamptz"+>            ] (+>            ScalarType "timestamptz" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "timetz"+>            ] (+>            ScalarType "timetz" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ Pseudo AnyArray+>            ] (+>            Pseudo AnyArray )+>            False+>        , CatCreateFunction+>            FunAgg+>            "min"+>            [ Pseudo AnyEnum+>            ] (+>            Pseudo AnyEnum )+>            False+>        , CatCreateFunction+>            FunAgg+>            "regr_avgx"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "regr_avgy"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "regr_count"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "regr_intercept"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "regr_r2"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "regr_slope"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "regr_sxx"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "regr_sxy"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "regr_syy"+>            [ ScalarType "float8"+>            , ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_pop"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_pop"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_pop"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_pop"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_pop"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_pop"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_samp"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_samp"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_samp"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_samp"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_samp"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "stddev_samp"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "sum"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "sum"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "sum"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "sum"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float4" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "sum"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "sum"+>            [ ScalarType "money"+>            ] (+>            ScalarType "money" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "sum"+>            [ ScalarType "interval"+>            ] (+>            ScalarType "interval" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "sum"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_pop"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_pop"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_pop"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_pop"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_pop"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_pop"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_samp"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_samp"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_samp"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_samp"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_samp"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "var_samp"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "variance"+>            [ ScalarType "int8"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "variance"+>            [ ScalarType "int2"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "variance"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "variance"+>            [ ScalarType "float4"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "variance"+>            [ ScalarType "float8"+>            ] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "variance"+>            [ ScalarType "numeric"+>            ] (+>            ScalarType "numeric" )+>            False+>        , CatCreateFunction+>            FunAgg+>            "xmlagg"+>            [ ScalarType "xml"+>            ] (+>            ScalarType "xml" )+>            False+>        , CatCreateFunction+>            FunWindow+>            "cume_dist"+>            [] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunWindow+>            "dense_rank"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunWindow+>            "first_value"+>            [ Pseudo AnyElement+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunWindow+>            "lag"+>            [ Pseudo AnyElement+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunWindow+>            "lag"+>            [ Pseudo AnyElement+>            , ScalarType "int4"+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunWindow+>            "lag"+>            [ Pseudo AnyElement+>            , ScalarType "int4"+>            , Pseudo AnyElement+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunWindow+>            "last_value"+>            [ Pseudo AnyElement+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunWindow+>            "lead"+>            [ Pseudo AnyElement+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunWindow+>            "lead"+>            [ Pseudo AnyElement+>            , ScalarType "int4"+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunWindow+>            "lead"+>            [ Pseudo AnyElement+>            , ScalarType "int4"+>            , Pseudo AnyElement+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunWindow+>            "nth_value"+>            [ Pseudo AnyElement+>            , ScalarType "int4"+>            ] (+>            Pseudo AnyElement )+>            False+>        , CatCreateFunction+>            FunWindow+>            "ntile"+>            [ ScalarType "int4"+>            ] (+>            ScalarType "int4" )+>            False+>        , CatCreateFunction+>            FunWindow+>            "percent_rank"+>            [] (+>            ScalarType "float8" )+>            False+>        , CatCreateFunction+>            FunWindow+>            "rank"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateFunction+>            FunWindow+>            "row_number"+>            [] (+>            ScalarType "int8" )+>            False+>        , CatCreateTable+>            "pg_aggregate"+>            [ ( "aggfnoid"+>              , ScalarType "regproc"+>              )+>            , ( "aggtransfn"+>              , ScalarType "regproc"+>              )+>            , ( "aggfinalfn"+>              , ScalarType "regproc"+>              )+>            , ( "aggsortop"+>              , ScalarType "oid"+>              )+>            , ( "aggtranstype"+>              , ScalarType "oid"+>              )+>            , ( "agginitval"+>              , ScalarType "text"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_am"+>            [ ( "amname"+>              , ScalarType "name"+>              )+>            , ( "amstrategies"+>              , ScalarType "int2"+>              )+>            , ( "amsupport"+>              , ScalarType "int2"+>              )+>            , ( "amcanorder"+>              , ScalarType "bool"+>              )+>            , ( "amcanbackward"+>              , ScalarType "bool"+>              )+>            , ( "amcanunique"+>              , ScalarType "bool"+>              )+>            , ( "amcanmulticol"+>              , ScalarType "bool"+>              )+>            , ( "amoptionalkey"+>              , ScalarType "bool"+>              )+>            , ( "amindexnulls"+>              , ScalarType "bool"+>              )+>            , ( "amsearchnulls"+>              , ScalarType "bool"+>              )+>            , ( "amstorage"+>              , ScalarType "bool"+>              )+>            , ( "amclusterable"+>              , ScalarType "bool"+>              )+>            , ( "amkeytype"+>              , ScalarType "oid"+>              )+>            , ( "aminsert"+>              , ScalarType "regproc"+>              )+>            , ( "ambeginscan"+>              , ScalarType "regproc"+>              )+>            , ( "amgettuple"+>              , ScalarType "regproc"+>              )+>            , ( "amgetbitmap"+>              , ScalarType "regproc"+>              )+>            , ( "amrescan"+>              , ScalarType "regproc"+>              )+>            , ( "amendscan"+>              , ScalarType "regproc"+>              )+>            , ( "ammarkpos"+>              , ScalarType "regproc"+>              )+>            , ( "amrestrpos"+>              , ScalarType "regproc"+>              )+>            , ( "ambuild"+>              , ScalarType "regproc"+>              )+>            , ( "ambulkdelete"+>              , ScalarType "regproc"+>              )+>            , ( "amvacuumcleanup"+>              , ScalarType "regproc"+>              )+>            , ( "amcostestimate"+>              , ScalarType "regproc"+>              )+>            , ( "amoptions"+>              , ScalarType "regproc"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_amop"+>            [ ( "amopfamily"+>              , ScalarType "oid"+>              )+>            , ( "amoplefttype"+>              , ScalarType "oid"+>              )+>            , ( "amoprighttype"+>              , ScalarType "oid"+>              )+>            , ( "amopstrategy"+>              , ScalarType "int2"+>              )+>            , ( "amopopr"+>              , ScalarType "oid"+>              )+>            , ( "amopmethod"+>              , ScalarType "oid"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_amproc"+>            [ ( "amprocfamily"+>              , ScalarType "oid"+>              )+>            , ( "amproclefttype"+>              , ScalarType "oid"+>              )+>            , ( "amprocrighttype"+>              , ScalarType "oid"+>              )+>            , ( "amprocnum"+>              , ScalarType "int2"+>              )+>            , ( "amproc"+>              , ScalarType "regproc"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_attrdef"+>            [ ( "adrelid"+>              , ScalarType "oid"+>              )+>            , ( "adnum"+>              , ScalarType "int2"+>              )+>            , ( "adbin"+>              , ScalarType "text"+>              )+>            , ( "adsrc"+>              , ScalarType "text"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_attribute"+>            [ ( "attrelid"+>              , ScalarType "oid"+>              )+>            , ( "attname"+>              , ScalarType "name"+>              )+>            , ( "atttypid"+>              , ScalarType "oid"+>              )+>            , ( "attstattarget"+>              , ScalarType "int4"+>              )+>            , ( "attlen"+>              , ScalarType "int2"+>              )+>            , ( "attnum"+>              , ScalarType "int2"+>              )+>            , ( "attndims"+>              , ScalarType "int4"+>              )+>            , ( "attcacheoff"+>              , ScalarType "int4"+>              )+>            , ( "atttypmod"+>              , ScalarType "int4"+>              )+>            , ( "attbyval"+>              , ScalarType "bool"+>              )+>            , ( "attstorage"+>              , ScalarType "char"+>              )+>            , ( "attalign"+>              , ScalarType "char"+>              )+>            , ( "attnotnull"+>              , ScalarType "bool"+>              )+>            , ( "atthasdef"+>              , ScalarType "bool"+>              )+>            , ( "attisdropped"+>              , ScalarType "bool"+>              )+>            , ( "attislocal"+>              , ScalarType "bool"+>              )+>            , ( "attinhcount"+>              , ScalarType "int4"+>              )+>            , ( "attacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_auth_members"+>            [ ( "roleid"+>              , ScalarType "oid"+>              )+>            , ( "member"+>              , ScalarType "oid"+>              )+>            , ( "grantor"+>              , ScalarType "oid"+>              )+>            , ( "admin_option"+>              , ScalarType "bool"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_authid"+>            [ ( "rolname"+>              , ScalarType "name"+>              )+>            , ( "rolsuper"+>              , ScalarType "bool"+>              )+>            , ( "rolinherit"+>              , ScalarType "bool"+>              )+>            , ( "rolcreaterole"+>              , ScalarType "bool"+>              )+>            , ( "rolcreatedb"+>              , ScalarType "bool"+>              )+>            , ( "rolcatupdate"+>              , ScalarType "bool"+>              )+>            , ( "rolcanlogin"+>              , ScalarType "bool"+>              )+>            , ( "rolconnlimit"+>              , ScalarType "int4"+>              )+>            , ( "rolpassword"+>              , ScalarType "text"+>              )+>            , ( "rolvaliduntil"+>              , ScalarType "timestamptz"+>              )+>            , ( "rolconfig"+>              , ArrayType ( ScalarType "text" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_cast"+>            [ ( "castsource"+>              , ScalarType "oid"+>              )+>            , ( "casttarget"+>              , ScalarType "oid"+>              )+>            , ( "castfunc"+>              , ScalarType "oid"+>              )+>            , ( "castcontext"+>              , ScalarType "char"+>              )+>            , ( "castmethod"+>              , ScalarType "char"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_class"+>            [ ( "relname"+>              , ScalarType "name"+>              )+>            , ( "relnamespace"+>              , ScalarType "oid"+>              )+>            , ( "reltype"+>              , ScalarType "oid"+>              )+>            , ( "relowner"+>              , ScalarType "oid"+>              )+>            , ( "relam"+>              , ScalarType "oid"+>              )+>            , ( "relfilenode"+>              , ScalarType "oid"+>              )+>            , ( "reltablespace"+>              , ScalarType "oid"+>              )+>            , ( "relpages"+>              , ScalarType "int4"+>              )+>            , ( "reltuples"+>              , ScalarType "float4"+>              )+>            , ( "reltoastrelid"+>              , ScalarType "oid"+>              )+>            , ( "reltoastidxid"+>              , ScalarType "oid"+>              )+>            , ( "relhasindex"+>              , ScalarType "bool"+>              )+>            , ( "relisshared"+>              , ScalarType "bool"+>              )+>            , ( "relistemp"+>              , ScalarType "bool"+>              )+>            , ( "relkind"+>              , ScalarType "char"+>              )+>            , ( "relnatts"+>              , ScalarType "int2"+>              )+>            , ( "relchecks"+>              , ScalarType "int2"+>              )+>            , ( "relhasoids"+>              , ScalarType "bool"+>              )+>            , ( "relhaspkey"+>              , ScalarType "bool"+>              )+>            , ( "relhasrules"+>              , ScalarType "bool"+>              )+>            , ( "relhastriggers"+>              , ScalarType "bool"+>              )+>            , ( "relhassubclass"+>              , ScalarType "bool"+>              )+>            , ( "relfrozenxid"+>              , ScalarType "xid"+>              )+>            , ( "relacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            , ( "reloptions"+>              , ArrayType ( ScalarType "text" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_constraint"+>            [ ( "conname"+>              , ScalarType "name"+>              )+>            , ( "connamespace"+>              , ScalarType "oid"+>              )+>            , ( "contype"+>              , ScalarType "char"+>              )+>            , ( "condeferrable"+>              , ScalarType "bool"+>              )+>            , ( "condeferred"+>              , ScalarType "bool"+>              )+>            , ( "conrelid"+>              , ScalarType "oid"+>              )+>            , ( "contypid"+>              , ScalarType "oid"+>              )+>            , ( "confrelid"+>              , ScalarType "oid"+>              )+>            , ( "confupdtype"+>              , ScalarType "char"+>              )+>            , ( "confdeltype"+>              , ScalarType "char"+>              )+>            , ( "confmatchtype"+>              , ScalarType "char"+>              )+>            , ( "conislocal"+>              , ScalarType "bool"+>              )+>            , ( "coninhcount"+>              , ScalarType "int4"+>              )+>            , ( "conkey"+>              , ArrayType ( ScalarType "int2" )+>              )+>            , ( "confkey"+>              , ArrayType ( ScalarType "int2" )+>              )+>            , ( "conpfeqop"+>              , ArrayType ( ScalarType "oid" )+>              )+>            , ( "conppeqop"+>              , ArrayType ( ScalarType "oid" )+>              )+>            , ( "conffeqop"+>              , ArrayType ( ScalarType "oid" )+>              )+>            , ( "conbin"+>              , ScalarType "text"+>              )+>            , ( "consrc"+>              , ScalarType "text"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_conversion"+>            [ ( "conname"+>              , ScalarType "name"+>              )+>            , ( "connamespace"+>              , ScalarType "oid"+>              )+>            , ( "conowner"+>              , ScalarType "oid"+>              )+>            , ( "conforencoding"+>              , ScalarType "int4"+>              )+>            , ( "contoencoding"+>              , ScalarType "int4"+>              )+>            , ( "conproc"+>              , ScalarType "regproc"+>              )+>            , ( "condefault"+>              , ScalarType "bool"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_database"+>            [ ( "datname"+>              , ScalarType "name"+>              )+>            , ( "datdba"+>              , ScalarType "oid"+>              )+>            , ( "encoding"+>              , ScalarType "int4"+>              )+>            , ( "datcollate"+>              , ScalarType "name"+>              )+>            , ( "datctype"+>              , ScalarType "name"+>              )+>            , ( "datistemplate"+>              , ScalarType "bool"+>              )+>            , ( "datallowconn"+>              , ScalarType "bool"+>              )+>            , ( "datconnlimit"+>              , ScalarType "int4"+>              )+>            , ( "datlastsysoid"+>              , ScalarType "oid"+>              )+>            , ( "datfrozenxid"+>              , ScalarType "xid"+>              )+>            , ( "dattablespace"+>              , ScalarType "oid"+>              )+>            , ( "datconfig"+>              , ArrayType ( ScalarType "text" )+>              )+>            , ( "datacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_depend"+>            [ ( "classid"+>              , ScalarType "oid"+>              )+>            , ( "objid"+>              , ScalarType "oid"+>              )+>            , ( "objsubid"+>              , ScalarType "int4"+>              )+>            , ( "refclassid"+>              , ScalarType "oid"+>              )+>            , ( "refobjid"+>              , ScalarType "oid"+>              )+>            , ( "refobjsubid"+>              , ScalarType "int4"+>              )+>            , ( "deptype"+>              , ScalarType "char"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_description"+>            [ ( "objoid"+>              , ScalarType "oid"+>              )+>            , ( "classoid"+>              , ScalarType "oid"+>              )+>            , ( "objsubid"+>              , ScalarType "int4"+>              )+>            , ( "description"+>              , ScalarType "text"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_enum"+>            [ ( "enumtypid"+>              , ScalarType "oid"+>              )+>            , ( "enumlabel"+>              , ScalarType "name"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_foreign_data_wrapper"+>            [ ( "fdwname"+>              , ScalarType "name"+>              )+>            , ( "fdwowner"+>              , ScalarType "oid"+>              )+>            , ( "fdwvalidator"+>              , ScalarType "oid"+>              )+>            , ( "fdwacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            , ( "fdwoptions"+>              , ArrayType ( ScalarType "text" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_foreign_server"+>            [ ( "srvname"+>              , ScalarType "name"+>              )+>            , ( "srvowner"+>              , ScalarType "oid"+>              )+>            , ( "srvfdw"+>              , ScalarType "oid"+>              )+>            , ( "srvtype"+>              , ScalarType "text"+>              )+>            , ( "srvversion"+>              , ScalarType "text"+>              )+>            , ( "srvacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            , ( "srvoptions"+>              , ArrayType ( ScalarType "text" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_index"+>            [ ( "indexrelid"+>              , ScalarType "oid"+>              )+>            , ( "indrelid"+>              , ScalarType "oid"+>              )+>            , ( "indnatts"+>              , ScalarType "int2"+>              )+>            , ( "indisunique"+>              , ScalarType "bool"+>              )+>            , ( "indisprimary"+>              , ScalarType "bool"+>              )+>            , ( "indisclustered"+>              , ScalarType "bool"+>              )+>            , ( "indisvalid"+>              , ScalarType "bool"+>              )+>            , ( "indcheckxmin"+>              , ScalarType "bool"+>              )+>            , ( "indisready"+>              , ScalarType "bool"+>              )+>            , ( "indkey"+>              , ScalarType "int2vector"+>              )+>            , ( "indclass"+>              , ScalarType "oidvector"+>              )+>            , ( "indoption"+>              , ScalarType "int2vector"+>              )+>            , ( "indexprs"+>              , ScalarType "text"+>              )+>            , ( "indpred"+>              , ScalarType "text"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_inherits"+>            [ ( "inhrelid"+>              , ScalarType "oid"+>              )+>            , ( "inhparent"+>              , ScalarType "oid"+>              )+>            , ( "inhseqno"+>              , ScalarType "int4"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_language"+>            [ ( "lanname"+>              , ScalarType "name"+>              )+>            , ( "lanowner"+>              , ScalarType "oid"+>              )+>            , ( "lanispl"+>              , ScalarType "bool"+>              )+>            , ( "lanpltrusted"+>              , ScalarType "bool"+>              )+>            , ( "lanplcallfoid"+>              , ScalarType "oid"+>              )+>            , ( "lanvalidator"+>              , ScalarType "oid"+>              )+>            , ( "lanacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_largeobject"+>            [ ( "loid"+>              , ScalarType "oid"+>              )+>            , ( "pageno"+>              , ScalarType "int4"+>              )+>            , ( "data"+>              , ScalarType "bytea"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_listener"+>            [ ( "relname"+>              , ScalarType "name"+>              )+>            , ( "listenerpid"+>              , ScalarType "int4"+>              )+>            , ( "notification"+>              , ScalarType "int4"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_namespace"+>            [ ( "nspname"+>              , ScalarType "name"+>              )+>            , ( "nspowner"+>              , ScalarType "oid"+>              )+>            , ( "nspacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_opclass"+>            [ ( "opcmethod"+>              , ScalarType "oid"+>              )+>            , ( "opcname"+>              , ScalarType "name"+>              )+>            , ( "opcnamespace"+>              , ScalarType "oid"+>              )+>            , ( "opcowner"+>              , ScalarType "oid"+>              )+>            , ( "opcfamily"+>              , ScalarType "oid"+>              )+>            , ( "opcintype"+>              , ScalarType "oid"+>              )+>            , ( "opcdefault"+>              , ScalarType "bool"+>              )+>            , ( "opckeytype"+>              , ScalarType "oid"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_operator"+>            [ ( "oprname"+>              , ScalarType "name"+>              )+>            , ( "oprnamespace"+>              , ScalarType "oid"+>              )+>            , ( "oprowner"+>              , ScalarType "oid"+>              )+>            , ( "oprkind"+>              , ScalarType "char"+>              )+>            , ( "oprcanmerge"+>              , ScalarType "bool"+>              )+>            , ( "oprcanhash"+>              , ScalarType "bool"+>              )+>            , ( "oprleft"+>              , ScalarType "oid"+>              )+>            , ( "oprright"+>              , ScalarType "oid"+>              )+>            , ( "oprresult"+>              , ScalarType "oid"+>              )+>            , ( "oprcom"+>              , ScalarType "oid"+>              )+>            , ( "oprnegate"+>              , ScalarType "oid"+>              )+>            , ( "oprcode"+>              , ScalarType "regproc"+>              )+>            , ( "oprrest"+>              , ScalarType "regproc"+>              )+>            , ( "oprjoin"+>              , ScalarType "regproc"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_opfamily"+>            [ ( "opfmethod"+>              , ScalarType "oid"+>              )+>            , ( "opfname"+>              , ScalarType "name"+>              )+>            , ( "opfnamespace"+>              , ScalarType "oid"+>              )+>            , ( "opfowner"+>              , ScalarType "oid"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_pltemplate"+>            [ ( "tmplname"+>              , ScalarType "name"+>              )+>            , ( "tmpltrusted"+>              , ScalarType "bool"+>              )+>            , ( "tmpldbacreate"+>              , ScalarType "bool"+>              )+>            , ( "tmplhandler"+>              , ScalarType "text"+>              )+>            , ( "tmplvalidator"+>              , ScalarType "text"+>              )+>            , ( "tmpllibrary"+>              , ScalarType "text"+>              )+>            , ( "tmplacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_proc"+>            [ ( "proname"+>              , ScalarType "name"+>              )+>            , ( "pronamespace"+>              , ScalarType "oid"+>              )+>            , ( "proowner"+>              , ScalarType "oid"+>              )+>            , ( "prolang"+>              , ScalarType "oid"+>              )+>            , ( "procost"+>              , ScalarType "float4"+>              )+>            , ( "prorows"+>              , ScalarType "float4"+>              )+>            , ( "provariadic"+>              , ScalarType "oid"+>              )+>            , ( "proisagg"+>              , ScalarType "bool"+>              )+>            , ( "proiswindow"+>              , ScalarType "bool"+>              )+>            , ( "prosecdef"+>              , ScalarType "bool"+>              )+>            , ( "proisstrict"+>              , ScalarType "bool"+>              )+>            , ( "proretset"+>              , ScalarType "bool"+>              )+>            , ( "provolatile"+>              , ScalarType "char"+>              )+>            , ( "pronargs"+>              , ScalarType "int2"+>              )+>            , ( "pronargdefaults"+>              , ScalarType "int2"+>              )+>            , ( "prorettype"+>              , ScalarType "oid"+>              )+>            , ( "proargtypes"+>              , ScalarType "oidvector"+>              )+>            , ( "proallargtypes"+>              , ArrayType ( ScalarType "oid" )+>              )+>            , ( "proargmodes"+>              , ArrayType ( ScalarType "char" )+>              )+>            , ( "proargnames"+>              , ArrayType ( ScalarType "text" )+>              )+>            , ( "proargdefaults"+>              , ScalarType "text"+>              )+>            , ( "prosrc"+>              , ScalarType "text"+>              )+>            , ( "probin"+>              , ScalarType "bytea"+>              )+>            , ( "proconfig"+>              , ArrayType ( ScalarType "text" )+>              )+>            , ( "proacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_rewrite"+>            [ ( "rulename"+>              , ScalarType "name"+>              )+>            , ( "ev_class"+>              , ScalarType "oid"+>              )+>            , ( "ev_attr"+>              , ScalarType "int2"+>              )+>            , ( "ev_type"+>              , ScalarType "char"+>              )+>            , ( "ev_enabled"+>              , ScalarType "char"+>              )+>            , ( "is_instead"+>              , ScalarType "bool"+>              )+>            , ( "ev_qual"+>              , ScalarType "text"+>              )+>            , ( "ev_action"+>              , ScalarType "text"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_shdepend"+>            [ ( "dbid"+>              , ScalarType "oid"+>              )+>            , ( "classid"+>              , ScalarType "oid"+>              )+>            , ( "objid"+>              , ScalarType "oid"+>              )+>            , ( "objsubid"+>              , ScalarType "int4"+>              )+>            , ( "refclassid"+>              , ScalarType "oid"+>              )+>            , ( "refobjid"+>              , ScalarType "oid"+>              )+>            , ( "deptype"+>              , ScalarType "char"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_shdescription"+>            [ ( "objoid"+>              , ScalarType "oid"+>              )+>            , ( "classoid"+>              , ScalarType "oid"+>              )+>            , ( "description"+>              , ScalarType "text"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_statistic"+>            [ ( "starelid"+>              , ScalarType "oid"+>              )+>            , ( "staattnum"+>              , ScalarType "int2"+>              )+>            , ( "stanullfrac"+>              , ScalarType "float4"+>              )+>            , ( "stawidth"+>              , ScalarType "int4"+>              )+>            , ( "stadistinct"+>              , ScalarType "float4"+>              )+>            , ( "stakind1"+>              , ScalarType "int2"+>              )+>            , ( "stakind2"+>              , ScalarType "int2"+>              )+>            , ( "stakind3"+>              , ScalarType "int2"+>              )+>            , ( "stakind4"+>              , ScalarType "int2"+>              )+>            , ( "staop1"+>              , ScalarType "oid"+>              )+>            , ( "staop2"+>              , ScalarType "oid"+>              )+>            , ( "staop3"+>              , ScalarType "oid"+>              )+>            , ( "staop4"+>              , ScalarType "oid"+>              )+>            , ( "stanumbers1"+>              , ArrayType ( ScalarType "float4" )+>              )+>            , ( "stanumbers2"+>              , ArrayType ( ScalarType "float4" )+>              )+>            , ( "stanumbers3"+>              , ArrayType ( ScalarType "float4" )+>              )+>            , ( "stanumbers4"+>              , ArrayType ( ScalarType "float4" )+>              )+>            , ( "stavalues1"+>              , Pseudo AnyArray+>              )+>            , ( "stavalues2"+>              , Pseudo AnyArray+>              )+>            , ( "stavalues3"+>              , Pseudo AnyArray+>              )+>            , ( "stavalues4"+>              , Pseudo AnyArray+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_tablespace"+>            [ ( "spcname"+>              , ScalarType "name"+>              )+>            , ( "spcowner"+>              , ScalarType "oid"+>              )+>            , ( "spclocation"+>              , ScalarType "text"+>              )+>            , ( "spcacl"+>              , ArrayType ( ScalarType "aclitem" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_trigger"+>            [ ( "tgrelid"+>              , ScalarType "oid"+>              )+>            , ( "tgname"+>              , ScalarType "name"+>              )+>            , ( "tgfoid"+>              , ScalarType "oid"+>              )+>            , ( "tgtype"+>              , ScalarType "int2"+>              )+>            , ( "tgenabled"+>              , ScalarType "char"+>              )+>            , ( "tgisconstraint"+>              , ScalarType "bool"+>              )+>            , ( "tgconstrname"+>              , ScalarType "name"+>              )+>            , ( "tgconstrrelid"+>              , ScalarType "oid"+>              )+>            , ( "tgconstraint"+>              , ScalarType "oid"+>              )+>            , ( "tgdeferrable"+>              , ScalarType "bool"+>              )+>            , ( "tginitdeferred"+>              , ScalarType "bool"+>              )+>            , ( "tgnargs"+>              , ScalarType "int2"+>              )+>            , ( "tgattr"+>              , ScalarType "int2vector"+>              )+>            , ( "tgargs"+>              , ScalarType "bytea"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_ts_config"+>            [ ( "cfgname"+>              , ScalarType "name"+>              )+>            , ( "cfgnamespace"+>              , ScalarType "oid"+>              )+>            , ( "cfgowner"+>              , ScalarType "oid"+>              )+>            , ( "cfgparser"+>              , ScalarType "oid"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_ts_config_map"+>            [ ( "mapcfg"+>              , ScalarType "oid"+>              )+>            , ( "maptokentype"+>              , ScalarType "int4"+>              )+>            , ( "mapseqno"+>              , ScalarType "int4"+>              )+>            , ( "mapdict"+>              , ScalarType "oid"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_ts_dict"+>            [ ( "dictname"+>              , ScalarType "name"+>              )+>            , ( "dictnamespace"+>              , ScalarType "oid"+>              )+>            , ( "dictowner"+>              , ScalarType "oid"+>              )+>            , ( "dicttemplate"+>              , ScalarType "oid"+>              )+>            , ( "dictinitoption"+>              , ScalarType "text"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_ts_parser"+>            [ ( "prsname"+>              , ScalarType "name"+>              )+>            , ( "prsnamespace"+>              , ScalarType "oid"+>              )+>            , ( "prsstart"+>              , ScalarType "regproc"+>              )+>            , ( "prstoken"+>              , ScalarType "regproc"+>              )+>            , ( "prsend"+>              , ScalarType "regproc"+>              )+>            , ( "prsheadline"+>              , ScalarType "regproc"+>              )+>            , ( "prslextype"+>              , ScalarType "regproc"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_ts_template"+>            [ ( "tmplname"+>              , ScalarType "name"+>              )+>            , ( "tmplnamespace"+>              , ScalarType "oid"+>              )+>            , ( "tmplinit"+>              , ScalarType "regproc"+>              )+>            , ( "tmpllexize"+>              , ScalarType "regproc"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_type"+>            [ ( "typname"+>              , ScalarType "name"+>              )+>            , ( "typnamespace"+>              , ScalarType "oid"+>              )+>            , ( "typowner"+>              , ScalarType "oid"+>              )+>            , ( "typlen"+>              , ScalarType "int2"+>              )+>            , ( "typbyval"+>              , ScalarType "bool"+>              )+>            , ( "typtype"+>              , ScalarType "char"+>              )+>            , ( "typcategory"+>              , ScalarType "char"+>              )+>            , ( "typispreferred"+>              , ScalarType "bool"+>              )+>            , ( "typisdefined"+>              , ScalarType "bool"+>              )+>            , ( "typdelim"+>              , ScalarType "char"+>              )+>            , ( "typrelid"+>              , ScalarType "oid"+>              )+>            , ( "typelem"+>              , ScalarType "oid"+>              )+>            , ( "typarray"+>              , ScalarType "oid"+>              )+>            , ( "typinput"+>              , ScalarType "regproc"+>              )+>            , ( "typoutput"+>              , ScalarType "regproc"+>              )+>            , ( "typreceive"+>              , ScalarType "regproc"+>              )+>            , ( "typsend"+>              , ScalarType "regproc"+>              )+>            , ( "typmodin"+>              , ScalarType "regproc"+>              )+>            , ( "typmodout"+>              , ScalarType "regproc"+>              )+>            , ( "typanalyze"+>              , ScalarType "regproc"+>              )+>            , ( "typalign"+>              , ScalarType "char"+>              )+>            , ( "typstorage"+>              , ScalarType "char"+>              )+>            , ( "typnotnull"+>              , ScalarType "bool"+>              )+>            , ( "typbasetype"+>              , ScalarType "oid"+>              )+>            , ( "typtypmod"+>              , ScalarType "int4"+>              )+>            , ( "typndims"+>              , ScalarType "int4"+>              )+>            , ( "typdefaultbin"+>              , ScalarType "text"+>              )+>            , ( "typdefault"+>              , ScalarType "text"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "pg_user_mapping"+>            [ ( "umuser"+>              , ScalarType "oid"+>              )+>            , ( "umserver"+>              , ScalarType "oid"+>              )+>            , ( "umoptions"+>              , ArrayType ( ScalarType "text" )+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "information_schema.sql_features"+>            [ ( "feature_id"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "feature_name"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sub_feature_id"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sub_feature_name"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_supported"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_verified_by"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "comments"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "information_schema.sql_implementation_info"+>            [ ( "implementation_info_id"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "implementation_info_name"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "integer_value"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_value"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "comments"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "information_schema.sql_languages"+>            [ ( "sql_language_source"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sql_language_year"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sql_language_conformance"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sql_language_integrity"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sql_language_implementation"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sql_language_binding_style"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sql_language_programming_language"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "information_schema.sql_packages"+>            [ ( "feature_id"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "feature_name"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_supported"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_verified_by"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "comments"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "information_schema.sql_parts"+>            [ ( "feature_id"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "feature_name"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_supported"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_verified_by"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "comments"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "information_schema.sql_sizing"+>            [ ( "sizing_id"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "sizing_name"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "supported_value"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "comments"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateTable+>            "information_schema.sql_sizing_profiles"+>            [ ( "sizing_id"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "sizing_name"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "profile_id"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "required_value"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "comments"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>            [ ( "tableoid"+>              , ScalarType "oid"+>              )+>            , ( "cmax"+>              , ScalarType "cid"+>              )+>            , ( "xmax"+>              , ScalarType "xid"+>              )+>            , ( "cmin"+>              , ScalarType "cid"+>              )+>            , ( "xmin"+>              , ScalarType "xid"+>              )+>            , ( "ctid"+>              , ScalarType "tid"+>              )+>            ]+>        , CatCreateView+>            "information_schema._pg_foreign_data_wrappers"+>            [ ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "fdwowner"+>              , ScalarType "oid"+>              )+>            , ( "fdwoptions"+>              , ArrayType ( ScalarType "text" )+>              )+>            , ( "foreign_data_wrapper_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_data_wrapper_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "authorization_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_data_wrapper_language"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema._pg_foreign_servers"+>            [ ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "srvoptions"+>              , ArrayType ( ScalarType "text" )+>              )+>            , ( "foreign_server_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_data_wrapper_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_data_wrapper_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "foreign_server_version"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "authorization_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema._pg_user_mappings"+>            [ ( "oid"+>              , ScalarType "oid"+>              )+>            , ( "umoptions"+>              , ArrayType ( ScalarType "text" )+>              )+>            , ( "umuser"+>              , ScalarType "oid"+>              )+>            , ( "authorization_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "srvowner"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.administrable_role_authorizations"+>            [ ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "role_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.applicable_roles"+>            [ ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "role_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.attributes"+>            [ ( "udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "attribute_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "ordinal_position"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "attribute_default"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_nullable"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "data_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "character_maximum_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_octet_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_set_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "numeric_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_precision_radix"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_scale"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "datetime_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "interval_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "interval_precision"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "attribute_udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "attribute_udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "attribute_udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "maximum_cardinality"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "dtd_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "is_derived_reference_attribute"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.check_constraint_routine_usage"+>            [ ( "constraint_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.check_constraints"+>            [ ( "constraint_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "check_clause"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.column_domain_usage"+>            [ ( "domain_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "column_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.column_privileges"+>            [ ( "grantor"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "column_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "privilege_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.column_udt_usage"+>            [ ( "udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "column_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.columns"+>            [ ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "column_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "ordinal_position"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "column_default"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_nullable"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "data_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "character_maximum_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_octet_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_precision_radix"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_scale"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "datetime_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "interval_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "interval_precision"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "character_set_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "maximum_cardinality"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "dtd_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "is_self_referencing"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_identity"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "identity_generation"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "identity_start"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "identity_increment"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "identity_maximum"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "identity_minimum"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "identity_cycle"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_generated"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "generation_expression"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_updatable"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.constraint_column_usage"+>            [ ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "column_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.constraint_table_usage"+>            [ ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.data_type_privileges"+>            [ ( "object_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "dtd_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.domain_constraints"+>            [ ( "constraint_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "is_deferrable"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "initially_deferred"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.domain_udt_usage"+>            [ ( "udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.domains"+>            [ ( "domain_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "domain_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "data_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "character_maximum_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_octet_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_set_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "numeric_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_precision_radix"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_scale"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "datetime_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "interval_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "interval_precision"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "domain_default"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "maximum_cardinality"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "dtd_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.element_types"+>            [ ( "object_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "collection_type_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "data_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "character_maximum_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_octet_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_set_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "numeric_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_precision_radix"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_scale"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "datetime_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "interval_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "interval_precision"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "domain_default"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "maximum_cardinality"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "dtd_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.enabled_roles"+>            [ ( "role_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.foreign_data_wrapper_options"+>            [ ( "foreign_data_wrapper_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_data_wrapper_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "option_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "option_value"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.foreign_data_wrappers"+>            [ ( "foreign_data_wrapper_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_data_wrapper_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "authorization_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "library_name"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "foreign_data_wrapper_language"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.foreign_server_options"+>            [ ( "foreign_server_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "option_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "option_value"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.foreign_servers"+>            [ ( "foreign_server_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_data_wrapper_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_data_wrapper_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "foreign_server_version"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "authorization_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.information_schema_catalog_name"+>            [ ( "catalog_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.key_column_usage"+>            [ ( "constraint_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "column_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "ordinal_position"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "position_in_unique_constraint"+>              , DomainType "information_schema.cardinal_number"+>              )+>            ]+>        , CatCreateView+>            "information_schema.parameters"+>            [ ( "specific_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "ordinal_position"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "parameter_mode"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_result"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "as_locator"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "parameter_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "data_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "character_maximum_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_octet_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_set_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "numeric_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_precision_radix"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_scale"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "datetime_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "interval_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "interval_precision"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "maximum_cardinality"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "dtd_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "pg_cursors"+>            [ ( "name"+>              , ScalarType "text"+>              )+>            , ( "statement"+>              , ScalarType "text"+>              )+>            , ( "is_holdable"+>              , ScalarType "bool"+>              )+>            , ( "is_binary"+>              , ScalarType "bool"+>              )+>            , ( "is_scrollable"+>              , ScalarType "bool"+>              )+>            , ( "creation_time"+>              , ScalarType "timestamptz"+>              )+>            ]+>        , CatCreateView+>            "pg_group"+>            [ ( "groname"+>              , ScalarType "name"+>              )+>            , ( "grosysid"+>              , ScalarType "oid"+>              )+>            , ( "grolist"+>              , ArrayType ( ScalarType "oid" )+>              )+>            ]+>        , CatCreateView+>            "pg_indexes"+>            [ ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "tablename"+>              , ScalarType "name"+>              )+>            , ( "indexname"+>              , ScalarType "name"+>              )+>            , ( "tablespace"+>              , ScalarType "name"+>              )+>            , ( "indexdef"+>              , ScalarType "text"+>              )+>            ]+>        , CatCreateView+>            "pg_locks"+>            [ ( "locktype"+>              , ScalarType "text"+>              )+>            , ( "database"+>              , ScalarType "oid"+>              )+>            , ( "relation"+>              , ScalarType "oid"+>              )+>            , ( "page"+>              , ScalarType "int4"+>              )+>            , ( "tuple"+>              , ScalarType "int2"+>              )+>            , ( "virtualxid"+>              , ScalarType "text"+>              )+>            , ( "transactionid"+>              , ScalarType "xid"+>              )+>            , ( "classid"+>              , ScalarType "oid"+>              )+>            , ( "objid"+>              , ScalarType "oid"+>              )+>            , ( "objsubid"+>              , ScalarType "int2"+>              )+>            , ( "virtualtransaction"+>              , ScalarType "text"+>              )+>            , ( "pid"+>              , ScalarType "int4"+>              )+>            , ( "mode"+>              , ScalarType "text"+>              )+>            , ( "granted"+>              , ScalarType "bool"+>              )+>            ]+>        , CatCreateView+>            "pg_prepared_statements"+>            [ ( "name"+>              , ScalarType "text"+>              )+>            , ( "statement"+>              , ScalarType "text"+>              )+>            , ( "prepare_time"+>              , ScalarType "timestamptz"+>              )+>            , ( "parameter_types"+>              , ArrayType ( ScalarType "regtype" )+>              )+>            , ( "from_sql"+>              , ScalarType "bool"+>              )+>            ]+>        , CatCreateView+>            "pg_prepared_xacts"+>            [ ( "transaction"+>              , ScalarType "xid"+>              )+>            , ( "gid"+>              , ScalarType "text"+>              )+>            , ( "prepared"+>              , ScalarType "timestamptz"+>              )+>            , ( "owner"+>              , ScalarType "name"+>              )+>            , ( "database"+>              , ScalarType "name"+>              )+>            ]+>        , CatCreateView+>            "pg_roles"+>            [ ( "rolname"+>              , ScalarType "name"+>              )+>            , ( "rolsuper"+>              , ScalarType "bool"+>              )+>            , ( "rolinherit"+>              , ScalarType "bool"+>              )+>            , ( "rolcreaterole"+>              , ScalarType "bool"+>              )+>            , ( "rolcreatedb"+>              , ScalarType "bool"+>              )+>            , ( "rolcatupdate"+>              , ScalarType "bool"+>              )+>            , ( "rolcanlogin"+>              , ScalarType "bool"+>              )+>            , ( "rolconnlimit"+>              , ScalarType "int4"+>              )+>            , ( "rolpassword"+>              , ScalarType "text"+>              )+>            , ( "rolvaliduntil"+>              , ScalarType "timestamptz"+>              )+>            , ( "rolconfig"+>              , ArrayType ( ScalarType "text" )+>              )+>            , ( "oid"+>              , ScalarType "oid"+>              )+>            ]+>        , CatCreateView+>            "pg_rules"+>            [ ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "tablename"+>              , ScalarType "name"+>              )+>            , ( "rulename"+>              , ScalarType "name"+>              )+>            , ( "definition"+>              , ScalarType "text"+>              )+>            ]+>        , CatCreateView+>            "pg_settings"+>            [ ( "name"+>              , ScalarType "text"+>              )+>            , ( "setting"+>              , ScalarType "text"+>              )+>            , ( "unit"+>              , ScalarType "text"+>              )+>            , ( "category"+>              , ScalarType "text"+>              )+>            , ( "short_desc"+>              , ScalarType "text"+>              )+>            , ( "extra_desc"+>              , ScalarType "text"+>              )+>            , ( "context"+>              , ScalarType "text"+>              )+>            , ( "vartype"+>              , ScalarType "text"+>              )+>            , ( "source"+>              , ScalarType "text"+>              )+>            , ( "min_val"+>              , ScalarType "text"+>              )+>            , ( "max_val"+>              , ScalarType "text"+>              )+>            , ( "enumvals"+>              , ArrayType ( ScalarType "text" )+>              )+>            , ( "boot_val"+>              , ScalarType "text"+>              )+>            , ( "reset_val"+>              , ScalarType "text"+>              )+>            , ( "sourcefile"+>              , ScalarType "text"+>              )+>            , ( "sourceline"+>              , ScalarType "int4"+>              )+>            ]+>        , CatCreateView+>            "pg_shadow"+>            [ ( "usename"+>              , ScalarType "name"+>              )+>            , ( "usesysid"+>              , ScalarType "oid"+>              )+>            , ( "usecreatedb"+>              , ScalarType "bool"+>              )+>            , ( "usesuper"+>              , ScalarType "bool"+>              )+>            , ( "usecatupd"+>              , ScalarType "bool"+>              )+>            , ( "passwd"+>              , ScalarType "text"+>              )+>            , ( "valuntil"+>              , ScalarType "abstime"+>              )+>            , ( "useconfig"+>              , ArrayType ( ScalarType "text" )+>              )+>            ]+>        , CatCreateView+>            "pg_stat_activity"+>            [ ( "datid"+>              , ScalarType "oid"+>              )+>            , ( "datname"+>              , ScalarType "name"+>              )+>            , ( "procpid"+>              , ScalarType "int4"+>              )+>            , ( "usesysid"+>              , ScalarType "oid"+>              )+>            , ( "usename"+>              , ScalarType "name"+>              )+>            , ( "current_query"+>              , ScalarType "text"+>              )+>            , ( "waiting"+>              , ScalarType "bool"+>              )+>            , ( "xact_start"+>              , ScalarType "timestamptz"+>              )+>            , ( "query_start"+>              , ScalarType "timestamptz"+>              )+>            , ( "backend_start"+>              , ScalarType "timestamptz"+>              )+>            , ( "client_addr"+>              , ScalarType "inet"+>              )+>            , ( "client_port"+>              , ScalarType "int4"+>              )+>            ]+>        , CatCreateView+>            "pg_stat_all_indexes"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "indexrelid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "indexrelname"+>              , ScalarType "name"+>              )+>            , ( "idx_scan"+>              , ScalarType "int8"+>              )+>            , ( "idx_tup_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_tup_fetch"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_stat_all_tables"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "seq_scan"+>              , ScalarType "int8"+>              )+>            , ( "seq_tup_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_scan"+>              , ScalarType "int8"+>              )+>            , ( "idx_tup_fetch"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_ins"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_upd"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_del"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_hot_upd"+>              , ScalarType "int8"+>              )+>            , ( "n_live_tup"+>              , ScalarType "int8"+>              )+>            , ( "n_dead_tup"+>              , ScalarType "int8"+>              )+>            , ( "last_vacuum"+>              , ScalarType "timestamptz"+>              )+>            , ( "last_autovacuum"+>              , ScalarType "timestamptz"+>              )+>            , ( "last_analyze"+>              , ScalarType "timestamptz"+>              )+>            , ( "last_autoanalyze"+>              , ScalarType "timestamptz"+>              )+>            ]+>        , CatCreateView+>            "pg_stat_bgwriter"+>            [ ( "checkpoints_timed"+>              , ScalarType "int8"+>              )+>            , ( "checkpoints_req"+>              , ScalarType "int8"+>              )+>            , ( "buffers_checkpoint"+>              , ScalarType "int8"+>              )+>            , ( "buffers_clean"+>              , ScalarType "int8"+>              )+>            , ( "maxwritten_clean"+>              , ScalarType "int8"+>              )+>            , ( "buffers_backend"+>              , ScalarType "int8"+>              )+>            , ( "buffers_alloc"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_stat_database"+>            [ ( "datid"+>              , ScalarType "oid"+>              )+>            , ( "datname"+>              , ScalarType "name"+>              )+>            , ( "numbackends"+>              , ScalarType "int4"+>              )+>            , ( "xact_commit"+>              , ScalarType "int8"+>              )+>            , ( "xact_rollback"+>              , ScalarType "int8"+>              )+>            , ( "blks_read"+>              , ScalarType "int8"+>              )+>            , ( "blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "tup_returned"+>              , ScalarType "int8"+>              )+>            , ( "tup_fetched"+>              , ScalarType "int8"+>              )+>            , ( "tup_inserted"+>              , ScalarType "int8"+>              )+>            , ( "tup_updated"+>              , ScalarType "int8"+>              )+>            , ( "tup_deleted"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_stat_sys_indexes"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "indexrelid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "indexrelname"+>              , ScalarType "name"+>              )+>            , ( "idx_scan"+>              , ScalarType "int8"+>              )+>            , ( "idx_tup_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_tup_fetch"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_stat_sys_tables"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "seq_scan"+>              , ScalarType "int8"+>              )+>            , ( "seq_tup_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_scan"+>              , ScalarType "int8"+>              )+>            , ( "idx_tup_fetch"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_ins"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_upd"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_del"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_hot_upd"+>              , ScalarType "int8"+>              )+>            , ( "n_live_tup"+>              , ScalarType "int8"+>              )+>            , ( "n_dead_tup"+>              , ScalarType "int8"+>              )+>            , ( "last_vacuum"+>              , ScalarType "timestamptz"+>              )+>            , ( "last_autovacuum"+>              , ScalarType "timestamptz"+>              )+>            , ( "last_analyze"+>              , ScalarType "timestamptz"+>              )+>            , ( "last_autoanalyze"+>              , ScalarType "timestamptz"+>              )+>            ]+>        , CatCreateView+>            "pg_stat_user_functions"+>            [ ( "funcid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "funcname"+>              , ScalarType "name"+>              )+>            , ( "calls"+>              , ScalarType "int8"+>              )+>            , ( "total_time"+>              , ScalarType "int8"+>              )+>            , ( "self_time"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_stat_user_indexes"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "indexrelid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "indexrelname"+>              , ScalarType "name"+>              )+>            , ( "idx_scan"+>              , ScalarType "int8"+>              )+>            , ( "idx_tup_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_tup_fetch"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_stat_user_tables"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "seq_scan"+>              , ScalarType "int8"+>              )+>            , ( "seq_tup_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_scan"+>              , ScalarType "int8"+>              )+>            , ( "idx_tup_fetch"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_ins"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_upd"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_del"+>              , ScalarType "int8"+>              )+>            , ( "n_tup_hot_upd"+>              , ScalarType "int8"+>              )+>            , ( "n_live_tup"+>              , ScalarType "int8"+>              )+>            , ( "n_dead_tup"+>              , ScalarType "int8"+>              )+>            , ( "last_vacuum"+>              , ScalarType "timestamptz"+>              )+>            , ( "last_autovacuum"+>              , ScalarType "timestamptz"+>              )+>            , ( "last_analyze"+>              , ScalarType "timestamptz"+>              )+>            , ( "last_autoanalyze"+>              , ScalarType "timestamptz"+>              )+>            ]+>        , CatCreateView+>            "pg_statio_all_indexes"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "indexrelid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "indexrelname"+>              , ScalarType "name"+>              )+>            , ( "idx_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_blks_hit"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_statio_all_sequences"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "blks_read"+>              , ScalarType "int8"+>              )+>            , ( "blks_hit"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_statio_all_tables"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "heap_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "heap_blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "idx_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "toast_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "toast_blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "tidx_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "tidx_blks_hit"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_statio_sys_indexes"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "indexrelid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "indexrelname"+>              , ScalarType "name"+>              )+>            , ( "idx_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_blks_hit"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_statio_sys_sequences"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "blks_read"+>              , ScalarType "int8"+>              )+>            , ( "blks_hit"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_statio_sys_tables"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "heap_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "heap_blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "idx_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "toast_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "toast_blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "tidx_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "tidx_blks_hit"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_statio_user_indexes"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "indexrelid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "indexrelname"+>              , ScalarType "name"+>              )+>            , ( "idx_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_blks_hit"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_statio_user_sequences"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "blks_read"+>              , ScalarType "int8"+>              )+>            , ( "blks_hit"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_statio_user_tables"+>            [ ( "relid"+>              , ScalarType "oid"+>              )+>            , ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "relname"+>              , ScalarType "name"+>              )+>            , ( "heap_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "heap_blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "idx_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "idx_blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "toast_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "toast_blks_hit"+>              , ScalarType "int8"+>              )+>            , ( "tidx_blks_read"+>              , ScalarType "int8"+>              )+>            , ( "tidx_blks_hit"+>              , ScalarType "int8"+>              )+>            ]+>        , CatCreateView+>            "pg_stats"+>            [ ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "tablename"+>              , ScalarType "name"+>              )+>            , ( "attname"+>              , ScalarType "name"+>              )+>            , ( "null_frac"+>              , ScalarType "float4"+>              )+>            , ( "avg_width"+>              , ScalarType "int4"+>              )+>            , ( "n_distinct"+>              , ScalarType "float4"+>              )+>            , ( "most_common_vals"+>              , Pseudo AnyArray+>              )+>            , ( "most_common_freqs"+>              , ArrayType ( ScalarType "float4" )+>              )+>            , ( "histogram_bounds"+>              , Pseudo AnyArray+>              )+>            , ( "correlation"+>              , ScalarType "float4"+>              )+>            ]+>        , CatCreateView+>            "pg_tables"+>            [ ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "tablename"+>              , ScalarType "name"+>              )+>            , ( "tableowner"+>              , ScalarType "name"+>              )+>            , ( "tablespace"+>              , ScalarType "name"+>              )+>            , ( "hasindexes"+>              , ScalarType "bool"+>              )+>            , ( "hasrules"+>              , ScalarType "bool"+>              )+>            , ( "hastriggers"+>              , ScalarType "bool"+>              )+>            ]+>        , CatCreateView+>            "pg_timezone_abbrevs"+>            [ ( "abbrev"+>              , ScalarType "text"+>              )+>            , ( "utc_offset"+>              , ScalarType "interval"+>              )+>            , ( "is_dst"+>              , ScalarType "bool"+>              )+>            ]+>        , CatCreateView+>            "pg_timezone_names"+>            [ ( "name"+>              , ScalarType "text"+>              )+>            , ( "abbrev"+>              , ScalarType "text"+>              )+>            , ( "utc_offset"+>              , ScalarType "interval"+>              )+>            , ( "is_dst"+>              , ScalarType "bool"+>              )+>            ]+>        , CatCreateView+>            "pg_user"+>            [ ( "usename"+>              , ScalarType "name"+>              )+>            , ( "usesysid"+>              , ScalarType "oid"+>              )+>            , ( "usecreatedb"+>              , ScalarType "bool"+>              )+>            , ( "usesuper"+>              , ScalarType "bool"+>              )+>            , ( "usecatupd"+>              , ScalarType "bool"+>              )+>            , ( "passwd"+>              , ScalarType "text"+>              )+>            , ( "valuntil"+>              , ScalarType "abstime"+>              )+>            , ( "useconfig"+>              , ArrayType ( ScalarType "text" )+>              )+>            ]+>        , CatCreateView+>            "pg_user_mappings"+>            [ ( "umid"+>              , ScalarType "oid"+>              )+>            , ( "srvid"+>              , ScalarType "oid"+>              )+>            , ( "srvname"+>              , ScalarType "name"+>              )+>            , ( "umuser"+>              , ScalarType "oid"+>              )+>            , ( "usename"+>              , ScalarType "name"+>              )+>            , ( "umoptions"+>              , ArrayType ( ScalarType "text" )+>              )+>            ]+>        , CatCreateView+>            "pg_views"+>            [ ( "schemaname"+>              , ScalarType "name"+>              )+>            , ( "viewname"+>              , ScalarType "name"+>              )+>            , ( "viewowner"+>              , ScalarType "name"+>              )+>            , ( "definition"+>              , ScalarType "text"+>              )+>            ]+>        , CatCreateView+>            "information_schema.referential_constraints"+>            [ ( "constraint_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "unique_constraint_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "unique_constraint_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "unique_constraint_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "match_option"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "update_rule"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "delete_rule"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.role_column_grants"+>            [ ( "grantor"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "column_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "privilege_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.role_routine_grants"+>            [ ( "grantor"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "privilege_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.role_table_grants"+>            [ ( "grantor"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "privilege_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "with_hierarchy"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.role_usage_grants"+>            [ ( "grantor"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "privilege_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.routine_privileges"+>            [ ( "grantor"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "privilege_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.routines"+>            [ ( "specific_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "module_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "module_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "module_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "data_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "character_maximum_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_octet_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "character_set_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "character_set_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "collation_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "numeric_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_precision_radix"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_scale"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "datetime_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "interval_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "interval_precision"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "type_udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "type_udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "type_udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "scope_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "maximum_cardinality"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "dtd_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "routine_body"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "routine_definition"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "external_name"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "external_language"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "parameter_style"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_deterministic"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sql_data_access"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_null_call"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "sql_path"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "schema_level_routine"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "max_dynamic_result_sets"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "is_user_defined_cast"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_implicitly_invocable"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "security_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "to_sql_specific_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "to_sql_specific_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "to_sql_specific_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "as_locator"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "created"+>              , DomainType "information_schema.time_stamp"+>              )+>            , ( "last_altered"+>              , DomainType "information_schema.time_stamp"+>              )+>            , ( "new_savepoint_level"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_udt_dependent"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "result_cast_from_data_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "result_cast_as_locator"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "result_cast_char_max_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "result_cast_char_octet_length"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "result_cast_char_set_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_char_set_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_character_set_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_collation_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_collation_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_collation_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_numeric_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "result_cast_numeric_precision_radix"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "result_cast_numeric_scale"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "result_cast_datetime_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "result_cast_interval_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "result_cast_interval_precision"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "result_cast_type_udt_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_type_udt_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_type_udt_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_scope_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_scope_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_scope_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "result_cast_maximum_cardinality"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "result_cast_dtd_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.schemata"+>            [ ( "catalog_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "schema_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "schema_owner"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "default_character_set_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "default_character_set_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "default_character_set_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "sql_path"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.sequences"+>            [ ( "sequence_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "sequence_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "sequence_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "data_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "numeric_precision"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_precision_radix"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "numeric_scale"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "maximum_value"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "minimum_value"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "increment"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "cycle_option"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.table_constraints"+>            [ ( "constraint_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "constraint_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_deferrable"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "initially_deferred"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.table_privileges"+>            [ ( "grantor"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "privilege_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "with_hierarchy"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.tables"+>            [ ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "self_referencing_column_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "reference_generation"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "user_defined_type_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "user_defined_type_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "user_defined_type_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "is_insertable_into"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_typed"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "commit_action"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.triggered_update_columns"+>            [ ( "trigger_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "trigger_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "trigger_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "event_object_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "event_object_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "event_object_table"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "event_object_column"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.triggers"+>            [ ( "trigger_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "trigger_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "trigger_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "event_manipulation"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "event_object_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "event_object_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "event_object_table"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "action_order"+>              , DomainType "information_schema.cardinal_number"+>              )+>            , ( "action_condition"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "action_statement"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "action_orientation"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "condition_timing"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "condition_reference_old_table"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "condition_reference_new_table"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "condition_reference_old_row"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "condition_reference_new_row"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "created"+>              , DomainType "information_schema.time_stamp"+>              )+>            ]+>        , CatCreateView+>            "information_schema.usage_privileges"+>            [ ( "grantor"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "grantee"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "object_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "privilege_type"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_grantable"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.user_mapping_options"+>            [ ( "authorization_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "option_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "option_value"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        , CatCreateView+>            "information_schema.user_mappings"+>            [ ( "authorization_identifier"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "foreign_server_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.view_column_usage"+>            [ ( "view_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "view_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "view_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "column_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.view_routine_usage"+>            [ ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "specific_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.view_table_usage"+>            [ ( "view_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "view_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "view_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            ]+>        , CatCreateView+>            "information_schema.views"+>            [ ( "table_catalog"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_schema"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "table_name"+>              , DomainType "information_schema.sql_identifier"+>              )+>            , ( "view_definition"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "check_option"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_updatable"+>              , DomainType "information_schema.character_data"+>              )+>            , ( "is_insertable_into"+>              , DomainType "information_schema.character_data"+>              )+>            ]+>        ]+
− Database/HsSqlPpp/AstInternals/Environment/DefaultTemplate1Environment.lhs
@@ -1,29027 +0,0 @@--Copyright 2009 Jake Wheat--This file contains--> {-# OPTIONS_HADDOCK hide  #-}--> module Database.HsSqlPpp.AstInternals.Environment.DefaultTemplate1Environment->     (defaultTemplate1Environment->      ) where--> import Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal-> import Database.HsSqlPpp.AstInternals.TypeType--> defaultTemplate1Environment :: Environment-> defaultTemplate1Environment =->    (\l -> case l of->             Left x -> error $ show x->             Right e -> e) $->     updateEnvironment defaultEnvironment->        [ EnvCreateScalar (->            ScalarType "bool" )->            "B"->            True->        , EnvCreateScalar (->            ScalarType "bytea" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "char" )->            "S"->            False->        , EnvCreateScalar (->            ScalarType "name" )->            "S"->            False->        , EnvCreateScalar (->            ScalarType "int8" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "int2" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "int2vector" )->            "A"->            False->        , EnvCreateScalar (->            ScalarType "int4" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "regproc" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "text" )->            "S"->            True->        , EnvCreateScalar (->            ScalarType "oid" )->            "N"->            True->        , EnvCreateScalar (->            ScalarType "tid" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "xid" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "cid" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "oidvector" )->            "A"->            False->        , EnvCreateScalar (->            ScalarType "xml" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "point" )->            "G"->            False->        , EnvCreateScalar (->            ScalarType "lseg" )->            "G"->            False->        , EnvCreateScalar (->            ScalarType "path" )->            "G"->            False->        , EnvCreateScalar (->            ScalarType "box" )->            "G"->            False->        , EnvCreateScalar (->            ScalarType "polygon" )->            "G"->            False->        , EnvCreateScalar (->            ScalarType "line" )->            "G"->            False->        , EnvCreateScalar (->            ScalarType "float4" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "float8" )->            "N"->            True->        , EnvCreateScalar (->            ScalarType "abstime" )->            "D"->            False->        , EnvCreateScalar (->            ScalarType "reltime" )->            "T"->            False->        , EnvCreateScalar (->            ScalarType "tinterval" )->            "T"->            False->        , EnvCreateScalar (->            ScalarType "circle" )->            "G"->            False->        , EnvCreateScalar (->            ScalarType "money" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "macaddr" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "inet" )->            "I"->            True->        , EnvCreateScalar (->            ScalarType "cidr" )->            "I"->            False->        , EnvCreateScalar (->            ScalarType "aclitem" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "bpchar" )->            "S"->            False->        , EnvCreateScalar (->            ScalarType "varchar" )->            "S"->            False->        , EnvCreateScalar (->            ScalarType "date" )->            "D"->            False->        , EnvCreateScalar (->            ScalarType "time" )->            "D"->            False->        , EnvCreateScalar (->            ScalarType "timestamp" )->            "D"->            False->        , EnvCreateScalar (->            ScalarType "timestamptz" )->            "D"->            True->        , EnvCreateScalar (->            ScalarType "interval" )->            "T"->            True->        , EnvCreateScalar (->            ScalarType "timetz" )->            "D"->            False->        , EnvCreateScalar (->            ScalarType "bit" )->            "V"->            False->        , EnvCreateScalar (->            ScalarType "varbit" )->            "V"->            True->        , EnvCreateScalar (->            ScalarType "numeric" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "refcursor" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "regprocedure" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "regoper" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "regoperator" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "regclass" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "regtype" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "uuid" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "tsvector" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "gtsvector" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "tsquery" )->            "U"->            False->        , EnvCreateScalar (->            ScalarType "regconfig" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "regdictionary" )->            "N"->            False->        , EnvCreateScalar (->            ScalarType "txid_snapshot" )->            "U"->            False->        , EnvCreateDomain (->            DomainType "information_schema.cardinal_number" ) (->            ScalarType "int4" )->        , EnvCreateDomain (->            DomainType "information_schema.character_data" ) (->            ScalarType "varchar" )->        , EnvCreateDomain (->            DomainType "information_schema.sql_identifier" ) (->            ScalarType "varchar" )->        , EnvCreateDomain (->            DomainType "information_schema.time_stamp" ) (->            ScalarType "timestamptz" )->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "int2" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "float4" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "float8" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "numeric" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "int8" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "int4" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "float4" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "float8" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "numeric" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "int8" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "int2" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "float4" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "float8" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "numeric" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "float4" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "float4" ) (->            ScalarType "int2" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "float4" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "float4" ) (->            ScalarType "float8" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "float4" ) (->            ScalarType "numeric" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "float8" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "float8" ) (->            ScalarType "int2" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "float8" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "float8" ) (->            ScalarType "float4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "float8" ) (->            ScalarType "numeric" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "numeric" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "numeric" ) (->            ScalarType "int2" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "numeric" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "numeric" ) (->            ScalarType "float4" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "numeric" ) (->            ScalarType "float8" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "bool" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "bool" ) (->            ScalarType "int4" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "regproc" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regproc" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "regproc" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "regproc" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "regproc" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regproc" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regproc" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regproc" ) (->            ScalarType "regprocedure" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regprocedure" ) (->            ScalarType "regproc" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "regprocedure" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regprocedure" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "regprocedure" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "regprocedure" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "regprocedure" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regprocedure" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regprocedure" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "regoper" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regoper" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "regoper" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "regoper" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "regoper" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regoper" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regoper" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regoper" ) (->            ScalarType "regoperator" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regoperator" ) (->            ScalarType "regoper" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "regoperator" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regoperator" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "regoperator" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "regoperator" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "regoperator" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regoperator" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regoperator" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "regclass" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regclass" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "regclass" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "regclass" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "regclass" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regclass" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regclass" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "regtype" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regtype" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "regtype" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "regtype" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "regtype" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regtype" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regtype" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "regconfig" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regconfig" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "regconfig" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "regconfig" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "regconfig" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regconfig" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regconfig" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "oid" ) (->            ScalarType "regdictionary" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regdictionary" ) (->            ScalarType "oid" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "regdictionary" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int2" ) (->            ScalarType "regdictionary" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "regdictionary" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "regdictionary" ) (->            ScalarType "int8" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "regdictionary" ) (->            ScalarType "int4" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "text" ) (->            ScalarType "regclass" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "varchar" ) (->            ScalarType "regclass" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "text" ) (->            ScalarType "bpchar" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "text" ) (->            ScalarType "varchar" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "bpchar" ) (->            ScalarType "text" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "bpchar" ) (->            ScalarType "varchar" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "varchar" ) (->            ScalarType "text" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "varchar" ) (->            ScalarType "bpchar" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "char" ) (->            ScalarType "text" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "char" ) (->            ScalarType "bpchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "char" ) (->            ScalarType "varchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "name" ) (->            ScalarType "text" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "name" ) (->            ScalarType "bpchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "name" ) (->            ScalarType "varchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "text" ) (->            ScalarType "char" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "bpchar" ) (->            ScalarType "char" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "varchar" ) (->            ScalarType "char" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "text" ) (->            ScalarType "name" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "bpchar" ) (->            ScalarType "name" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "varchar" ) (->            ScalarType "name" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "char" ) (->            ScalarType "int4" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "char" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "abstime" ) (->            ScalarType "date" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "abstime" ) (->            ScalarType "time" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "abstime" ) (->            ScalarType "timestamp" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "abstime" ) (->            ScalarType "timestamptz" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "reltime" ) (->            ScalarType "interval" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "date" ) (->            ScalarType "timestamp" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "date" ) (->            ScalarType "timestamptz" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "time" ) (->            ScalarType "interval" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "time" ) (->            ScalarType "timetz" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "timestamp" ) (->            ScalarType "abstime" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "timestamp" ) (->            ScalarType "date" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "timestamp" ) (->            ScalarType "time" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "timestamp" ) (->            ScalarType "timestamptz" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "timestamptz" ) (->            ScalarType "abstime" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "timestamptz" ) (->            ScalarType "date" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "timestamptz" ) (->            ScalarType "time" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "timestamptz" ) (->            ScalarType "timestamp" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "timestamptz" ) (->            ScalarType "timetz" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "interval" ) (->            ScalarType "reltime" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "interval" ) (->            ScalarType "time" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "timetz" ) (->            ScalarType "time" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "abstime" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "abstime" ) (->            ScalarType "int4" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "reltime" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "reltime" ) (->            ScalarType "int4" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "lseg" ) (->            ScalarType "point" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "path" ) (->            ScalarType "point" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "path" ) (->            ScalarType "polygon" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "box" ) (->            ScalarType "point" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "box" ) (->            ScalarType "lseg" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "box" ) (->            ScalarType "polygon" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "box" ) (->            ScalarType "circle" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "polygon" ) (->            ScalarType "point" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "polygon" ) (->            ScalarType "path" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "polygon" ) (->            ScalarType "box" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "polygon" ) (->            ScalarType "circle" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "circle" ) (->            ScalarType "point" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "circle" ) (->            ScalarType "box" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "circle" ) (->            ScalarType "polygon" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "cidr" ) (->            ScalarType "inet" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "inet" ) (->            ScalarType "cidr" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "bit" ) (->            ScalarType "varbit" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "varbit" ) (->            ScalarType "bit" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "int8" ) (->            ScalarType "bit" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "int4" ) (->            ScalarType "bit" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "bit" ) (->            ScalarType "int8" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "bit" ) (->            ScalarType "int4" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "cidr" ) (->            ScalarType "text" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "inet" ) (->            ScalarType "text" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "bool" ) (->            ScalarType "text" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "xml" ) (->            ScalarType "text" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "text" ) (->            ScalarType "xml" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "cidr" ) (->            ScalarType "varchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "inet" ) (->            ScalarType "varchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "bool" ) (->            ScalarType "varchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "xml" ) (->            ScalarType "varchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "varchar" ) (->            ScalarType "xml" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "cidr" ) (->            ScalarType "bpchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "inet" ) (->            ScalarType "bpchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "bool" ) (->            ScalarType "bpchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "xml" ) (->            ScalarType "bpchar" )->            AssignmentCastContext->        , EnvCreateCast (->            ScalarType "bpchar" ) (->            ScalarType "xml" )->            ExplicitCastContext->        , EnvCreateCast (->            ScalarType "bpchar" ) (->            ScalarType "bpchar" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "varchar" ) (->            ScalarType "varchar" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "time" ) (->            ScalarType "time" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "timestamp" ) (->            ScalarType "timestamp" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "timestamptz" ) (->            ScalarType "timestamptz" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "interval" ) (->            ScalarType "interval" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "timetz" ) (->            ScalarType "timetz" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "bit" ) (->            ScalarType "bit" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "varbit" ) (->            ScalarType "varbit" )->            ImplicitCastContext->        , EnvCreateCast (->            ScalarType "numeric" ) (->            ScalarType "numeric" )->            ImplicitCastContext->        , EnvCreateFunction->            FunPrefix->            "~"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunPrefix->            "~"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunPrefix->            "~"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunPrefix->            "~"->            [ ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunPrefix->            "~"->            [ ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunPrefix->            "||/"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunPrefix->            "|/"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunPrefix->            "|"->            [ ScalarType "tinterval"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunPrefix->            "@@"->            [ ScalarType "circle"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunPrefix->            "@@"->            [ ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunPrefix->            "@@"->            [ ScalarType "path"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunPrefix->            "@@"->            [ ScalarType "polygon"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunPrefix->            "@@"->            [ ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunPrefix->            "@-@"->            [ ScalarType "path"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunPrefix->            "@-@"->            [ ScalarType "lseg"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunPrefix->            "@"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunPrefix->            "@"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunPrefix->            "@"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunPrefix->            "@"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunPrefix->            "@"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunPrefix->            "@"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunPrefix->            "?|"->            [ ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunPrefix->            "?|"->            [ ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunPrefix->            "?-"->            [ ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunPrefix->            "?-"->            [ ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunPrefix->            "-"->            [ ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunPrefix->            "-"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunPrefix->            "-"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunPrefix->            "-"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunPrefix->            "-"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunPrefix->            "-"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunPrefix->            "-"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunPrefix->            "+"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunPrefix->            "+"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunPrefix->            "+"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunPrefix->            "+"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunPrefix->            "+"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunPrefix->            "+"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunPrefix->            "#"->            [ ScalarType "path"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunPrefix->            "#"->            [ ScalarType "polygon"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunPrefix->            "!!"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunPrefix->            "!!"->            [ ScalarType "tsquery"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunPostfix->            "!"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunBinary->            "~~*"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~~*"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~~*"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~~"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~~"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~~"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~~"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~>~"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~>~"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~>=~"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~>=~"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~="->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~="->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~="->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~="->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~="->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~<~"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~<~"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~<=~"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~<=~"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~*"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~*"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~*"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ArrayType ( ScalarType "aclitem" )->            , ScalarType "aclitem"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ScalarType "polygon"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "~"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "varbit" )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ Pseudo AnyElement->            , Pseudo AnyArray->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ Pseudo AnyNonArray->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "tsvector" )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ Pseudo AnyArray->            , Pseudo AnyElement->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunBinary->            "||"->            [ ScalarType "text"->            , Pseudo AnyNonArray->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunBinary->            "|>>"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "|>>"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "|>>"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "|&>"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "|&>"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "|&>"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "|"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "|"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "|"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            "|"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunBinary->            "|"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunBinary->            "^"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunBinary->            "^"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "@@@"->            [ ScalarType "tsquery"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@@@"->            [ ScalarType "tsvector"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@@"->            [ ScalarType "text"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@@"->            [ ScalarType "tsquery"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@@"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@@"->            [ ScalarType "tsvector"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@>"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@>"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@>"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@>"->            [ ScalarType "polygon"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@>"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@>"->            [ ArrayType ( ScalarType "aclitem" )->            , ScalarType "aclitem"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@>"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@>"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "@>"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?||"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?||"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?|"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?-|"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?-|"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?-"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?#"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?#"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?#"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?#"->            [ ScalarType "lseg"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?#"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?#"->            [ ScalarType "lseg"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "?#"->            [ ScalarType "line"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">^"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">^"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">>="->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">>"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">>"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">>"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">>"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            ">>"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            ">>"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            ">>"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">>"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">>"->            [ ScalarType "bit"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">="->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            ">"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "aclitem"->            , ScalarType "aclitem"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int2vector"->            , ScalarType "int2vector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "cid"->            , ScalarType "cid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "xid"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "xid"->            , ScalarType "xid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "="->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<^"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<^"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "lseg"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "lseg"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "point"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "point"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "point"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "point"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "point"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<@"->            [ ScalarType "point"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<?>"->            [ ScalarType "abstime"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<>"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<="->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<|"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<|"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<|"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<="->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "bit"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "<<"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "circle"->            , ScalarType "polygon"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "point"->            , ScalarType "line"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "point"->            , ScalarType "path"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "point"->            , ScalarType "circle"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "lseg"->            , ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "point"->            , ScalarType "lseg"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "lseg"->            , ScalarType "line"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "point"->            , ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<->"->            [ ScalarType "line"->            , ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "<#>"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "tinterval" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "<"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "money"->            , ScalarType "float4"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "money"->            , ScalarType "int4"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "interval"->            , ScalarType "float8"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "money"->            , ScalarType "int2"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "money"->            , ScalarType "float8"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "/"->            [ ScalarType "box"->            , ScalarType "point"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "timestamptz"->            , ScalarType "interval"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "date"->            , ScalarType "int4"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "date"->            , ScalarType "interval"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ArrayType ( ScalarType "aclitem" )->            , ScalarType "aclitem"->            ] (->            ArrayType ( ScalarType "aclitem" ) )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "inet"->            , ScalarType "int8"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "box"->            , ScalarType "point"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "time"->            , ScalarType "interval"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "timetz"->            , ScalarType "interval"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "abstime"->            , ScalarType "reltime"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "timestamp"->            , ScalarType "interval"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunBinary->            "-"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "date"->            , ScalarType "time"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "timetz"->            , ScalarType "interval"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "time"->            , ScalarType "interval"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "timestamp"->            , ScalarType "interval"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "time"->            , ScalarType "date"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "date"->            , ScalarType "timetz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "box"->            , ScalarType "point"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int8"->            , ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ArrayType ( ScalarType "aclitem" )->            , ScalarType "aclitem"->            ] (->            ArrayType ( ScalarType "aclitem" ) )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "inet"->            , ScalarType "int8"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "interval"->            , ScalarType "date"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "date"->            , ScalarType "interval"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "timetz"->            , ScalarType "date"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "interval"->            , ScalarType "timetz"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "interval"->            , ScalarType "timestamp"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "date"->            , ScalarType "int4"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "interval"->            , ScalarType "timestamptz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "int4"->            , ScalarType "date"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "timestamptz"->            , ScalarType "interval"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "abstime"->            , ScalarType "reltime"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunBinary->            "+"->            [ ScalarType "interval"->            , ScalarType "time"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "box"->            , ScalarType "point"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "money"->            , ScalarType "float4"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "float4"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "money"->            , ScalarType "float8"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "money"->            , ScalarType "int4"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "money"->            , ScalarType "int2"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "float8"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int4"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int2"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "float8"->            , ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "interval"->            , ScalarType "float8"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "*"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunBinary->            "&>"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&>"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&>"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&<|"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&<|"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&<|"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&<"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&<"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&<"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&&"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&&"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&&"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&&"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&&"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "&&"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunBinary->            "&"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunBinary->            "&"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunBinary->            "&"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "&"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "&"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            "%"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            "%"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunBinary->            "%"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "%"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "#>="->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "#>"->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "#="->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "#<>"->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "#<="->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "#<"->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "##"->            [ ScalarType "line"->            , ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "##"->            [ ScalarType "lseg"->            , ScalarType "line"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "##"->            [ ScalarType "point"->            , ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "##"->            [ ScalarType "lseg"->            , ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "##"->            [ ScalarType "line"->            , ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "##"->            [ ScalarType "point"->            , ScalarType "line"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "##"->            [ ScalarType "point"->            , ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "##"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "#"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunBinary->            "#"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "#"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunBinary->            "#"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunBinary->            "#"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunBinary->            "#"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunBinary->            "#"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunBinary->            "!~~*"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~~*"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~~*"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~~"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~~"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~~"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~~"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~*"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~*"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~*"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunBinary->            "!~"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_cascade_del"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_cascade_upd"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_check_ins"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_check_upd"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_noaction_del"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_noaction_upd"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_restrict_del"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_restrict_upd"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_setdefault_del"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_setdefault_upd"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_setnull_del"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "RI_FKey_setnull_upd"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "abbrev"->            [ ScalarType "cidr"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "abbrev"->            [ ScalarType "inet"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "abs"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "abs"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "abs"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "abs"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "abs"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "abs"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "abstime"->            [ ScalarType "timestamp"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunName->            "abstime"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunName->            "abstimeeq"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "abstimege"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "abstimegt"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "abstimein"->            [ Pseudo Cstring->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunName->            "abstimele"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "abstimelt"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "abstimene"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "abstimeout"->            [ ScalarType "abstime"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "abstimerecv"->            [ Pseudo Internal->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunName->            "abstimesend"->            [ ScalarType "abstime"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "aclcontains"->            [ ArrayType ( ScalarType "aclitem" )->            , ScalarType "aclitem"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "aclinsert"->            [ ArrayType ( ScalarType "aclitem" )->            , ScalarType "aclitem"->            ] (->            ArrayType ( ScalarType "aclitem" ) )->            False->        , EnvCreateFunction->            FunName->            "aclitemeq"->            [ ScalarType "aclitem"->            , ScalarType "aclitem"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "aclitemin"->            [ Pseudo Cstring->            ] (->            ScalarType "aclitem" )->            False->        , EnvCreateFunction->            FunName->            "aclitemout"->            [ ScalarType "aclitem"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "aclremove"->            [ ArrayType ( ScalarType "aclitem" )->            , ScalarType "aclitem"->            ] (->            ArrayType ( ScalarType "aclitem" ) )->            False->        , EnvCreateFunction->            FunName->            "acos"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "age"->            [ ScalarType "xid"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "age"->            [ ScalarType "timestamp"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "age"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "age"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "age"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "any_in"->            [ Pseudo Cstring->            ] (->            Pseudo Any )->            False->        , EnvCreateFunction->            FunName->            "any_out"->            [ Pseudo Any->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "anyarray_in"->            [ Pseudo Cstring->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "anyarray_out"->            [ Pseudo AnyArray->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "anyarray_recv"->            [ Pseudo Internal->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "anyarray_send"->            [ Pseudo AnyArray->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "anyelement_in"->            [ Pseudo Cstring->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunName->            "anyelement_out"->            [ Pseudo AnyElement->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "anyenum_in"->            [ Pseudo Cstring->            ] (->            Pseudo AnyEnum )->            False->        , EnvCreateFunction->            FunName->            "anyenum_out"->            [ Pseudo AnyEnum->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "anynonarray_in"->            [ Pseudo Cstring->            ] (->            Pseudo AnyNonArray )->            False->        , EnvCreateFunction->            FunName->            "anynonarray_out"->            [ Pseudo AnyNonArray->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "anytextcat"->            [ Pseudo AnyNonArray->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "area"->            [ ScalarType "path"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "area"->            [ ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "area"->            [ ScalarType "circle"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "areajoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "areasel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "array_agg_finalfn"->            [ Pseudo Internal->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_agg_transfn"->            [ Pseudo Internal->            , Pseudo AnyElement->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "array_append"->            [ Pseudo AnyArray->            , Pseudo AnyElement->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_cat"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_dims"->            [ Pseudo AnyArray->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "array_eq"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "array_fill"->            [ Pseudo AnyElement->            , ArrayType ( ScalarType "int4" )->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_fill"->            [ Pseudo AnyElement->            , ArrayType ( ScalarType "int4" )->            , ArrayType ( ScalarType "int4" )->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_ge"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "array_gt"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "array_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_larger"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_le"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "array_length"->            [ Pseudo AnyArray->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "array_lower"->            [ Pseudo AnyArray->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "array_lt"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "array_ndims"->            [ Pseudo AnyArray->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "array_ne"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "array_out"->            [ Pseudo AnyArray->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "array_prepend"->            [ Pseudo AnyElement->            , Pseudo AnyArray->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_send"->            [ Pseudo AnyArray->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "array_smaller"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "array_to_string"->            [ Pseudo AnyArray->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "array_upper"->            [ Pseudo AnyArray->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "arraycontained"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "arraycontains"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "arrayoverlap"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ascii"->            [ ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "ascii_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "ascii_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "asin"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "atan"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "atan2"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "big5_to_euc_tw"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "big5_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "big5_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "bit"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bit"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bit"->            [ ScalarType "bit"->            , ScalarType "int4"->            , ScalarType "bool"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bit_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bit_length"->            [ ScalarType "bytea"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "bit_length"->            [ ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "bit_length"->            [ ScalarType "bit"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "bit_out"->            [ ScalarType "bit"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "bit_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bit_send"->            [ ScalarType "bit"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "bitand"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bitcat"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "varbit" )->            False->        , EnvCreateFunction->            FunName->            "bitcmp"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "biteq"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bitge"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bitgt"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bitle"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bitlt"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bitne"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bitnot"->            [ ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bitor"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bitshiftleft"->            [ ScalarType "bit"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bitshiftright"->            [ ScalarType "bit"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bittypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "bittypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "bitxor"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "bool"->            [ ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "booland_statefunc"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "booleq"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "boolge"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "boolgt"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "boolin"->            [ Pseudo Cstring->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "boolle"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "boollt"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "boolne"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "boolor_statefunc"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "boolout"->            [ ScalarType "bool"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "boolrecv"->            [ Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "boolsend"->            [ ScalarType "bool"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "box"->            [ ScalarType "polygon"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "box"->            [ ScalarType "circle"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "box"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "box_above"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_above_eq"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_add"->            [ ScalarType "box"->            , ScalarType "point"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "box_below"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_below_eq"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_center"->            [ ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "box_contain"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_contained"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_distance"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "box_div"->            [ ScalarType "box"->            , ScalarType "point"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "box_eq"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_ge"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_gt"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_in"->            [ Pseudo Cstring->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "box_intersect"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "box_le"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_left"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_lt"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_mul"->            [ ScalarType "box"->            , ScalarType "point"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "box_out"->            [ ScalarType "box"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "box_overabove"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_overbelow"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_overlap"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_overleft"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_overright"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_recv"->            [ Pseudo Internal->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "box_right"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_same"->            [ ScalarType "box"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "box_send"->            [ ScalarType "box"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "box_sub"->            [ ScalarType "box"->            , ScalarType "point"->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "bpchar"->            [ ScalarType "char"->            ] (->            ScalarType "bpchar" )->            False->        , EnvCreateFunction->            FunName->            "bpchar"->            [ ScalarType "name"->            ] (->            ScalarType "bpchar" )->            False->        , EnvCreateFunction->            FunName->            "bpchar"->            [ ScalarType "bpchar"->            , ScalarType "int4"->            , ScalarType "bool"->            ] (->            ScalarType "bpchar" )->            False->        , EnvCreateFunction->            FunName->            "bpchar_larger"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bpchar" )->            False->        , EnvCreateFunction->            FunName->            "bpchar_pattern_ge"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpchar_pattern_gt"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpchar_pattern_le"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpchar_pattern_lt"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpchar_smaller"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bpchar" )->            False->        , EnvCreateFunction->            FunName->            "bpcharcmp"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "bpchareq"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharge"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpchargt"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpchariclike"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharicnlike"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharicregexeq"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharicregexne"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharin"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "bpchar" )->            False->        , EnvCreateFunction->            FunName->            "bpcharle"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharlike"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharlt"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharne"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharnlike"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharout"->            [ ScalarType "bpchar"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "bpcharrecv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "bpchar" )->            False->        , EnvCreateFunction->            FunName->            "bpcharregexeq"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharregexne"->            [ ScalarType "bpchar"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bpcharsend"->            [ ScalarType "bpchar"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "bpchartypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "bpchartypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "broadcast"->            [ ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "btabstimecmp"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btarraycmp"->            [ Pseudo AnyArray->            , Pseudo AnyArray->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btbeginscan"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "btboolcmp"->            [ ScalarType "bool"->            , ScalarType "bool"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btbpchar_pattern_cmp"->            [ ScalarType "bpchar"->            , ScalarType "bpchar"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btbuild"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "btbulkdelete"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "btcharcmp"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btcostestimate"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "btendscan"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "btfloat48cmp"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btfloat4cmp"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btfloat84cmp"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btfloat8cmp"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btgetbitmap"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "btgettuple"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "btinsert"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "btint24cmp"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btint28cmp"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btint2cmp"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btint42cmp"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btint48cmp"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btint4cmp"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btint82cmp"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btint84cmp"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btint8cmp"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btmarkpos"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "btnamecmp"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btoidcmp"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btoidvectorcmp"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btoptions"->            [ ArrayType ( ScalarType "text" )->            , ScalarType "bool"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "btrecordcmp"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btreltimecmp"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btrescan"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "btrestrpos"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "btrim"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "btrim"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "btrim"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "bttext_pattern_cmp"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "bttextcmp"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "bttidcmp"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "bttintervalcmp"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "btvacuumcleanup"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "byteacat"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "byteacmp"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "byteaeq"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "byteage"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "byteagt"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "byteain"->            [ Pseudo Cstring->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "byteale"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bytealike"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "bytealt"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "byteane"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "byteanlike"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "byteaout"->            [ ScalarType "bytea"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "bytearecv"->            [ Pseudo Internal->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "byteasend"->            [ ScalarType "bytea"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "cash_cmp"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "cash_div_flt4"->            [ ScalarType "money"->            , ScalarType "float4"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_div_flt8"->            [ ScalarType "money"->            , ScalarType "float8"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_div_int2"->            [ ScalarType "money"->            , ScalarType "int2"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_div_int4"->            [ ScalarType "money"->            , ScalarType "int4"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_eq"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "cash_ge"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "cash_gt"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "cash_in"->            [ Pseudo Cstring->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_le"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "cash_lt"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "cash_mi"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_mul_flt4"->            [ ScalarType "money"->            , ScalarType "float4"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_mul_flt8"->            [ ScalarType "money"->            , ScalarType "float8"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_mul_int2"->            [ ScalarType "money"->            , ScalarType "int2"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_mul_int4"->            [ ScalarType "money"->            , ScalarType "int4"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_ne"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "cash_out"->            [ ScalarType "money"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "cash_pl"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_recv"->            [ Pseudo Internal->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cash_send"->            [ ScalarType "money"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "cash_words"->            [ ScalarType "money"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "cashlarger"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cashsmaller"->            [ ScalarType "money"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "cbrt"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "ceil"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "ceil"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "ceiling"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "ceiling"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "center"->            [ ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "center"->            [ ScalarType "circle"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "char"->            [ ScalarType "int4"->            ] (->            ScalarType "char" )->            False->        , EnvCreateFunction->            FunName->            "char"->            [ ScalarType "text"->            ] (->            ScalarType "char" )->            False->        , EnvCreateFunction->            FunName->            "char_length"->            [ ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "char_length"->            [ ScalarType "bpchar"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "character_length"->            [ ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "character_length"->            [ ScalarType "bpchar"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "chareq"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "charge"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "chargt"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "charin"->            [ Pseudo Cstring->            ] (->            ScalarType "char" )->            False->        , EnvCreateFunction->            FunName->            "charle"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "charlt"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "charne"->            [ ScalarType "char"->            , ScalarType "char"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "charout"->            [ ScalarType "char"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "charrecv"->            [ Pseudo Internal->            ] (->            ScalarType "char" )->            False->        , EnvCreateFunction->            FunName->            "charsend"->            [ ScalarType "char"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "chr"->            [ ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "cideq"->            [ ScalarType "cid"->            , ScalarType "cid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "cidin"->            [ Pseudo Cstring->            ] (->            ScalarType "cid" )->            False->        , EnvCreateFunction->            FunName->            "cidout"->            [ ScalarType "cid"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "cidr"->            [ ScalarType "inet"->            ] (->            ScalarType "cidr" )->            False->        , EnvCreateFunction->            FunName->            "cidr_in"->            [ Pseudo Cstring->            ] (->            ScalarType "cidr" )->            False->        , EnvCreateFunction->            FunName->            "cidr_out"->            [ ScalarType "cidr"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "cidr_recv"->            [ Pseudo Internal->            ] (->            ScalarType "cidr" )->            False->        , EnvCreateFunction->            FunName->            "cidr_send"->            [ ScalarType "cidr"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "cidrecv"->            [ Pseudo Internal->            ] (->            ScalarType "cid" )->            False->        , EnvCreateFunction->            FunName->            "cidsend"->            [ ScalarType "cid"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "circle"->            [ ScalarType "box"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunName->            "circle"->            [ ScalarType "polygon"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunName->            "circle"->            [ ScalarType "point"->            , ScalarType "float8"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunName->            "circle_above"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_add_pt"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunName->            "circle_below"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_center"->            [ ScalarType "circle"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "circle_contain"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_contain_pt"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_contained"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_distance"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "circle_div_pt"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunName->            "circle_eq"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_ge"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_gt"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_in"->            [ Pseudo Cstring->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunName->            "circle_le"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_left"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_lt"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_mul_pt"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunName->            "circle_ne"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_out"->            [ ScalarType "circle"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "circle_overabove"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_overbelow"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_overlap"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_overleft"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_overright"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_recv"->            [ Pseudo Internal->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunName->            "circle_right"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_same"->            [ ScalarType "circle"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "circle_send"->            [ ScalarType "circle"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "circle_sub_pt"->            [ ScalarType "circle"->            , ScalarType "point"->            ] (->            ScalarType "circle" )->            False->        , EnvCreateFunction->            FunName->            "clock_timestamp"->            [] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "close_lb"->            [ ScalarType "line"->            , ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "close_ls"->            [ ScalarType "line"->            , ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "close_lseg"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "close_pb"->            [ ScalarType "point"->            , ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "close_pl"->            [ ScalarType "point"->            , ScalarType "line"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "close_ps"->            [ ScalarType "point"->            , ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "close_sb"->            [ ScalarType "lseg"->            , ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "close_sl"->            [ ScalarType "lseg"->            , ScalarType "line"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "col_description"->            [ ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "contjoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "contsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "convert"->            [ ScalarType "bytea"->            , ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "convert_from"->            [ ScalarType "bytea"->            , ScalarType "name"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "convert_to"->            [ ScalarType "text"->            , ScalarType "name"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "cos"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "cot"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "cstring_in"->            [ Pseudo Cstring->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "cstring_out"->            [ Pseudo Cstring->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "cstring_recv"->            [ Pseudo Internal->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "cstring_send"->            [ Pseudo Cstring->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "current_database"->            [] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "current_query"->            [] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "current_schema"->            [] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "current_schemas"->            [ ScalarType "bool"->            ] (->            ArrayType ( ScalarType "name" ) )->            False->        , EnvCreateFunction->            FunName->            "current_setting"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "current_user"->            [] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "currtid"->            [ ScalarType "oid"->            , ScalarType "tid"->            ] (->            ScalarType "tid" )->            False->        , EnvCreateFunction->            FunName->            "currtid2"->            [ ScalarType "text"->            , ScalarType "tid"->            ] (->            ScalarType "tid" )->            False->        , EnvCreateFunction->            FunName->            "currval"->            [ ScalarType "regclass"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "cursor_to_xml"->            [ ScalarType "refcursor"->            , ScalarType "int4"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "cursor_to_xmlschema"->            [ ScalarType "refcursor"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "database_to_xml"->            [ ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "database_to_xml_and_xmlschema"->            [ ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "database_to_xmlschema"->            [ ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "date"->            [ ScalarType "abstime"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "date"->            [ ScalarType "timestamp"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "date"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "date_cmp"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "date_cmp_timestamp"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "date_cmp_timestamptz"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "date_eq"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_eq_timestamp"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_eq_timestamptz"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_ge"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_ge_timestamp"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_ge_timestamptz"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_gt"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_gt_timestamp"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_gt_timestamptz"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_in"->            [ Pseudo Cstring->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "date_larger"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "date_le"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_le_timestamp"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_le_timestamptz"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_lt"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_lt_timestamp"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_lt_timestamptz"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_mi"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "date_mi_interval"->            [ ScalarType "date"->            , ScalarType "interval"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "date_mii"->            [ ScalarType "date"->            , ScalarType "int4"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "date_ne"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_ne_timestamp"->            [ ScalarType "date"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_ne_timestamptz"->            [ ScalarType "date"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "date_out"->            [ ScalarType "date"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "date_part"->            [ ScalarType "text"->            , ScalarType "abstime"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "date_part"->            [ ScalarType "text"->            , ScalarType "reltime"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "date_part"->            [ ScalarType "text"->            , ScalarType "date"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "date_part"->            [ ScalarType "text"->            , ScalarType "time"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "date_part"->            [ ScalarType "text"->            , ScalarType "timestamp"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "date_part"->            [ ScalarType "text"->            , ScalarType "timestamptz"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "date_part"->            [ ScalarType "text"->            , ScalarType "interval"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "date_part"->            [ ScalarType "text"->            , ScalarType "timetz"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "date_pl_interval"->            [ ScalarType "date"->            , ScalarType "interval"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "date_pli"->            [ ScalarType "date"->            , ScalarType "int4"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "date_recv"->            [ Pseudo Internal->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "date_send"->            [ ScalarType "date"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "date_smaller"->            [ ScalarType "date"->            , ScalarType "date"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "date_trunc"->            [ ScalarType "text"->            , ScalarType "timestamp"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "date_trunc"->            [ ScalarType "text"->            , ScalarType "timestamptz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "date_trunc"->            [ ScalarType "text"->            , ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "datetime_pl"->            [ ScalarType "date"->            , ScalarType "time"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "datetimetz_pl"->            [ ScalarType "date"->            , ScalarType "timetz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "dcbrt"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "decode"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "degrees"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dexp"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "diagonal"->            [ ScalarType "box"->            ] (->            ScalarType "lseg" )->            False->        , EnvCreateFunction->            FunName->            "diameter"->            [ ScalarType "circle"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dispell_init"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "dispell_lexize"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "dist_cpoly"->            [ ScalarType "circle"->            , ScalarType "polygon"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dist_lb"->            [ ScalarType "line"->            , ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dist_pb"->            [ ScalarType "point"->            , ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dist_pc"->            [ ScalarType "point"->            , ScalarType "circle"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dist_pl"->            [ ScalarType "point"->            , ScalarType "line"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dist_ppath"->            [ ScalarType "point"->            , ScalarType "path"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dist_ps"->            [ ScalarType "point"->            , ScalarType "lseg"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dist_sb"->            [ ScalarType "lseg"->            , ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dist_sl"->            [ ScalarType "lseg"->            , ScalarType "line"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "div"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "dlog1"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dlog10"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "domain_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            Pseudo Any )->            False->        , EnvCreateFunction->            FunName->            "domain_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            Pseudo Any )->            False->        , EnvCreateFunction->            FunName->            "dpow"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dround"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dsimple_init"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "dsimple_lexize"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "dsnowball_init"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "dsnowball_lexize"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "dsqrt"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "dsynonym_init"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "dsynonym_lexize"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "dtrunc"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "encode"->            [ ScalarType "bytea"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "enum_cmp"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "enum_eq"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "enum_first"->            [ Pseudo AnyEnum->            ] (->            Pseudo AnyEnum )->            False->        , EnvCreateFunction->            FunName->            "enum_ge"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "enum_gt"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "enum_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            ] (->            Pseudo AnyEnum )->            False->        , EnvCreateFunction->            FunName->            "enum_larger"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            Pseudo AnyEnum )->            False->        , EnvCreateFunction->            FunName->            "enum_last"->            [ Pseudo AnyEnum->            ] (->            Pseudo AnyEnum )->            False->        , EnvCreateFunction->            FunName->            "enum_le"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "enum_lt"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "enum_ne"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "enum_out"->            [ Pseudo AnyEnum->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "enum_range"->            [ Pseudo AnyEnum->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "enum_range"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunName->            "enum_recv"->            [ Pseudo Cstring->            , ScalarType "oid"->            ] (->            Pseudo AnyEnum )->            False->        , EnvCreateFunction->            FunName->            "enum_send"->            [ Pseudo AnyEnum->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "enum_smaller"->            [ Pseudo AnyEnum->            , Pseudo AnyEnum->            ] (->            Pseudo AnyEnum )->            False->        , EnvCreateFunction->            FunName->            "eqjoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "eqsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "euc_cn_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_cn_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_jis_2004_to_shift_jis_2004"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_jis_2004_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_jp_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_jp_to_sjis"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_jp_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_kr_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_kr_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_tw_to_big5"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_tw_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "euc_tw_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "exp"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "exp"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "factorial"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "family"->            [ ScalarType "inet"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "flatfile_update_trigger"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "float4"->            [ ScalarType "int8"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4"->            [ ScalarType "int2"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4"->            [ ScalarType "int4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4"->            [ ScalarType "float8"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4"->            [ ScalarType "numeric"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float48div"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float48eq"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float48ge"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float48gt"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float48le"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float48lt"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float48mi"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float48mul"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float48ne"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float48pl"->            [ ScalarType "float4"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float4_accum"->            [ ArrayType ( ScalarType "float8" )->            , ScalarType "float4"->            ] (->            ArrayType ( ScalarType "float8" ) )->            False->        , EnvCreateFunction->            FunName->            "float4abs"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4div"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4eq"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float4ge"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float4gt"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float4in"->            [ Pseudo Cstring->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4larger"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4le"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float4lt"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float4mi"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4mul"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4ne"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float4out"->            [ ScalarType "float4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "float4pl"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4recv"->            [ Pseudo Internal->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4send"->            [ ScalarType "float4"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "float4smaller"->            [ ScalarType "float4"->            , ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4um"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float4up"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "float8"->            [ ScalarType "int8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8"->            [ ScalarType "int2"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8"->            [ ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8"->            [ ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8"->            [ ScalarType "numeric"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float84div"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float84eq"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float84ge"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float84gt"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float84le"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float84lt"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float84mi"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float84mul"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float84ne"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float84pl"->            [ ScalarType "float8"->            , ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_accum"->            [ ArrayType ( ScalarType "float8" )->            , ScalarType "float8"->            ] (->            ArrayType ( ScalarType "float8" ) )->            False->        , EnvCreateFunction->            FunName->            "float8_avg"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_corr"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_covar_pop"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_covar_samp"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_regr_accum"->            [ ArrayType ( ScalarType "float8" )->            , ScalarType "float8"->            , ScalarType "float8"->            ] (->            ArrayType ( ScalarType "float8" ) )->            False->        , EnvCreateFunction->            FunName->            "float8_regr_avgx"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_regr_avgy"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_regr_intercept"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_regr_r2"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_regr_slope"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_regr_sxx"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_regr_sxy"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_regr_syy"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_stddev_pop"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_stddev_samp"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_var_pop"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8_var_samp"->            [ ArrayType ( ScalarType "float8" )->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8abs"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8div"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8eq"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float8ge"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float8gt"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float8in"->            [ Pseudo Cstring->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8larger"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8le"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float8lt"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float8mi"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8mul"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8ne"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "float8out"->            [ ScalarType "float8"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "float8pl"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8recv"->            [ Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8send"->            [ ScalarType "float8"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "float8smaller"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8um"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "float8up"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "floor"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "floor"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "flt4_mul_cash"->            [ ScalarType "float4"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "flt8_mul_cash"->            [ ScalarType "float8"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "fmgr_c_validator"->            [ ScalarType "oid"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "fmgr_internal_validator"->            [ ScalarType "oid"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "fmgr_sql_validator"->            [ ScalarType "oid"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "format_type"->            [ ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "gb18030_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "gbk_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "generate_series"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            SetOfType ( ScalarType "int8" ) )->            False->        , EnvCreateFunction->            FunName->            "generate_series"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            SetOfType ( ScalarType "int4" ) )->            False->        , EnvCreateFunction->            FunName->            "generate_series"->            [ ScalarType "int8"->            , ScalarType "int8"->            , ScalarType "int8"->            ] (->            SetOfType ( ScalarType "int8" ) )->            False->        , EnvCreateFunction->            FunName->            "generate_series"->            [ ScalarType "int4"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            SetOfType ( ScalarType "int4" ) )->            False->        , EnvCreateFunction->            FunName->            "generate_series"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            , ScalarType "interval"->            ] (->            SetOfType ( ScalarType "timestamp" ) )->            False->        , EnvCreateFunction->            FunName->            "generate_series"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            , ScalarType "interval"->            ] (->            SetOfType ( ScalarType "timestamptz" ) )->            False->        , EnvCreateFunction->            FunName->            "generate_subscripts"->            [ Pseudo AnyArray->            , ScalarType "int4"->            ] (->            SetOfType ( ScalarType "int4" ) )->            False->        , EnvCreateFunction->            FunName->            "generate_subscripts"->            [ Pseudo AnyArray->            , ScalarType "int4"->            , ScalarType "bool"->            ] (->            SetOfType ( ScalarType "int4" ) )->            False->        , EnvCreateFunction->            FunName->            "get_bit"->            [ ScalarType "bytea"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "get_byte"->            [ ScalarType "bytea"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "get_current_ts_config"->            [] (->            ScalarType "regconfig" )->            False->        , EnvCreateFunction->            FunName->            "getdatabaseencoding"->            [] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "getpgusername"->            [] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "gin_cmp_prefix"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "gin_cmp_tslexeme"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "gin_extract_tsquery"->            [ ScalarType "tsquery"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gin_extract_tsvector"->            [ ScalarType "tsvector"->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gin_tsquery_consistent"->            [ Pseudo Internal->            , ScalarType "int2"->            , ScalarType "tsquery"->            , ScalarType "int4"->            , Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ginarrayconsistent"->            [ Pseudo Internal->            , ScalarType "int2"->            , Pseudo AnyArray->            , ScalarType "int4"->            , Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ginarrayextract"->            [ Pseudo AnyArray->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "ginbeginscan"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "ginbuild"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "ginbulkdelete"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gincostestimate"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "ginendscan"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "gingetbitmap"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "gininsert"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ginmarkpos"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "ginoptions"->            [ ArrayType ( ScalarType "text" )->            , ScalarType "bool"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "ginqueryarrayextract"->            [ Pseudo AnyArray->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "ginrescan"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "ginrestrpos"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "ginvacuumcleanup"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gist_box_compress"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gist_box_consistent"->            [ Pseudo Internal->            , ScalarType "box"->            , ScalarType "int4"->            , ScalarType "oid"->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "gist_box_decompress"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gist_box_penalty"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gist_box_picksplit"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gist_box_same"->            [ ScalarType "box"->            , ScalarType "box"->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gist_box_union"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "box" )->            False->        , EnvCreateFunction->            FunName->            "gist_circle_compress"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gist_circle_consistent"->            [ Pseudo Internal->            , ScalarType "circle"->            , ScalarType "int4"->            , ScalarType "oid"->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "gist_poly_compress"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gist_poly_consistent"->            [ Pseudo Internal->            , ScalarType "polygon"->            , ScalarType "int4"->            , ScalarType "oid"->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "gistbeginscan"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gistbuild"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gistbulkdelete"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gistcostestimate"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "gistendscan"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "gistgetbitmap"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "gistgettuple"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "gistinsert"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "gistmarkpos"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "gistoptions"->            [ ArrayType ( ScalarType "text" )->            , ScalarType "bool"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "gistrescan"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "gistrestrpos"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "gistvacuumcleanup"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsquery_compress"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsquery_consistent"->            [ Pseudo Internal->            , Pseudo Internal->            , ScalarType "int4"->            , ScalarType "oid"->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "gtsquery_decompress"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsquery_penalty"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsquery_picksplit"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsquery_same"->            [ ScalarType "int8"->            , ScalarType "int8"->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsquery_union"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsvector_compress"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsvector_consistent"->            [ Pseudo Internal->            , ScalarType "gtsvector"->            , ScalarType "int4"->            , ScalarType "oid"->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "gtsvector_decompress"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsvector_penalty"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsvector_picksplit"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsvector_same"->            [ ScalarType "gtsvector"->            , ScalarType "gtsvector"->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsvector_union"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "gtsvectorin"->            [ Pseudo Cstring->            ] (->            ScalarType "gtsvector" )->            False->        , EnvCreateFunction->            FunName->            "gtsvectorout"->            [ ScalarType "gtsvector"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "has_any_column_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_any_column_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_any_column_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_any_column_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_any_column_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_any_column_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "text"->            , ScalarType "int2"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "oid"->            , ScalarType "int2"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "int2"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "int2"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "int2"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "int2"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_column_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_database_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_database_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_database_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_database_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_database_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_database_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_foreign_data_wrapper_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_foreign_data_wrapper_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_foreign_data_wrapper_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_foreign_data_wrapper_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_foreign_data_wrapper_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_foreign_data_wrapper_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_function_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_function_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_function_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_function_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_function_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_function_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_language_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_language_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_language_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_language_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_language_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_language_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_schema_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_schema_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_schema_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_schema_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_schema_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_schema_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_server_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_server_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_server_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_server_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_server_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_server_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_table_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_table_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_table_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_table_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_table_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_table_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_tablespace_privilege"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_tablespace_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_tablespace_privilege"->            [ ScalarType "name"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_tablespace_privilege"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_tablespace_privilege"->            [ ScalarType "oid"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "has_tablespace_privilege"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "hash_aclitem"->            [ ScalarType "aclitem"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hash_numeric"->            [ ScalarType "numeric"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashbeginscan"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "hashbpchar"->            [ ScalarType "bpchar"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashbuild"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "hashbulkdelete"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "hashchar"->            [ ScalarType "char"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashcostestimate"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "hashendscan"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "hashenum"->            [ Pseudo AnyEnum->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashfloat4"->            [ ScalarType "float4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashfloat8"->            [ ScalarType "float8"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashgetbitmap"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "hashgettuple"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "hashinet"->            [ ScalarType "inet"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashinsert"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "hashint2"->            [ ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashint2vector"->            [ ScalarType "int2vector"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashint4"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashint8"->            [ ScalarType "int8"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashmacaddr"->            [ ScalarType "macaddr"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashmarkpos"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "hashname"->            [ ScalarType "name"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashoid"->            [ ScalarType "oid"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashoidvector"->            [ ScalarType "oidvector"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashoptions"->            [ ArrayType ( ScalarType "text" )->            , ScalarType "bool"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "hashrescan"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "hashrestrpos"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "hashtext"->            [ ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "hashvacuumcleanup"->            [ Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "hashvarlena"->            [ Pseudo Internal->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "height"->            [ ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "host"->            [ ScalarType "inet"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "hostmask"->            [ ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "iclikejoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "iclikesel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "icnlikejoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "icnlikesel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "icregexeqjoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "icregexeqsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "icregexnejoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "icregexnesel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "inet_client_addr"->            [] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "inet_client_port"->            [] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "inet_in"->            [ Pseudo Cstring->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "inet_out"->            [ ScalarType "inet"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "inet_recv"->            [ Pseudo Internal->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "inet_send"->            [ ScalarType "inet"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "inet_server_addr"->            [] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "inet_server_port"->            [] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "inetand"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "inetmi"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "inetmi_int8"->            [ ScalarType "inet"->            , ScalarType "int8"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "inetnot"->            [ ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "inetor"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "inetpl"->            [ ScalarType "inet"->            , ScalarType "int8"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "initcap"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "int2"->            [ ScalarType "int8"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2"->            [ ScalarType "int4"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2"->            [ ScalarType "float4"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2"->            [ ScalarType "float8"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2"->            [ ScalarType "numeric"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int24div"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int24eq"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int24ge"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int24gt"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int24le"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int24lt"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int24mi"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int24mul"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int24ne"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int24pl"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int28div"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int28eq"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int28ge"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int28gt"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int28le"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int28lt"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int28mi"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int28mul"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int28ne"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int28pl"->            [ ScalarType "int2"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int2_accum"->            [ ArrayType ( ScalarType "numeric" )->            , ScalarType "int2"->            ] (->            ArrayType ( ScalarType "numeric" ) )->            False->        , EnvCreateFunction->            FunName->            "int2_avg_accum"->            [ ArrayType ( ScalarType "int8" )->            , ScalarType "int2"->            ] (->            ArrayType ( ScalarType "int8" ) )->            False->        , EnvCreateFunction->            FunName->            "int2_mul_cash"->            [ ScalarType "int2"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "int2_sum"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int2abs"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2and"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2div"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2eq"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int2ge"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int2gt"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int2in"->            [ Pseudo Cstring->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2larger"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2le"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int2lt"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int2mi"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2mod"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2mul"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2ne"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int2not"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2or"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2out"->            [ ScalarType "int2"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "int2pl"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2recv"->            [ Pseudo Internal->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2send"->            [ ScalarType "int2"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "int2shl"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2shr"->            [ ScalarType "int2"->            , ScalarType "int4"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2smaller"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2um"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2up"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int2vectoreq"->            [ ScalarType "int2vector"->            , ScalarType "int2vector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int2vectorin"->            [ Pseudo Cstring->            ] (->            ScalarType "int2vector" )->            False->        , EnvCreateFunction->            FunName->            "int2vectorout"->            [ ScalarType "int2vector"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "int2vectorrecv"->            [ Pseudo Internal->            ] (->            ScalarType "int2vector" )->            False->        , EnvCreateFunction->            FunName->            "int2vectorsend"->            [ ScalarType "int2vector"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "int2xor"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "int4"->            [ ScalarType "bool"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4"->            [ ScalarType "char"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4"->            [ ScalarType "int8"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4"->            [ ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4"->            [ ScalarType "float4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4"->            [ ScalarType "float8"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4"->            [ ScalarType "bit"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4"->            [ ScalarType "numeric"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int42div"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int42eq"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int42ge"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int42gt"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int42le"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int42lt"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int42mi"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int42mul"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int42ne"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int42pl"->            [ ScalarType "int4"->            , ScalarType "int2"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int48div"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int48eq"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int48ge"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int48gt"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int48le"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int48lt"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int48mi"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int48mul"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int48ne"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int48pl"->            [ ScalarType "int4"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int4_accum"->            [ ArrayType ( ScalarType "numeric" )->            , ScalarType "int4"->            ] (->            ArrayType ( ScalarType "numeric" ) )->            False->        , EnvCreateFunction->            FunName->            "int4_avg_accum"->            [ ArrayType ( ScalarType "int8" )->            , ScalarType "int4"->            ] (->            ArrayType ( ScalarType "int8" ) )->            False->        , EnvCreateFunction->            FunName->            "int4_mul_cash"->            [ ScalarType "int4"->            , ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunName->            "int4_sum"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int4abs"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4and"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4div"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4eq"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int4ge"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int4gt"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int4in"->            [ Pseudo Cstring->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4inc"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4larger"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4le"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int4lt"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int4mi"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4mod"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4mul"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4ne"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int4not"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4or"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4out"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "int4pl"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4recv"->            [ Pseudo Internal->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4send"->            [ ScalarType "int4"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "int4shl"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4shr"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4smaller"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4um"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4up"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int4xor"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "int8"->            [ ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8"->            [ ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8"->            [ ScalarType "float4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8"->            [ ScalarType "float8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8"->            [ ScalarType "bit"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8"->            [ ScalarType "numeric"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int82div"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int82eq"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int82ge"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int82gt"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int82le"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int82lt"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int82mi"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int82mul"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int82ne"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int82pl"->            [ ScalarType "int8"->            , ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int84div"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int84eq"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int84ge"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int84gt"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int84le"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int84lt"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int84mi"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int84mul"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int84ne"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int84pl"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8_accum"->            [ ArrayType ( ScalarType "numeric" )->            , ScalarType "int8"->            ] (->            ArrayType ( ScalarType "numeric" ) )->            False->        , EnvCreateFunction->            FunName->            "int8_avg"->            [ ArrayType ( ScalarType "int8" )->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "int8_avg_accum"->            [ ArrayType ( ScalarType "numeric" )->            , ScalarType "int8"->            ] (->            ArrayType ( ScalarType "numeric" ) )->            False->        , EnvCreateFunction->            FunName->            "int8_sum"->            [ ScalarType "numeric"->            , ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "int8abs"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8and"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8div"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8eq"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int8ge"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int8gt"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int8in"->            [ Pseudo Cstring->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8inc"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8inc_any"->            [ ScalarType "int8"->            , Pseudo Any->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8inc_float8_float8"->            [ ScalarType "int8"->            , ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8larger"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8le"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int8lt"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int8mi"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8mod"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8mul"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8ne"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "int8not"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8or"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8out"->            [ ScalarType "int8"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "int8pl"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8pl_inet"->            [ ScalarType "int8"->            , ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "int8recv"->            [ Pseudo Internal->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8send"->            [ ScalarType "int8"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "int8shl"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8shr"->            [ ScalarType "int8"->            , ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8smaller"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8um"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8up"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "int8xor"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "integer_pl_date"->            [ ScalarType "int4"->            , ScalarType "date"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "inter_lb"->            [ ScalarType "line"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "inter_sb"->            [ ScalarType "lseg"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "inter_sl"->            [ ScalarType "lseg"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "internal_in"->            [ Pseudo Cstring->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "internal_out"->            [ Pseudo Internal->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "interval"->            [ ScalarType "reltime"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval"->            [ ScalarType "time"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval"->            [ ScalarType "interval"->            , ScalarType "int4"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_accum"->            [ ArrayType ( ScalarType "interval" )->            , ScalarType "interval"->            ] (->            ArrayType ( ScalarType "interval" ) )->            False->        , EnvCreateFunction->            FunName->            "interval_avg"->            [ ArrayType ( ScalarType "interval" )->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_cmp"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "interval_div"->            [ ScalarType "interval"->            , ScalarType "float8"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_eq"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "interval_ge"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "interval_gt"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "interval_hash"->            [ ScalarType "interval"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "interval_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_larger"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_le"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "interval_lt"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "interval_mi"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_mul"->            [ ScalarType "interval"->            , ScalarType "float8"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_ne"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "interval_out"->            [ ScalarType "interval"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "interval_pl"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_pl_date"->            [ ScalarType "interval"->            , ScalarType "date"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "interval_pl_time"->            [ ScalarType "interval"->            , ScalarType "time"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "interval_pl_timestamp"->            [ ScalarType "interval"->            , ScalarType "timestamp"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "interval_pl_timestamptz"->            [ ScalarType "interval"->            , ScalarType "timestamptz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "interval_pl_timetz"->            [ ScalarType "interval"->            , ScalarType "timetz"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "interval_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_send"->            [ ScalarType "interval"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "interval_smaller"->            [ ScalarType "interval"->            , ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "interval_um"->            [ ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "intervaltypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "intervaltypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "intinterval"->            [ ScalarType "abstime"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isclosed"->            [ ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isfinite"->            [ ScalarType "abstime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isfinite"->            [ ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isfinite"->            [ ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isfinite"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isfinite"->            [ ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ishorizontal"->            [ ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ishorizontal"->            [ ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ishorizontal"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "iso8859_1_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "iso8859_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "iso_to_koi8r"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "iso_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "iso_to_win1251"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "iso_to_win866"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "isopen"->            [ ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isparallel"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isparallel"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isperp"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isperp"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isvertical"->            [ ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isvertical"->            [ ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "isvertical"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "johab_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "justify_days"->            [ ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "justify_hours"->            [ ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "justify_interval"->            [ ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "koi8r_to_iso"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "koi8r_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "koi8r_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "koi8r_to_win1251"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "koi8r_to_win866"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "koi8u_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "language_handler_in"->            [ Pseudo Cstring->            ] (->            Pseudo LanguageHandler )->            False->        , EnvCreateFunction->            FunName->            "language_handler_out"->            [ Pseudo LanguageHandler->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "lastval"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "latin1_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "latin2_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "latin2_to_win1250"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "latin3_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "latin4_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "length"->            [ ScalarType "bytea"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "length"->            [ ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "length"->            [ ScalarType "lseg"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "length"->            [ ScalarType "path"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "length"->            [ ScalarType "bpchar"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "length"->            [ ScalarType "bit"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "length"->            [ ScalarType "tsvector"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "length"->            [ ScalarType "bytea"->            , ScalarType "name"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "like"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "like"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "like"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "like_escape"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "like_escape"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "likejoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "likesel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "line"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "line" )->            False->        , EnvCreateFunction->            FunName->            "line_distance"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "line_eq"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "line_horizontal"->            [ ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "line_in"->            [ Pseudo Cstring->            ] (->            ScalarType "line" )->            False->        , EnvCreateFunction->            FunName->            "line_interpt"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "line_intersect"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "line_out"->            [ ScalarType "line"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "line_parallel"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "line_perp"->            [ ScalarType "line"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "line_recv"->            [ Pseudo Internal->            ] (->            ScalarType "line" )->            False->        , EnvCreateFunction->            FunName->            "line_send"->            [ ScalarType "line"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "line_vertical"->            [ ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ln"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "ln"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "lo_close"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "lo_creat"->            [ ScalarType "int4"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "lo_create"->            [ ScalarType "oid"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "lo_export"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "lo_import"->            [ ScalarType "text"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "lo_import"->            [ ScalarType "text"->            , ScalarType "oid"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "lo_lseek"->            [ ScalarType "int4"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "lo_open"->            [ ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "lo_tell"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "lo_truncate"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "lo_unlink"->            [ ScalarType "oid"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "log"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "log"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "log"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "loread"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "lower"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "lowrite"->            [ ScalarType "int4"->            , ScalarType "bytea"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "lpad"->            [ ScalarType "text"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "lpad"->            [ ScalarType "text"->            , ScalarType "int4"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "lseg"->            [ ScalarType "box"->            ] (->            ScalarType "lseg" )->            False->        , EnvCreateFunction->            FunName->            "lseg"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "lseg" )->            False->        , EnvCreateFunction->            FunName->            "lseg_center"->            [ ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "lseg_distance"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "lseg_eq"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_ge"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_gt"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_horizontal"->            [ ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_in"->            [ Pseudo Cstring->            ] (->            ScalarType "lseg" )->            False->        , EnvCreateFunction->            FunName->            "lseg_interpt"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "lseg_intersect"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_le"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_length"->            [ ScalarType "lseg"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "lseg_lt"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_ne"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_out"->            [ ScalarType "lseg"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "lseg_parallel"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_perp"->            [ ScalarType "lseg"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "lseg_recv"->            [ Pseudo Internal->            ] (->            ScalarType "lseg" )->            False->        , EnvCreateFunction->            FunName->            "lseg_send"->            [ ScalarType "lseg"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "lseg_vertical"->            [ ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ltrim"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "ltrim"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_cmp"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_eq"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_ge"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_gt"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_in"->            [ Pseudo Cstring->            ] (->            ScalarType "macaddr" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_le"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_lt"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_ne"->            [ ScalarType "macaddr"->            , ScalarType "macaddr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_out"->            [ ScalarType "macaddr"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "macaddr_recv"->            [ Pseudo Internal->            ] (->            ScalarType "macaddr" )->            False->        , EnvCreateFunction->            FunName->            "macaddr_send"->            [ ScalarType "macaddr"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "makeaclitem"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            , ScalarType "bool"->            ] (->            ScalarType "aclitem" )->            False->        , EnvCreateFunction->            FunName->            "masklen"->            [ ScalarType "inet"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "md5"->            [ ScalarType "bytea"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "md5"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "mic_to_ascii"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_big5"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_euc_cn"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_euc_jp"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_euc_kr"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_euc_tw"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_iso"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_koi8r"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_latin1"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_latin2"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_latin3"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_latin4"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_sjis"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_win1250"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_win1251"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mic_to_win866"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "mktinterval"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "tinterval" )->            False->        , EnvCreateFunction->            FunName->            "mod"->            [ ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "mod"->            [ ScalarType "int2"->            , ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunName->            "mod"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "mod"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "mul_d_interval"->            [ ScalarType "float8"->            , ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "name"->            [ ScalarType "text"->            ] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "name"->            [ ScalarType "bpchar"->            ] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "name"->            [ ScalarType "varchar"->            ] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "nameeq"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "namege"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "namegt"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "nameiclike"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "nameicnlike"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "nameicregexeq"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "nameicregexne"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "namein"->            [ Pseudo Cstring->            ] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "namele"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "namelike"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "namelt"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "namene"->            [ ScalarType "name"->            , ScalarType "name"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "namenlike"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "nameout"->            [ ScalarType "name"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "namerecv"->            [ Pseudo Internal->            ] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "nameregexeq"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "nameregexne"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "namesend"->            [ ScalarType "name"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "neqjoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "neqsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "netmask"->            [ ScalarType "inet"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "network"->            [ ScalarType "inet"->            ] (->            ScalarType "cidr" )->            False->        , EnvCreateFunction->            FunName->            "network_cmp"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "network_eq"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "network_ge"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "network_gt"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "network_le"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "network_lt"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "network_ne"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "network_sub"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "network_subeq"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "network_sup"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "network_supeq"->            [ ScalarType "inet"->            , ScalarType "inet"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "nextval"->            [ ScalarType "regclass"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "nlikejoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "nlikesel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "notlike"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "notlike"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "notlike"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "now"->            [] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "npoints"->            [ ScalarType "path"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "npoints"->            [ ScalarType "polygon"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "numeric"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric"->            [ ScalarType "int2"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric"->            [ ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric"->            [ ScalarType "float4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric"->            [ ScalarType "float8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric"->            [ ScalarType "numeric"->            , ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_abs"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_accum"->            [ ArrayType ( ScalarType "numeric" )->            , ScalarType "numeric"->            ] (->            ArrayType ( ScalarType "numeric" ) )->            False->        , EnvCreateFunction->            FunName->            "numeric_add"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_avg"->            [ ArrayType ( ScalarType "numeric" )->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_avg_accum"->            [ ArrayType ( ScalarType "numeric" )->            , ScalarType "numeric"->            ] (->            ArrayType ( ScalarType "numeric" ) )->            False->        , EnvCreateFunction->            FunName->            "numeric_cmp"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "numeric_div"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_div_trunc"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_eq"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "numeric_exp"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_fac"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_ge"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "numeric_gt"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "numeric_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_inc"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_larger"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_le"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "numeric_ln"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_log"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_lt"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "numeric_mod"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_mul"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_ne"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "numeric_out"->            [ ScalarType "numeric"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "numeric_power"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_send"->            [ ScalarType "numeric"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "numeric_smaller"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_sqrt"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_stddev_pop"->            [ ArrayType ( ScalarType "numeric" )->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_stddev_samp"->            [ ArrayType ( ScalarType "numeric" )->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_sub"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_uminus"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_uplus"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_var_pop"->            [ ArrayType ( ScalarType "numeric" )->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numeric_var_samp"->            [ ArrayType ( ScalarType "numeric" )->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "numerictypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "numerictypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "numnode"->            [ ScalarType "tsquery"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "obj_description"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "obj_description"->            [ ScalarType "oid"->            , ScalarType "name"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "octet_length"->            [ ScalarType "bytea"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "octet_length"->            [ ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "octet_length"->            [ ScalarType "bpchar"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "octet_length"->            [ ScalarType "bit"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "oid"->            [ ScalarType "int8"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "oideq"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidge"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidgt"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidin"->            [ Pseudo Cstring->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "oidlarger"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "oidle"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidlt"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidne"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidout"->            [ ScalarType "oid"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "oidrecv"->            [ Pseudo Internal->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "oidsend"->            [ ScalarType "oid"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "oidsmaller"->            [ ScalarType "oid"->            , ScalarType "oid"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "oidvectoreq"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidvectorge"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidvectorgt"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidvectorin"->            [ Pseudo Cstring->            ] (->            ScalarType "oidvector" )->            False->        , EnvCreateFunction->            FunName->            "oidvectorle"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidvectorlt"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidvectorne"->            [ ScalarType "oidvector"->            , ScalarType "oidvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "oidvectorout"->            [ ScalarType "oidvector"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "oidvectorrecv"->            [ Pseudo Internal->            ] (->            ScalarType "oidvector" )->            False->        , EnvCreateFunction->            FunName->            "oidvectorsend"->            [ ScalarType "oidvector"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "oidvectortypes"->            [ ScalarType "oidvector"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "on_pb"->            [ ScalarType "point"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "on_pl"->            [ ScalarType "point"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "on_ppath"->            [ ScalarType "point"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "on_ps"->            [ ScalarType "point"->            , ScalarType "lseg"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "on_sb"->            [ ScalarType "lseg"->            , ScalarType "box"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "on_sl"->            [ ScalarType "lseg"->            , ScalarType "line"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "opaque_in"->            [ Pseudo Cstring->            ] (->            Pseudo Opaque )->            False->        , EnvCreateFunction->            FunName->            "opaque_out"->            [ Pseudo Opaque->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "time"->            , ScalarType "time"->            , ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "time"->            , ScalarType "time"->            , ScalarType "time"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "time"->            , ScalarType "interval"->            , ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "time"->            , ScalarType "interval"->            , ScalarType "time"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            , ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            , ScalarType "timestamp"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "timestamp"->            , ScalarType "interval"->            , ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "timestamp"->            , ScalarType "interval"->            , ScalarType "timestamp"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            , ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            , ScalarType "timestamptz"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "timestamptz"->            , ScalarType "interval"->            , ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "timestamptz"->            , ScalarType "interval"->            , ScalarType "timestamptz"->            , ScalarType "interval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlaps"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            , ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "overlay"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "overlay"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "path"->            [ ScalarType "polygon"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "path_add"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "path_add_pt"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "path_center"->            [ ScalarType "path"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "path_contain_pt"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "path_distance"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "path_div_pt"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "path_in"->            [ Pseudo Cstring->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "path_inter"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "path_length"->            [ ScalarType "path"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "path_mul_pt"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "path_n_eq"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "path_n_ge"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "path_n_gt"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "path_n_le"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "path_n_lt"->            [ ScalarType "path"->            , ScalarType "path"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "path_npoints"->            [ ScalarType "path"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "path_out"->            [ ScalarType "path"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "path_recv"->            [ Pseudo Internal->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "path_send"->            [ ScalarType "path"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "path_sub_pt"->            [ ScalarType "path"->            , ScalarType "point"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "pclose"->            [ ScalarType "path"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "pg_advisory_lock"->            [ ScalarType "int8"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "pg_advisory_lock"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "pg_advisory_lock_shared"->            [ ScalarType "int8"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "pg_advisory_lock_shared"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "pg_advisory_unlock"->            [ ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_advisory_unlock"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_advisory_unlock_all"->            [] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "pg_advisory_unlock_shared"->            [ ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_advisory_unlock_shared"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_backend_pid"->            [] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "pg_cancel_backend"->            [ ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_char_to_encoding"->            [ ScalarType "name"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "pg_client_encoding"->            [] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "pg_column_size"->            [ Pseudo Any->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "pg_conf_load_time"->            [] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "pg_conversion_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_current_xlog_insert_location"->            [] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_current_xlog_location"->            [] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_cursor"->            [] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_database_size"->            [ ScalarType "name"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_database_size"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_encoding_to_char"->            [ ScalarType "int4"->            ] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "pg_function_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_constraintdef"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_constraintdef"->            [ ScalarType "oid"->            , ScalarType "bool"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_expr"->            [ ScalarType "text"->            , ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_expr"->            [ ScalarType "text"->            , ScalarType "oid"->            , ScalarType "bool"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_function_arguments"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_function_identity_arguments"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_function_result"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_functiondef"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_indexdef"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_indexdef"->            [ ScalarType "oid"->            , ScalarType "int4"->            , ScalarType "bool"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_keywords"->            [] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_get_ruledef"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_ruledef"->            [ ScalarType "oid"->            , ScalarType "bool"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_serial_sequence"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_triggerdef"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_userbyid"->            [ ScalarType "oid"->            ] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_viewdef"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_viewdef"->            [ ScalarType "oid"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_viewdef"->            [ ScalarType "text"->            , ScalarType "bool"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_get_viewdef"->            [ ScalarType "oid"->            , ScalarType "bool"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_has_role"->            [ ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_has_role"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_has_role"->            [ ScalarType "name"->            , ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_has_role"->            [ ScalarType "name"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_has_role"->            [ ScalarType "oid"->            , ScalarType "name"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_has_role"->            [ ScalarType "oid"->            , ScalarType "oid"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_is_other_temp_schema"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_lock_status"->            [] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_ls_dir"->            [ ScalarType "text"->            ] (->            SetOfType ( ScalarType "text" ) )->            False->        , EnvCreateFunction->            FunName->            "pg_my_temp_schema"->            [] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "pg_opclass_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_operator_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_options_to_table"->            [ ArrayType ( ScalarType "text" )->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_postmaster_start_time"->            [] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "pg_prepared_statement"->            [] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_prepared_xact"->            [] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_read_file"->            [ ScalarType "text"->            , ScalarType "int8"->            , ScalarType "int8"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_relation_size"->            [ ScalarType "regclass"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_relation_size"->            [ ScalarType "regclass"->            , ScalarType "text"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_reload_conf"->            [] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_rotate_logfile"->            [] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_show_all_settings"->            [] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_size_pretty"->            [ ScalarType "int8"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_sleep"->            [ ScalarType "float8"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "pg_start_backup"->            [ ScalarType "text"->            , ScalarType "bool"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_clear_snapshot"->            [] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_file"->            [ ScalarType "text"->            ] (->            Pseudo Record )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_activity"->            [ ScalarType "int4"->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_activity"->            [ ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_activity_start"->            [ ScalarType "int4"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_client_addr"->            [ ScalarType "int4"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_client_port"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_dbid"->            [ ScalarType "int4"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_idset"->            [] (->            SetOfType ( ScalarType "int4" ) )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_pid"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_start"->            [ ScalarType "int4"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_userid"->            [ ScalarType "int4"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_waiting"->            [ ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_backend_xact_start"->            [ ScalarType "int4"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_bgwriter_buf_written_checkpoints"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_bgwriter_buf_written_clean"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_bgwriter_maxwritten_clean"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_bgwriter_requested_checkpoints"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_bgwriter_timed_checkpoints"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_blocks_fetched"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_blocks_hit"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_buf_alloc"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_buf_written_backend"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_blocks_fetched"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_blocks_hit"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_numbackends"->            [ ScalarType "oid"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_tuples_deleted"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_tuples_fetched"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_tuples_inserted"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_tuples_returned"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_tuples_updated"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_xact_commit"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_db_xact_rollback"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_dead_tuples"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_function_calls"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_function_self_time"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_function_time"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_last_analyze_time"->            [ ScalarType "oid"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_last_autoanalyze_time"->            [ ScalarType "oid"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_last_autovacuum_time"->            [ ScalarType "oid"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_last_vacuum_time"->            [ ScalarType "oid"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_live_tuples"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_numscans"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_tuples_deleted"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_tuples_fetched"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_tuples_hot_updated"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_tuples_inserted"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_tuples_returned"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_get_tuples_updated"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_stat_reset"->            [] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "pg_stop_backup"->            [] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_switch_xlog"->            [] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_table_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_tablespace_databases"->            [ ScalarType "oid"->            ] (->            SetOfType ( ScalarType "oid" ) )->            False->        , EnvCreateFunction->            FunName->            "pg_tablespace_size"->            [ ScalarType "name"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_tablespace_size"->            [ ScalarType "oid"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_terminate_backend"->            [ ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_timezone_abbrevs"->            [] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_timezone_names"->            [] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "pg_total_relation_size"->            [ ScalarType "regclass"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "pg_try_advisory_lock"->            [ ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_try_advisory_lock"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_try_advisory_lock_shared"->            [ ScalarType "int8"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_try_advisory_lock_shared"->            [ ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_ts_config_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_ts_dict_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_ts_parser_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_ts_template_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_type_is_visible"->            [ ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pg_typeof"->            [ Pseudo Any->            ] (->            ScalarType "regtype" )->            False->        , EnvCreateFunction->            FunName->            "pg_xlogfile_name"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "pg_xlogfile_name_offset"->            [ ScalarType "text"->            ] (->            Pseudo Record )->            False->        , EnvCreateFunction->            FunName->            "pi"->            [] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "plainto_tsquery"->            [ ScalarType "text"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "plainto_tsquery"->            [ ScalarType "regconfig"->            , ScalarType "text"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "point"->            [ ScalarType "lseg"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point"->            [ ScalarType "path"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point"->            [ ScalarType "box"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point"->            [ ScalarType "polygon"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point"->            [ ScalarType "circle"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point_above"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "point_add"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point_below"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "point_distance"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "point_div"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point_eq"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "point_horiz"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "point_in"->            [ Pseudo Cstring->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point_left"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "point_mul"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point_ne"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "point_out"->            [ ScalarType "point"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "point_recv"->            [ Pseudo Internal->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point_right"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "point_send"->            [ ScalarType "point"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "point_sub"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "point_vert"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_above"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_below"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_center"->            [ ScalarType "polygon"->            ] (->            ScalarType "point" )->            False->        , EnvCreateFunction->            FunName->            "poly_contain"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_contain_pt"->            [ ScalarType "polygon"->            , ScalarType "point"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_contained"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_distance"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "poly_in"->            [ Pseudo Cstring->            ] (->            ScalarType "polygon" )->            False->        , EnvCreateFunction->            FunName->            "poly_left"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_npoints"->            [ ScalarType "polygon"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "poly_out"->            [ ScalarType "polygon"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "poly_overabove"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_overbelow"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_overlap"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_overleft"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_overright"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_recv"->            [ Pseudo Internal->            ] (->            ScalarType "polygon" )->            False->        , EnvCreateFunction->            FunName->            "poly_right"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_same"->            [ ScalarType "polygon"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "poly_send"->            [ ScalarType "polygon"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "polygon"->            [ ScalarType "path"->            ] (->            ScalarType "polygon" )->            False->        , EnvCreateFunction->            FunName->            "polygon"->            [ ScalarType "box"->            ] (->            ScalarType "polygon" )->            False->        , EnvCreateFunction->            FunName->            "polygon"->            [ ScalarType "circle"->            ] (->            ScalarType "polygon" )->            False->        , EnvCreateFunction->            FunName->            "polygon"->            [ ScalarType "int4"->            , ScalarType "circle"->            ] (->            ScalarType "polygon" )->            False->        , EnvCreateFunction->            FunName->            "popen"->            [ ScalarType "path"->            ] (->            ScalarType "path" )->            False->        , EnvCreateFunction->            FunName->            "position"->            [ ScalarType "bytea"->            , ScalarType "bytea"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "position"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "position"->            [ ScalarType "bit"->            , ScalarType "bit"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "positionjoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "positionsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "postgresql_fdw_validator"->            [ ArrayType ( ScalarType "text" )->            , ScalarType "oid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pow"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "pow"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "power"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "power"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "prsd_end"->            [ Pseudo Internal->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "prsd_headline"->            [ Pseudo Internal->            , Pseudo Internal->            , ScalarType "tsquery"->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "prsd_lextype"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "prsd_nexttoken"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "prsd_start"->            [ Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "pt_contained_circle"->            [ ScalarType "point"->            , ScalarType "circle"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "pt_contained_poly"->            [ ScalarType "point"->            , ScalarType "polygon"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "query_to_xml"->            [ ScalarType "text"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "query_to_xml_and_xmlschema"->            [ ScalarType "text"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "query_to_xmlschema"->            [ ScalarType "text"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "querytree"->            [ ScalarType "tsquery"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "quote_ident"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "quote_literal"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "quote_literal"->            [ Pseudo AnyElement->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "quote_nullable"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "quote_nullable"->            [ Pseudo AnyElement->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "radians"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "radius"->            [ ScalarType "circle"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "random"->            [] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "record_eq"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "record_ge"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "record_gt"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "record_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            Pseudo Record )->            False->        , EnvCreateFunction->            FunName->            "record_le"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "record_lt"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "record_ne"->            [ Pseudo Record->            , Pseudo Record->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "record_out"->            [ Pseudo Record->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "record_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            Pseudo Record )->            False->        , EnvCreateFunction->            FunName->            "record_send"->            [ Pseudo Record->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "regclass"->            [ ScalarType "text"->            ] (->            ScalarType "regclass" )->            False->        , EnvCreateFunction->            FunName->            "regclassin"->            [ Pseudo Cstring->            ] (->            ScalarType "regclass" )->            False->        , EnvCreateFunction->            FunName->            "regclassout"->            [ ScalarType "regclass"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "regclassrecv"->            [ Pseudo Internal->            ] (->            ScalarType "regclass" )->            False->        , EnvCreateFunction->            FunName->            "regclasssend"->            [ ScalarType "regclass"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "regconfigin"->            [ Pseudo Cstring->            ] (->            ScalarType "regconfig" )->            False->        , EnvCreateFunction->            FunName->            "regconfigout"->            [ ScalarType "regconfig"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "regconfigrecv"->            [ Pseudo Internal->            ] (->            ScalarType "regconfig" )->            False->        , EnvCreateFunction->            FunName->            "regconfigsend"->            [ ScalarType "regconfig"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "regdictionaryin"->            [ Pseudo Cstring->            ] (->            ScalarType "regdictionary" )->            False->        , EnvCreateFunction->            FunName->            "regdictionaryout"->            [ ScalarType "regdictionary"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "regdictionaryrecv"->            [ Pseudo Internal->            ] (->            ScalarType "regdictionary" )->            False->        , EnvCreateFunction->            FunName->            "regdictionarysend"->            [ ScalarType "regdictionary"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "regexeqjoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "regexeqsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "regexnejoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "regexnesel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "regexp_matches"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            SetOfType ( ArrayType ( ScalarType "text" ) ) )->            False->        , EnvCreateFunction->            FunName->            "regexp_matches"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            SetOfType ( ArrayType ( ScalarType "text" ) ) )->            False->        , EnvCreateFunction->            FunName->            "regexp_replace"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "regexp_replace"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "regexp_split_to_array"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ArrayType ( ScalarType "text" ) )->            False->        , EnvCreateFunction->            FunName->            "regexp_split_to_array"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ArrayType ( ScalarType "text" ) )->            False->        , EnvCreateFunction->            FunName->            "regexp_split_to_table"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            SetOfType ( ScalarType "text" ) )->            False->        , EnvCreateFunction->            FunName->            "regexp_split_to_table"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            SetOfType ( ScalarType "text" ) )->            False->        , EnvCreateFunction->            FunName->            "regoperatorin"->            [ Pseudo Cstring->            ] (->            ScalarType "regoperator" )->            False->        , EnvCreateFunction->            FunName->            "regoperatorout"->            [ ScalarType "regoperator"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "regoperatorrecv"->            [ Pseudo Internal->            ] (->            ScalarType "regoperator" )->            False->        , EnvCreateFunction->            FunName->            "regoperatorsend"->            [ ScalarType "regoperator"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "regoperin"->            [ Pseudo Cstring->            ] (->            ScalarType "regoper" )->            False->        , EnvCreateFunction->            FunName->            "regoperout"->            [ ScalarType "regoper"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "regoperrecv"->            [ Pseudo Internal->            ] (->            ScalarType "regoper" )->            False->        , EnvCreateFunction->            FunName->            "regopersend"->            [ ScalarType "regoper"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "regprocedurein"->            [ Pseudo Cstring->            ] (->            ScalarType "regprocedure" )->            False->        , EnvCreateFunction->            FunName->            "regprocedureout"->            [ ScalarType "regprocedure"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "regprocedurerecv"->            [ Pseudo Internal->            ] (->            ScalarType "regprocedure" )->            False->        , EnvCreateFunction->            FunName->            "regproceduresend"->            [ ScalarType "regprocedure"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "regprocin"->            [ Pseudo Cstring->            ] (->            ScalarType "regproc" )->            False->        , EnvCreateFunction->            FunName->            "regprocout"->            [ ScalarType "regproc"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "regprocrecv"->            [ Pseudo Internal->            ] (->            ScalarType "regproc" )->            False->        , EnvCreateFunction->            FunName->            "regprocsend"->            [ ScalarType "regproc"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "regtypein"->            [ Pseudo Cstring->            ] (->            ScalarType "regtype" )->            False->        , EnvCreateFunction->            FunName->            "regtypeout"->            [ ScalarType "regtype"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "regtyperecv"->            [ Pseudo Internal->            ] (->            ScalarType "regtype" )->            False->        , EnvCreateFunction->            FunName->            "regtypesend"->            [ ScalarType "regtype"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "reltime"->            [ ScalarType "interval"->            ] (->            ScalarType "reltime" )->            False->        , EnvCreateFunction->            FunName->            "reltimeeq"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "reltimege"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "reltimegt"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "reltimein"->            [ Pseudo Cstring->            ] (->            ScalarType "reltime" )->            False->        , EnvCreateFunction->            FunName->            "reltimele"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "reltimelt"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "reltimene"->            [ ScalarType "reltime"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "reltimeout"->            [ ScalarType "reltime"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "reltimerecv"->            [ Pseudo Internal->            ] (->            ScalarType "reltime" )->            False->        , EnvCreateFunction->            FunName->            "reltimesend"->            [ ScalarType "reltime"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "repeat"->            [ ScalarType "text"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "replace"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "round"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "round"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "round"->            [ ScalarType "numeric"->            , ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "rpad"->            [ ScalarType "text"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "rpad"->            [ ScalarType "text"->            , ScalarType "int4"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "rtrim"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "rtrim"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "scalargtjoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "scalargtsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "scalarltjoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "scalarltsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "schema_to_xml"->            [ ScalarType "name"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "schema_to_xml_and_xmlschema"->            [ ScalarType "name"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "schema_to_xmlschema"->            [ ScalarType "name"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "session_user"->            [] (->            ScalarType "name" )->            False->        , EnvCreateFunction->            FunName->            "set_bit"->            [ ScalarType "bytea"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "set_byte"->            [ ScalarType "bytea"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "set_config"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "bool"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "set_masklen"->            [ ScalarType "cidr"->            , ScalarType "int4"->            ] (->            ScalarType "cidr" )->            False->        , EnvCreateFunction->            FunName->            "set_masklen"->            [ ScalarType "inet"->            , ScalarType "int4"->            ] (->            ScalarType "inet" )->            False->        , EnvCreateFunction->            FunName->            "setseed"->            [ ScalarType "float8"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "setval"->            [ ScalarType "regclass"->            , ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "setval"->            [ ScalarType "regclass"->            , ScalarType "int8"->            , ScalarType "bool"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "setweight"->            [ ScalarType "tsvector"->            , ScalarType "char"->            ] (->            ScalarType "tsvector" )->            False->        , EnvCreateFunction->            FunName->            "shell_in"->            [ Pseudo Cstring->            ] (->            Pseudo Opaque )->            False->        , EnvCreateFunction->            FunName->            "shell_out"->            [ Pseudo Opaque->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "shift_jis_2004_to_euc_jis_2004"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "shift_jis_2004_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "shobj_description"->            [ ScalarType "oid"->            , ScalarType "name"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "sign"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "sign"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "similar_escape"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "sin"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "sjis_to_euc_jp"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "sjis_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "sjis_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "slope"->            [ ScalarType "point"->            , ScalarType "point"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "smgreq"->            [ ScalarType "smgr"->            , ScalarType "smgr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "smgrin"->            [ Pseudo Cstring->            ] (->            ScalarType "smgr" )->            False->        , EnvCreateFunction->            FunName->            "smgrne"->            [ ScalarType "smgr"->            , ScalarType "smgr"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "smgrout"->            [ ScalarType "smgr"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "split_part"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "sqrt"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "sqrt"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "statement_timestamp"->            [] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "string_to_array"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ArrayType ( ScalarType "text" ) )->            False->        , EnvCreateFunction->            FunName->            "strip"->            [ ScalarType "tsvector"->            ] (->            ScalarType "tsvector" )->            False->        , EnvCreateFunction->            FunName->            "strpos"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "substr"->            [ ScalarType "bytea"->            , ScalarType "int4"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "substr"->            [ ScalarType "text"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "substr"->            [ ScalarType "bytea"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "substr"->            [ ScalarType "text"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "substring"->            [ ScalarType "bytea"->            , ScalarType "int4"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "substring"->            [ ScalarType "text"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "substring"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "substring"->            [ ScalarType "bit"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "substring"->            [ ScalarType "bytea"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "substring"->            [ ScalarType "text"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "substring"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "substring"->            [ ScalarType "bit"->            , ScalarType "int4"->            , ScalarType "int4"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunName->            "suppress_redundant_updates_trigger"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "table_to_xml"->            [ ScalarType "regclass"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "table_to_xml_and_xmlschema"->            [ ScalarType "regclass"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "table_to_xmlschema"->            [ ScalarType "regclass"->            , ScalarType "bool"->            , ScalarType "bool"->            , ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "tan"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "text"->            [ ScalarType "bool"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "text"->            [ ScalarType "char"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "text"->            [ ScalarType "name"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "text"->            [ ScalarType "xml"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "text"->            [ ScalarType "inet"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "text"->            [ ScalarType "bpchar"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "text_ge"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "text_gt"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "text_larger"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "text_le"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "text_lt"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "text_pattern_ge"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "text_pattern_gt"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "text_pattern_le"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "text_pattern_lt"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "text_smaller"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "textanycat"->            [ ScalarType "text"->            , Pseudo AnyNonArray->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "textcat"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "texteq"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "texticlike"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "texticnlike"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "texticregexeq"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "texticregexne"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "textin"->            [ Pseudo Cstring->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "textlen"->            [ ScalarType "text"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "textlike"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "textne"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "textnlike"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "textout"->            [ ScalarType "text"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "textrecv"->            [ Pseudo Internal->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "textregexeq"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "textregexne"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "textsend"->            [ ScalarType "text"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "thesaurus_init"->            [ Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "thesaurus_lexize"->            [ Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            , Pseudo Internal->            ] (->            Pseudo Internal )->            False->        , EnvCreateFunction->            FunName->            "tideq"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tidge"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tidgt"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tidin"->            [ Pseudo Cstring->            ] (->            ScalarType "tid" )->            False->        , EnvCreateFunction->            FunName->            "tidlarger"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "tid" )->            False->        , EnvCreateFunction->            FunName->            "tidle"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tidlt"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tidne"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tidout"->            [ ScalarType "tid"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "tidrecv"->            [ Pseudo Internal->            ] (->            ScalarType "tid" )->            False->        , EnvCreateFunction->            FunName->            "tidsend"->            [ ScalarType "tid"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "tidsmaller"->            [ ScalarType "tid"->            , ScalarType "tid"->            ] (->            ScalarType "tid" )->            False->        , EnvCreateFunction->            FunName->            "time"->            [ ScalarType "abstime"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time"->            [ ScalarType "timestamp"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time"->            [ ScalarType "interval"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time"->            [ ScalarType "timetz"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time"->            [ ScalarType "time"->            , ScalarType "int4"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time_cmp"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "time_eq"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "time_ge"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "time_gt"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "time_hash"->            [ ScalarType "time"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "time_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time_larger"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time_le"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "time_lt"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "time_mi_interval"->            [ ScalarType "time"->            , ScalarType "interval"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time_mi_time"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "time_ne"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "time_out"->            [ ScalarType "time"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "time_pl_interval"->            [ ScalarType "time"->            , ScalarType "interval"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "time_send"->            [ ScalarType "time"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "time_smaller"->            [ ScalarType "time"->            , ScalarType "time"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunName->            "timedate_pl"->            [ ScalarType "time"->            , ScalarType "date"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timemi"->            [ ScalarType "abstime"->            , ScalarType "reltime"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunName->            "timenow"->            [] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunName->            "timeofday"->            [] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "timepl"->            [ ScalarType "abstime"->            , ScalarType "reltime"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunName->            "timestamp"->            [ ScalarType "abstime"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp"->            [ ScalarType "date"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp"->            [ ScalarType "date"->            , ScalarType "time"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp"->            [ ScalarType "timestamp"->            , ScalarType "int4"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_cmp"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_cmp_date"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_cmp_timestamptz"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_eq"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_eq_date"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_eq_timestamptz"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_ge"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_ge_date"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_ge_timestamptz"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_gt"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_gt_date"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_gt_timestamptz"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_hash"->            [ ScalarType "timestamp"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_larger"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_le"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_le_date"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_le_timestamptz"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_lt"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_lt_date"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_lt_timestamptz"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_mi"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_mi_interval"->            [ ScalarType "timestamp"->            , ScalarType "interval"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_ne"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_ne_date"->            [ ScalarType "timestamp"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_ne_timestamptz"->            [ ScalarType "timestamp"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_out"->            [ ScalarType "timestamp"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "timestamp_pl_interval"->            [ ScalarType "timestamp"->            , ScalarType "interval"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_send"->            [ ScalarType "timestamp"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "timestamp_smaller"->            [ ScalarType "timestamp"->            , ScalarType "timestamp"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timestamptypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timestamptypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "timestamptz"->            [ ScalarType "abstime"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz"->            [ ScalarType "date"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz"->            [ ScalarType "timestamp"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz"->            [ ScalarType "date"->            , ScalarType "time"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz"->            [ ScalarType "date"->            , ScalarType "timetz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz"->            [ ScalarType "timestamptz"->            , ScalarType "int4"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_cmp"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_cmp_date"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_cmp_timestamp"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_eq"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_eq_date"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_eq_timestamp"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_ge"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_ge_date"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_ge_timestamp"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_gt"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_gt_date"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_gt_timestamp"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_larger"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_le"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_le_date"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_le_timestamp"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_lt"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_lt_date"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_lt_timestamp"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_mi"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_mi_interval"->            [ ScalarType "timestamptz"->            , ScalarType "interval"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_ne"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_ne_date"->            [ ScalarType "timestamptz"->            , ScalarType "date"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_ne_timestamp"->            [ ScalarType "timestamptz"->            , ScalarType "timestamp"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_out"->            [ ScalarType "timestamptz"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_pl_interval"->            [ ScalarType "timestamptz"->            , ScalarType "interval"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_send"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "timestamptz_smaller"->            [ ScalarType "timestamptz"->            , ScalarType "timestamptz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timestamptztypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timestamptztypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "timetypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timetypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "timetz"->            [ ScalarType "time"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timetz"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timetz"->            [ ScalarType "timetz"->            , ScalarType "int4"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timetz_cmp"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timetz_eq"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timetz_ge"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timetz_gt"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timetz_hash"->            [ ScalarType "timetz"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timetz_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timetz_larger"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timetz_le"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timetz_lt"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timetz_mi_interval"->            [ ScalarType "timetz"->            , ScalarType "interval"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timetz_ne"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "timetz_out"->            [ ScalarType "timetz"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "timetz_pl_interval"->            [ ScalarType "timetz"->            , ScalarType "interval"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timetz_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timetz_send"->            [ ScalarType "timetz"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "timetz_smaller"->            [ ScalarType "timetz"->            , ScalarType "timetz"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timetzdate_pl"->            [ ScalarType "timetz"->            , ScalarType "date"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timetztypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "timetztypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "timezone"->            [ ScalarType "text"->            , ScalarType "timestamp"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timezone"->            [ ScalarType "text"->            , ScalarType "timestamptz"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timezone"->            [ ScalarType "text"->            , ScalarType "timetz"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "timezone"->            [ ScalarType "interval"->            , ScalarType "timestamp"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "timezone"->            [ ScalarType "interval"->            , ScalarType "timestamptz"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunName->            "timezone"->            [ ScalarType "interval"->            , ScalarType "timetz"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunName->            "tinterval"->            [ ScalarType "abstime"->            , ScalarType "abstime"->            ] (->            ScalarType "tinterval" )->            False->        , EnvCreateFunction->            FunName->            "tintervalct"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervalend"->            [ ScalarType "tinterval"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunName->            "tintervaleq"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervalge"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervalgt"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervalin"->            [ Pseudo Cstring->            ] (->            ScalarType "tinterval" )->            False->        , EnvCreateFunction->            FunName->            "tintervalle"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervalleneq"->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervallenge"->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervallengt"->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervallenle"->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervallenlt"->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervallenne"->            [ ScalarType "tinterval"->            , ScalarType "reltime"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervallt"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervalne"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervalout"->            [ ScalarType "tinterval"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "tintervalov"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervalrecv"->            [ Pseudo Internal->            ] (->            ScalarType "tinterval" )->            False->        , EnvCreateFunction->            FunName->            "tintervalrel"->            [ ScalarType "tinterval"->            ] (->            ScalarType "reltime" )->            False->        , EnvCreateFunction->            FunName->            "tintervalsame"->            [ ScalarType "tinterval"->            , ScalarType "tinterval"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tintervalsend"->            [ ScalarType "tinterval"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "tintervalstart"->            [ ScalarType "tinterval"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunName->            "to_ascii"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_ascii"->            [ ScalarType "text"->            , ScalarType "name"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_ascii"->            [ ScalarType "text"->            , ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_char"->            [ ScalarType "int8"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_char"->            [ ScalarType "int4"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_char"->            [ ScalarType "float4"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_char"->            [ ScalarType "float8"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_char"->            [ ScalarType "timestamp"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_char"->            [ ScalarType "timestamptz"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_char"->            [ ScalarType "interval"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_char"->            [ ScalarType "numeric"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_date"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunName->            "to_hex"->            [ ScalarType "int8"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_hex"->            [ ScalarType "int4"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "to_number"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "to_timestamp"->            [ ScalarType "float8"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "to_timestamp"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "to_tsquery"->            [ ScalarType "text"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "to_tsquery"->            [ ScalarType "regconfig"->            , ScalarType "text"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "to_tsvector"->            [ ScalarType "text"->            ] (->            ScalarType "tsvector" )->            False->        , EnvCreateFunction->            FunName->            "to_tsvector"->            [ ScalarType "regconfig"->            , ScalarType "text"->            ] (->            ScalarType "tsvector" )->            False->        , EnvCreateFunction->            FunName->            "transaction_timestamp"->            [] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunName->            "translate"->            [ ScalarType "text"->            , ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "trigger_in"->            [ Pseudo Cstring->            ] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "trigger_out"->            [ Pseudo Trigger->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "trunc"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "trunc"->            [ ScalarType "macaddr"->            ] (->            ScalarType "macaddr" )->            False->        , EnvCreateFunction->            FunName->            "trunc"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "trunc"->            [ ScalarType "numeric"->            , ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunName->            "ts_debug"->            [ ScalarType "text"->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "ts_debug"->            [ ScalarType "regconfig"->            , ScalarType "text"->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "ts_headline"->            [ ScalarType "text"->            , ScalarType "tsquery"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "ts_headline"->            [ ScalarType "text"->            , ScalarType "tsquery"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "ts_headline"->            [ ScalarType "regconfig"->            , ScalarType "text"->            , ScalarType "tsquery"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "ts_headline"->            [ ScalarType "regconfig"->            , ScalarType "text"->            , ScalarType "tsquery"->            , ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "ts_lexize"->            [ ScalarType "regdictionary"->            , ScalarType "text"->            ] (->            ArrayType ( ScalarType "text" ) )->            False->        , EnvCreateFunction->            FunName->            "ts_match_qv"->            [ ScalarType "tsquery"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ts_match_tq"->            [ ScalarType "text"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ts_match_tt"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ts_match_vq"->            [ ScalarType "tsvector"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "ts_parse"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "ts_parse"->            [ ScalarType "oid"->            , ScalarType "text"->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "ts_rank"->            [ ScalarType "tsvector"->            , ScalarType "tsquery"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "ts_rank"->            [ ArrayType ( ScalarType "float4" )->            , ScalarType "tsvector"->            , ScalarType "tsquery"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "ts_rank"->            [ ScalarType "tsvector"->            , ScalarType "tsquery"->            , ScalarType "int4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "ts_rank"->            [ ArrayType ( ScalarType "float4" )->            , ScalarType "tsvector"->            , ScalarType "tsquery"->            , ScalarType "int4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "ts_rank_cd"->            [ ScalarType "tsvector"->            , ScalarType "tsquery"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "ts_rank_cd"->            [ ArrayType ( ScalarType "float4" )->            , ScalarType "tsvector"->            , ScalarType "tsquery"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "ts_rank_cd"->            [ ScalarType "tsvector"->            , ScalarType "tsquery"->            , ScalarType "int4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "ts_rank_cd"->            [ ArrayType ( ScalarType "float4" )->            , ScalarType "tsvector"->            , ScalarType "tsquery"->            , ScalarType "int4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunName->            "ts_rewrite"->            [ ScalarType "tsquery"->            , ScalarType "text"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "ts_rewrite"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "ts_stat"->            [ ScalarType "text"->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "ts_stat"->            [ ScalarType "text"->            , ScalarType "text"->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "ts_token_type"->            [ ScalarType "text"->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "ts_token_type"->            [ ScalarType "oid"->            ] (->            SetOfType ( Pseudo Record ) )->            False->        , EnvCreateFunction->            FunName->            "ts_typanalyze"->            [ Pseudo Internal->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsmatchjoinsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int2"->            , Pseudo Internal->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "tsmatchsel"->            [ Pseudo Internal->            , ScalarType "oid"->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "tsq_mcontained"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsq_mcontains"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_and"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_cmp"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_eq"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_ge"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_gt"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_le"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_lt"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_ne"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_not"->            [ ScalarType "tsquery"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "tsquery_or"->            [ ScalarType "tsquery"->            , ScalarType "tsquery"->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "tsqueryin"->            [ Pseudo Cstring->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "tsqueryout"->            [ ScalarType "tsquery"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "tsqueryrecv"->            [ Pseudo Internal->            ] (->            ScalarType "tsquery" )->            False->        , EnvCreateFunction->            FunName->            "tsquerysend"->            [ ScalarType "tsquery"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "tsvector_cmp"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "tsvector_concat"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "tsvector" )->            False->        , EnvCreateFunction->            FunName->            "tsvector_eq"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsvector_ge"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsvector_gt"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsvector_le"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsvector_lt"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsvector_ne"->            [ ScalarType "tsvector"->            , ScalarType "tsvector"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "tsvector_update_trigger"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "tsvector_update_trigger_column"->            [] (->            Pseudo Trigger )->            False->        , EnvCreateFunction->            FunName->            "tsvectorin"->            [ Pseudo Cstring->            ] (->            ScalarType "tsvector" )->            False->        , EnvCreateFunction->            FunName->            "tsvectorout"->            [ ScalarType "tsvector"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "tsvectorrecv"->            [ Pseudo Internal->            ] (->            ScalarType "tsvector" )->            False->        , EnvCreateFunction->            FunName->            "tsvectorsend"->            [ ScalarType "tsvector"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "txid_current"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "txid_current_snapshot"->            [] (->            ScalarType "txid_snapshot" )->            False->        , EnvCreateFunction->            FunName->            "txid_snapshot_in"->            [ Pseudo Cstring->            ] (->            ScalarType "txid_snapshot" )->            False->        , EnvCreateFunction->            FunName->            "txid_snapshot_out"->            [ ScalarType "txid_snapshot"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "txid_snapshot_recv"->            [ Pseudo Internal->            ] (->            ScalarType "txid_snapshot" )->            False->        , EnvCreateFunction->            FunName->            "txid_snapshot_send"->            [ ScalarType "txid_snapshot"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "txid_snapshot_xip"->            [ ScalarType "txid_snapshot"->            ] (->            SetOfType ( ScalarType "int8" ) )->            False->        , EnvCreateFunction->            FunName->            "txid_snapshot_xmax"->            [ ScalarType "txid_snapshot"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "txid_snapshot_xmin"->            [ ScalarType "txid_snapshot"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunName->            "txid_visible_in_snapshot"->            [ ScalarType "int8"->            , ScalarType "txid_snapshot"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "uhc_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "unknownin"->            [ Pseudo Cstring->            ] (->            ScalarType "unknown" )->            False->        , EnvCreateFunction->            FunName->            "unknownout"->            [ ScalarType "unknown"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "unknownrecv"->            [ Pseudo Internal->            ] (->            ScalarType "unknown" )->            False->        , EnvCreateFunction->            FunName->            "unknownsend"->            [ ScalarType "unknown"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "unnest"->            [ Pseudo AnyArray->            ] (->            SetOfType ( Pseudo AnyElement ) )->            False->        , EnvCreateFunction->            FunName->            "upper"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_ascii"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_big5"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_euc_cn"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_euc_jis_2004"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_euc_jp"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_euc_kr"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_euc_tw"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_gb18030"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_gbk"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_iso8859"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_iso8859_1"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_johab"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_koi8r"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_koi8u"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_shift_jis_2004"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_sjis"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_uhc"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "utf8_to_win"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "uuid_cmp"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "uuid_eq"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "uuid_ge"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "uuid_gt"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "uuid_hash"->            [ ScalarType "uuid"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "uuid_in"->            [ Pseudo Cstring->            ] (->            ScalarType "uuid" )->            False->        , EnvCreateFunction->            FunName->            "uuid_le"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "uuid_lt"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "uuid_ne"->            [ ScalarType "uuid"->            , ScalarType "uuid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "uuid_out"->            [ ScalarType "uuid"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "uuid_recv"->            [ Pseudo Internal->            ] (->            ScalarType "uuid" )->            False->        , EnvCreateFunction->            FunName->            "uuid_send"->            [ ScalarType "uuid"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "varbit"->            [ ScalarType "varbit"->            , ScalarType "int4"->            , ScalarType "bool"->            ] (->            ScalarType "varbit" )->            False->        , EnvCreateFunction->            FunName->            "varbit_in"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "varbit" )->            False->        , EnvCreateFunction->            FunName->            "varbit_out"->            [ ScalarType "varbit"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "varbit_recv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "varbit" )->            False->        , EnvCreateFunction->            FunName->            "varbit_send"->            [ ScalarType "varbit"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "varbitcmp"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "varbiteq"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "varbitge"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "varbitgt"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "varbitle"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "varbitlt"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "varbitne"->            [ ScalarType "varbit"->            , ScalarType "varbit"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "varbittypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "varbittypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "varchar"->            [ ScalarType "name"->            ] (->            ScalarType "varchar" )->            False->        , EnvCreateFunction->            FunName->            "varchar"->            [ ScalarType "varchar"->            , ScalarType "int4"->            , ScalarType "bool"->            ] (->            ScalarType "varchar" )->            False->        , EnvCreateFunction->            FunName->            "varcharin"->            [ Pseudo Cstring->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "varchar" )->            False->        , EnvCreateFunction->            FunName->            "varcharout"->            [ ScalarType "varchar"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "varcharrecv"->            [ Pseudo Internal->            , ScalarType "oid"->            , ScalarType "int4"->            ] (->            ScalarType "varchar" )->            False->        , EnvCreateFunction->            FunName->            "varcharsend"->            [ ScalarType "varchar"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "varchartypmodin"->            [ ArrayType ( Pseudo Cstring )->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "varchartypmodout"->            [ ScalarType "int4"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "version"->            [] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunName->            "void_in"->            [ Pseudo Cstring->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "void_out"->            [ Pseudo Void->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "width"->            [ ScalarType "box"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunName->            "width_bucket"->            [ ScalarType "float8"->            , ScalarType "float8"->            , ScalarType "float8"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "width_bucket"->            [ ScalarType "numeric"->            , ScalarType "numeric"->            , ScalarType "numeric"->            , ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunName->            "win1250_to_latin2"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win1250_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win1251_to_iso"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win1251_to_koi8r"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win1251_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win1251_to_win866"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win866_to_iso"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win866_to_koi8r"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win866_to_mic"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win866_to_win1251"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "win_to_utf8"->            [ ScalarType "int4"->            , ScalarType "int4"->            , Pseudo Cstring->            , Pseudo Internal->            , ScalarType "int4"->            ] (->            Pseudo Void )->            False->        , EnvCreateFunction->            FunName->            "xideq"->            [ ScalarType "xid"->            , ScalarType "xid"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "xideqint4"->            [ ScalarType "xid"->            , ScalarType "int4"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "xidin"->            [ Pseudo Cstring->            ] (->            ScalarType "xid" )->            False->        , EnvCreateFunction->            FunName->            "xidout"->            [ ScalarType "xid"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "xidrecv"->            [ Pseudo Internal->            ] (->            ScalarType "xid" )->            False->        , EnvCreateFunction->            FunName->            "xidsend"->            [ ScalarType "xid"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "xml"->            [ ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "xml_in"->            [ Pseudo Cstring->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "xml_out"->            [ ScalarType "xml"->            ] (->            Pseudo Cstring )->            False->        , EnvCreateFunction->            FunName->            "xml_recv"->            [ Pseudo Internal->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "xml_send"->            [ ScalarType "xml"->            ] (->            ScalarType "bytea" )->            False->        , EnvCreateFunction->            FunName->            "xmlcomment"->            [ ScalarType "text"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "xmlconcat2"->            [ ScalarType "xml"->            , ScalarType "xml"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunName->            "xmlvalidate"->            [ ScalarType "xml"->            , ScalarType "text"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunName->            "xpath"->            [ ScalarType "text"->            , ScalarType "xml"->            ] (->            ArrayType ( ScalarType "xml" ) )->            False->        , EnvCreateFunction->            FunName->            "xpath"->            [ ScalarType "text"->            , ScalarType "xml"->            , ArrayType ( ScalarType "text" )->            ] (->            ArrayType ( ScalarType "xml" ) )->            False->        , EnvCreateFunction->            FunAgg->            "array_agg"->            [ Pseudo AnyElement->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunAgg->            "avg"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "avg"->            [ ScalarType "int2"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "avg"->            [ ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "avg"->            [ ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "avg"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "avg"->            [ ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunAgg->            "avg"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "bit_and"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunAgg->            "bit_and"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunAgg->            "bit_and"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunAgg->            "bit_and"->            [ ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunAgg->            "bit_or"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunAgg->            "bit_or"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunAgg->            "bit_or"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunAgg->            "bit_or"->            [ ScalarType "bit"->            ] (->            ScalarType "bit" )->            False->        , EnvCreateFunction->            FunAgg->            "bool_and"->            [ ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunAgg->            "bool_or"->            [ ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunAgg->            "corr"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "count"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunAgg->            "count"->            [ Pseudo Any->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunAgg->            "covar_pop"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "covar_samp"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "every"->            [ ScalarType "bool"->            ] (->            ScalarType "bool" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "oid"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "tid"->            ] (->            ScalarType "tid" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "abstime"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "bpchar"->            ] (->            ScalarType "bpchar" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "date"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "time"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "timestamp"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "timetz"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ Pseudo AnyArray->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunAgg->            "max"->            [ Pseudo AnyEnum->            ] (->            Pseudo AnyEnum )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "int8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "int2"->            ] (->            ScalarType "int2" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "text"->            ] (->            ScalarType "text" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "oid"->            ] (->            ScalarType "oid" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "tid"->            ] (->            ScalarType "tid" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "abstime"->            ] (->            ScalarType "abstime" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "bpchar"->            ] (->            ScalarType "bpchar" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "date"->            ] (->            ScalarType "date" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "time"->            ] (->            ScalarType "time" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "timestamp"->            ] (->            ScalarType "timestamp" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "timestamptz"->            ] (->            ScalarType "timestamptz" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "timetz"->            ] (->            ScalarType "timetz" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ Pseudo AnyArray->            ] (->            Pseudo AnyArray )->            False->        , EnvCreateFunction->            FunAgg->            "min"->            [ Pseudo AnyEnum->            ] (->            Pseudo AnyEnum )->            False->        , EnvCreateFunction->            FunAgg->            "regr_avgx"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "regr_avgy"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "regr_count"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunAgg->            "regr_intercept"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "regr_r2"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "regr_slope"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "regr_sxx"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "regr_sxy"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "regr_syy"->            [ ScalarType "float8"->            , ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev"->            [ ScalarType "int2"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev"->            [ ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev"->            [ ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_pop"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_pop"->            [ ScalarType "int2"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_pop"->            [ ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_pop"->            [ ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_pop"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_pop"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_samp"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_samp"->            [ ScalarType "int2"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_samp"->            [ ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_samp"->            [ ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_samp"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "stddev_samp"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "sum"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "sum"->            [ ScalarType "int2"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunAgg->            "sum"->            [ ScalarType "int4"->            ] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunAgg->            "sum"->            [ ScalarType "float4"->            ] (->            ScalarType "float4" )->            False->        , EnvCreateFunction->            FunAgg->            "sum"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "sum"->            [ ScalarType "money"->            ] (->            ScalarType "money" )->            False->        , EnvCreateFunction->            FunAgg->            "sum"->            [ ScalarType "interval"->            ] (->            ScalarType "interval" )->            False->        , EnvCreateFunction->            FunAgg->            "sum"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "var_pop"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "var_pop"->            [ ScalarType "int2"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "var_pop"->            [ ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "var_pop"->            [ ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "var_pop"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "var_pop"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "var_samp"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "var_samp"->            [ ScalarType "int2"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "var_samp"->            [ ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "var_samp"->            [ ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "var_samp"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "var_samp"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "variance"->            [ ScalarType "int8"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "variance"->            [ ScalarType "int2"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "variance"->            [ ScalarType "int4"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "variance"->            [ ScalarType "float4"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "variance"->            [ ScalarType "float8"->            ] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunAgg->            "variance"->            [ ScalarType "numeric"->            ] (->            ScalarType "numeric" )->            False->        , EnvCreateFunction->            FunAgg->            "xmlagg"->            [ ScalarType "xml"->            ] (->            ScalarType "xml" )->            False->        , EnvCreateFunction->            FunWindow->            "cume_dist"->            [] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunWindow->            "dense_rank"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunWindow->            "first_value"->            [ Pseudo AnyElement->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunWindow->            "lag"->            [ Pseudo AnyElement->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunWindow->            "lag"->            [ Pseudo AnyElement->            , ScalarType "int4"->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunWindow->            "lag"->            [ Pseudo AnyElement->            , ScalarType "int4"->            , Pseudo AnyElement->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunWindow->            "last_value"->            [ Pseudo AnyElement->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunWindow->            "lead"->            [ Pseudo AnyElement->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunWindow->            "lead"->            [ Pseudo AnyElement->            , ScalarType "int4"->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunWindow->            "lead"->            [ Pseudo AnyElement->            , ScalarType "int4"->            , Pseudo AnyElement->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunWindow->            "nth_value"->            [ Pseudo AnyElement->            , ScalarType "int4"->            ] (->            Pseudo AnyElement )->            False->        , EnvCreateFunction->            FunWindow->            "ntile"->            [ ScalarType "int4"->            ] (->            ScalarType "int4" )->            False->        , EnvCreateFunction->            FunWindow->            "percent_rank"->            [] (->            ScalarType "float8" )->            False->        , EnvCreateFunction->            FunWindow->            "rank"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateFunction->            FunWindow->            "row_number"->            [] (->            ScalarType "int8" )->            False->        , EnvCreateTable->            "pg_aggregate"->            [ ( "aggfnoid"->              , ScalarType "regproc"->              )->            , ( "aggtransfn"->              , ScalarType "regproc"->              )->            , ( "aggfinalfn"->              , ScalarType "regproc"->              )->            , ( "aggsortop"->              , ScalarType "oid"->              )->            , ( "aggtranstype"->              , ScalarType "oid"->              )->            , ( "agginitval"->              , ScalarType "text"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_am"->            [ ( "amname"->              , ScalarType "name"->              )->            , ( "amstrategies"->              , ScalarType "int2"->              )->            , ( "amsupport"->              , ScalarType "int2"->              )->            , ( "amcanorder"->              , ScalarType "bool"->              )->            , ( "amcanbackward"->              , ScalarType "bool"->              )->            , ( "amcanunique"->              , ScalarType "bool"->              )->            , ( "amcanmulticol"->              , ScalarType "bool"->              )->            , ( "amoptionalkey"->              , ScalarType "bool"->              )->            , ( "amindexnulls"->              , ScalarType "bool"->              )->            , ( "amsearchnulls"->              , ScalarType "bool"->              )->            , ( "amstorage"->              , ScalarType "bool"->              )->            , ( "amclusterable"->              , ScalarType "bool"->              )->            , ( "amkeytype"->              , ScalarType "oid"->              )->            , ( "aminsert"->              , ScalarType "regproc"->              )->            , ( "ambeginscan"->              , ScalarType "regproc"->              )->            , ( "amgettuple"->              , ScalarType "regproc"->              )->            , ( "amgetbitmap"->              , ScalarType "regproc"->              )->            , ( "amrescan"->              , ScalarType "regproc"->              )->            , ( "amendscan"->              , ScalarType "regproc"->              )->            , ( "ammarkpos"->              , ScalarType "regproc"->              )->            , ( "amrestrpos"->              , ScalarType "regproc"->              )->            , ( "ambuild"->              , ScalarType "regproc"->              )->            , ( "ambulkdelete"->              , ScalarType "regproc"->              )->            , ( "amvacuumcleanup"->              , ScalarType "regproc"->              )->            , ( "amcostestimate"->              , ScalarType "regproc"->              )->            , ( "amoptions"->              , ScalarType "regproc"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_amop"->            [ ( "amopfamily"->              , ScalarType "oid"->              )->            , ( "amoplefttype"->              , ScalarType "oid"->              )->            , ( "amoprighttype"->              , ScalarType "oid"->              )->            , ( "amopstrategy"->              , ScalarType "int2"->              )->            , ( "amopopr"->              , ScalarType "oid"->              )->            , ( "amopmethod"->              , ScalarType "oid"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_amproc"->            [ ( "amprocfamily"->              , ScalarType "oid"->              )->            , ( "amproclefttype"->              , ScalarType "oid"->              )->            , ( "amprocrighttype"->              , ScalarType "oid"->              )->            , ( "amprocnum"->              , ScalarType "int2"->              )->            , ( "amproc"->              , ScalarType "regproc"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_attrdef"->            [ ( "adrelid"->              , ScalarType "oid"->              )->            , ( "adnum"->              , ScalarType "int2"->              )->            , ( "adbin"->              , ScalarType "text"->              )->            , ( "adsrc"->              , ScalarType "text"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_attribute"->            [ ( "attrelid"->              , ScalarType "oid"->              )->            , ( "attname"->              , ScalarType "name"->              )->            , ( "atttypid"->              , ScalarType "oid"->              )->            , ( "attstattarget"->              , ScalarType "int4"->              )->            , ( "attlen"->              , ScalarType "int2"->              )->            , ( "attnum"->              , ScalarType "int2"->              )->            , ( "attndims"->              , ScalarType "int4"->              )->            , ( "attcacheoff"->              , ScalarType "int4"->              )->            , ( "atttypmod"->              , ScalarType "int4"->              )->            , ( "attbyval"->              , ScalarType "bool"->              )->            , ( "attstorage"->              , ScalarType "char"->              )->            , ( "attalign"->              , ScalarType "char"->              )->            , ( "attnotnull"->              , ScalarType "bool"->              )->            , ( "atthasdef"->              , ScalarType "bool"->              )->            , ( "attisdropped"->              , ScalarType "bool"->              )->            , ( "attislocal"->              , ScalarType "bool"->              )->            , ( "attinhcount"->              , ScalarType "int4"->              )->            , ( "attacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_auth_members"->            [ ( "roleid"->              , ScalarType "oid"->              )->            , ( "member"->              , ScalarType "oid"->              )->            , ( "grantor"->              , ScalarType "oid"->              )->            , ( "admin_option"->              , ScalarType "bool"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_authid"->            [ ( "rolname"->              , ScalarType "name"->              )->            , ( "rolsuper"->              , ScalarType "bool"->              )->            , ( "rolinherit"->              , ScalarType "bool"->              )->            , ( "rolcreaterole"->              , ScalarType "bool"->              )->            , ( "rolcreatedb"->              , ScalarType "bool"->              )->            , ( "rolcatupdate"->              , ScalarType "bool"->              )->            , ( "rolcanlogin"->              , ScalarType "bool"->              )->            , ( "rolconnlimit"->              , ScalarType "int4"->              )->            , ( "rolpassword"->              , ScalarType "text"->              )->            , ( "rolvaliduntil"->              , ScalarType "timestamptz"->              )->            , ( "rolconfig"->              , ArrayType ( ScalarType "text" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_cast"->            [ ( "castsource"->              , ScalarType "oid"->              )->            , ( "casttarget"->              , ScalarType "oid"->              )->            , ( "castfunc"->              , ScalarType "oid"->              )->            , ( "castcontext"->              , ScalarType "char"->              )->            , ( "castmethod"->              , ScalarType "char"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_class"->            [ ( "relname"->              , ScalarType "name"->              )->            , ( "relnamespace"->              , ScalarType "oid"->              )->            , ( "reltype"->              , ScalarType "oid"->              )->            , ( "relowner"->              , ScalarType "oid"->              )->            , ( "relam"->              , ScalarType "oid"->              )->            , ( "relfilenode"->              , ScalarType "oid"->              )->            , ( "reltablespace"->              , ScalarType "oid"->              )->            , ( "relpages"->              , ScalarType "int4"->              )->            , ( "reltuples"->              , ScalarType "float4"->              )->            , ( "reltoastrelid"->              , ScalarType "oid"->              )->            , ( "reltoastidxid"->              , ScalarType "oid"->              )->            , ( "relhasindex"->              , ScalarType "bool"->              )->            , ( "relisshared"->              , ScalarType "bool"->              )->            , ( "relistemp"->              , ScalarType "bool"->              )->            , ( "relkind"->              , ScalarType "char"->              )->            , ( "relnatts"->              , ScalarType "int2"->              )->            , ( "relchecks"->              , ScalarType "int2"->              )->            , ( "relhasoids"->              , ScalarType "bool"->              )->            , ( "relhaspkey"->              , ScalarType "bool"->              )->            , ( "relhasrules"->              , ScalarType "bool"->              )->            , ( "relhastriggers"->              , ScalarType "bool"->              )->            , ( "relhassubclass"->              , ScalarType "bool"->              )->            , ( "relfrozenxid"->              , ScalarType "xid"->              )->            , ( "relacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            , ( "reloptions"->              , ArrayType ( ScalarType "text" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_constraint"->            [ ( "conname"->              , ScalarType "name"->              )->            , ( "connamespace"->              , ScalarType "oid"->              )->            , ( "contype"->              , ScalarType "char"->              )->            , ( "condeferrable"->              , ScalarType "bool"->              )->            , ( "condeferred"->              , ScalarType "bool"->              )->            , ( "conrelid"->              , ScalarType "oid"->              )->            , ( "contypid"->              , ScalarType "oid"->              )->            , ( "confrelid"->              , ScalarType "oid"->              )->            , ( "confupdtype"->              , ScalarType "char"->              )->            , ( "confdeltype"->              , ScalarType "char"->              )->            , ( "confmatchtype"->              , ScalarType "char"->              )->            , ( "conislocal"->              , ScalarType "bool"->              )->            , ( "coninhcount"->              , ScalarType "int4"->              )->            , ( "conkey"->              , ArrayType ( ScalarType "int2" )->              )->            , ( "confkey"->              , ArrayType ( ScalarType "int2" )->              )->            , ( "conpfeqop"->              , ArrayType ( ScalarType "oid" )->              )->            , ( "conppeqop"->              , ArrayType ( ScalarType "oid" )->              )->            , ( "conffeqop"->              , ArrayType ( ScalarType "oid" )->              )->            , ( "conbin"->              , ScalarType "text"->              )->            , ( "consrc"->              , ScalarType "text"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_conversion"->            [ ( "conname"->              , ScalarType "name"->              )->            , ( "connamespace"->              , ScalarType "oid"->              )->            , ( "conowner"->              , ScalarType "oid"->              )->            , ( "conforencoding"->              , ScalarType "int4"->              )->            , ( "contoencoding"->              , ScalarType "int4"->              )->            , ( "conproc"->              , ScalarType "regproc"->              )->            , ( "condefault"->              , ScalarType "bool"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_database"->            [ ( "datname"->              , ScalarType "name"->              )->            , ( "datdba"->              , ScalarType "oid"->              )->            , ( "encoding"->              , ScalarType "int4"->              )->            , ( "datcollate"->              , ScalarType "name"->              )->            , ( "datctype"->              , ScalarType "name"->              )->            , ( "datistemplate"->              , ScalarType "bool"->              )->            , ( "datallowconn"->              , ScalarType "bool"->              )->            , ( "datconnlimit"->              , ScalarType "int4"->              )->            , ( "datlastsysoid"->              , ScalarType "oid"->              )->            , ( "datfrozenxid"->              , ScalarType "xid"->              )->            , ( "dattablespace"->              , ScalarType "oid"->              )->            , ( "datconfig"->              , ArrayType ( ScalarType "text" )->              )->            , ( "datacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_depend"->            [ ( "classid"->              , ScalarType "oid"->              )->            , ( "objid"->              , ScalarType "oid"->              )->            , ( "objsubid"->              , ScalarType "int4"->              )->            , ( "refclassid"->              , ScalarType "oid"->              )->            , ( "refobjid"->              , ScalarType "oid"->              )->            , ( "refobjsubid"->              , ScalarType "int4"->              )->            , ( "deptype"->              , ScalarType "char"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_description"->            [ ( "objoid"->              , ScalarType "oid"->              )->            , ( "classoid"->              , ScalarType "oid"->              )->            , ( "objsubid"->              , ScalarType "int4"->              )->            , ( "description"->              , ScalarType "text"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_enum"->            [ ( "enumtypid"->              , ScalarType "oid"->              )->            , ( "enumlabel"->              , ScalarType "name"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_foreign_data_wrapper"->            [ ( "fdwname"->              , ScalarType "name"->              )->            , ( "fdwowner"->              , ScalarType "oid"->              )->            , ( "fdwvalidator"->              , ScalarType "oid"->              )->            , ( "fdwacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            , ( "fdwoptions"->              , ArrayType ( ScalarType "text" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_foreign_server"->            [ ( "srvname"->              , ScalarType "name"->              )->            , ( "srvowner"->              , ScalarType "oid"->              )->            , ( "srvfdw"->              , ScalarType "oid"->              )->            , ( "srvtype"->              , ScalarType "text"->              )->            , ( "srvversion"->              , ScalarType "text"->              )->            , ( "srvacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            , ( "srvoptions"->              , ArrayType ( ScalarType "text" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_index"->            [ ( "indexrelid"->              , ScalarType "oid"->              )->            , ( "indrelid"->              , ScalarType "oid"->              )->            , ( "indnatts"->              , ScalarType "int2"->              )->            , ( "indisunique"->              , ScalarType "bool"->              )->            , ( "indisprimary"->              , ScalarType "bool"->              )->            , ( "indisclustered"->              , ScalarType "bool"->              )->            , ( "indisvalid"->              , ScalarType "bool"->              )->            , ( "indcheckxmin"->              , ScalarType "bool"->              )->            , ( "indisready"->              , ScalarType "bool"->              )->            , ( "indkey"->              , ScalarType "int2vector"->              )->            , ( "indclass"->              , ScalarType "oidvector"->              )->            , ( "indoption"->              , ScalarType "int2vector"->              )->            , ( "indexprs"->              , ScalarType "text"->              )->            , ( "indpred"->              , ScalarType "text"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_inherits"->            [ ( "inhrelid"->              , ScalarType "oid"->              )->            , ( "inhparent"->              , ScalarType "oid"->              )->            , ( "inhseqno"->              , ScalarType "int4"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_language"->            [ ( "lanname"->              , ScalarType "name"->              )->            , ( "lanowner"->              , ScalarType "oid"->              )->            , ( "lanispl"->              , ScalarType "bool"->              )->            , ( "lanpltrusted"->              , ScalarType "bool"->              )->            , ( "lanplcallfoid"->              , ScalarType "oid"->              )->            , ( "lanvalidator"->              , ScalarType "oid"->              )->            , ( "lanacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_largeobject"->            [ ( "loid"->              , ScalarType "oid"->              )->            , ( "pageno"->              , ScalarType "int4"->              )->            , ( "data"->              , ScalarType "bytea"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_listener"->            [ ( "relname"->              , ScalarType "name"->              )->            , ( "listenerpid"->              , ScalarType "int4"->              )->            , ( "notification"->              , ScalarType "int4"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_namespace"->            [ ( "nspname"->              , ScalarType "name"->              )->            , ( "nspowner"->              , ScalarType "oid"->              )->            , ( "nspacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_opclass"->            [ ( "opcmethod"->              , ScalarType "oid"->              )->            , ( "opcname"->              , ScalarType "name"->              )->            , ( "opcnamespace"->              , ScalarType "oid"->              )->            , ( "opcowner"->              , ScalarType "oid"->              )->            , ( "opcfamily"->              , ScalarType "oid"->              )->            , ( "opcintype"->              , ScalarType "oid"->              )->            , ( "opcdefault"->              , ScalarType "bool"->              )->            , ( "opckeytype"->              , ScalarType "oid"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_operator"->            [ ( "oprname"->              , ScalarType "name"->              )->            , ( "oprnamespace"->              , ScalarType "oid"->              )->            , ( "oprowner"->              , ScalarType "oid"->              )->            , ( "oprkind"->              , ScalarType "char"->              )->            , ( "oprcanmerge"->              , ScalarType "bool"->              )->            , ( "oprcanhash"->              , ScalarType "bool"->              )->            , ( "oprleft"->              , ScalarType "oid"->              )->            , ( "oprright"->              , ScalarType "oid"->              )->            , ( "oprresult"->              , ScalarType "oid"->              )->            , ( "oprcom"->              , ScalarType "oid"->              )->            , ( "oprnegate"->              , ScalarType "oid"->              )->            , ( "oprcode"->              , ScalarType "regproc"->              )->            , ( "oprrest"->              , ScalarType "regproc"->              )->            , ( "oprjoin"->              , ScalarType "regproc"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_opfamily"->            [ ( "opfmethod"->              , ScalarType "oid"->              )->            , ( "opfname"->              , ScalarType "name"->              )->            , ( "opfnamespace"->              , ScalarType "oid"->              )->            , ( "opfowner"->              , ScalarType "oid"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_pltemplate"->            [ ( "tmplname"->              , ScalarType "name"->              )->            , ( "tmpltrusted"->              , ScalarType "bool"->              )->            , ( "tmpldbacreate"->              , ScalarType "bool"->              )->            , ( "tmplhandler"->              , ScalarType "text"->              )->            , ( "tmplvalidator"->              , ScalarType "text"->              )->            , ( "tmpllibrary"->              , ScalarType "text"->              )->            , ( "tmplacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_proc"->            [ ( "proname"->              , ScalarType "name"->              )->            , ( "pronamespace"->              , ScalarType "oid"->              )->            , ( "proowner"->              , ScalarType "oid"->              )->            , ( "prolang"->              , ScalarType "oid"->              )->            , ( "procost"->              , ScalarType "float4"->              )->            , ( "prorows"->              , ScalarType "float4"->              )->            , ( "provariadic"->              , ScalarType "oid"->              )->            , ( "proisagg"->              , ScalarType "bool"->              )->            , ( "proiswindow"->              , ScalarType "bool"->              )->            , ( "prosecdef"->              , ScalarType "bool"->              )->            , ( "proisstrict"->              , ScalarType "bool"->              )->            , ( "proretset"->              , ScalarType "bool"->              )->            , ( "provolatile"->              , ScalarType "char"->              )->            , ( "pronargs"->              , ScalarType "int2"->              )->            , ( "pronargdefaults"->              , ScalarType "int2"->              )->            , ( "prorettype"->              , ScalarType "oid"->              )->            , ( "proargtypes"->              , ScalarType "oidvector"->              )->            , ( "proallargtypes"->              , ArrayType ( ScalarType "oid" )->              )->            , ( "proargmodes"->              , ArrayType ( ScalarType "char" )->              )->            , ( "proargnames"->              , ArrayType ( ScalarType "text" )->              )->            , ( "proargdefaults"->              , ScalarType "text"->              )->            , ( "prosrc"->              , ScalarType "text"->              )->            , ( "probin"->              , ScalarType "bytea"->              )->            , ( "proconfig"->              , ArrayType ( ScalarType "text" )->              )->            , ( "proacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_rewrite"->            [ ( "rulename"->              , ScalarType "name"->              )->            , ( "ev_class"->              , ScalarType "oid"->              )->            , ( "ev_attr"->              , ScalarType "int2"->              )->            , ( "ev_type"->              , ScalarType "char"->              )->            , ( "ev_enabled"->              , ScalarType "char"->              )->            , ( "is_instead"->              , ScalarType "bool"->              )->            , ( "ev_qual"->              , ScalarType "text"->              )->            , ( "ev_action"->              , ScalarType "text"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_shdepend"->            [ ( "dbid"->              , ScalarType "oid"->              )->            , ( "classid"->              , ScalarType "oid"->              )->            , ( "objid"->              , ScalarType "oid"->              )->            , ( "objsubid"->              , ScalarType "int4"->              )->            , ( "refclassid"->              , ScalarType "oid"->              )->            , ( "refobjid"->              , ScalarType "oid"->              )->            , ( "deptype"->              , ScalarType "char"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_shdescription"->            [ ( "objoid"->              , ScalarType "oid"->              )->            , ( "classoid"->              , ScalarType "oid"->              )->            , ( "description"->              , ScalarType "text"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_statistic"->            [ ( "starelid"->              , ScalarType "oid"->              )->            , ( "staattnum"->              , ScalarType "int2"->              )->            , ( "stanullfrac"->              , ScalarType "float4"->              )->            , ( "stawidth"->              , ScalarType "int4"->              )->            , ( "stadistinct"->              , ScalarType "float4"->              )->            , ( "stakind1"->              , ScalarType "int2"->              )->            , ( "stakind2"->              , ScalarType "int2"->              )->            , ( "stakind3"->              , ScalarType "int2"->              )->            , ( "stakind4"->              , ScalarType "int2"->              )->            , ( "staop1"->              , ScalarType "oid"->              )->            , ( "staop2"->              , ScalarType "oid"->              )->            , ( "staop3"->              , ScalarType "oid"->              )->            , ( "staop4"->              , ScalarType "oid"->              )->            , ( "stanumbers1"->              , ArrayType ( ScalarType "float4" )->              )->            , ( "stanumbers2"->              , ArrayType ( ScalarType "float4" )->              )->            , ( "stanumbers3"->              , ArrayType ( ScalarType "float4" )->              )->            , ( "stanumbers4"->              , ArrayType ( ScalarType "float4" )->              )->            , ( "stavalues1"->              , Pseudo AnyArray->              )->            , ( "stavalues2"->              , Pseudo AnyArray->              )->            , ( "stavalues3"->              , Pseudo AnyArray->              )->            , ( "stavalues4"->              , Pseudo AnyArray->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_tablespace"->            [ ( "spcname"->              , ScalarType "name"->              )->            , ( "spcowner"->              , ScalarType "oid"->              )->            , ( "spclocation"->              , ScalarType "text"->              )->            , ( "spcacl"->              , ArrayType ( ScalarType "aclitem" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_trigger"->            [ ( "tgrelid"->              , ScalarType "oid"->              )->            , ( "tgname"->              , ScalarType "name"->              )->            , ( "tgfoid"->              , ScalarType "oid"->              )->            , ( "tgtype"->              , ScalarType "int2"->              )->            , ( "tgenabled"->              , ScalarType "char"->              )->            , ( "tgisconstraint"->              , ScalarType "bool"->              )->            , ( "tgconstrname"->              , ScalarType "name"->              )->            , ( "tgconstrrelid"->              , ScalarType "oid"->              )->            , ( "tgconstraint"->              , ScalarType "oid"->              )->            , ( "tgdeferrable"->              , ScalarType "bool"->              )->            , ( "tginitdeferred"->              , ScalarType "bool"->              )->            , ( "tgnargs"->              , ScalarType "int2"->              )->            , ( "tgattr"->              , ScalarType "int2vector"->              )->            , ( "tgargs"->              , ScalarType "bytea"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_ts_config"->            [ ( "cfgname"->              , ScalarType "name"->              )->            , ( "cfgnamespace"->              , ScalarType "oid"->              )->            , ( "cfgowner"->              , ScalarType "oid"->              )->            , ( "cfgparser"->              , ScalarType "oid"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_ts_config_map"->            [ ( "mapcfg"->              , ScalarType "oid"->              )->            , ( "maptokentype"->              , ScalarType "int4"->              )->            , ( "mapseqno"->              , ScalarType "int4"->              )->            , ( "mapdict"->              , ScalarType "oid"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_ts_dict"->            [ ( "dictname"->              , ScalarType "name"->              )->            , ( "dictnamespace"->              , ScalarType "oid"->              )->            , ( "dictowner"->              , ScalarType "oid"->              )->            , ( "dicttemplate"->              , ScalarType "oid"->              )->            , ( "dictinitoption"->              , ScalarType "text"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_ts_parser"->            [ ( "prsname"->              , ScalarType "name"->              )->            , ( "prsnamespace"->              , ScalarType "oid"->              )->            , ( "prsstart"->              , ScalarType "regproc"->              )->            , ( "prstoken"->              , ScalarType "regproc"->              )->            , ( "prsend"->              , ScalarType "regproc"->              )->            , ( "prsheadline"->              , ScalarType "regproc"->              )->            , ( "prslextype"->              , ScalarType "regproc"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_ts_template"->            [ ( "tmplname"->              , ScalarType "name"->              )->            , ( "tmplnamespace"->              , ScalarType "oid"->              )->            , ( "tmplinit"->              , ScalarType "regproc"->              )->            , ( "tmpllexize"->              , ScalarType "regproc"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_type"->            [ ( "typname"->              , ScalarType "name"->              )->            , ( "typnamespace"->              , ScalarType "oid"->              )->            , ( "typowner"->              , ScalarType "oid"->              )->            , ( "typlen"->              , ScalarType "int2"->              )->            , ( "typbyval"->              , ScalarType "bool"->              )->            , ( "typtype"->              , ScalarType "char"->              )->            , ( "typcategory"->              , ScalarType "char"->              )->            , ( "typispreferred"->              , ScalarType "bool"->              )->            , ( "typisdefined"->              , ScalarType "bool"->              )->            , ( "typdelim"->              , ScalarType "char"->              )->            , ( "typrelid"->              , ScalarType "oid"->              )->            , ( "typelem"->              , ScalarType "oid"->              )->            , ( "typarray"->              , ScalarType "oid"->              )->            , ( "typinput"->              , ScalarType "regproc"->              )->            , ( "typoutput"->              , ScalarType "regproc"->              )->            , ( "typreceive"->              , ScalarType "regproc"->              )->            , ( "typsend"->              , ScalarType "regproc"->              )->            , ( "typmodin"->              , ScalarType "regproc"->              )->            , ( "typmodout"->              , ScalarType "regproc"->              )->            , ( "typanalyze"->              , ScalarType "regproc"->              )->            , ( "typalign"->              , ScalarType "char"->              )->            , ( "typstorage"->              , ScalarType "char"->              )->            , ( "typnotnull"->              , ScalarType "bool"->              )->            , ( "typbasetype"->              , ScalarType "oid"->              )->            , ( "typtypmod"->              , ScalarType "int4"->              )->            , ( "typndims"->              , ScalarType "int4"->              )->            , ( "typdefaultbin"->              , ScalarType "text"->              )->            , ( "typdefault"->              , ScalarType "text"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "pg_user_mapping"->            [ ( "umuser"->              , ScalarType "oid"->              )->            , ( "umserver"->              , ScalarType "oid"->              )->            , ( "umoptions"->              , ArrayType ( ScalarType "text" )->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "oid"->              , ScalarType "oid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "information_schema.sql_features"->            [ ( "feature_id"->              , DomainType "information_schema.character_data"->              )->            , ( "feature_name"->              , DomainType "information_schema.character_data"->              )->            , ( "sub_feature_id"->              , DomainType "information_schema.character_data"->              )->            , ( "sub_feature_name"->              , DomainType "information_schema.character_data"->              )->            , ( "is_supported"->              , DomainType "information_schema.character_data"->              )->            , ( "is_verified_by"->              , DomainType "information_schema.character_data"->              )->            , ( "comments"->              , DomainType "information_schema.character_data"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "information_schema.sql_implementation_info"->            [ ( "implementation_info_id"->              , DomainType "information_schema.character_data"->              )->            , ( "implementation_info_name"->              , DomainType "information_schema.character_data"->              )->            , ( "integer_value"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_value"->              , DomainType "information_schema.character_data"->              )->            , ( "comments"->              , DomainType "information_schema.character_data"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "information_schema.sql_languages"->            [ ( "sql_language_source"->              , DomainType "information_schema.character_data"->              )->            , ( "sql_language_year"->              , DomainType "information_schema.character_data"->              )->            , ( "sql_language_conformance"->              , DomainType "information_schema.character_data"->              )->            , ( "sql_language_integrity"->              , DomainType "information_schema.character_data"->              )->            , ( "sql_language_implementation"->              , DomainType "information_schema.character_data"->              )->            , ( "sql_language_binding_style"->              , DomainType "information_schema.character_data"->              )->            , ( "sql_language_programming_language"->              , DomainType "information_schema.character_data"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "information_schema.sql_packages"->            [ ( "feature_id"->              , DomainType "information_schema.character_data"->              )->            , ( "feature_name"->              , DomainType "information_schema.character_data"->              )->            , ( "is_supported"->              , DomainType "information_schema.character_data"->              )->            , ( "is_verified_by"->              , DomainType "information_schema.character_data"->              )->            , ( "comments"->              , DomainType "information_schema.character_data"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "information_schema.sql_parts"->            [ ( "feature_id"->              , DomainType "information_schema.character_data"->              )->            , ( "feature_name"->              , DomainType "information_schema.character_data"->              )->            , ( "is_supported"->              , DomainType "information_schema.character_data"->              )->            , ( "is_verified_by"->              , DomainType "information_schema.character_data"->              )->            , ( "comments"->              , DomainType "information_schema.character_data"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "information_schema.sql_sizing"->            [ ( "sizing_id"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "sizing_name"->              , DomainType "information_schema.character_data"->              )->            , ( "supported_value"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "comments"->              , DomainType "information_schema.character_data"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateTable->            "information_schema.sql_sizing_profiles"->            [ ( "sizing_id"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "sizing_name"->              , DomainType "information_schema.character_data"->              )->            , ( "profile_id"->              , DomainType "information_schema.character_data"->              )->            , ( "required_value"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "comments"->              , DomainType "information_schema.character_data"->              )->            ]->            [ ( "tableoid"->              , ScalarType "oid"->              )->            , ( "cmax"->              , ScalarType "cid"->              )->            , ( "xmax"->              , ScalarType "xid"->              )->            , ( "cmin"->              , ScalarType "cid"->              )->            , ( "xmin"->              , ScalarType "xid"->              )->            , ( "ctid"->              , ScalarType "tid"->              )->            ]->        , EnvCreateView->            "information_schema._pg_foreign_data_wrappers"->            [ ( "oid"->              , ScalarType "oid"->              )->            , ( "fdwowner"->              , ScalarType "oid"->              )->            , ( "fdwoptions"->              , ArrayType ( ScalarType "text" )->              )->            , ( "foreign_data_wrapper_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_data_wrapper_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "authorization_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_data_wrapper_language"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema._pg_foreign_servers"->            [ ( "oid"->              , ScalarType "oid"->              )->            , ( "srvoptions"->              , ArrayType ( ScalarType "text" )->              )->            , ( "foreign_server_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_data_wrapper_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_data_wrapper_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_type"->              , DomainType "information_schema.character_data"->              )->            , ( "foreign_server_version"->              , DomainType "information_schema.character_data"->              )->            , ( "authorization_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema._pg_user_mappings"->            [ ( "oid"->              , ScalarType "oid"->              )->            , ( "umoptions"->              , ArrayType ( ScalarType "text" )->              )->            , ( "umuser"->              , ScalarType "oid"->              )->            , ( "authorization_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "srvowner"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.administrable_role_authorizations"->            [ ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "role_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.applicable_roles"->            [ ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "role_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.attributes"->            [ ( "udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "attribute_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "ordinal_position"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "attribute_default"->              , DomainType "information_schema.character_data"->              )->            , ( "is_nullable"->              , DomainType "information_schema.character_data"->              )->            , ( "data_type"->              , DomainType "information_schema.character_data"->              )->            , ( "character_maximum_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_octet_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_set_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "numeric_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_precision_radix"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_scale"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "datetime_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "interval_type"->              , DomainType "information_schema.character_data"->              )->            , ( "interval_precision"->              , DomainType "information_schema.character_data"->              )->            , ( "attribute_udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "attribute_udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "attribute_udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "maximum_cardinality"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "dtd_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "is_derived_reference_attribute"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.check_constraint_routine_usage"->            [ ( "constraint_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.check_constraints"->            [ ( "constraint_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "check_clause"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.column_domain_usage"->            [ ( "domain_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "column_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.column_privileges"->            [ ( "grantor"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "column_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "privilege_type"->              , DomainType "information_schema.character_data"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.column_udt_usage"->            [ ( "udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "column_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.columns"->            [ ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "column_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "ordinal_position"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "column_default"->              , DomainType "information_schema.character_data"->              )->            , ( "is_nullable"->              , DomainType "information_schema.character_data"->              )->            , ( "data_type"->              , DomainType "information_schema.character_data"->              )->            , ( "character_maximum_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_octet_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_precision_radix"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_scale"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "datetime_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "interval_type"->              , DomainType "information_schema.character_data"->              )->            , ( "interval_precision"->              , DomainType "information_schema.character_data"->              )->            , ( "character_set_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "maximum_cardinality"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "dtd_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "is_self_referencing"->              , DomainType "information_schema.character_data"->              )->            , ( "is_identity"->              , DomainType "information_schema.character_data"->              )->            , ( "identity_generation"->              , DomainType "information_schema.character_data"->              )->            , ( "identity_start"->              , DomainType "information_schema.character_data"->              )->            , ( "identity_increment"->              , DomainType "information_schema.character_data"->              )->            , ( "identity_maximum"->              , DomainType "information_schema.character_data"->              )->            , ( "identity_minimum"->              , DomainType "information_schema.character_data"->              )->            , ( "identity_cycle"->              , DomainType "information_schema.character_data"->              )->            , ( "is_generated"->              , DomainType "information_schema.character_data"->              )->            , ( "generation_expression"->              , DomainType "information_schema.character_data"->              )->            , ( "is_updatable"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.constraint_column_usage"->            [ ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "column_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.constraint_table_usage"->            [ ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.data_type_privileges"->            [ ( "object_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_type"->              , DomainType "information_schema.character_data"->              )->            , ( "dtd_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.domain_constraints"->            [ ( "constraint_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "is_deferrable"->              , DomainType "information_schema.character_data"->              )->            , ( "initially_deferred"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.domain_udt_usage"->            [ ( "udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.domains"->            [ ( "domain_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "domain_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "data_type"->              , DomainType "information_schema.character_data"->              )->            , ( "character_maximum_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_octet_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_set_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "numeric_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_precision_radix"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_scale"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "datetime_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "interval_type"->              , DomainType "information_schema.character_data"->              )->            , ( "interval_precision"->              , DomainType "information_schema.character_data"->              )->            , ( "domain_default"->              , DomainType "information_schema.character_data"->              )->            , ( "udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "maximum_cardinality"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "dtd_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.element_types"->            [ ( "object_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_type"->              , DomainType "information_schema.character_data"->              )->            , ( "collection_type_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "data_type"->              , DomainType "information_schema.character_data"->              )->            , ( "character_maximum_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_octet_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_set_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "numeric_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_precision_radix"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_scale"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "datetime_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "interval_type"->              , DomainType "information_schema.character_data"->              )->            , ( "interval_precision"->              , DomainType "information_schema.character_data"->              )->            , ( "domain_default"->              , DomainType "information_schema.character_data"->              )->            , ( "udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "maximum_cardinality"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "dtd_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.enabled_roles"->            [ ( "role_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.foreign_data_wrapper_options"->            [ ( "foreign_data_wrapper_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_data_wrapper_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "option_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "option_value"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.foreign_data_wrappers"->            [ ( "foreign_data_wrapper_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_data_wrapper_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "authorization_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "library_name"->              , DomainType "information_schema.character_data"->              )->            , ( "foreign_data_wrapper_language"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.foreign_server_options"->            [ ( "foreign_server_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "option_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "option_value"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.foreign_servers"->            [ ( "foreign_server_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_data_wrapper_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_data_wrapper_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_type"->              , DomainType "information_schema.character_data"->              )->            , ( "foreign_server_version"->              , DomainType "information_schema.character_data"->              )->            , ( "authorization_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.information_schema_catalog_name"->            [ ( "catalog_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.key_column_usage"->            [ ( "constraint_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "column_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "ordinal_position"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "position_in_unique_constraint"->              , DomainType "information_schema.cardinal_number"->              )->            ]->        , EnvCreateView->            "information_schema.parameters"->            [ ( "specific_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "ordinal_position"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "parameter_mode"->              , DomainType "information_schema.character_data"->              )->            , ( "is_result"->              , DomainType "information_schema.character_data"->              )->            , ( "as_locator"->              , DomainType "information_schema.character_data"->              )->            , ( "parameter_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "data_type"->              , DomainType "information_schema.character_data"->              )->            , ( "character_maximum_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_octet_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_set_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "numeric_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_precision_radix"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_scale"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "datetime_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "interval_type"->              , DomainType "information_schema.character_data"->              )->            , ( "interval_precision"->              , DomainType "information_schema.character_data"->              )->            , ( "udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "maximum_cardinality"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "dtd_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "pg_cursors"->            [ ( "name"->              , ScalarType "text"->              )->            , ( "statement"->              , ScalarType "text"->              )->            , ( "is_holdable"->              , ScalarType "bool"->              )->            , ( "is_binary"->              , ScalarType "bool"->              )->            , ( "is_scrollable"->              , ScalarType "bool"->              )->            , ( "creation_time"->              , ScalarType "timestamptz"->              )->            ]->        , EnvCreateView->            "pg_group"->            [ ( "groname"->              , ScalarType "name"->              )->            , ( "grosysid"->              , ScalarType "oid"->              )->            , ( "grolist"->              , ArrayType ( ScalarType "oid" )->              )->            ]->        , EnvCreateView->            "pg_indexes"->            [ ( "schemaname"->              , ScalarType "name"->              )->            , ( "tablename"->              , ScalarType "name"->              )->            , ( "indexname"->              , ScalarType "name"->              )->            , ( "tablespace"->              , ScalarType "name"->              )->            , ( "indexdef"->              , ScalarType "text"->              )->            ]->        , EnvCreateView->            "pg_locks"->            [ ( "locktype"->              , ScalarType "text"->              )->            , ( "database"->              , ScalarType "oid"->              )->            , ( "relation"->              , ScalarType "oid"->              )->            , ( "page"->              , ScalarType "int4"->              )->            , ( "tuple"->              , ScalarType "int2"->              )->            , ( "virtualxid"->              , ScalarType "text"->              )->            , ( "transactionid"->              , ScalarType "xid"->              )->            , ( "classid"->              , ScalarType "oid"->              )->            , ( "objid"->              , ScalarType "oid"->              )->            , ( "objsubid"->              , ScalarType "int2"->              )->            , ( "virtualtransaction"->              , ScalarType "text"->              )->            , ( "pid"->              , ScalarType "int4"->              )->            , ( "mode"->              , ScalarType "text"->              )->            , ( "granted"->              , ScalarType "bool"->              )->            ]->        , EnvCreateView->            "pg_prepared_statements"->            [ ( "name"->              , ScalarType "text"->              )->            , ( "statement"->              , ScalarType "text"->              )->            , ( "prepare_time"->              , ScalarType "timestamptz"->              )->            , ( "parameter_types"->              , ArrayType ( ScalarType "regtype" )->              )->            , ( "from_sql"->              , ScalarType "bool"->              )->            ]->        , EnvCreateView->            "pg_prepared_xacts"->            [ ( "transaction"->              , ScalarType "xid"->              )->            , ( "gid"->              , ScalarType "text"->              )->            , ( "prepared"->              , ScalarType "timestamptz"->              )->            , ( "owner"->              , ScalarType "name"->              )->            , ( "database"->              , ScalarType "name"->              )->            ]->        , EnvCreateView->            "pg_roles"->            [ ( "rolname"->              , ScalarType "name"->              )->            , ( "rolsuper"->              , ScalarType "bool"->              )->            , ( "rolinherit"->              , ScalarType "bool"->              )->            , ( "rolcreaterole"->              , ScalarType "bool"->              )->            , ( "rolcreatedb"->              , ScalarType "bool"->              )->            , ( "rolcatupdate"->              , ScalarType "bool"->              )->            , ( "rolcanlogin"->              , ScalarType "bool"->              )->            , ( "rolconnlimit"->              , ScalarType "int4"->              )->            , ( "rolpassword"->              , ScalarType "text"->              )->            , ( "rolvaliduntil"->              , ScalarType "timestamptz"->              )->            , ( "rolconfig"->              , ArrayType ( ScalarType "text" )->              )->            , ( "oid"->              , ScalarType "oid"->              )->            ]->        , EnvCreateView->            "pg_rules"->            [ ( "schemaname"->              , ScalarType "name"->              )->            , ( "tablename"->              , ScalarType "name"->              )->            , ( "rulename"->              , ScalarType "name"->              )->            , ( "definition"->              , ScalarType "text"->              )->            ]->        , EnvCreateView->            "pg_settings"->            [ ( "name"->              , ScalarType "text"->              )->            , ( "setting"->              , ScalarType "text"->              )->            , ( "unit"->              , ScalarType "text"->              )->            , ( "category"->              , ScalarType "text"->              )->            , ( "short_desc"->              , ScalarType "text"->              )->            , ( "extra_desc"->              , ScalarType "text"->              )->            , ( "context"->              , ScalarType "text"->              )->            , ( "vartype"->              , ScalarType "text"->              )->            , ( "source"->              , ScalarType "text"->              )->            , ( "min_val"->              , ScalarType "text"->              )->            , ( "max_val"->              , ScalarType "text"->              )->            , ( "enumvals"->              , ArrayType ( ScalarType "text" )->              )->            , ( "boot_val"->              , ScalarType "text"->              )->            , ( "reset_val"->              , ScalarType "text"->              )->            , ( "sourcefile"->              , ScalarType "text"->              )->            , ( "sourceline"->              , ScalarType "int4"->              )->            ]->        , EnvCreateView->            "pg_shadow"->            [ ( "usename"->              , ScalarType "name"->              )->            , ( "usesysid"->              , ScalarType "oid"->              )->            , ( "usecreatedb"->              , ScalarType "bool"->              )->            , ( "usesuper"->              , ScalarType "bool"->              )->            , ( "usecatupd"->              , ScalarType "bool"->              )->            , ( "passwd"->              , ScalarType "text"->              )->            , ( "valuntil"->              , ScalarType "abstime"->              )->            , ( "useconfig"->              , ArrayType ( ScalarType "text" )->              )->            ]->        , EnvCreateView->            "pg_stat_activity"->            [ ( "datid"->              , ScalarType "oid"->              )->            , ( "datname"->              , ScalarType "name"->              )->            , ( "procpid"->              , ScalarType "int4"->              )->            , ( "usesysid"->              , ScalarType "oid"->              )->            , ( "usename"->              , ScalarType "name"->              )->            , ( "current_query"->              , ScalarType "text"->              )->            , ( "waiting"->              , ScalarType "bool"->              )->            , ( "xact_start"->              , ScalarType "timestamptz"->              )->            , ( "query_start"->              , ScalarType "timestamptz"->              )->            , ( "backend_start"->              , ScalarType "timestamptz"->              )->            , ( "client_addr"->              , ScalarType "inet"->              )->            , ( "client_port"->              , ScalarType "int4"->              )->            ]->        , EnvCreateView->            "pg_stat_all_indexes"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "indexrelid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "indexrelname"->              , ScalarType "name"->              )->            , ( "idx_scan"->              , ScalarType "int8"->              )->            , ( "idx_tup_read"->              , ScalarType "int8"->              )->            , ( "idx_tup_fetch"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_stat_all_tables"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "seq_scan"->              , ScalarType "int8"->              )->            , ( "seq_tup_read"->              , ScalarType "int8"->              )->            , ( "idx_scan"->              , ScalarType "int8"->              )->            , ( "idx_tup_fetch"->              , ScalarType "int8"->              )->            , ( "n_tup_ins"->              , ScalarType "int8"->              )->            , ( "n_tup_upd"->              , ScalarType "int8"->              )->            , ( "n_tup_del"->              , ScalarType "int8"->              )->            , ( "n_tup_hot_upd"->              , ScalarType "int8"->              )->            , ( "n_live_tup"->              , ScalarType "int8"->              )->            , ( "n_dead_tup"->              , ScalarType "int8"->              )->            , ( "last_vacuum"->              , ScalarType "timestamptz"->              )->            , ( "last_autovacuum"->              , ScalarType "timestamptz"->              )->            , ( "last_analyze"->              , ScalarType "timestamptz"->              )->            , ( "last_autoanalyze"->              , ScalarType "timestamptz"->              )->            ]->        , EnvCreateView->            "pg_stat_bgwriter"->            [ ( "checkpoints_timed"->              , ScalarType "int8"->              )->            , ( "checkpoints_req"->              , ScalarType "int8"->              )->            , ( "buffers_checkpoint"->              , ScalarType "int8"->              )->            , ( "buffers_clean"->              , ScalarType "int8"->              )->            , ( "maxwritten_clean"->              , ScalarType "int8"->              )->            , ( "buffers_backend"->              , ScalarType "int8"->              )->            , ( "buffers_alloc"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_stat_database"->            [ ( "datid"->              , ScalarType "oid"->              )->            , ( "datname"->              , ScalarType "name"->              )->            , ( "numbackends"->              , ScalarType "int4"->              )->            , ( "xact_commit"->              , ScalarType "int8"->              )->            , ( "xact_rollback"->              , ScalarType "int8"->              )->            , ( "blks_read"->              , ScalarType "int8"->              )->            , ( "blks_hit"->              , ScalarType "int8"->              )->            , ( "tup_returned"->              , ScalarType "int8"->              )->            , ( "tup_fetched"->              , ScalarType "int8"->              )->            , ( "tup_inserted"->              , ScalarType "int8"->              )->            , ( "tup_updated"->              , ScalarType "int8"->              )->            , ( "tup_deleted"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_stat_sys_indexes"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "indexrelid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "indexrelname"->              , ScalarType "name"->              )->            , ( "idx_scan"->              , ScalarType "int8"->              )->            , ( "idx_tup_read"->              , ScalarType "int8"->              )->            , ( "idx_tup_fetch"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_stat_sys_tables"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "seq_scan"->              , ScalarType "int8"->              )->            , ( "seq_tup_read"->              , ScalarType "int8"->              )->            , ( "idx_scan"->              , ScalarType "int8"->              )->            , ( "idx_tup_fetch"->              , ScalarType "int8"->              )->            , ( "n_tup_ins"->              , ScalarType "int8"->              )->            , ( "n_tup_upd"->              , ScalarType "int8"->              )->            , ( "n_tup_del"->              , ScalarType "int8"->              )->            , ( "n_tup_hot_upd"->              , ScalarType "int8"->              )->            , ( "n_live_tup"->              , ScalarType "int8"->              )->            , ( "n_dead_tup"->              , ScalarType "int8"->              )->            , ( "last_vacuum"->              , ScalarType "timestamptz"->              )->            , ( "last_autovacuum"->              , ScalarType "timestamptz"->              )->            , ( "last_analyze"->              , ScalarType "timestamptz"->              )->            , ( "last_autoanalyze"->              , ScalarType "timestamptz"->              )->            ]->        , EnvCreateView->            "pg_stat_user_functions"->            [ ( "funcid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "funcname"->              , ScalarType "name"->              )->            , ( "calls"->              , ScalarType "int8"->              )->            , ( "total_time"->              , ScalarType "int8"->              )->            , ( "self_time"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_stat_user_indexes"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "indexrelid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "indexrelname"->              , ScalarType "name"->              )->            , ( "idx_scan"->              , ScalarType "int8"->              )->            , ( "idx_tup_read"->              , ScalarType "int8"->              )->            , ( "idx_tup_fetch"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_stat_user_tables"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "seq_scan"->              , ScalarType "int8"->              )->            , ( "seq_tup_read"->              , ScalarType "int8"->              )->            , ( "idx_scan"->              , ScalarType "int8"->              )->            , ( "idx_tup_fetch"->              , ScalarType "int8"->              )->            , ( "n_tup_ins"->              , ScalarType "int8"->              )->            , ( "n_tup_upd"->              , ScalarType "int8"->              )->            , ( "n_tup_del"->              , ScalarType "int8"->              )->            , ( "n_tup_hot_upd"->              , ScalarType "int8"->              )->            , ( "n_live_tup"->              , ScalarType "int8"->              )->            , ( "n_dead_tup"->              , ScalarType "int8"->              )->            , ( "last_vacuum"->              , ScalarType "timestamptz"->              )->            , ( "last_autovacuum"->              , ScalarType "timestamptz"->              )->            , ( "last_analyze"->              , ScalarType "timestamptz"->              )->            , ( "last_autoanalyze"->              , ScalarType "timestamptz"->              )->            ]->        , EnvCreateView->            "pg_statio_all_indexes"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "indexrelid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "indexrelname"->              , ScalarType "name"->              )->            , ( "idx_blks_read"->              , ScalarType "int8"->              )->            , ( "idx_blks_hit"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_statio_all_sequences"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "blks_read"->              , ScalarType "int8"->              )->            , ( "blks_hit"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_statio_all_tables"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "heap_blks_read"->              , ScalarType "int8"->              )->            , ( "heap_blks_hit"->              , ScalarType "int8"->              )->            , ( "idx_blks_read"->              , ScalarType "int8"->              )->            , ( "idx_blks_hit"->              , ScalarType "int8"->              )->            , ( "toast_blks_read"->              , ScalarType "int8"->              )->            , ( "toast_blks_hit"->              , ScalarType "int8"->              )->            , ( "tidx_blks_read"->              , ScalarType "int8"->              )->            , ( "tidx_blks_hit"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_statio_sys_indexes"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "indexrelid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "indexrelname"->              , ScalarType "name"->              )->            , ( "idx_blks_read"->              , ScalarType "int8"->              )->            , ( "idx_blks_hit"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_statio_sys_sequences"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "blks_read"->              , ScalarType "int8"->              )->            , ( "blks_hit"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_statio_sys_tables"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "heap_blks_read"->              , ScalarType "int8"->              )->            , ( "heap_blks_hit"->              , ScalarType "int8"->              )->            , ( "idx_blks_read"->              , ScalarType "int8"->              )->            , ( "idx_blks_hit"->              , ScalarType "int8"->              )->            , ( "toast_blks_read"->              , ScalarType "int8"->              )->            , ( "toast_blks_hit"->              , ScalarType "int8"->              )->            , ( "tidx_blks_read"->              , ScalarType "int8"->              )->            , ( "tidx_blks_hit"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_statio_user_indexes"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "indexrelid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "indexrelname"->              , ScalarType "name"->              )->            , ( "idx_blks_read"->              , ScalarType "int8"->              )->            , ( "idx_blks_hit"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_statio_user_sequences"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "blks_read"->              , ScalarType "int8"->              )->            , ( "blks_hit"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_statio_user_tables"->            [ ( "relid"->              , ScalarType "oid"->              )->            , ( "schemaname"->              , ScalarType "name"->              )->            , ( "relname"->              , ScalarType "name"->              )->            , ( "heap_blks_read"->              , ScalarType "int8"->              )->            , ( "heap_blks_hit"->              , ScalarType "int8"->              )->            , ( "idx_blks_read"->              , ScalarType "int8"->              )->            , ( "idx_blks_hit"->              , ScalarType "int8"->              )->            , ( "toast_blks_read"->              , ScalarType "int8"->              )->            , ( "toast_blks_hit"->              , ScalarType "int8"->              )->            , ( "tidx_blks_read"->              , ScalarType "int8"->              )->            , ( "tidx_blks_hit"->              , ScalarType "int8"->              )->            ]->        , EnvCreateView->            "pg_stats"->            [ ( "schemaname"->              , ScalarType "name"->              )->            , ( "tablename"->              , ScalarType "name"->              )->            , ( "attname"->              , ScalarType "name"->              )->            , ( "null_frac"->              , ScalarType "float4"->              )->            , ( "avg_width"->              , ScalarType "int4"->              )->            , ( "n_distinct"->              , ScalarType "float4"->              )->            , ( "most_common_vals"->              , Pseudo AnyArray->              )->            , ( "most_common_freqs"->              , ArrayType ( ScalarType "float4" )->              )->            , ( "histogram_bounds"->              , Pseudo AnyArray->              )->            , ( "correlation"->              , ScalarType "float4"->              )->            ]->        , EnvCreateView->            "pg_tables"->            [ ( "schemaname"->              , ScalarType "name"->              )->            , ( "tablename"->              , ScalarType "name"->              )->            , ( "tableowner"->              , ScalarType "name"->              )->            , ( "tablespace"->              , ScalarType "name"->              )->            , ( "hasindexes"->              , ScalarType "bool"->              )->            , ( "hasrules"->              , ScalarType "bool"->              )->            , ( "hastriggers"->              , ScalarType "bool"->              )->            ]->        , EnvCreateView->            "pg_timezone_abbrevs"->            [ ( "abbrev"->              , ScalarType "text"->              )->            , ( "utc_offset"->              , ScalarType "interval"->              )->            , ( "is_dst"->              , ScalarType "bool"->              )->            ]->        , EnvCreateView->            "pg_timezone_names"->            [ ( "name"->              , ScalarType "text"->              )->            , ( "abbrev"->              , ScalarType "text"->              )->            , ( "utc_offset"->              , ScalarType "interval"->              )->            , ( "is_dst"->              , ScalarType "bool"->              )->            ]->        , EnvCreateView->            "pg_user"->            [ ( "usename"->              , ScalarType "name"->              )->            , ( "usesysid"->              , ScalarType "oid"->              )->            , ( "usecreatedb"->              , ScalarType "bool"->              )->            , ( "usesuper"->              , ScalarType "bool"->              )->            , ( "usecatupd"->              , ScalarType "bool"->              )->            , ( "passwd"->              , ScalarType "text"->              )->            , ( "valuntil"->              , ScalarType "abstime"->              )->            , ( "useconfig"->              , ArrayType ( ScalarType "text" )->              )->            ]->        , EnvCreateView->            "pg_user_mappings"->            [ ( "umid"->              , ScalarType "oid"->              )->            , ( "srvid"->              , ScalarType "oid"->              )->            , ( "srvname"->              , ScalarType "name"->              )->            , ( "umuser"->              , ScalarType "oid"->              )->            , ( "usename"->              , ScalarType "name"->              )->            , ( "umoptions"->              , ArrayType ( ScalarType "text" )->              )->            ]->        , EnvCreateView->            "pg_views"->            [ ( "schemaname"->              , ScalarType "name"->              )->            , ( "viewname"->              , ScalarType "name"->              )->            , ( "viewowner"->              , ScalarType "name"->              )->            , ( "definition"->              , ScalarType "text"->              )->            ]->        , EnvCreateView->            "information_schema.referential_constraints"->            [ ( "constraint_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "unique_constraint_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "unique_constraint_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "unique_constraint_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "match_option"->              , DomainType "information_schema.character_data"->              )->            , ( "update_rule"->              , DomainType "information_schema.character_data"->              )->            , ( "delete_rule"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.role_column_grants"->            [ ( "grantor"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "column_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "privilege_type"->              , DomainType "information_schema.character_data"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.role_routine_grants"->            [ ( "grantor"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "privilege_type"->              , DomainType "information_schema.character_data"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.role_table_grants"->            [ ( "grantor"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "privilege_type"->              , DomainType "information_schema.character_data"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            , ( "with_hierarchy"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.role_usage_grants"->            [ ( "grantor"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_type"->              , DomainType "information_schema.character_data"->              )->            , ( "privilege_type"->              , DomainType "information_schema.character_data"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.routine_privileges"->            [ ( "grantor"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "privilege_type"->              , DomainType "information_schema.character_data"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.routines"->            [ ( "specific_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_type"->              , DomainType "information_schema.character_data"->              )->            , ( "module_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "module_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "module_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "data_type"->              , DomainType "information_schema.character_data"->              )->            , ( "character_maximum_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_octet_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "character_set_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "character_set_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "collation_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "numeric_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_precision_radix"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_scale"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "datetime_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "interval_type"->              , DomainType "information_schema.character_data"->              )->            , ( "interval_precision"->              , DomainType "information_schema.character_data"->              )->            , ( "type_udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "type_udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "type_udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "scope_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "maximum_cardinality"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "dtd_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "routine_body"->              , DomainType "information_schema.character_data"->              )->            , ( "routine_definition"->              , DomainType "information_schema.character_data"->              )->            , ( "external_name"->              , DomainType "information_schema.character_data"->              )->            , ( "external_language"->              , DomainType "information_schema.character_data"->              )->            , ( "parameter_style"->              , DomainType "information_schema.character_data"->              )->            , ( "is_deterministic"->              , DomainType "information_schema.character_data"->              )->            , ( "sql_data_access"->              , DomainType "information_schema.character_data"->              )->            , ( "is_null_call"->              , DomainType "information_schema.character_data"->              )->            , ( "sql_path"->              , DomainType "information_schema.character_data"->              )->            , ( "schema_level_routine"->              , DomainType "information_schema.character_data"->              )->            , ( "max_dynamic_result_sets"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "is_user_defined_cast"->              , DomainType "information_schema.character_data"->              )->            , ( "is_implicitly_invocable"->              , DomainType "information_schema.character_data"->              )->            , ( "security_type"->              , DomainType "information_schema.character_data"->              )->            , ( "to_sql_specific_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "to_sql_specific_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "to_sql_specific_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "as_locator"->              , DomainType "information_schema.character_data"->              )->            , ( "created"->              , DomainType "information_schema.time_stamp"->              )->            , ( "last_altered"->              , DomainType "information_schema.time_stamp"->              )->            , ( "new_savepoint_level"->              , DomainType "information_schema.character_data"->              )->            , ( "is_udt_dependent"->              , DomainType "information_schema.character_data"->              )->            , ( "result_cast_from_data_type"->              , DomainType "information_schema.character_data"->              )->            , ( "result_cast_as_locator"->              , DomainType "information_schema.character_data"->              )->            , ( "result_cast_char_max_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "result_cast_char_octet_length"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "result_cast_char_set_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_char_set_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_character_set_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_collation_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_collation_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_collation_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_numeric_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "result_cast_numeric_precision_radix"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "result_cast_numeric_scale"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "result_cast_datetime_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "result_cast_interval_type"->              , DomainType "information_schema.character_data"->              )->            , ( "result_cast_interval_precision"->              , DomainType "information_schema.character_data"->              )->            , ( "result_cast_type_udt_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_type_udt_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_type_udt_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_scope_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_scope_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_scope_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "result_cast_maximum_cardinality"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "result_cast_dtd_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.schemata"->            [ ( "catalog_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "schema_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "schema_owner"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "default_character_set_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "default_character_set_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "default_character_set_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "sql_path"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.sequences"->            [ ( "sequence_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "sequence_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "sequence_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "data_type"->              , DomainType "information_schema.character_data"->              )->            , ( "numeric_precision"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_precision_radix"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "numeric_scale"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "maximum_value"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "minimum_value"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "increment"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "cycle_option"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.table_constraints"->            [ ( "constraint_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "constraint_type"->              , DomainType "information_schema.character_data"->              )->            , ( "is_deferrable"->              , DomainType "information_schema.character_data"->              )->            , ( "initially_deferred"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.table_privileges"->            [ ( "grantor"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "privilege_type"->              , DomainType "information_schema.character_data"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            , ( "with_hierarchy"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.tables"->            [ ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_type"->              , DomainType "information_schema.character_data"->              )->            , ( "self_referencing_column_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "reference_generation"->              , DomainType "information_schema.character_data"->              )->            , ( "user_defined_type_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "user_defined_type_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "user_defined_type_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "is_insertable_into"->              , DomainType "information_schema.character_data"->              )->            , ( "is_typed"->              , DomainType "information_schema.character_data"->              )->            , ( "commit_action"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.triggered_update_columns"->            [ ( "trigger_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "trigger_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "trigger_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "event_object_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "event_object_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "event_object_table"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "event_object_column"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.triggers"->            [ ( "trigger_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "trigger_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "trigger_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "event_manipulation"->              , DomainType "information_schema.character_data"->              )->            , ( "event_object_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "event_object_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "event_object_table"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "action_order"->              , DomainType "information_schema.cardinal_number"->              )->            , ( "action_condition"->              , DomainType "information_schema.character_data"->              )->            , ( "action_statement"->              , DomainType "information_schema.character_data"->              )->            , ( "action_orientation"->              , DomainType "information_schema.character_data"->              )->            , ( "condition_timing"->              , DomainType "information_schema.character_data"->              )->            , ( "condition_reference_old_table"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "condition_reference_new_table"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "condition_reference_old_row"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "condition_reference_new_row"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "created"->              , DomainType "information_schema.time_stamp"->              )->            ]->        , EnvCreateView->            "information_schema.usage_privileges"->            [ ( "grantor"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "grantee"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "object_type"->              , DomainType "information_schema.character_data"->              )->            , ( "privilege_type"->              , DomainType "information_schema.character_data"->              )->            , ( "is_grantable"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.user_mapping_options"->            [ ( "authorization_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "option_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "option_value"->              , DomainType "information_schema.character_data"->              )->            ]->        , EnvCreateView->            "information_schema.user_mappings"->            [ ( "authorization_identifier"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "foreign_server_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.view_column_usage"->            [ ( "view_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "view_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "view_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "column_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.view_routine_usage"->            [ ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "specific_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.view_table_usage"->            [ ( "view_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "view_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "view_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            ]->        , EnvCreateView->            "information_schema.views"->            [ ( "table_catalog"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_schema"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "table_name"->              , DomainType "information_schema.sql_identifier"->              )->            , ( "view_definition"->              , DomainType "information_schema.character_data"->              )->            , ( "check_option"->              , DomainType "information_schema.character_data"->              )->            , ( "is_updatable"->              , DomainType "information_schema.character_data"->              )->            , ( "is_insertable_into"->              , DomainType "information_schema.character_data"->              )->            ]->        ]-
− Database/HsSqlPpp/AstInternals/Environment/EnvironmentInternal.lhs
@@ -1,465 +0,0 @@-Copyright 2009 Jake Wheat--This module contains the implementation of the Environment data types-and functions, and provides the api for the other type checking-modules.--> {-# LANGUAGE DeriveDataTypeable #-}-> {-# OPTIONS_HADDOCK hide  #-}--> module Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal->     (->      Environment->     ,CastContext(..)->     ,CompositeFlavour(..)->     ,relationComposites->     ,CompositeDef->     ,FunctionPrototype->     ,DomainDefinition->     ,FunFlav(..)->     ,emptyEnvironment->     ,defaultEnvironment->     ,EnvironmentUpdate(..)->     ,ppEnvUpdate->     ,updateEnvironment->     ,deconstructEnvironment->     -- type checker stuff->     ,envCompositeDef->     ,envCompositeAttrsPair->     ,envCompositeAttrs->     ,envCompositePublicAttrs->     ,envTypeCategory->     ,envPreferredType->     ,envCast->     ,envDomainBaseType->     ,envLookupFns->     ,envTypeExists->     ,envLookupType->     ,OperatorType(..)->     ,getOperatorType->     ,isOperatorName->     ) where--> import Control.Monad-> import Data.List-> import Data.Generics-> -- import Debug.Trace-> import Data.Char--> import Database.HsSqlPpp.AstInternals.TypeType-> import Database.HsSqlPpp.Utils--> -- | The main datatype, this holds the catalog and context-> -- information to type check against.-> data Environment = Environment->                    {envTypeNames :: [(String, Type)]->                    ,envDomainDefs :: [DomainDefinition]->                    ,envCasts :: [(Type,Type,CastContext)]->                    ,envTypeCategories :: [(Type,String,Bool)]->                    ,envPrefixOperators :: [FunctionPrototype]->                    ,envPostfixOperators :: [FunctionPrototype]->                    ,envBinaryOperators :: [FunctionPrototype]->                    ,envFunctions :: [FunctionPrototype]->                    ,envAggregates :: [FunctionPrototype]->                    ,envWindowFunctions :: [FunctionPrototype]->                    ,envAttrDefs :: [CompositeDef]->                    ,envUpdates :: [EnvironmentUpdate]}->                    deriving Show--> -- | Represents an empty environment. This doesn't contain things-> -- like the \'and\' operator, and so if you try to use it it will-> -- almost certainly not work.-> emptyEnvironment :: Environment-> emptyEnvironment = Environment [] [] [] [] [] [] [] [] [] [] [] []--> -- | Represents what you probably want to use as a starting point if-> -- you are building an environment from scratch. It contains-> -- information on built in function like things that aren't in the-> -- PostgreSQL catalog, such as greatest, coalesce, keyword operators-> -- like \'and\', etc..-> defaultEnvironment :: Environment-> defaultEnvironment = emptyEnvironment {->                       envTypeNames = pseudoTypes->                      ,envBinaryOperators = ("=",[Pseudo AnyElement->                                                 ,Pseudo AnyElement],->                                             typeBool, False):keywordOperatorTypes->                      ,envFunctions = specialFunctionTypes}---> -- | Use to note what the flavour of a cast is, i.e. if/when it can-> -- be used implicitly.-> data CastContext = ImplicitCastContext->                  | AssignmentCastContext->                  | ExplicitCastContext->                    deriving (Eq,Show,Ord,Typeable,Data)--> -- | Used to distinguish between standalone composite types, and-> -- automatically generated ones, generated from a table or view-> -- respectively.-> data CompositeFlavour = Composite | TableComposite | ViewComposite->                         deriving (Eq,Ord,Show)--> relationComposites :: [CompositeFlavour]-> relationComposites = [TableComposite,ViewComposite]---> -- | Provides the definition of a composite type. The components are-> -- composite (or table or view) name, the flavour of the composite,-> -- the types of the composite attributes, and the types of the-> -- system columns iff the composite represents a table type (the-> -- third and fourth components are always 'CompositeType's).-> type CompositeDef = (String, CompositeFlavour, Type, Type)--> -- | The components are: function (or operator) name, argument-> -- types, return type and is variadic.-> type FunctionPrototype = (String, [Type], Type, Bool)--> -- | The components are domain type, base type (todo: add check-> -- constraint).-> type DomainDefinition = (Type,Type)--> data EnvironmentUpdate =->     -- | add a new scalar type with the name given, also creates->     -- an array type automatically->     EnvCreateScalar Type String Bool->   | EnvCreateDomain Type Type->   | EnvCreateComposite String [(String,Type)]->   | EnvCreateCast Type Type CastContext->   | EnvCreateTable String [(String,Type)] [(String,Type)]->   | EnvCreateView String [(String,Type)]->   | EnvCreateFunction FunFlav String [Type] Type Bool->   | EnvDropFunction Bool String [Type]->     deriving (Eq,Ord,Typeable,Data,Show)--> ppEnvUpdate :: EnvironmentUpdate -> String-> ppEnvUpdate (EnvCreateScalar t c p) = "EnvCreateScalar " ++ show t ++ "(" ++ c ++ "," ++ show p ++ ")"-> ppEnvUpdate (EnvCreateDomain t b) = "EnvCreateDomain " ++ show t ++ " as " ++ show b-> ppEnvUpdate (EnvCreateComposite nm flds) = "EnvCreateComposite " ++ nm ++ showFlds flds-> ppEnvUpdate (EnvCreateCast s t ctx) = "EnvCreateCast " ++ show s ++ "->" ++ show t ++ " " ++ show ctx-> ppEnvUpdate (EnvCreateTable nm flds1 flds2) = "EnvCreateTable " ++ nm ++ showFlds flds1 ++ showFlds flds2-> ppEnvUpdate (EnvCreateView nm flds) = "EnvCreateView " ++ nm ++ showFlds flds-> ppEnvUpdate (EnvCreateFunction flav nm args ret vdc) =->     "EnvCreateFunction " ++ show flav ++ " " ++ nm ++ " returns " ++ show ret ++->     "(" ++ intercalate "," (map show args) ++ ")" ++ if vdc then " variadic" else ""-> ppEnvUpdate (EnvDropFunction _ nm args) = "EnvDropFunction " ++ nm ++ "(" ++ show args ++ ")"--> showFlds :: [(String,Type)] -> String-> showFlds flds = "(\n" ++ sfs flds ++ ")"->                 where->                   sfs ((nm,t):fs) = "    " ++ show nm ++ " " ++ show t ++ "\n" ++ sfs fs->                   sfs [] = ""--> data FunFlav = FunPrefix | FunPostfix | FunBinary->              | FunName | FunAgg | FunWindow->                deriving (Eq,Show,Ord,Typeable,Data)--> -- | Applies a list of 'EnvironmentUpdate's to an 'Environment' value-> -- to produce a new Environment value.-> updateEnvironment :: Environment->                   -> [EnvironmentUpdate]->                   -> Either [TypeError] Environment-> updateEnvironment env' eus =->   foldM updateEnv' (env' {envUpdates = envUpdates env' ++ eus}) eus->   where->     updateEnv' env eu =->       case eu of->         EnvCreateScalar ty cat pref -> do->                 errorWhen (not allowed)->                   [BadEnvironmentUpdate $ "can only add scalar types\->                                           \this way, got " ++ show ty]->                 let ScalarType nm = ty->                 return $ addTypeWithArray env nm ty cat pref->                 where->                   allowed = case ty of->                                     ScalarType _ -> True->                                     _ -> False->         EnvCreateDomain ty baseTy -> do->                 errorWhen (not allowed)->                   [BadEnvironmentUpdate $ "can only add domain types\->                                           \this way, got " ++ show ty]->                 errorWhen (not baseAllowed)->                   [BadEnvironmentUpdate $ "can only add domain types\->                                           \based on scalars, got "->                                           ++ show baseTy]->                 let DomainType nm = ty->                 let cat = envTypeCategory env baseTy->                 return (addTypeWithArray env nm ty cat False) {->                                        envDomainDefs =->                                          (ty,baseTy):envDomainDefs env->                                        ,envCasts =->                                          (ty,baseTy,ImplicitCastContext):envCasts env}->                 where->                   allowed = case ty of->                                             DomainType _ -> True->                                             _ -> False->                   baseAllowed = case baseTy of->                                                     ScalarType _ -> True->                                                     _ -> False-->         EnvCreateComposite nm flds ->->                 return $ (addTypeWithArray env nm (NamedCompositeType nm) "C" False) {->                             envAttrDefs =->                               (nm,Composite,CompositeType flds, CompositeType [])->                               : envAttrDefs env}->         EnvCreateCast src tgt ctx -> return $ env {envCasts = (src,tgt,ctx):envCasts env}->         EnvCreateTable nm attrs sysAttrs -> do->                 checkTypeDoesntExist env nm (NamedCompositeType nm)->                 return $ (addTypeWithArray env nm->                             (NamedCompositeType nm) "C" False) {->                             envAttrDefs =->                               (nm,TableComposite,CompositeType attrs, CompositeType sysAttrs)->                               : envAttrDefs env}->         EnvCreateView nm attrs -> {-trace ("create view:" ++ show nm) $-} do->                 checkTypeDoesntExist env nm (NamedCompositeType nm)->                 return $ (addTypeWithArray env nm->                             (NamedCompositeType nm) "C" False) {->                             envAttrDefs =->                               (nm,ViewComposite,CompositeType attrs, CompositeType [])->                               : envAttrDefs env}->         EnvCreateFunction f nm args ret vdc ->->             return $ case f of->               FunPrefix -> env {envPrefixOperators=(nm,args,ret,vdc):envPrefixOperators env}->               FunPostfix -> env {envPostfixOperators=(nm,args,ret,vdc):envPostfixOperators env}->               FunBinary -> env {envBinaryOperators=(nm,args,ret,vdc):envBinaryOperators env}->               FunAgg -> env {envAggregates=(nm,args,ret,vdc):envAggregates env}->               FunWindow -> env {envWindowFunctions=(nm,args,ret,vdc):envWindowFunctions env}->               FunName -> env {envFunctions=(nm,args,ret,vdc):envFunctions env}->         EnvDropFunction ifexists nm args -> do->             let matches =  filter matchingFn (envFunctions env)->             errorWhen (null matches) [BadEnvironmentUpdate $->                                         "couldn't find function to drop " ++->                                         show nm ++ "(" ++ show args++")"]->             errorWhen (length matches > 1) [BadEnvironmentUpdate $->                                               "multiple matching functions to drop " ++->                                               show nm ++ "(" ++ show args++")"]->             return env {envFunctions = filter (not . matchingFn) (envFunctions env)->                        ,envUpdates = filter (not.matchingUpdate) (envUpdates env)}->             where->               matchingFn (nm1,a1,_,_) = map toLower nm == map toLower nm1 && args == a1->               matchingUpdate (EnvDropFunction _ nm2 a2) | map toLower nm2 == map toLower nm->                                                           && a2 == args = True->               matchingUpdate (EnvCreateFunction _ nm2 a2 _ _) | map toLower nm2 == map toLower nm->                                                           && a2 == args = True->               matchingUpdate _ = False--todo:-look for matching function in list, if not found then error-remove from list, and remove from update list--->     addTypeWithArray env nm ty cat pref =->       env {envTypeNames =->                ('_':nm,ArrayType ty)->                : (nm,ty)->                : envTypeNames env->           ,envTypeCategories =->                (ArrayType ty,"A",False)->                : (ty,cat,pref)->                : envTypeCategories env}->     checkTypeDoesntExist env nm ty = do->         errorWhen (any (==nm) $ map fst $ envTypeNames env)->             [TypeAlreadyExists ty]->         errorWhen (any (==ty) $ map snd $ envTypeNames env)->             [TypeAlreadyExists ty]->         return ()---> {-->  | Takes part an 'Environment' value to produce a list of 'EnvironmentUpdate's.->  You can use this to look inside the Environment data type e.g. if you want to->  examine a catalog. It should be the case that:->  @->   updateEnvironment emptyEnvironment (deconstructEnvironment env) = env->  @ -}-> deconstructEnvironment :: Environment -> [EnvironmentUpdate]-> deconstructEnvironment = envUpdates---================================================================================--= type checking stuff--> envCompositeDef :: Environment -> [CompositeFlavour] -> String -> Either [TypeError] (CompositeDef)-> envCompositeDef env flvs nm = do->   let c = filter (\(n,t,_,_) -> n == nm && (null flvs || t `elem` flvs)) $ envAttrDefs env->   errorWhen (null c)->             [UnrecognisedRelation nm]->   case c of->     (_,fl1,r,s):[] -> return (nm,fl1,r,s)->     _ -> error $ "problem getting attributes for: " ++ show nm ++ ", " ++ show c--> envCompositeAttrsPair :: Environment -> [CompositeFlavour] -> String->                       -> Either [TypeError] ([(String,Type)],[(String,Type)])-> envCompositeAttrsPair env flvs ty = do->    (_,_,CompositeType a,CompositeType b) <- envCompositeDef env flvs ty->    return (a,b)--> envCompositeAttrs :: Environment -> [CompositeFlavour] -> String->                   -> Either [TypeError] [(String,Type)]-> envCompositeAttrs env flvs ty = do->   (a,b) <- envCompositeAttrsPair env flvs ty->   return $ a ++ b--> envCompositePublicAttrs :: Environment -> [CompositeFlavour] -> String->                   -> Either [TypeError] [(String,Type)]-> envCompositePublicAttrs env flvs ty = do->   (a,_) <- envCompositeAttrsPair env flvs ty->   return a---> envTypeCategory :: Environment -> Type -> String-> envTypeCategory env ty =->   let (c,_) = envGetCategoryInfo env ty->   in c--> envPreferredType :: Environment -> Type -> Bool-> envPreferredType env ty =->   let (_,p) = envGetCategoryInfo env ty->   in p--> envCast :: Environment -> CastContext -> Type -> Type -> Bool-> envCast env ctx from to = {-trace ("check cast " ++ show from ++ show to) $-}->     case from of->       t@(DomainType _) -> let baseType = envDomainBaseType env t->                           in (baseType == to) ||->                                (envCast env ctx baseType to ||->                                   any (== (from, to, ctx)) (envCasts env))->       _ -> any (==(from,to,ctx)) (envCasts env)---> envDomainBaseType :: Environment -> Type -> Type-> envDomainBaseType env ty =->   --check type is domain, check it exists in main list->   case lookup ty (envDomainDefs env) of->       Nothing -> error "domain not found" -- Left [DomainDefNotFound ty]->       Just t -> t---> envLookupFns :: Environment -> String -> [FunctionPrototype]-> envLookupFns env name =->     filter (\(nm,_,_,_) -> map toLower nm == map toLower name) envGetAllFns->     where->     envGetAllFns =->         concat [envPrefixOperators env->                ,envPostfixOperators env->                ,envBinaryOperators env->                ,envFunctions env->                ,envAggregates env->                ,envWindowFunctions env]--== internal support for type checker fns above--> envGetCategoryInfo :: Environment -> Type -> (String, Bool)-> envGetCategoryInfo env ty =->   case ty of->     SetOfType _ -> ("", False)->     AnonymousRecordType _ -> ("", False)->     ArrayType (Pseudo _) -> ("A",False)->     Pseudo _ -> ("P",False)->     _ -> let l = filter (\(t,_,_) -> ty == t) $ envTypeCategories env->          in if null l->               then error $ "no type category for " ++ show ty->               else let (_,c,p):_ =l->                    in (c,p)--> envTypeExists :: Environment -> Type -> Either [TypeError] Type-> envTypeExists env t =->     errorWhen (t `notElem` map snd (envTypeNames env))->               [UnknownTypeError t] >>->     Right t--> envLookupType :: Environment -> String -> Either [TypeError] Type-> envLookupType env name =->     liftME [UnknownTypeName name] $->       lookup name (envTypeNames env)---================================================================================--= built in stuff--keyword operators, all of these are built in and don't appear in any-postgresql catalog--This is wrong, these need to be separated into prefix, postfix, binary--> keywordOperatorTypes :: [FunctionPrototype]-> keywordOperatorTypes = [->   ("!and", [typeBool, typeBool], typeBool, False)->  ,("!or", [typeBool, typeBool], typeBool, False)->  ,("!like", [ScalarType "text", ScalarType "text"], typeBool, False)->  ,("!not", [typeBool], typeBool, False)->  ,("!isnull", [Pseudo AnyElement], typeBool, False)->  ,("!isnotnull", [Pseudo AnyElement], typeBool, False)->  ,("!arrayctor", [ArrayType $ Pseudo AnyElement], Pseudo AnyArray, True)->  ,("!between", [Pseudo AnyElement->                ,Pseudo AnyElement->                ,Pseudo AnyElement], Pseudo AnyElement, False)->  ,("!substring", [ScalarType "text",typeInt,typeInt], ScalarType "text", False)->  ,("!arraysub", [Pseudo AnyArray,typeInt], Pseudo AnyElement, False)->  ]--these look like functions, but don't appear in the postgresql catalog.--> specialFunctionTypes :: [FunctionPrototype]-> specialFunctionTypes = [->   ("coalesce", [ArrayType $ Pseudo AnyElement], Pseudo AnyElement, True)->  ,("nullif", [Pseudo AnyElement, Pseudo AnyElement], Pseudo AnyElement,False)->  ,("greatest", [ArrayType $ Pseudo AnyElement], Pseudo AnyElement,True)->  ,("least", [ArrayType $ Pseudo AnyElement], Pseudo AnyElement,True)->  ]--> pseudoTypes :: [(String, Type)]-> pseudoTypes =->     [("any",Pseudo Any)->     ,("anyarray",Pseudo AnyArray)->     ,("anyelement",Pseudo AnyElement)->     ,("anyenum",Pseudo AnyEnum)->     ,("anynonarray",Pseudo AnyNonArray)->     ,("cstring",Pseudo Cstring)->     ,("record",Pseudo Record)->     ,("trigger",Pseudo Trigger)->     ,("void",Pseudo Void)->     ,("_cstring",ArrayType $ Pseudo Cstring)->     ,("_record",ArrayType $ Pseudo Record)->     --,Pseudo Internal->     --,Pseudo LanguageHandler->     --,Pseudo Opaque->     ]--================================================================================--= getOperatorType--used by the pretty printer, not sure this is a very good design--for now, assume that all the overloaded operators that have the-same name are all either binary, prefix or postfix, otherwise the-getoperatortype would need the types of the arguments to determine-the operator type, and the parser would have to be a lot cleverer-although, parsec handles - being unary and binary without breaking-a sweat, so maybe this isn't too difficult?--this is why binary @ operator isn't currently supported--> data OperatorType = BinaryOp | PrefixOp | PostfixOp->                   deriving (Eq,Show)--> getOperatorType :: Environment -> String -> OperatorType-> getOperatorType env s = case () of->                       _ | s `elem` ["!and", "!or","!like"] -> BinaryOp->                         | s `elem` ["!not"] -> PrefixOp->                         | s `elem` ["!isnull", "!isnotnull"] -> PostfixOp->                         | any (\(x,_,_,_) -> x == s) (envBinaryOperators env) ->->                             BinaryOp->                         | any (\(x,_,_,_) -> x == s ||->                                            (x=="-" && s=="u-"))->                               (envPrefixOperators env) ->->                             PrefixOp->                         | any (\(x,_,_,_) -> x == s) (envPostfixOperators env) ->->                             PostfixOp->                         | otherwise ->->                             error $ "don't know flavour of operator " ++ s--> isOperatorName :: String -> Bool-> isOperatorName = any (`elem` "+-*/<>=~!@#%^&|`?")
− Database/HsSqlPpp/AstInternals/Environment/EnvironmentReader.lhs
@@ -1,258 +0,0 @@-Copyright 2009 Jake Wheat--This module contains the code to read a set of environment updates-from a database.--The code here hasn't been tidied up since the Environment data type-was heavily changed so it's a bit messy.--> {-# OPTIONS_HADDOCK hide  #-}--> module Database.HsSqlPpp.AstInternals.Environment.EnvironmentReader->     (readEnvironmentFromDatabase) where--> import qualified Data.Map as M-> import Data.Maybe-> import Control.Applicative-> --import Debug.Trace--> import Database.HsSqlPpp.Dbms.DBAccess-> import Database.HsSqlPpp.AstInternals.TypeType-> import Database.HsSqlPpp.Utils-> import Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal--> -- | Creates an 'EnvironmentUpdate' list by reading the database given.-> -- To create an Environment value from this, use-> ---> -- @-> -- env <- readEnvironmentFromDatabase 'something'-> -- let newEnv = updateEnvironment defaultEnvironment env-> -- @-> readEnvironmentFromDatabase :: String -- ^ name of the database to read->                             -> IO [EnvironmentUpdate]-> readEnvironmentFromDatabase dbName = withConn ("dbname=" ++ dbName) $ \conn -> do->    typeInfo <- selectRelation conn->                  "select t.oid as oid,\n\->                  \       t.typtype,\n\->                  \       case nspname\n\->                  \         when 'public' then t.typname\n\->                  \         when 'pg_catalog' then t.typname\n\->                  \         else nspname || '.' || t.typname\n\->                  \       end as typname,\n\->                  \       t.typarray,\n\->                  \       coalesce(e.typtype,'0') as atyptype,\n\->                  \       e.oid as aoid,\n\->                  \       e.typname as atypname\n\->                  \  from pg_catalog.pg_type t\n\->                  \  left outer join pg_type e\n\->                  \    on t.typarray = e.oid\n\->                  \   inner join pg_namespace ns\n\->                  \      on t.typnamespace = ns.oid\n\->                   \         and ns.nspname in ('pg_catalog', 'public', 'information_schema')\n\->                  \  where /*pg_catalog.pg_type_is_visible(t.oid)\n\->                  \   and */not exists(select 1 from pg_catalog.pg_type el\n\->                  \                       where el.typarray = t.oid)\n\->                  \  order by t.typname;" []->    let typeStuff = concatMap convTypeInfoRow typeInfo->        typeAssoc = map (\(a,b,_) -> (a,b)) typeStuff->        typeMap = M.fromList typeAssoc->    cts <- map (\(nm:cat:pref:[]) ->->                EnvCreateScalar (ScalarType nm) cat ( read pref :: Bool)) <$>->           selectRelation conn->                        "select t.typname,typcategory,typispreferred\n\->                        \from pg_type t\n\->                        \   inner join pg_namespace ns\n\->                        \      on t.typnamespace = ns.oid\n\->                        \         and ns.nspname in ('pg_catalog', 'public', 'information_schema')\n\->                        \where t.typarray<>0 and\n\->                        \    typtype='b' /*and\n\->                        \    pg_catalog.pg_type_is_visible(t.oid)*/;" []->    domainDefInfo <- selectRelation conn->                       "select pg_type.oid, typbasetype\n\->                       \  from pg_type\n\->                       \  inner join pg_namespace ns\n\->                       \      on pg_type.typnamespace = ns.oid\n\->                       \         and ns.nspname in ('pg_catalog', 'public', 'information_schema')\n\->                       \ where typtype = 'd'\n\->                       \     /*and  pg_catalog.pg_type_is_visible(oid)*/;" []->    let jlt k = fromJust $ M.lookup k typeMap->    let domainDefs = map (\l -> (jlt (l!!0),  jlt (l!!1))) domainDefInfo->    --let domainCasts = map (\(t,b) ->(t,b,ImplicitCastContext)) domainDefs->    castInfo <- selectRelation conn->                  "select castsource,casttarget,castcontext from pg_cast;" []->    let casts = {- domainCasts ++ -}  flip map castInfo->                  (\l -> (jlt (l!!0), jlt (l!!1),->                          case (l!!2) of->                                      "a" -> AssignmentCastContext->                                      "i" -> ImplicitCastContext->                                      "e" -> ExplicitCastContext->                                      _ -> error $ "internal error: unknown cast context " ++ (l!!2)))->    operatorInfo <- selectRelation conn->                        "select oprname,\n\->                        \       oprleft,\n\->                        \       oprright,\n\->                        \       oprresult\n\->                        \from pg_operator\n\->                        \      where not (oprleft <> 0 and oprright <> 0\n\->                        \         and oprname = '@') --hack for now\n\->                        \      order by oprname;" []->    let getOps a b c [] = (a,b,c)->        getOps pref post bin (l:ls) =->          let bit = (\a -> (l!!0, a, jlt(l!!3)))->          in case () of->                   _ | l!!1 == "0" -> getOps (bit [jlt (l!!2)]:pref) post bin ls->                     | l!!2 == "0" -> getOps pref (bit [jlt (l!!1)]:post) bin ls->                     | otherwise -> getOps pref post (bit [jlt (l!!1), jlt (l!!2)]:bin) ls->    let (prefixOps, postfixOps, binaryOps) = getOps [] [] [] operatorInfo->    functionInfo <- selectRelation conn->                       "select proname,\n\->                       \       array_to_string(proargtypes,','),\n\->                       \       proretset,\n\->                       \       prorettype\n\->                       \from pg_proc\n\->                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\->                       \      and provariadic = 0\n\->                       \      and not proisagg\n\->                       \      and not proiswindow\n\->                       \order by proname,proargtypes;" []->    let fnProts = map (convFnRow jlt) functionInfo-->    aggregateInfo <- selectRelation conn->                       "select proname,\n\->                       \       array_to_string(proargtypes,','),\n\->                       \       proretset,\n\->                       \       prorettype\n\->                       \from pg_proc\n\->                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\->                       \      and provariadic = 0\n\->                       \      and proisagg\n\->                       \order by proname,proargtypes;" []->    let aggProts = map (convFnRow jlt) aggregateInfo-->    windowInfo <- selectRelation conn->                       "select proname,\n\->                       \       array_to_string(proargtypes,','),\n\->                       \       proretset,\n\->                       \       prorettype\n\->                       \from pg_proc\n\->                       \where pg_catalog.pg_function_is_visible(pg_proc.oid)\n\->                       \      and provariadic = 0\n\->                       \      and proiswindow\n\->                       \order by proname,proargtypes;" []->    let winProts = map (convFnRow jlt) windowInfo--->    comps <- map (\(kind:nm:atts:sysatts:nsp:[]) ->->              let nm1 = case nsp of->                                 "pg_catalog" -> nm->                                 "public" -> nm->                                 n -> n ++ "." ++ nm->              in case kind of->                     "c" -> EnvCreateComposite nm1 (convertAttString jlt atts)->                     "r" -> EnvCreateTable nm1 (convertAttString jlt atts) (convertAttString jlt sysatts)->                     "v" -> EnvCreateView nm1 (convertAttString jlt atts)->                     _ -> error $ "unrecognised relkind: " ++ kind) <$>->                 selectRelation conn->                   "with att1 as (\n\->                   \ select\n\->                   \     attrelid,\n\->                   \     attname,\n\->                   \     attnum,\n\->                   \     atttypid\n\->                   \   from pg_attribute\n\->                   \   inner join pg_class cls\n\->                   \      on cls.oid = attrelid\n\->                   \   inner join pg_namespace ns\n\->                   \      on cls.relnamespace = ns.oid\n\->                   \         and ns.nspname in ('pg_catalog', 'public', 'information_schema')\n\->                   \   where /*pg_catalog.pg_table_is_visible(cls.oid)\n\->                   \      and*/ cls.relkind in ('r','v','c')\n\->                   \      and not attisdropped),\n\->                   \ sysAtt as (\n\->                   \ select attrelid,\n\->                   \     array_to_string(\n\->                   \       array_agg(attname || ';' || atttypid)\n\->                   \         over (partition by attrelid order by attnum\n\->                   \               range between unbounded preceding\n\->                   \               and unbounded following)\n\->                   \       ,',') as sysAtts\n\->                   \   from att1\n\->                   \   where attnum < 0),\n\->                   \ att as (\n\->                   \ select attrelid,\n\->                   \     array_to_string(\n\->                   \       array_agg(attname || ';' || atttypid)\n\->                   \          over (partition by attrelid order by attnum\n\->                   \                range between unbounded preceding\n\->                   \                and unbounded following)\n\->                   \       ,',') as atts\n\->                   \   from att1\n\->                   \   where attnum > 0)\n\->                   \ select distinct\n\->                   \     cls.relkind,\n\->                   \     cls.relname,\n\->                   \     atts,\n\->                   \     coalesce(sysAtts,''),\n\->                   \     nspname\n\->                   \   from att left outer join sysAtt using (attrelid)\n\->                   \   inner join pg_class cls\n\->                   \     on cls.oid = attrelid\n\->                   \   inner join pg_namespace ns\n\->                   \      on cls.relnamespace = ns.oid\n\->                   \   order by relkind,relname;" []--->    return $ concat [->                cts->               ,map (uncurry EnvCreateDomain) domainDefs->               ,map (\(a,b,c) -> EnvCreateCast a b c) casts->               ,map (\(a,b,c) -> EnvCreateFunction FunPrefix a b c False) prefixOps->               ,map (\(a,b,c) -> EnvCreateFunction FunPostfix a b c False) postfixOps->               ,map (\(a,b,c) -> EnvCreateFunction FunBinary a b c False) binaryOps->               ,map (\(a,b,c) -> EnvCreateFunction FunName a b c False) fnProts->               ,map (\(a,b,c) -> EnvCreateFunction FunAgg a b c False) aggProts->               ,map (\(a,b,c) -> EnvCreateFunction FunWindow a b c False) winProts->               ,comps]->    where->      convertAttString jlt s =->          let ps = split ',' s->              ps1 = map (split ';') ps->          in map (\pl -> (head pl, jlt (pl!!1))) ps1->      convFnRow jlt l =->         (head l,fnArgs,fnRet)->         where->           fnRet = let rt1 = jlt (l!!3)->                   in if read (l!!2)::Bool->                        then SetOfType rt1->                        else rt1->           fnArgs = if (l!!1) == ""->                      then []->                      else let a = split ',' (l!!1)->                           in map jlt a->      convTypeInfoRow l =->        let name = (l!!2)->            ctor = case (l!!1) of->                     "b" -> ScalarType->                     "c" -> NamedCompositeType->                     "d" -> DomainType->                     "e" -> EnumType->                     "p" -> (\t -> Pseudo (case t of->                                                  "any" -> Any->                                                  "anyarray" -> AnyArray->                                                  "anyelement" -> AnyElement->                                                  "anyenum" -> AnyEnum->                                                  "anynonarray" -> AnyNonArray->                                                  "cstring" -> Cstring->                                                  "internal" -> Internal->                                                  "language_handler" -> LanguageHandler->                                                  "opaque" -> Opaque->                                                  "record" -> Record->                                                  "trigger" -> Trigger->                                                  "void" -> Void->                                                  _ -> error $ "internal error: unknown pseudo " ++ t))->                     _ -> error $ "internal error: unknown type type: " ++ (l !! 1)->            scType = (head l, ctor name, name)->        in if (l!!4) /= "0"->           then [(l!!5,ArrayType $ ctor name, '_':name), scType]->           else [scType]-
− Database/HsSqlPpp/AstInternals/Environment/LocalIdentifierBindings.lhs
@@ -1,240 +0,0 @@-Copyright 2009 Jake Wheat--This module contains the code to manage local identifier bindings-during the type checking process.--Main areas to support are parameters and variables--> {-# OPTIONS_HADDOCK hide  #-}--> module Database.HsSqlPpp.AstInternals.Environment.LocalIdentifierBindings->     (->      QualifiedIDs->     ,LocalIdentifierBindings->     ,emptyBindings->     ,updateBindings->     ,LocalIdentifierBindingsUpdate(..)->     ,libExpandStar->     ,libLookupID->     ) where--> import Control.Monad-> import Data.List-> import Debug.Trace-> import Data.Char--> import Database.HsSqlPpp.AstInternals.TypeType-> import Database.HsSqlPpp.Utils-> import Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal--> -- | The main datatype, this holds the catalog and context-> -- information to type check against.-> data LocalIdentifierBindings = LocalIdentifierBindings->                    {identifierTypes :: [[QualifiedIDs]]->                    ,starTypes :: [QualifiedIDs]}----> -- | Represents an empty environment. This doesn't contain things-> -- like the \'and\' operator, and so if you try to use it it will-> -- almost certainly not work.-> emptyBindings :: LocalIdentifierBindings-> emptyBindings = LocalIdentifierBindings [] []--> -- | Represents the types of the ids available, currently used for-> -- resolving identifiers inside select expressions. Will probably-> -- change as this is fixed to support more general contexts.  The-> -- components represent the qualifying name (empty string for no-> -- qualifying name), the list of identifier names with their types,-> -- and the list of system column identifier names with their types.-> type QualifiedIDs = (String, [(String,Type)])--> instance Show LocalIdentifierBindings where->   show (LocalIdentifierBindings idTypes starEx) =->       "ID Types:\n" ++ concatMap (flip showQList 0) idTypes ++->         "Star Exp:\n" ++ concatMap showQuals starEx->       where->         showQList :: [QualifiedIDs] -> Int -> String->         showQList (x:xs) n = show n ++ ":\n" ++->                               showQuals x ++ "\n" ++ showQList xs (n + 1)->         showQList [] _ = ""->         showQuals :: QualifiedIDs -> String->         showQuals (co, idList) = "qual: " ++ co ++ ":\n" ++ concatMap (\(n,t) -> n ++ "::" ++ show t ++ "\n") idList----= Attribute identifier scoping--The way this scoping works is we have a list of prefixes/namespaces,-which is generally the table/view name, or the alias given to it, and-then a list of identifiers (with no dots) and their types. When we-look up the type of an identifier, if it has an correlation name we-try to match that against a table name or alias in that list, if it is-not present or not unique then throw an error. Similarly with no-correlation name, we look at all the lists, if the id is not present-or not unique then throw an error.--envIdentifierTypes is for expanding *. If we want to access the-common attributes from one of the tables in a using or natural join,-this attribute can be qualified with either of the table names/-aliases. But when we expand the *, we only output these common fields-once, so keep a separate list of these fields used just for expanding-the star. The other twist is that these common fields appear first in-the resultant field list.--System columns: pg also has these - they have names and types like-other attributes, but are not included when expanding stars, so you-only get them when you explicitly ask for them. The main use is using-the oid system column which is heavily used as a target for foreign-key references in the pg catalog.--This system still isn't working right. Subqueries are a-problem. Aspects which don't work right now are:--consider this query:-select relname as relvar_name-    from pg_class-    where ((relnamespace =-           (select oid-              from pg_namespace-              where (nspname = 'public'))) and (relkind = 'r'));--we need to be able to access attributes from pg_class inside the subquery,-but 1) they aren't inserted if you use * in the inner query-2) they can't make an identifier ambiguous, so the oid here in the subquery-is ok even though both the oid from pg_namespace and the oid from pg_class-are in scope.--So there are two problems with the current code:-it's too aggressive at throwing ambiguous identifier errors-it pulls in too many identifiers when expanding star--Solution ideas:-for the ambiguous errors, create a stack of identifiers, then split-the EnvUpdateIDs into two, one to replace the current set, and one to-push a new set on the stack. Then fix the lookup to walk the stack level by level.--for the *, we already have special cases for system columns, and for-join ids. I think the best solution is to provide a separate list of *-columns and types, with a separate env update ctor, and get the type-checker to resolve the list for * expansion rather than doing it here.--This should also handle parameters and variable declarations in plpgsql-functions too, these stack in the same way, with one complication to-do with parameters:--there is an additional complication with plpgsql, which isn't going to-be handled for now: instead of stacking like everything else, for-variable references inside select, insert, update and delete-statements only, which aren't qualified and match a parameter name,-then the parameter is used in lieu of variable declarations or-attributes inside a select expression. This will be handled at some-point.--this is something the lint checker should flag when it's written, it-will also flag any ambiguous identifiers which resolve ok only because-of stacking, this is a standard warning in many flavours of lint-checkers.--One last thing is that we need to make sure identifiers availability doesn't-get inherited too far: e.g. a create function inside a create function-can't access ids from the outer create function. This is pretty easy:-the following things generate identifier bindings:-select expressions, inside the expression-parameter defs-variable defs--since select expressions can't contain statements, we don't need to-worry about e.g. if statements, they want to inherit ids from params-and variable defs, so the default is good.--For environments being updated sequentially: since the environment is-updated in a statement list (i.e. environment updates stack from one-statement to the next within a single statement list), any var defs-can't break out of the containing list, so we are covered e.g. for a-variable def leaking from an inner block to an outer block.--With ids going into select expressions: we want the default which is-parameters, vardefs and ids from containing select expressions to be-inherited. So, in the end the only case to deal with is a create-function inside another create function. This isn't dealt with at the-moment.----> libExpandStar :: LocalIdentifierBindings -> String -> Either [TypeError] [(String,Type)]-> libExpandStar env correlationName =->     case lookup correlationName $ starTypes env of->       Nothing -> errorWhen (correlationName == "")->                            [InternalError "no star expansion found?"] >>->                  Left [UnrecognisedCorrelationName correlationName]->       Just l -> Right l--> splitIdentifier :: String -> (String,String)-> splitIdentifier s = let (a,b) = span (/= '.') s->                     in if b == ""->                          then ("", a)->                          else (a,tail b)--> libLookupID :: LocalIdentifierBindings -> String -> Either [TypeError] Type-> libLookupID env iden1 =->   envLookupID' $ identifierTypes env->   where->     (correlationName,iden) = splitIdentifier $ map toLower iden1->     envLookupID' (its:itss) =->       case lookup correlationName its of->         Nothing -> envLookupID' itss->         Just s -> case filter (\(n,_) -> map toLower n==iden) s of->                     [] -> if correlationName == ""->                             then envLookupID' itss->                             else Left [UnrecognisedIdentifier $ correlationName ++ "." ++ iden]->                     (_,t):[] -> Right t->                     _ -> Left [AmbiguousIdentifier iden]->     envLookupID' [] =->       Left [if correlationName == ""->               then UnrecognisedIdentifier iden->               else UnrecognisedCorrelationName correlationName]--> -- | Applies a list of 'EnvironmentUpdate's to an 'Environment' value-> -- to produce a new Environment value.-> updateBindings :: LocalIdentifierBindings->                -> Environment->                -> [LocalIdentifierBindingsUpdate]->                -> Either [TypeError] LocalIdentifierBindings-> updateBindings lbs' env eus =->   let r = foldM updateEnv' lbs' eus->   in {-trace ("*********************************************\nupdatebindings from " ++ show lbs' ++ "\nto\n" ++ show r) -} r->   where->     updateEnv' lbs eu =->       case eu of->         LibStackIDs qids -> return $ lbs {identifierTypes = expandComposites qids : identifierTypes lbs}->         LibSetStarExpansion sids -> return $ lbs {starTypes = sids}->     --take all the composite typed ids, and expand them out->     expandComposites :: [(String, [(String,Type)])] -> [(String, [(String,Type)])]->     expandComposites ((q,attrs):qis) =->         ec attrs ++ (q, map (\(n,t) -> (n,wrapIfRecord n t)) attrs) : expandComposites qis->         where->           ec :: [(String,Type)] -> [(String, [(String,Type)])]->           ec [] = []->           ec ((nm,NamedCompositeType t):xs) = (nm,compFields t):ec xs->           ec ((nm,SetOfType(NamedCompositeType t)):xs) = (nm,compFields t):ec xs->           ec ((nm,CompositeType t):xs) = (nm, t):ec xs->           ec ((nm,SetOfType(CompositeType t)):xs) = (nm, t):ec xs->           ec (_:xs) = ec xs->           wrapIfRecord n t =->             case libLookupID lbs' n of->               Right (PgRecord _) -> PgRecord (Just t)->               _ -> t->     expandComposites [] = []->     compFields = fromRight [] . envCompositePublicAttrs env []--> data LocalIdentifierBindingsUpdate =->     -- | to allow an unqualified identifier reference to work you need to->     -- supply an extra entry with \"\" as the alias, and all the fields,->     -- in the case of joins, these unaliased fields need to have the->     -- duplicates removed and the types resolved->       LibStackIDs [QualifiedIDs]->     -- | to allow an unqualified star to work you need to->     -- supply an extra entry with \"\" as the alias, and all the fields->     | LibSetStarExpansion [QualifiedIDs]-
Database/HsSqlPpp/AstInternals/TypeChecking/CreateFunction.ag view
@@ -23,8 +23,8 @@         loc.tpe = dependsOnRTpe                     (@rettype.namedType : @loc.parameterTypes) $                     Right $ Pseudo Void-        loc.envUpdates = dependsOn [tpeToT @loc.tpe] []-                                   [EnvCreateFunction FunName+        loc.catUpdates = dependsOn [tpeToT @loc.tpe] []+                                   [CatCreateFunction FunName                                                       (map toLower @name)                                                       @loc.parameterTypes                                                       @rettype.namedType@@ -40,7 +40,7 @@                                       @body.annotatedTree                                       @vol.annotatedTree         loc.statementType = []-        body.env = @lhs.inProducedEnv+        body.cat = @lhs.inProducedCat  {- == parameters@@ -88,25 +88,25 @@ New plan: do two passes, type check everything but the bodies of functions in first pass, then type check bodies of functions in second pass. Not perfect, but better than current situation. This will be-achieved by using a separate env attribute which is the same as the env+achieved by using a separate cat attribute which is the same as the cat value which gets returned from the annotation functions in AstInternal.ag  -}  SEM Statement     | CreateFunction-        --add the parameters to the environment for the contained statements+        --add the parameters to the catalog for the contained statements         body.lib = let p = @params.params                            ++ (zip posNames $ map snd @params.params)                    in fromRight @lhs.lib $-                      updateBindings @lhs.lib @lhs.env+                      updateBindings @lhs.lib @lhs.cat                                      [LibStackIDs [("", p)                                                   ,(@name, @params.params)]]                    where                      posNames :: [String]                      posNames = map (\l -> '$':show l) [1..] {--TODO: using fromRight on it's own for identifier bindings or env+TODO: using fromRight on it's own for identifier bindings or cat updates is wrong, if an error is produced then this needs to be added to an annotation somewhere. Some of the code uses error instead of fromRight which is even worse.@@ -119,7 +119,7 @@         --which can nest inside plpgsql functions (they aren't even         --supported by the parser at the moment)         sts.lib = fromRight @lhs.lib $-                  updateBindings @lhs.lib @lhs.env+                  updateBindings @lhs.lib @lhs.cat                                  [LibStackIDs [("", @vars.defs)]]  ATTR VarDef [||def : {(String,Type)}]
Database/HsSqlPpp/AstInternals/TypeChecking/CreateTable.ag view
@@ -14,7 +14,7 @@ doesn't check for duplicate attribute names. doesn't check if the types are valid for a table (e.g. disallow setof types) -We produce a valid environment update if the types of the attributes+We produce a valid catalog update if the types of the attributes check ok, any errors in the constraints aren't leaked.  -}@@ -23,8 +23,8 @@ SEM Statement     | CreateTable         loc.tpe = dependsOnRTpe @loc.attrTypes $ Right $ Pseudo Void-        loc.envUpdates = dependsOn @loc.attrTypes []-                           [EnvCreateTable @name @atts.attrs defaultSystemColumns]+        loc.catUpdates = dependsOn @loc.attrTypes []+                           [CatCreateTable @name @atts.attrs defaultSystemColumns]         loc.attrTypes : {[Type]}         loc.attrTypes = map snd @atts.attrs @@ -33,7 +33,7 @@                                    @name                                    @atts.annotatedTree                                    @cons.annotatedTree-        cons.lib = case updateBindings @lhs.lib @lhs.env+        cons.lib = case updateBindings @lhs.lib @lhs.cat                      [LibStackIDs [("", @atts.attrs)]] of                       Left x -> error $ show x                       Right e -> e@@ -54,8 +54,8 @@             dependsOnRTpe [@loc.selType] $ do               @loc.attrs               Right @loc.selType-        loc.envUpdates =-           leftToEmpty (\as -> [EnvCreateTable @name as defaultSystemColumns]) $ do+        loc.catUpdates =+           leftToEmpty (\as -> [CatCreateTable @name as defaultSystemColumns]) $ do               ats <- @loc.attrs               return $ dependsOn (tpeToT @loc.tpe :                                   (map snd ats)) [] ats@@ -93,7 +93,7 @@ SEM AttributeDef     | AttributeDef         cons.lib =-            case updateBindings @lhs.lib @lhs.env+            case updateBindings @lhs.lib @lhs.cat                      [LibStackIDs [("", [(@name, @typ.namedType)])]] of               Left x -> error $ show x               Right e -> e
Database/HsSqlPpp/AstInternals/TypeChecking/Dml.ag view
@@ -20,20 +20,27 @@               @loc.columnTypes               Right $ Pseudo Void         loc.statementType =-            leftToEmpty (\ct -> [StatementType [] (fromMaybe [] @returning.listType)]) @loc.columnTypes+            leftToEmpty (\ct -> [StatementType (getPlaceholderTypes @loc.insDataAddedInferredTypes) (fromMaybe [] @returning.listType)]) @loc.columnTypes          loc.columnTypes =             do             tys <- unwrapSetOfComposite $                    getTypeAnnotation @insData.annotatedTree-            checkColumnConsistency @lhs.env+            checkColumnConsistency @lhs.cat                                    @table                                    @targetCols.strings                                    tys+        loc.insDataAddedInferredTypes =+            case @insData.annotatedTree of+              Values ann [exl] ->+                  let fargs = map snd (fromRight [] @loc.columnTypes) ++ repeat TypeCheckFailed+                      newExl = map (\(ex,ty) -> updateAnnotation (++ [InferredType ty]) ex) $ zip exl fargs+                  in Values ann [newExl]+              x -> x          loc.backTree = Insert @ann @table @targetCols.annotatedTree-                              @insData.annotatedTree @returning.annotatedTree-        loc.envUpdates = []+                              @loc.insDataAddedInferredTypes @returning.annotatedTree+        loc.catUpdates = []  -- inject the ids into the returning part @@ -41,8 +48,8 @@     | Insert         returning.lib =             fromRight @lhs.lib $ do-              atts <- envCompositeAttrs @lhs.env relationComposites @table-              updateBindings @lhs.lib @lhs.env [LibStackIDs [("", atts)]]+              atts <- catCompositeAttrs @lhs.cat relationComposites @table+              updateBindings @lhs.lib @lhs.cat [LibStackIDs [("", atts)]]  {- ================================================================================@@ -57,28 +64,48 @@     | Update         loc.tpe =             do-            checkRelationExists @lhs.env @table+            checkRelationExists @lhs.cat @table             dependsOnRTpe (map snd @assigns.pairs) $ do               @loc.columnTypes               liftErrors @assigns.rowSetErrors               return $ Pseudo Void         loc.statementType =-            leftToEmpty (\ct -> [StatementType [] (fromMaybe [] @returning.listType)]) @loc.columnTypes+            leftToEmpty (\ct -> [StatementType (getPlaceholderTypes @loc.assignWInferredTypes+                                                ++ getPlaceholderTypes @whr.annotatedTree)+                                               (fromMaybe [] @returning.listType)])+               @loc.columnTypes          loc.columnTypes =-            checkColumnConsistency @lhs.env+            checkColumnConsistency @lhs.cat                                    @table                                    (map fst @assigns.pairs)                                    @assigns.pairs+        loc.assignWInferredTypes : SetClauseList+        loc.assignWInferredTypes =+            let colTypes :: [Type]+                colTypes = (map snd $ fromRight [] @loc.columnTypes)+            in setInferredTypesG colTypes @assigns.annotatedTree          loc.backTree = Update @ann                               @table-                              @assigns.annotatedTree+                              @loc.assignWInferredTypes                               @whr.annotatedTree                               @returning.annotatedTree-        loc.envUpdates = []+        loc.catUpdates = [] +{ +setInferredTypesG :: Data a => [Type] -> a -> a+setInferredTypesG tys x =+  evalState (transformBiM f x) tys+  where+    f (p@(Placeholder _)) = do+         y:ys <- get+         put ys+         return $ updateAnnotation (++ [InferredType y]) p+    f z = return z+}+ -- local identifier bindings: pass the table attribute names and types -- into the where expression, and the set clause expressions @@ -86,10 +113,10 @@     | Update         loc.lib =              fromRight @lhs.lib $ do-             ct <- envCompositeAttrs @lhs.env+             ct <- catCompositeAttrs @lhs.cat                                      relationComposites                                      @table-             updateBindings @lhs.lib @lhs.env [LibStackIDs [("", ct)]]+             updateBindings @lhs.lib @lhs.cat [LibStackIDs [("", ct)]]         whr.lib = @loc.lib         assigns.lib = @loc.lib         returning.lib = @loc.lib@@ -151,20 +178,21 @@ SEM Statement     | Delete         loc.tpe =-            checkRelationExists @lhs.env @table >>+            checkRelationExists @lhs.cat @table >>             Right (Pseudo Void)-        loc.statementType = [StatementType [] (fromMaybe [] @returning.listType)]+        loc.statementType = [StatementType (getPlaceholderTypes @whr.annotatedTree)+                                           (fromMaybe [] @returning.listType)]          loc.backTree = Delete @ann @table @whr.annotatedTree @returning.annotatedTree-        loc.envUpdates = []+        loc.catUpdates = []   SEM Statement     | Delete         loc.lib =             fromRight @lhs.lib $ do-            columnTypes <- envCompositeAttrs @lhs.env relationComposites @table-            updateBindings @lhs.lib @lhs.env [LibStackIDs [("", columnTypes)]]+            columnTypes <- catCompositeAttrs @lhs.cat relationComposites @table+            updateBindings @lhs.lib @lhs.cat [LibStackIDs [("", columnTypes)]]         whr.lib = @loc.lib         returning.lib = @loc.lib @@ -174,16 +202,16 @@ {  --small shortcut to help produce better errors?-checkRelationExists :: Environment -> String -> Either [TypeError] ()-checkRelationExists env tbl =-    envCompositeDef env relationComposites tbl >>+checkRelationExists :: Catalog -> String -> Either [TypeError] ()+checkRelationExists cat tbl =+    catCompositeDef cat relationComposites tbl >>     return ()  --used by both insert and update-checkColumnConsistency :: Environment ->  String -> [String] -> [(String,Type)]+checkColumnConsistency :: Catalog ->  String -> [String] -> [(String,Type)]                        -> Either [TypeError] [(String,Type)]-checkColumnConsistency env tbl cols' insNameTypePairs = do-  ttcols <- lowerize <$> envCompositePublicAttrs env [] tbl+checkColumnConsistency cat tbl cols' insNameTypePairs = do+  ttcols <- lowerize <$> catCompositePublicAttrs cat [] tbl   let cols = if null cols'                then map fst ttcols                else map (map toLower) cols'@@ -199,7 +227,7 @@                     map snd insNameTypePairs       errs :: [TypeError]       errs = concat $ lefts $-             map (\(_,b,c) -> checkAssignmentValid env c b) typeTriples+             map (\(_,b,c) -> checkAssignmentValid cat c b) typeTriples   liftErrors errs   return targetNameTypePairs   where
Database/HsSqlPpp/AstInternals/TypeChecking/Drops.ag view
@@ -9,8 +9,8 @@     | DropFunction         loc.tpe = Right $ Pseudo Void         loc.backTree = DropFunction @ann @ifE.annotatedTree @sigs.annotatedTree @cascade.annotatedTree-        loc.envUpdates = flip map @sigs.fnSigs $ \(nm,args) ->-                               EnvDropFunction ifE nm args+        loc.catUpdates = flip map @sigs.fnSigs $ \(nm,args) ->+                               CatDropFunction ifE nm args                          where                            ifE = @ifE.annotatedTree == IfExists         loc.statementType = []
Database/HsSqlPpp/AstInternals/TypeChecking/ErrorUtils.lhs view
@@ -15,8 +15,6 @@ >     ,getErrors >     ) where -> import Data.List- > import Database.HsSqlPpp.AstInternals.TypeType  ================================================================================
Database/HsSqlPpp/AstInternals/TypeChecking/Expressions.ag view
@@ -14,8 +14,20 @@         lhs.annotatedTree = annTypesAndErrors @loc.backTree                               (tpeToT @loc.tpe)                               (getErrors @loc.tpe)-                              Nothing+                              $ fmap ((:[]) . FunctionPrototypeA) @loc.prototype +SEM Expression+    | IntegerLit StringLit FloatLit BooleanLit NullLit FunCall Identifier+      Exists Case CaseSimple Cast InPredicate ScalarSubQuery LiftOperator+      PositionalArg Placeholder WindowFn+        loc.prototype : {Maybe FunctionPrototype}++SEM Expression+    | IntegerLit StringLit FloatLit BooleanLit NullLit Identifier+      Exists Case CaseSimple Cast InPredicate ScalarSubQuery LiftOperator+      PositionalArg Placeholder WindowFn+        loc.prototype = Nothing+ {- == literals @@ -59,11 +71,15 @@ -} SEM Expression     | FunCall-        loc.tpe = dependsOnRTpe @args.typeList $-                    typeCheckFunCall-                      @lhs.env-                      @funName-                      @args.typeList+        (loc.tpe, loc.prototype) = if any (==TypeCheckFailed) @args.typeList+                                   then (Right TypeCheckFailed, Nothing)+                                   else+                                     let fe = typeCheckFunCall+                                              @lhs.cat+                                              @funName+                                              @args.typeList+                                     in (dependsOnRTpe @args.typeList $ fmap (\(_,_,r,_) -> r) fe+                                        ,eitherToMaybe fe)         loc.backTree = FunCall @ann @funName @args.annotatedTree  @@ -93,30 +109,29 @@  TODO: move all of this into find call match. Don't know why it's separate -}-typeCheckFunCall :: Environment -> String -> [Type] -> Either [TypeError] Type-typeCheckFunCall env fnName' argsType =+typeCheckFunCall :: Catalog -> String -> [Type] -> Either [TypeError] FunctionPrototype+typeCheckFunCall cat fnName' argsType =     {-trace ("typecheckfncall " ++ fnName' ++ show argsType) $-}-    dependsOnRTpe argsType $+    --dependsOnRTpe argsType $       case fnName of               "count" -> -- not quite sure how this is suppose to work,                          -- the counts in the pg catalog accept either                          -- no args, or one arg of type any, but you can call                          -- count with multiple arguments?-                         return typeBigInt+                         return ("count", argsType, typeBigInt, False)               "!between" -> do-                    f1 <- lookupFn ">=" [argsType !! 0, argsType !! 1]-                    f2 <- lookupFn "<=" [argsType !! 0, argsType !! 2]+                    f1 <- lookupReturnType ">=" [argsType !! 0, argsType !! 1]+                    f2 <- lookupReturnType "<=" [argsType !! 0, argsType !! 2]                     lookupFn "!and" [f1,f2]-              --"coalesce" -> resolveResultSetType env argsType               "greatest" -> do-                    t <- lookupFn fnName argsType -- t <- resolveResultSetType env argsType+                    fp@(_,_,t,_) <- lookupFn fnName argsType                     lookupFn ">=" [t,t]-                    return t+                    return fp               "least" -> do-                    t <- lookupFn fnName argsType -- resolveResultSetType env argsType+                    fp@(_,_,t,_) <- lookupFn fnName argsType                     lookupFn "<=" [t,t]-                    return t-              "!rowctor" -> return $ AnonymousRecordType argsType+                    return fp+              "!rowctor" -> return $ ("!rowCtor", argsType, AnonymousRecordType argsType, False)                     -- special case the row comparison ops                     -- this needs to be fixed: we want to match                     -- any implicit casts to functions on composite types@@ -125,24 +140,15 @@               _ | fnName `elem` ["=", "<>", "<=", ">=", "<", ">"]                          && length argsType == 2                          && all isCompositeOrSetOfCompositeType argsType-                         && compositesCompatible env (head argsType) (head $ tail argsType) -> Right typeBool+                         && compositesCompatible cat (head argsType) (head $ tail argsType) -> return (fnName, argsType, typeBool, False)               --checked for all special cases, so run general case now               s -> lookupFn s argsType     where-      lookupFn :: String -> [Type] -> Either [TypeError] Type-      lookupFn s1 args = do-        (_,_,r,_) <- findCallMatch env+      lookupReturnType :: String -> [Type] -> Either [TypeError] Type+      lookupReturnType s1 args = fmap (\(_,_,r,_) -> r) $ lookupFn s1 args+      lookupFn :: String -> [Type] -> Either [TypeError] FunctionPrototype+      lookupFn s1 args = findCallMatch cat                              (if s1 == "u-" then "-" else s1) args-        return r-      checkRowTypesMatch (AnonymousRecordType t1s) (AnonymousRecordType t2s) = do-        when (length t1s /= length t2s) $ Left [ValuesListsMustBeSameLength]-        let errs = map (resolveResultSetType env . (\(a,b) -> [a,b])) $-                     zip t1s t2s-        liftErrors $ concat $ lefts errs-        return typeBool-      checkRowTypesMatch x y  =-        error $ "internal error: checkRowTypesMatch called with " ++-                show x ++ "," ++ show y       fnName = map toLower fnName' } @@ -169,8 +175,8 @@                   errorWhen (not $ isArrayType bType)                             [AnyAllError $ "second arg must be array, got " ++ show args]                   elemType <- unwrapArray $ bType-                  resType <- typeCheckFunCall-                                     @lhs.env+                  resType <- fmap (\(_,_,r,_) -> r) $ typeCheckFunCall+                                     @lhs.cat                                      @oper                                      [aType,elemType]                   errorWhen (resType /= typeBool)@@ -206,7 +212,7 @@             errorWhen (any (/= typeBool) @loc.whenTypes) $                       [WrongTypes typeBool @loc.whenTypes]             dependsOnRTpe @loc.thenTypes $-              resolveResultSetType @lhs.env @loc.thenTypes+              resolveResultSetType @lhs.cat @loc.thenTypes         loc.backTree = Case @ann @cases.annotatedTree @els.annotatedTree  @@ -216,9 +222,9 @@           dependsOnRTpe @loc.whenTypes $ do           let valueType = getTypeAnnotation @value.annotatedTree           checkWhenTypes <--              resolveResultSetType @lhs.env (valueType : @loc.whenTypes)+              resolveResultSetType @lhs.cat (valueType : @loc.whenTypes)           dependsOnRTpe @loc.thenTypes $-            resolveResultSetType @lhs.env @loc.thenTypes+            resolveResultSetType @lhs.cat @loc.thenTypes         loc.backTree = CaseSimple @ann                                   @value.annotatedTree                                   @cases.annotatedTree@@ -226,7 +232,7 @@  {- == identifiers-pull id types out of env for identifiers+pull id types out of cat for identifiers  -} @@ -283,7 +289,7 @@         loc.tpe = do                   lt <- @list.listType                   ty <- resolveResultSetType-                            @lhs.env+                            @lhs.cat                             [getTypeAnnotation @expr.annotatedTree, lt]                   return typeBool         loc.backTree = InPredicate @ann@@ -296,7 +302,7 @@  SEM InList     | InList-        lhs.listType = resolveResultSetType @lhs.env @exprs.typeList+        lhs.listType = resolveResultSetType @lhs.cat @exprs.typeList     | InSelect         lhs.listType =             do@@ -308,3 +314,29 @@                       1 -> Right $ head attrs                       _ -> Right $ AnonymousRecordType attrs             dependsOnRTpe attrs $ Right typ+{-+================================================================================++dodgy type inference for parameterized statements++start with ? in function calls only++the idea is to assume the type is unknown, save the matched function prototype,+then set an inferred type attribute back down into the ? node,+then convert this to an annotation++the matched function prototype gets saved in Expression.loc.protoType+above when resolving the matching function++won't work: the function prototype lookup uses the annotation on the+argument nodes, and this will make the annotation dependent on already+having the function prototype.++-}++-- ATTR Expression [inferredType:Type||]+-- ATTR ExpressionList [inferredTypes:{[Type]}||]++-- SEM Expression+--    | FunCall+--        args.inferredTypes = let t = 
+ Database/HsSqlPpp/AstInternals/TypeChecking/LocalBindings.lhs view
@@ -0,0 +1,120 @@+Copyright 2010 Jake Wheat++This module contains the code to manage local identifier bindings+during the type checking process. This is used for e.g. looking up the+types of parameter and variable references in plpgsql functions, and+for looking up the types of identifiers in select expressions.++Some notes on lookups+all lookups are case insensitive - todo: change correlation names and+ids to lower case in the lbupdate function+start by searching the head of the lookup update list and working down+the code here handles resolving the types of join columns when they+are not the same, and the update routine returns error if the join columns are not compatible+the code here handles expanding record types so that the components can be looked up+++++> {-# OPTIONS_HADDOCK hide  #-}++> module Database.HsSqlPpp.AstInternals.TypeChecking.LocalBindings+>     (+>      LocalBindingsUpdate(..)+>     ,LocalBindings+>     ,emptyBindings+>     ,lbUpdate+>     ,lbExpandStar+>     ,lbLookupID+>     ) where++> import Control.Monad+> --import Debug.Trace++> import Database.HsSqlPpp.AstInternals.TypeType+> --import Database.HsSqlPpp.Utils+> --import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal++> data LocalBindings = LocalBindings [LocalBindingsUpdate]++> emptyBindings :: LocalBindings+> emptyBindings = LocalBindings []++> data LocalBindingsUpdate = LBQualifiedIds {+>                              source :: String+>                             ,correlationName :: String+>                             ,lbids :: [(String,Type)]+>                             ,internalIds :: [(String,Type)]+>                             }+>                          | LBUnqualifiedIds {+>                              source :: String+>                             ,lbids :: [(String,Type)]+>                             ,internalIds :: [(String,Type)]+>                             }+>                          | LBJoinIds {+>                              source1 :: String+>                             ,correlationName1 :: String+>                             ,lbids1 :: [(String,Type)]+>                             ,internalIds1 :: [(String,Type)]+>                             ,source2 :: String+>                             ,correlationName2 :: String+>                             ,lbids2 :: [(String,Type)]+>                             ,internalIds2 :: [(String,Type)]+>                             ,joinIds :: [String]+>                             }++> lbUpdate :: LocalBindingsUpdate -> LocalBindings -> LocalBindings+> lbUpdate lbu (LocalBindings lb) = LocalBindings (lbu : lb)++> lbExpandStar :: LocalBindings+>              -> String -- correlation name+>              -> Either [TypeError] [(String,String,String,Type)] -- either error or [source,(corr,name,type)]+> lbExpandStar (LocalBindings l) cor =+>   es l+>   where+>     es :: [LocalBindingsUpdate] -> Either [TypeError] [(String,String,String,Type)]+>     es (LBQualifiedIds src cor1 ids _ :lbus) = if cor == cor1 || cor == ""+>                                                then mapEm src cor1 ids+>                                                else es lbus+>     es (LBUnqualifiedIds src ids _ : lbus) = if cor == ""+>                                              then mapEm src "" ids+>                                              else es lbus+>     es (LBJoinIds _ _ _ _ _ _ _ _ _ :lbus) = undefined+>     es [] = Left [UnrecognisedCorrelationName cor]+>     mapEm :: String -> String -> [(String,Type)] -> Either [TypeError] [(String,String,String,Type)]+>     mapEm src c = Right . map (\(a,b) -> (src,c,a,b))++> lbLookupID :: LocalBindings+>            -> String -- correlation name+>            -> String -- identifier name+>            -> Either [TypeError] (String,String,String,Type) -- type error or source, corr, type+> lbLookupID (LocalBindings lb) cor i =+>   lk lb+>   where+>     lk (lbu:lbus) = case findID cor i lbu of+>                                           Nothing -> lk lbus+>                                           Just t -> t+>     lk [] = Left [UnrecognisedIdentifier (if cor == "" then i else cor ++ "." ++ i)]++> findID :: String+>        -> String+>        -> LocalBindingsUpdate+>        -> Maybe (Either [TypeError] (String,String,String,Type))+> findID cor i (LBQualifiedIds src cor1 ids intIds) =+>     if cor `elem` ["", cor1]+>     then case (msum [lookup i ids+>                     ,lookup i intIds]) of+>            Just ty -> Just $ Right (src,cor1,i,ty)+>            Nothing -> if cor == ""+>                       then Nothing+>                       else Just $ Left [UnrecognisedIdentifier (if cor == "" then i else cor ++ "." ++ i)]+>     else Nothing++> findID cor i (LBUnqualifiedIds src ids intIds) =+>   if cor == ""+>   then flip fmap (msum [lookup i ids+>                        ,lookup i intIds])+>          $ \ty -> Right (src,"",i,ty)+>   else Nothing+> findID cor i (LBJoinIds _ _ _ _ _ _ _ _ _)  = undefined+
+ Database/HsSqlPpp/AstInternals/TypeChecking/LocalIdentifierBindings.lhs view
@@ -0,0 +1,238 @@+Copyright 2009 Jake Wheat++This module contains the code to manage local identifier bindings+during the type checking process.++Main areas to support are parameters and variables++> {-# OPTIONS_HADDOCK hide  #-}++> module Database.HsSqlPpp.AstInternals.TypeChecking.LocalIdentifierBindings+>     (+>      QualifiedIDs+>     ,LocalIdentifierBindings+>     ,emptyBindings+>     ,updateBindings+>     ,LocalIdentifierBindingsUpdate(..)+>     ,libExpandStar+>     ,libLookupID+>     ) where++> import Control.Monad+> import Data.Char++> import Database.HsSqlPpp.AstInternals.TypeType+> import Database.HsSqlPpp.Utils+> import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal++> -- | The main datatype, this holds the catalog and context+> -- information to type check against.+> data LocalIdentifierBindings = LocalIdentifierBindings+>                    {identifierTypes :: [[QualifiedIDs]]+>                    ,starTypes :: [QualifiedIDs]}++++> -- | Represents an empty catalog. This doesn't contain things+> -- like the \'and\' operator, and so if you try to use it it will+> -- almost certainly not work.+> emptyBindings :: LocalIdentifierBindings+> emptyBindings = LocalIdentifierBindings [] []++> -- | Represents the types of the ids available, currently used for+> -- resolving identifiers inside select expressions. Will probably+> -- change as this is fixed to support more general contexts.  The+> -- components represent the qualifying name (empty string for no+> -- qualifying name), the list of identifier names with their types,+> -- and the list of system column identifier names with their types.+> type QualifiedIDs = (String, [(String,Type)])++> instance Show LocalIdentifierBindings where+>   show (LocalIdentifierBindings idTypes starEx) =+>       "ID Types:\n" ++ concatMap (flip showQList 0) idTypes +++>         "Star Exp:\n" ++ concatMap showQuals starEx+>       where+>         showQList :: [QualifiedIDs] -> Int -> String+>         showQList (x:xs) n = show n ++ ":\n" +++>                               showQuals x ++ "\n" ++ showQList xs (n + 1)+>         showQList [] _ = ""+>         showQuals :: QualifiedIDs -> String+>         showQuals (co, idList) = "qual: " ++ co ++ ":\n" ++ concatMap (\(n,t) -> n ++ "::" ++ show t ++ "\n") idList++++= Attribute identifier scoping++The way this scoping works is we have a list of prefixes/namespaces,+which is generally the table/view name, or the alias given to it, and+then a list of identifiers (with no dots) and their types. When we+look up the type of an identifier, if it has an correlation name we+try to match that against a table name or alias in that list, if it is+not present or not unique then throw an error. Similarly with no+correlation name, we look at all the lists, if the id is not present+or not unique then throw an error.++catIdentifierTypes is for expanding *. If we want to access the+common attributes from one of the tables in a using or natural join,+this attribute can be qualified with either of the table names/+aliases. But when we expand the *, we only output these common fields+once, so keep a separate list of these fields used just for expanding+the star. The other twist is that these common fields appear first in+the resultant field list.++System columns: pg also has these - they have names and types like+other attributes, but are not included when expanding stars, so you+only get them when you explicitly ask for them. The main use is using+the oid system column which is heavily used as a target for foreign+key references in the pg catalog.++This system still isn't working right. Subqueries are a+problem. Aspects which don't work right now are:++consider this query:+select relname as relvar_name+    from pg_class+    where ((relnamespace =+           (select oid+              from pg_namespace+              where (nspname = 'public'))) and (relkind = 'r'));++we need to be able to access attributes from pg_class inside the subquery,+but 1) they aren't inserted if you use * in the inner query+2) they can't make an identifier ambiguous, so the oid here in the subquery+is ok even though both the oid from pg_namespace and the oid from pg_class+are in scope.++So there are two problems with the current code:+it's too aggressive at throwing ambiguous identifier errors+it pulls in too many identifiers when expanding star++Solution ideas:+for the ambiguous errors, create a stack of identifiers, then split+the CatUpdateIDs into two, one to replace the current set, and one to+push a new set on the stack. Then fix the lookup to walk the stack level by level.++for the *, we already have special cases for system columns, and for+join ids. I think the best solution is to provide a separate list of *+columns and types, with a separate cat update ctor, and get the type+checker to resolve the list for * expansion rather than doing it here.++This should also handle parameters and variable declarations in plpgsql+functions too, these stack in the same way, with one complication to+do with parameters:++there is an additional complication with plpgsql, which isn't going to+be handled for now: instead of stacking like everything else, for+variable references inside select, insert, update and delete+statements only, which aren't qualified and match a parameter name,+then the parameter is used in lieu of variable declarations or+attributes inside a select expression. This will be handled at some+point.++this is something the lint checker should flag when it's written, it+will also flag any ambiguous identifiers which resolve ok only because+of stacking, this is a standard warning in many flavours of lint+checkers.++One last thing is that we need to make sure identifiers availability doesn't+get inherited too far: e.g. a create function inside a create function+can't access ids from the outer create function. This is pretty easy:+the following things generate identifier bindings:+select expressions, inside the expression+parameter defs+variable defs++since select expressions can't contain statements, we don't need to+worry about e.g. if statements, they want to inherit ids from params+and variable defs, so the default is good.++For catalogs being updated sequentially: since the catalog is+updated in a statement list (i.e. catalog updates stack from one+statement to the next within a single statement list), any var defs+can't break out of the containing list, so we are covered e.g. for a+variable def leaking from an inner block to an outer block.++With ids going into select expressions: we want the default which is+parameters, vardefs and ids from containing select expressions to be+inherited. So, in the end the only case to deal with is a create+function inside another create function. This isn't dealt with at the+moment.++++> libExpandStar :: LocalIdentifierBindings -> String -> Either [TypeError] [(String,Type)]+> libExpandStar cat correlationName =+>     case lookup correlationName $ starTypes cat of+>       Nothing -> errorWhen (correlationName == "")+>                            [InternalError "no star expansion found?"] >>+>                  Left [UnrecognisedCorrelationName correlationName]+>       Just l -> Right l++> splitIdentifier :: String -> (String,String)+> splitIdentifier s = let (a,b) = span (/= '.') s+>                     in if b == ""+>                          then ("", a)+>                          else (a,tail b)++> libLookupID :: LocalIdentifierBindings -> String -> Either [TypeError] Type+> libLookupID cat iden1 =+>   catLookupID' $ identifierTypes cat+>   where+>     (correlationName,iden) = splitIdentifier $ map toLower iden1+>     catLookupID' (its:itss) =+>       case lookup correlationName its of+>         Nothing -> catLookupID' itss+>         Just s -> case filter (\(n,_) -> map toLower n==iden) s of+>                     [] -> if correlationName == ""+>                             then catLookupID' itss+>                             else Left [UnrecognisedIdentifier $ correlationName ++ "." ++ iden]+>                     (_,t):[] -> Right t+>                     _ -> Left [AmbiguousIdentifier iden]+>     catLookupID' [] =+>       Left [if correlationName == ""+>               then UnrecognisedIdentifier iden+>               else UnrecognisedCorrelationName correlationName]++> -- | Applies a list of 'CatalogUpdate's to an 'Catalog' value+> -- to produce a new Catalog value.+> updateBindings :: LocalIdentifierBindings+>                -> Catalog+>                -> [LocalIdentifierBindingsUpdate]+>                -> Either [TypeError] LocalIdentifierBindings+> updateBindings lbs' cat eus =+>   let r = foldM updateCat' lbs' eus+>   in {-trace ("*********************************************\nupdatebindings from " ++ show lbs' ++ "\nto\n" ++ show r) -} r+>   where+>     updateCat' lbs eu =+>       case eu of+>         LibStackIDs qids -> return $ lbs {identifierTypes = expandComposites qids : identifierTypes lbs}+>         LibSetStarExpansion sids -> return $ lbs {starTypes = sids}+>     --take all the composite typed ids, and expand them out+>     expandComposites :: [(String, [(String,Type)])] -> [(String, [(String,Type)])]+>     expandComposites ((q,attrs):qis) =+>         ec attrs ++ (q, map (\(n,t) -> (n,wrapIfRecord n t)) attrs) : expandComposites qis+>         where+>           ec :: [(String,Type)] -> [(String, [(String,Type)])]+>           ec [] = []+>           ec ((nm,NamedCompositeType t):xs) = (nm,compFields t):ec xs+>           ec ((nm,SetOfType(NamedCompositeType t)):xs) = (nm,compFields t):ec xs+>           ec ((nm,CompositeType t):xs) = (nm, t):ec xs+>           ec ((nm,SetOfType(CompositeType t)):xs) = (nm, t):ec xs+>           ec (_:xs) = ec xs+>           wrapIfRecord n t =+>             case libLookupID lbs' n of+>               Right (PgRecord _) -> PgRecord (Just t)+>               _ -> t+>     expandComposites [] = []+>     compFields = fromRight [] . catCompositePublicAttrs cat []++> data LocalIdentifierBindingsUpdate =+>     -- | to allow an unqualified identifier reference to work you need to+>     -- supply an extra entry with \"\" as the alias, and all the fields,+>     -- in the case of joins, these unaliased fields need to have the+>     -- duplicates removed and the types resolved+>       LibStackIDs [QualifiedIDs]+>     -- | to allow an unqualified star to work you need to+>     -- supply an extra entry with \"\" as the alias, and all the fields+>     | LibSetStarExpansion [QualifiedIDs]+
Database/HsSqlPpp/AstInternals/TypeChecking/Misc.ag view
@@ -24,7 +24,7 @@  SEM TypeName      | SimpleTypeName-        loc.tpe = envLookupType @lhs.env $ canonicalizeTypeName @tn+        loc.tpe = catLookupType @lhs.cat $ canonicalizeTypeName @tn         loc.backTree = SimpleTypeName @ann @tn      | ArrayTypeName         loc.tpe = dependsOnRTpe [@typ.namedType] $ Right $ ArrayType @typ.namedType@@ -33,7 +33,7 @@         loc.tpe = dependsOnRTpe [@typ.namedType] $ Right $ SetOfType @typ.namedType         loc.backTree = SetOfTypeName @ann @typ.annotatedTree      | PrecTypeName-        loc.tpe = envLookupType @lhs.env $ canonicalizeTypeName @tn+        loc.tpe = catLookupType @lhs.cat $ canonicalizeTypeName @tn         loc.backTree = PrecTypeName @ann @tn @prec  @@ -105,5 +105,67 @@     where       modifier = (([TypeAnnotation nt] ++ fromMaybe [] add ++        map TypeErrorA errs) ++)++{-+================================================================================++proper dodgy:+1st pass is to add inferred types to the tree. This is done only for+expressions in a funcall argument list atm. Then we pull out the+placeholders after they've had this information added. Only the+placeholders in funcall argument lists will have their type inferred+in this way, to be expanded. Insert also does this currently, but in Dml.ag++This should probably be done during the typechecking phase instead,+but probably needs a proper type inferencing algorithm to be used, is+done like this for development expediency.++-}+getPlaceholders :: Data a => a -> [Expression]+getPlaceholders st =+    filter isPlaceholder $ everything (++) (mkQ [] ga) (setInferredTypes st)+    where+      ga :: Expression -> [Expression]+      ga s = [s]+      isPlaceholder e = case e of+                          PositionalArg _ _ -> True+                          Placeholder _ -> True+                          _ -> False++getPlaceholderTypes :: Data a => a -> [Type]+getPlaceholderTypes ex =+    map (getInferredType . getAnnotation) $ getPlaceholders ex+    where+      getInferredType (InferredType t:_) = t+      getInferredType (_:as) = getInferredType as+      getInferredType [] = TypeCheckFailed+++setInferredTypes :: Data a => a -> a+setInferredTypes =+      doExprs {-. doSts-}+     where+       doExprs =+         transformBi (\x ->+           case x of+             FunCall an op exprs+                 -> FunCall an op (addInferredTypes an exprs)+             x1 -> x1)+       {-doSts =+         transformBi (\x ->+           case x of+             Insert ann table targetCols insData returning+                 -> Insert ann table targetCols insData returning+             x1 -> x1)-}+       addInferredTypes an exprs =+           let args1 = fmap (\(_,a,_,_) -> a) $ fp an+               args = fromMaybe [] args1+               fargs = args ++ repeat TypeCheckFailed+           in flip map (zip exprs fargs)+                  (\(ex, ty) -> updateAnnotation (++ [InferredType ty]) ex)+           where+             fp (FunctionPrototypeA f:_) = Just f+             fp (_:ls) = fp ls+             fp [] = Nothing  }
Database/HsSqlPpp/AstInternals/TypeChecking/MiscCreates.ag view
@@ -18,7 +18,7 @@         loc.attrs = case getTypeAnnotation @expr.annotatedTree of                       SetOfType (CompositeType c) -> c                       _ -> [] --TODO: error ignored-        loc.envUpdates = [EnvCreateView @name @loc.attrs]+        loc.catUpdates = [CatCreateView @name @loc.attrs]         loc.statementType = []  {-@@ -51,7 +51,7 @@         loc.tpe = Right $ Pseudo Void         loc.backTree = CreateType @ann @name @atts.annotatedTree         loc.statementType = []-        loc.envUpdates = [EnvCreateComposite @name @atts.attrs]+        loc.catUpdates = [CatCreateComposite @name @atts.attrs]  {- @@ -64,8 +64,16 @@         loc.tpe = Right $ Pseudo Void         loc.backTree = CreateDomain @ann @name @typ.annotatedTree @checkName @check.annotatedTree         loc.statementType = []-        loc.envUpdates = [EnvCreateDomain (DomainType @name) @typ.namedType]+        loc.catUpdates = [CatCreateDomain (DomainType @name) @typ.namedType]         --allow refering to value as 'value' in check expression         check.lib = fromRight @lhs.lib $-                    updateBindings @lhs.lib @lhs.env+                    updateBindings @lhs.lib @lhs.cat                       [LibStackIDs [("", [("value", @typ.namedType)])]]++SEM Statement+    | CreateLanguage+        loc.tpe = Right $ Pseudo Void+        loc.backTree = CreateLanguage @ann @name+        loc.statementType = []+        loc.catUpdates = [CatCreateFunction FunName "plpgsql_call_handler" [] (Pseudo LanguageHandler) False+                         ,CatCreateFunction FunName "plpgsql_validator" [ScalarType "oid"] (Pseudo Void) False]
Database/HsSqlPpp/AstInternals/TypeChecking/Plpgsql.ag view
@@ -14,7 +14,7 @@                                 getTypeAnnotation                                 @value.annotatedTree] $ Right $ Pseudo Void         loc.backTree = Return @ann @value.annotatedTree-        loc.envUpdates = []+        loc.catUpdates = []         loc.statementType = []  @@ -25,10 +25,10 @@             let fromType = getTypeAnnotation @value.annotatedTree             toType <- libLookupID @lhs.lib @target             dependsOnRTpe [getTypeAnnotation @value.annotatedTree, toType] $ do-            checkAssignmentValid @lhs.env fromType toType+            checkAssignmentValid @lhs.cat fromType toType             return $ Pseudo Void         loc.backTree = Assignment @ann @target @value.annotatedTree-        loc.envUpdates = []+        loc.catUpdates = []         loc.statementType = []  SEM Statement@@ -42,19 +42,19 @@           --probably a bit too strict:           errorWhen (fromType /= toType) [FromToTypesNotSame fromType toType]           case @loc.varTypeE of-            Right t -> checkAssignmentValid @lhs.env fromType t+            Right t -> checkAssignmentValid @lhs.cat fromType t             Left _ -> return ()           return $ Pseudo Void         sts.lib =             case @loc.varTypeE of               Left [UnrecognisedIdentifier @var] ->                   fromRight @lhs.lib $-                  updateBindings @lhs.lib @lhs.env+                  updateBindings @lhs.lib @lhs.cat                                  [LibStackIDs [("", [(@var,getTypeAnnotation @from.annotatedTree)])]]               _ -> @lhs.lib          loc.backTree = ForIntegerStatement @ann @var @from.annotatedTree @to.annotatedTree @sts.annotatedTree-        loc.envUpdates = []+        loc.catUpdates = []         loc.statementType = []  @@ -66,7 +66,7 @@           dependsOnRTpe [@loc.selType] $ do           toType <- libLookupID @lhs.lib @var           dependsOnRTpe [toType] $ do-          checkAssignmentValid @lhs.env @loc.selType toType+          checkAssignmentValid @lhs.cat @loc.selType toType           return $ Pseudo Void         --just handles assigning to a record type for now         --one thing that isn't quite right is that the record variable@@ -75,13 +75,13 @@         sts.lib =             if okToUpdate               then fromRight @lhs.lib $-                   updateBindings @lhs.lib @lhs.env [LibStackIDs [("", [(@var,@loc.selType)])]]+                   updateBindings @lhs.lib @lhs.cat [LibStackIDs [("", [(@var,@loc.selType)])]]                    -- todo:ignoring error               else @lhs.lib             where               okToUpdate = isRight @loc.tpe && @loc.selType /= TypeCheckFailed          loc.backTree = ForSelectStatement @ann @var @sel.annotatedTree @sts.annotatedTree-        loc.envUpdates = []+        loc.catUpdates = []         loc.statementType = [] 
Database/HsSqlPpp/AstInternals/TypeChecking/SelectLists.ag view
@@ -58,11 +58,11 @@             targetTypeErrs = concat $ lefts $ targetTypeEithers             targetTypes = rights $ targetTypeEithers             typePairs = zip (map snd @items.listType) targetTypes-            assignErrs = concat $ lefts $ map (uncurry $ checkAssignmentValid @lhs.env) typePairs+            assignErrs = concat $ lefts $ map (uncurry $ checkAssignmentValid @lhs.cat) typePairs             sl = @into.strings             matchingComposite =                 case targetTypes of-                  [t] | isCompositeType t -> checkAssignmentValid @lhs.env (AnonymousRecordType (map snd @items.listType)) t+                  [t] | isCompositeType t -> checkAssignmentValid @lhs.cat (AnonymousRecordType (map snd @items.listType)) t                   _ -> Left []          lhs.annotatedTree = SelectList (@ann ++ map TypeErrorA @loc.errs)@@ -95,11 +95,11 @@            -> Type            -> [(String,Type)]            -> [(String,Type)]-expandStar env colName colType types =+expandStar cat colName colType types =     fromRight types $ do     let (correlationName,iden) = splitIdentifier colName     newCols <- if iden == "*"-                 then libExpandStar env correlationName+                 then libExpandStar cat correlationName                  else return [(iden, colType)]     return $ newCols ++ types 
Database/HsSqlPpp/AstInternals/TypeChecking/SelectStatement.ag view
@@ -12,14 +12,11 @@ SEM Statement     | SelectStatement         loc.tpe = dependsOnRTpe [getTypeAnnotation @ex.annotatedTree] $ Right $ Pseudo Void-        loc.statementType = [StatementType ph $ leftToEmpty id  $+        loc.statementType = [StatementType (getPlaceholderTypes @ex.annotatedTree) $ leftToEmpty id  $                                                 unwrapSetOfComposite $                                                 getTypeAnnotation @ex.annotatedTree]-                            where-                              ph = flip map (getPlaceholders @ex.annotatedTree)-                                     $ const $ ScalarType "text"         loc.backTree = SelectStatement @ann @ex.annotatedTree-        loc.envUpdates = []+        loc.catUpdates = []  SEM SelectExpression     | Values Select CombineSelect@@ -55,7 +52,7 @@ inside the from, if we have any join expressions we need to pass the types from the joined trefs to the join expressions. -So, the basic plan is to propagate the iden bindings in the env attribute+So, the basic plan is to propagate the iden bindings in the cat attribute as elsewhere, and also pass along a flag to say whether the previous stage type checked or not, so we can bail if it has failed. @@ -64,9 +61,9 @@ of ids easily. The problem might be with updating the annotations in the original tree though. -== env passing current bodge+== cat passing current bodge -env flow:+cat flow: current simple version: from tref -> select list           -> where@@ -94,8 +91,8 @@  SEM SelectExpression     | Select-         loc.newLib = case updateBindings @lhs.lib @lhs.env @selTref.libUpdates of-                        Left x -> error $ show x -- @lhs.env+         loc.newLib = case updateBindings @lhs.lib @lhs.cat @selTref.libUpdates of+                        Left x -> error $ show x -- @lhs.cat                         Right e -> e          selSelectList.lib = @loc.newLib          selWhere.lib = @loc.newLib@@ -107,7 +104,7 @@ SEM SelectExpression     | Values         loc.tpe = typeCheckValuesExpr-                              @lhs.env+                              @lhs.cat                               @vll.typeListList         loc.backTree = Values @ann @vll.annotatedTree     | Select@@ -133,32 +130,32 @@           let sel1t = getTypeAnnotation @sel1.annotatedTree               sel2t = getTypeAnnotation @sel2.annotatedTree           in dependsOnRTpe [sel1t, sel2t] $-                typeCheckCombineSelect @lhs.env sel1t sel2t+                typeCheckCombineSelect @lhs.cat sel1t sel2t         loc.backTree = CombineSelect @ann @ctype.annotatedTree                                      @sel1.annotatedTree                                      @sel2.annotatedTree  { -typeCheckValuesExpr :: Environment -> [[Type]] -> Either [TypeError] Type-typeCheckValuesExpr env rowsTs =+typeCheckValuesExpr :: Catalog -> [[Type]] -> Either [TypeError] Type+typeCheckValuesExpr cat rowsTs =         let colNames = zipWith (++)                            (repeat "column")                            (map show [1..length $ head rowsTs])-        in unionRelTypes env rowsTs colNames+        in unionRelTypes cat rowsTs colNames  -typeCheckCombineSelect :: Environment -> Type -> Type -> Either [TypeError] Type-typeCheckCombineSelect env v1 v2 = do+typeCheckCombineSelect :: Catalog -> Type -> Type -> Either [TypeError] Type+typeCheckCombineSelect cat v1 v2 = do     u1 <- unwrapSetOfComposite v1     let colNames = map fst u1     u2 <- unwrapSetOfComposite v2     let colTypes1 = map snd u1     let colTypes2 = map snd u2-    unionRelTypes env [colTypes1,colTypes2] colNames+    unionRelTypes cat [colTypes1,colTypes2] colNames -unionRelTypes :: Environment -> [[Type]] -> [String] -> Either [TypeError] Type-unionRelTypes env rowsTs colNames =+unionRelTypes :: Catalog -> [[Type]] -> [String] -> Either [TypeError] Type+unionRelTypes cat rowsTs colNames =   let lengths = map length rowsTs   in case () of              _ | null rowsTs ->@@ -167,7 +164,7 @@                    Left [ValuesListsMustBeSameLength]                | otherwise ->                    --i don't think this propagates all the errors, just the first set-                   mapM (resolveResultSetType env) (transpose rowsTs) >>=+                   mapM (resolveResultSetType cat) (transpose rowsTs) >>=                      (return . SetOfType . CompositeType . zip colNames)  }@@ -175,17 +172,3 @@ INCLUDE "TypeChecking/TableRefs.ag"  INCLUDE "TypeChecking/SelectLists.ag"---{-getPlaceholders :: Data a => a -> [Expression]-getPlaceholders st =-    filter isPlaceholder $ everything (++) (mkQ [] ga) st-    where-      ga :: Expression -> [Expression]-      ga s = [s]-      isPlaceholder e = case e of-                          PositionalArg _ _ -> True-                          Placeholder _ -> True-                          _ -> False-}
Database/HsSqlPpp/AstInternals/TypeChecking/Statements.ag view
@@ -5,56 +5,56 @@ lists, and includes the ag files for various flavours of statement.  The attributes and sem statements in this file are for chaining the-env updates as we progress through a statement list, and for producing-the resultant env after we've checked a whole ast, this can be used+cat updates as we progress through a statement list, and for producing+the resultant cat after we've checked a whole ast, this can be used e.g. to type check multiple files in a row which depend on eachother.  -} --- env updates syn attr is used by each statement to report+-- cat updates syn attr is used by each statement to report -- what changes it makes to the catalog, we use this to update--- the env to feed into the next statement+-- the cat to feed into the next statement -ATTR Statement [||envUpdates : {[EnvironmentUpdate]}+ATTR Statement [||catUpdates : {[CatalogUpdate]}                   libUpdates : {[LocalIdentifierBindingsUpdate]}]  -ATTR StatementList [envUpdates : {[EnvironmentUpdate]}+ATTR StatementList [catUpdates : {[CatalogUpdate]}                     libUpdates : {[LocalIdentifierBindingsUpdate]}||]  ---producedenv is used to pass the final updated env out-ATTR StatementList Root [|| producedEnv : Environment+--producedcat is used to pass the final updated cat out+ATTR StatementList Root [|| producedCat : Catalog                             producedLib : LocalIdentifierBindings] -ATTR Statement [inProducedEnv: Environment||]+ATTR Statement [inProducedCat: Catalog||]  SEM StatementList     | Cons Nil-        --newenv is the environment passed into the head statement+        --newcat is the catalog passed into the head statement         --updated with any catalog changes that that statement has made-        loc.newEnv = fromRight @lhs.env $ updateEnvironment @lhs.env @lhs.envUpdates-        loc.newLib = fromRight @lhs.lib $ updateBindings @lhs.lib @lhs.env @lhs.libUpdates+        loc.newCat = fromRight @lhs.cat $ updateCatalog @lhs.cat @lhs.catUpdates+        loc.newLib = fromRight @lhs.lib $ updateBindings @lhs.lib @lhs.cat @lhs.libUpdates     | Cons-        hd.env = @loc.newEnv-        tl.env = @loc.newEnv+        hd.cat = @loc.newCat+        tl.cat = @loc.newCat         hd.lib = @loc.newLib         tl.lib = @loc.newLib-        --produced env is used to chain the final updated environment from the last+        --produced cat is used to chain the final updated catalog from the last         --element of the list and pass it back up the list so in can be pushed up         -- to the root element and sent out from there-        lhs.producedEnv = @tl.producedEnv+        lhs.producedCat = @tl.producedCat         lhs.producedLib = @tl.producedLib-        --this is probably a bit inefficient: it creates a new environment from scratch-        --on each statement instead of chaining on the last updated env-        tl.envUpdates = @hd.envUpdates+        --this is probably a bit inefficient: it creates a new catalog from scratch+        --on each statement instead of chaining on the last updated cat+        tl.catUpdates = @hd.catUpdates         tl.libUpdates = @hd.libUpdates     | Nil-        lhs.producedEnv = @loc.newEnv+        lhs.producedCat = @loc.newCat         lhs.producedLib = @loc.newLib  SEM Statement-    | SelectStatement Insert Update Delete CreateView CreateDomain+    | SelectStatement Insert Update Delete CreateView CreateDomain CreateLanguage       CreateFunction CreateType CreateTable CreateTableAs Return Assignment       ForSelectStatement ForIntegerStatement DropFunction         loc.tpe : {Either [TypeError] Type}@@ -62,9 +62,9 @@                               (tpeToT @loc.tpe)                               (getErrors @loc.tpe)                               $ Just (map StatementTypeA @loc.statementType ++-                                      [EnvUpdates @loc.envUpdates])-        loc.envUpdates : {[EnvironmentUpdate]}-        lhs.envUpdates = @loc.envUpdates+                                      [CatUpdates @loc.catUpdates])+        loc.catUpdates : {[CatalogUpdate]}+        lhs.catUpdates = @loc.catUpdates         lhs.libUpdates = @loc.libUpdates     | Insert Update Delete CreateView CreateDomain       CreateFunction CreateType CreateTable CreateTableAs Return@@ -73,41 +73,41 @@         loc.libUpdates = []  SEM StatementList-    | Cons hd.inProducedEnv = @tl.producedEnv+    | Cons hd.inProducedCat = @tl.producedCat   SEM Root-    | Root statements.envUpdates = []+    | Root statements.catUpdates = []            statements.libUpdates = []  SEM Statement     | CaseStatement ContinueStatement Copy CopyData       DropSomething Execute ExecuteInto       If NullStatement Perform Raise ReturnNext ReturnQuery Truncate-      WhileStatement Set CreateLanguage Notify CreateSequence+      WhileStatement Set Notify CreateSequence       AlterSequence AlterTable CreateTrigger-        lhs.envUpdates = []+        lhs.catUpdates = []         lhs.libUpdates = []  SEM ExpressionListStatementListPair     | Tuple-        x2.envUpdates = []+        x2.catUpdates = []         x2.libUpdates = [] SEM ExpressionStatementListPair     | Tuple-        x2.envUpdates = []+        x2.catUpdates = []         x2.libUpdates = [] SEM FnBody     | PlpgsqlFnBody SqlFnBody-        sts.envUpdates = []+        sts.catUpdates = []         sts.libUpdates = [] SEM Statement     | CaseStatement If-        els.envUpdates = []+        els.catUpdates = []         els.libUpdates = [] SEM Statement     | ForIntegerStatement ForSelectStatement WhileStatement-        sts.envUpdates = []+        sts.catUpdates = []         sts.libUpdates = []  
Database/HsSqlPpp/AstInternals/TypeChecking/TableRefs.ag view
@@ -105,7 +105,7 @@                      Left e -> e                      Right _ -> []         loc.relType : {Either [TypeError] ([(String, Type)], [(String, Type)])}-        loc.relType = envCompositeAttrsPair @lhs.env [] @tbl+        loc.relType = catCompositeAttrsPair @lhs.cat [] @tbl         loc.relType1 = fromRight ([],[]) @loc.relType         loc.pAttrs = fst @loc.relType1         loc.sAttrs = snd @loc.relType1@@ -121,7 +121,7 @@                      Left e -> e                      Right _ -> []         loc.eqfunIdens : {Either [TypeError] (String,[(String,Type)])}-        loc.eqfunIdens = funIdens @lhs.env @loc.alias @fn.annotatedTree+        loc.eqfunIdens = funIdens @lhs.cat @loc.alias @fn.annotatedTree         loc.qfunIdens = fromRight ("",[]) @loc.eqfunIdens         loc.alias2 = fst @loc.qfunIdens         loc.funIdens = snd @loc.qfunIdens@@ -161,7 +161,7 @@                 -- type resolution (see typeconversion.lhs for more details                 -- and the relevant link to the pg manual                 resolvedTypes :: [Either [TypeError] Type]-                resolvedTypes = map (\(a,b) -> resolveResultSetType @lhs.env [a,b]) $ zip tjts t1jts+                resolvedTypes = map (\(a,b) -> resolveResultSetType @lhs.cat [a,b]) $ zip tjts t1jts             liftErrors $ concat $ lefts resolvedTypes             return $ zip jns $ rights resolvedTypes             where@@ -184,7 +184,7 @@          -- we need the attributes from the joined tables to be available         -- in the join expression.-        loc.newLib = case updateBindings @lhs.lib @lhs.env (@loc.libUpdates ++ @lhs.jlibUpdates) of+        loc.newLib = case updateBindings @lhs.lib @lhs.cat (@loc.libUpdates ++ @lhs.jlibUpdates) of                        Left x -> error $ show x                        Right e -> {-trace ("on expr lib:" ++ show e)-} e         onExpr.lib = @loc.newLib@@ -214,8 +214,8 @@ need to check to see what should happen with arrayof  -}-funIdens :: Environment -> String -> Expression -> Either [TypeError] (String,[(String,Type)])-funIdens env alias fnVal = do+funIdens :: Catalog -> String -> Expression -> Either [TypeError] (String,[(String,Type)])+funIdens cat alias fnVal = do    errorWhen (case fnVal of                 FunCall _ _ _ -> False                 _ -> True)@@ -226,7 +226,7 @@                            else fnName    attrs <- do      case getTypeAnnotation fnVal of-       SetOfType (NamedCompositeType t) -> envCompositePublicAttrs env [] t+       SetOfType (NamedCompositeType t) -> catCompositePublicAttrs cat [] t        SetOfType x -> return [(correlationName,x)]        y -> return [(correlationName,y)]    return (correlationName, attrs)
Database/HsSqlPpp/AstInternals/TypeChecking/TypeChecking.ag view
@@ -44,8 +44,8 @@  Here are the main attributes used in the type checking: -env is used to chain the environments up and down the tree, to allow-access to the catalog information, and to store the in environment+cat is used to chain the catalogs up and down the tree, to allow+access to the catalog information, and to store the in catalog identifier names and types e.g. inside a select expression.  annotatedTree is used to create a copy of the ast with the type,@@ -53,7 +53,7 @@  -} ATTR AllNodes Root ExpressionRoot-  [ env : Environment+  [ cat : Catalog     lib : LocalIdentifierBindings || annotatedTree : SELF                                      -- workaround: avoid bogus cycle                                      -- detections search for this,@@ -209,5 +209,27 @@ This canonical form should pretty print and parse back to the same form, and type check correctly. ++================================================================================++type inferencing++some random ideas about using type inferencing++1) need to be able to gather the constraints: introduce a variable+   name for each node that has a type collect together all the+   equations that relate these variables+2) need to be able to unify these to get types or errors+3) need to rebuild the tree containing the results of this process in+   the annotations, either types or errors++possible issues, don't know how these will affect the process:++literal strings in pg have the type unknown as well as possibly a real+type determined by inference+the implicit type casting e.g. for function resolution is pretty wacky+combinining these, function call resolution apparently distinguishes+between arguments which are unknown and then resolve to being text,+and arguments which are already known to be text, e.g.  -}
Database/HsSqlPpp/AstInternals/TypeChecking/TypeConversion.lhs view
@@ -28,11 +28,11 @@  > import Data.Maybe > import Data.List-> import Debug.Trace+> --import Debug.Trace  > import Database.HsSqlPpp.AstInternals.TypeType > import Database.HsSqlPpp.AstInternals.TypeChecking.ErrorUtils-> import Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal+> import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal > import Database.HsSqlPpp.Utils   > traceIt :: Show a => String -> a -> a@@ -127,8 +127,8 @@  > type ProtArgCast = (FunctionPrototype, [ArgCastFlavour]) -> findCallMatch :: Environment -> String -> [Type] ->  Either [TypeError] FunctionPrototype-> findCallMatch env f inArgs =+> findCallMatch :: Catalog -> String -> [Type] ->  Either [TypeError] FunctionPrototype+> findCallMatch cat f inArgs = >     returnIfOnne [ >        exactMatch >       ,binOp1UnknownMatch@@ -144,7 +144,7 @@ >       initialCandList :: [FunctionPrototype] >       initialCandList = filter (\(_,candArgs,_,_) -> >                                   length candArgs == length inArgs) $->                                map expandVariadic $ envLookupFns env f+>                                map expandVariadic $ catLookupFns cat f > >       expandVariadic fp@(fn,a,r,v) = >         if v@@ -183,11 +183,11 @@ > >       mostExactMatches :: [ProtArgCast] >       mostExactMatches =->         let inArgsBase = map (replaceWithBase env) inArgs+>         let inArgsBase = map (replaceWithBase cat) inArgs >             exactCounts :: [Int] >             exactCounts = >               map ((length->                       . filter (\(a1,a2) -> a1==replaceWithBase env a2)+>                       . filter (\(a1,a2) -> a1==replaceWithBase cat a2) >                       . zip inArgsBase) >                 . (\((_,a,_,_),_) -> a)) reachable >             pairs = zip reachable exactCounts@@ -220,8 +220,8 @@ >                           listCastPairs' (ia:ias) (ca:cas) = >                               (case () of >                                  _ | ia == ca -> ExactMatch->                                    | castableFromTo env ImplicitCastContext ia ca ->->                                        if envPreferredType env ca+>                                    | castableFromTo cat ImplicitCastContext ia ca ->+>                                        if forceRight (catPreferredType cat ca) >                                          then ImplicitToPreferred >                                          else ImplicitToNonPreferred >                                    | otherwise -> CannotCast@@ -307,7 +307,7 @@ >                                                   Pseudo AnyNonArray -> Just ia >                                                   _ -> Nothing) >                 in {-trace ("\nresolve types: " ++ show typeList ++ "\n") $-}->                    case resolveResultSetType env typeList of+>                    case resolveResultSetType cat typeList of >                      Left _ -> Nothing >                      Right t -> Just t >             instantiatePolyType :: ProtArgCast -> Type -> ProtArgCast@@ -369,7 +369,7 @@ >                   getCandsCatAt :: Int -> Either () String >                   getCandsCatAt n' = >                       let typesAtN = map (!!n') candArgLists->                           catsAtN = map (envTypeCategory env) typesAtN+>                           catsAtN = map (forceRight . catTypeCategory cat) typesAtN >                       in case () of >                            --if any are string choose string >                            _ | any (== "S") catsAtN -> Right "S"@@ -393,7 +393,7 @@ >                            catMatches = filter (\c -> Right (getCatForArgN n c) == >                                                      (cats !! n)) cands >                            prefMatches :: [ProtArgCast]->                            prefMatches = filter (envPreferredType env .+>                            prefMatches = filter (forceRight . catPreferredType cat . >                                                    getTypeForArgN n) catMatches >                            keepMatches :: [ProtArgCast] >                            keepMatches = if length prefMatches > 0@@ -403,7 +403,7 @@ >            getTypeForArgN :: Int -> ProtArgCast -> Type >            getTypeForArgN n ((_,a,_,_),_) = a !! n >            getCatForArgN :: Int -> ProtArgCast -> String->            getCatForArgN n = envTypeCategory env . getTypeForArgN n+>            getCatForArgN n = forceRight . catTypeCategory cat . getTypeForArgN n > >       -- utils >       -- filter a candidate/cast flavours pair by a predicate on each@@ -449,39 +449,39 @@  code is not as much of a mess as findCallMatch -> resolveResultSetType :: Environment -> [Type] -> Either [TypeError] Type-> resolveResultSetType env inArgs =+> resolveResultSetType :: Catalog -> [Type] -> Either [TypeError] Type+> resolveResultSetType cat inArgs = >   dependsOnRTpe inArgs $ do >   errorWhen (null inArgs) [TypelessEmptyArray] >   returnWhen allSameType (head inArgs) $ do >   returnWhen allSameBaseType (head inArgsBase) $ do->   returnWhen allUnknown (ScalarType "text") $ do+>   --returnWhen allUnknown (UnknownType) $ do >   errorWhen (not allSameCat) [IncompatibleTypeSet inArgs] >   returnWhen (isJust targetType && >               allConvertibleToFrom (fromJust targetType) inArgs) >               (fromJust targetType) $ do >   Left [IncompatibleTypeSet inArgs] >   where->      allSameType = all (== head inArgs) inArgs &&->                      head inArgs /= UnknownType+>      allSameType = all (== head inArgs) inArgs -- &&+>                      --head inArgs /= UnknownType >      allSameBaseType = all (== head inArgsBase) inArgsBase && >                      head inArgsBase /= UnknownType->      inArgsBase = map (replaceWithBase env) inArgs->      allUnknown = all (==UnknownType) inArgsBase->      allSameCat = let firstCat = envTypeCategory env (head knownTypes)->                   in all (\t -> envTypeCategory env t == firstCat)+>      inArgsBase = map (replaceWithBase cat) inArgs+>      --allUnknown = all (==UnknownType) inArgsBase+>      allSameCat = let firstCat = catTypeCategory cat (head knownTypes)+>                   in all (\t -> catTypeCategory cat t == firstCat) >                          knownTypes >      targetType = case catMaybes [firstPreferred, lastAllConvertibleTo] of >                     [] -> Nothing >                     (x:_) -> Just x->      firstPreferred = find (envPreferredType env) knownTypes+>      firstPreferred = find (forceRight . catPreferredType cat) knownTypes >      lastAllConvertibleTo = firstAllConvertibleTo (reverse knownTypes) >      firstAllConvertibleTo (x:xs) = if allConvertibleToFrom x xs >                                       then Just x >                                       else firstAllConvertibleTo xs >      firstAllConvertibleTo [] = Nothing >      knownTypes = filter (/=UnknownType) inArgsBase->      allConvertibleToFrom = all . flip (castableFromTo env ImplicitCastContext)+>      allConvertibleToFrom = all . flip (castableFromTo cat ImplicitCastContext)  todo: cast empty array, where else can an empty array work?@@ -490,15 +490,15 @@  = checkAssignmentValue -> checkAssignmentValid :: Environment -> Type -> Type -> Either [TypeError] ()-> checkAssignmentValid env from to =->     if castableFromTo env AssignmentCastContext from to+> checkAssignmentValid :: Catalog -> Type -> Type -> Either [TypeError] ()+> checkAssignmentValid cat from to =+>     if castableFromTo cat AssignmentCastContext from to >        then Right () >        else Left [IncompatibleTypes to from] -> compositesCompatible :: Environment -> Type -> Type -> Bool-> compositesCompatible env =->     castableFromTo env ImplicitCastContext+> compositesCompatible :: Catalog -> Type -> Type -> Bool+> compositesCompatible cat =+>     castableFromTo cat ImplicitCastContext  ================================================================================ @@ -506,8 +506,8 @@  wrapper around the catalog to add a bunch of extra valid casts -> castableFromTo :: Environment -> CastContext -> Type -> Type -> Bool-> castableFromTo env cc from to =+> castableFromTo :: Catalog -> CastContext -> Type -> Type -> Bool+> castableFromTo cat cc from to = >   {-trace ("check cast " ++ show from ++ "->" ++ show to) $-} >   -- put this here to avoid having to write it everywhere else >   from == to@@ -517,13 +517,13 @@ >   || to == UnknownType >   -- check base types of domains >   || ((isDomainType from || isDomainType to)->       && castableFromTo env cc (replaceWithBase env from)->                                (replaceWithBase env to))+>       && castableFromTo cat cc (replaceWithBase cat from)+>                                (replaceWithBase cat to)) >   -- check the casts listed in the catalog->   || envCast env cc from to+>   || forceRight (catCast cat cc from to) >   -- implicitcast => assignment cast >   || (cc == AssignmentCastContext->       && envCast env ImplicitCastContext from to)+>       && forceRight (catCast cat ImplicitCastContext from to)) >   -- can assign composite to record >   || (cc == AssignmentCastContext >       && isCompOrSetoOfComp from@@ -540,12 +540,12 @@ >   || case (getCompositeTypes from >           ,getCompositeTypes to) of >        -- zip almost does the right thing here, needs a bit of tweaking->        (Just ft, Just tt) | length ft == length tt -> all (uncurry $ castableFromTo env cc) $ zip ft tt+>        (Just ft, Just tt) | length ft == length tt -> all (uncurry $ castableFromTo cat cc) $ zip ft tt >        _ -> False >   where  >     getCompositeTypes (NamedCompositeType n) =->         Just $ map snd $ fromRight [] $ envCompositePublicAttrs env [] n+>         Just $ map snd $ fromRight [] $ catCompositePublicAttrs cat [] n >     getCompositeTypes (CompositeType t) = Just $ map snd t >     getCompositeTypes (AnonymousRecordType t) = Just t >     getCompositeTypes (PgRecord Nothing) = Nothing@@ -563,9 +563,9 @@ >     unboxedSetOfType (PgRecord (Just t)) = unboxedSetOfType t >     unboxedSetOfType _ = Nothing ->     recurseTransFrom = maybe False (flip (castableFromTo env cc) to)->     recurseTransTo = maybe False (castableFromTo env cc from)+>     recurseTransFrom = maybe False (flip (castableFromTo cat cc) to)+>     recurseTransTo = maybe False (castableFromTo cat cc from) -> replaceWithBase :: Environment -> Type -> Type-> replaceWithBase env t@(DomainType _) = envDomainBaseType env t+> replaceWithBase :: Catalog -> Type -> Type+> replaceWithBase cat t@(DomainType _) = forceRight $ catDomainBaseType cat t > replaceWithBase _ t = t
Database/HsSqlPpp/AstInternals/TypeType.lhs view
@@ -40,10 +40,6 @@  The Type type identifies the type of a node, but doesn't necessarily describe the type.-Arraytype, setoftype and row are treated as type generators, and are-unnamed so have structural equality. Other types sometimes effectively-have structural equality depending on the context... (SQL/ PostGreSQL-wasn't designed by ML programmers!)  Typing relational valued expressions: use SetOfType combined with composite type for now, see if it works@@ -59,6 +55,7 @@ > import Control.Monad.Error  > import Data.Generics+> import Data.Generics.PlateData   > import Data.Binary @@ -126,7 +123,7 @@ >                | WrongNumberOfColumns >                | ExpectedDomainType Type >                | DomainDefNotFound Type->                | BadEnvironmentUpdate String+>                | BadCatalogUpdate String >                | TypeAlreadyExists Type >                | AnyAllError String >                | InternalError String@@ -156,7 +153,8 @@ > typeChar = ScalarType "char" > typeBool = ScalarType "bool" -this converts the name of a type to its canonical name+this converts the name of a type to its canonical name:+try to follow the names that pg uses in a dump  > canonicalizeTypeName :: String -> String > canonicalizeTypeName s =@@ -181,6 +179,13 @@ >       varcharNames = ["character varying", "varchar"] >       charNames = ["character", "char"] >       boolNames = ["boolean", "bool"]++> canonicalizeTypes :: Data a => a -> a+> canonicalizeTypes =+>   transformBi $ \x ->+>       case x of+>         ScalarType s -> ScalarType $ canonicalizeTypeName s+>         x1 -> x1  random notes on pg types: 
− Database/HsSqlPpp/Commands/CommandComponents.lhs
@@ -1,420 +0,0 @@-Copyright 2009 Jake Wheat--Wrappers used in the command line program--> {-# LANGUAGE FlexibleContexts #-}---> {- | This module contains all the functions used in the hssqlsystem->      exe. Mainly a set of wrappers to lift other functions into an->      ErrorT monad. See HsSqlSystem.lhs for example use.-> -}-> module Database.HsSqlPpp.Commands.CommandComponents->     (->      -- * errort wrapper->      wrapET->      -- * parsing->     ,lexSql->     ,parseSql1->     ,parseExpression1->      -- * show and pretty print->     ,printList->     ,ppSh->     ,ppSql->     ,ppAnnOrig->     ,ppTypeErrors->      -- * annotations->     ,stripAnn->     ,typeCheckC->     ,typeCheckExpressionC->     ,getTEs->     ,Database.HsSqlPpp.Commands.CommandComponents.getTopLevelTypes->      -- * dbms access->     ,readCatalog->     ,clearDB->     ,loadAst->     ,loadSqlUsingPsqlFromFile->     ,loadSqlUsingPsql->     ,pgDump->      -- catalog diffs->     ,compareCatalogs->     ,ppCatDiff->     ,CatDiff(..)->      -- extensions->     ,runExtensions->     -- docs->     ,pandoc->     ,hsTextize->     -- testing->     ,wrapperGen1->      -- * utils->     ,message->     ,putStrLnList->     ,readInput->     ,Database.HsSqlPpp.Commands.CommandComponents.writeFile->     ,lconcat->     ,lfst->     ,lsnd->     ,AllErrors(..)->     ) where--> import Control.Monad.Error-> import System-> import Data.List-> import System.IO-> import Data.Generics--> import Text.Show.Pretty-> import System.Process.Pipe-> --import Text.Pandoc--> import Database.HsSqlPpp.Parsing.Parser-> import Database.HsSqlPpp.Parsing.Lexer--> import Database.HsSqlPpp.Ast.TypeChecker as A-> import Database.HsSqlPpp.Ast.Annotation-> import Database.HsSqlPpp.Ast.Environment-> import Database.HsSqlPpp.Ast.Ast-> import Database.HsSqlPpp.Ast.SqlTypes--> import Database.HsSqlPpp.PrettyPrinter.PrettyPrinter-> import Database.HsSqlPpp.PrettyPrinter.AnnotateSource--> import Database.HsSqlPpp.Dbms.DBAccess-> import Database.HsSqlPpp.Dbms.DatabaseLoader--> import Database.HsSqlPpp.Extensions.ChaosExtensions--> import Database.HsSqlPpp.Utils-> import Database.HsSqlPpp.HsText.HsText--> import Database.HsSqlPpp.Dbms.WrapperGen--===============================================================================--parsing--> -- | Lex a string to a list of tokens.-> lexSql :: Monad m => String -> String -> ErrorT AllErrors m [Token]-> lexSql f = throwEEEither . lexSqlText f--> -- | Parse a string to an ast.-> parseSql1 :: Monad m => String -> String -> ErrorT AllErrors m StatementList-> parseSql1 f = throwEEEither . parseSql f--> -- | Parse an expression to an ast.-> parseExpression1 :: Monad m => String -> String -> ErrorT AllErrors m Expression-> parseExpression1 f = throwEEEither . parseExpression f--================================================================================--> -- | Transform an ast using the chaos syntax extensions.-> runExtensions :: (Monad m, Error e) => StatementList -> ErrorT e m StatementList-> runExtensions = return . extensionize--================================================================================--annotation ish--> -- | Take an ast and remove all the annotations. Can be used to view-> --   an ast without all the source position annotations cluttering-> --   it up.-> stripAnn :: (Monad m, Error e, Data a) => a -> ErrorT e m a-> stripAnn = return . stripAnnotations--> -- | Type check an ast against a catalog, return the annotated ast-> --   and the updated catalog.-> typeCheckC :: (Monad m, Error e) => Environment -> StatementList->            -> ErrorT e m (Environment, StatementList)-> typeCheckC cat = return . typeCheck cat--> -- | Type check an expression ast against a catalog-> typeCheckExpressionC :: (Monad m, Error e) => Environment -> Expression->                      -> ErrorT e m Expression-> typeCheckExpressionC cat = return . typeCheckExpression cat--could probably make this more general, so can run an arbitrary filter-on annotations and then get a list of them with source positions--> -- | Take an ast and return a list of type errors with source position-> --   if available.-> getTEs :: (Monad m, Error e, Data d) =>->           d -> ErrorT e m [(Maybe AnnotationElement,[TypeError])]-> getTEs = return . getTypeErrors--> -- | Pretty print list of type errors with optional source position-> --   in emacs readable format.-> ppTypeErrors :: Monad m =>->                 [(Maybe AnnotationElement, [TypeError])] -> m [String]-> ppTypeErrors tes =->   return $ map showSpTe tes->   where->     showSpTe (Just (SourcePos fn l c), e) =->         fn ++ ":" ++ show l ++ ":" ++ show c ++ ":\n" ++ show e->     showSpTe (_,e) = "unknown:0:0:\n" ++ show e--> -- | Get the top level type annotation from the ast passed.-> getTopLevelTypes :: (Monad m, Error e, Data d) =>->           d -> ErrorT e m [Type]-> getTopLevelTypes ast = return $ A.getTopLevelTypes [ast]---================================================================================--pretty printing--todo: change the naming convention, so fns which produce haskell-syntax start with show, human readable stuff starts with pp, not sure-where printsql comes in system though--> -- | use ppshow to pretty print a value.-> ppSh :: (Monad m, Error e, Show a) => a -> ErrorT e m String-> ppSh = return . ppShow--> -- | pretty print an ast.-> ppSql :: (Monad m, Error e) => StatementList -> ErrorT e m String-> ppSql = return . printSql--> -- | take a source text and annotated ast and interpolate annotations into the source-> --   as comments-> ppAnnOrig :: (Monad m, Error e) => Bool -> String -> StatementList -> ErrorT e m String-> ppAnnOrig doErrs src = return . annotateSource doErrs src--================================================================================--dbms utilities--> -- | get the catalog from the database-> readCatalog :: MonadIO m => String -> ErrorT AllErrors m Environment-> readCatalog dbName =->   liftIO (readEnvironmentFromDatabase dbName) >>=->   throwTESEither . updateEnvironment defaultEnvironment--> -- | run psql to load the sql text into a database.-> loadSqlUsingPsql :: MonadIO m  => String -> String -> ErrorT AllErrors m String-> loadSqlUsingPsql dbName =->   liftIO . pipeString [("psql", [dbName->                                 ,"-q"->                                 ,"--set"->                                 ,"ON_ERROR_STOP=on"->                                 ,"--file=-"])]--> -- | run psql to load sql from the filename given into a database.-> loadSqlUsingPsqlFromFile :: MonadIO m  => String -> FilePath -> ErrorT AllErrors m String-> loadSqlUsingPsqlFromFile dbName fn = do->   ex <- liftIO $ system ("psql " ++ dbName ++->                 " -q --set ON_ERROR_STOP=on" ++->                 " --file=" ++ fn)->   case ex of->     ExitFailure e -> throwError $ AEMisc $ "psql failed with " ++ show e->     ExitSuccess -> return ""--> -- | use the hssqlppp code to load the sql into a database directly-> --   (this parses and pretty prints the sql to load it)-> loadAst :: (MonadIO m, Error e) => String -> String -> StatementList -> ErrorT e m ()-> loadAst db fn = liftIO . loadIntoDatabase db fn--> -- | use a dodgy hack to clear the database given-> clearDB :: MonadIO m => String -> ErrorT AllErrors m ()-> clearDB db =->   liftIO $ withConn ("dbname=" ++ db) $ \conn ->->     runSqlCommand conn "drop owned by jake cascade;"--> -- | dump the given database to sql source using pg_dump-> pgDump :: MonadIO m => String -> ErrorT AllErrors m String-> pgDump db = liftIO $ pipeString [("pg_dump", [db->                                              ,"--schema-only"->                                              ,"--no-owner"->                                              ,"--no-privileges"])] ""--================================================================================--catalog stuff - just a diff to compare two catalogs--> -- | items in first catalog and not second, items in second and not first.-> data CatDiff = CatDiff [EnvironmentUpdate] [EnvironmentUpdate]->                deriving Show--> -- | find differences between two catalogs-> compareCatalogs :: (Monad m, Error e) => Environment -> Environment -> Environment -> ErrorT e m CatDiff-> compareCatalogs base start end =->         let baseEnvBits = deconstructEnvironment base->             startEnvBits = deconstructEnvironment start \\ baseEnvBits->             endEnvBits = deconstructEnvironment end \\ baseEnvBits->             missing = sort $ endEnvBits \\ startEnvBits->             extras = sort $ startEnvBits \\ endEnvBits->         in return $ CatDiff missing extras--> -- | print a catdiff in a more human readable way than show.-> ppCatDiff :: (Monad m, Error e) => CatDiff -> ErrorT e m String-> ppCatDiff (CatDiff missing extra) =->           return $ "\nmissing:\n"->                    ++ intercalate "\n" (map ppEnvUpdate missing)->                    ++ "\nextra:\n"->                    ++ intercalate "\n" (map ppEnvUpdate extra)--================================================================================--> -- | Documentation command to produce some hssqlppp docs, takes a-> --   pandoc source file and converts to html, can run and insert-> --   commands embedded in the source-> pandoc :: MonadIO m => String -> ErrorT AllErrors m String-> pandoc txt = return txt {-->   liftM (writeHtmlString wopt . readMarkdown defaultParserState)->     (hsTextize txt)->   where->     wopt = defaultWriterOptions {->                writerStandalone = True->               ,writerTitlePrefix = "HsSqlPpp documentation"->               ,writerTableOfContents = True->               ,writerHeader = "<style>\n\->                               \pre {\n\->                               \    border: 1px dotted gray;\n\->                               \    background-color: #ececec;\n\->                               \    color: #1111111;\n\->                               \    padding: 0.5em;\n\->                               \}\n\->                               \</style>"->              }-}---writerStandalone :: Bool	Include header and footer-writerHeader :: String	Header for the document-writerTitlePrefix :: String	Prefix for HTML titles-writerTabStop :: Int	Tabstop for conversion btw spaces and tabs-writerTableOfContents :: Bool	Include table of contents-writerS5 :: Bool	We're writing S5-writerHTMLMathMethod :: HTMLMathMethod	How to print math in HTML-writerIgnoreNotes :: Bool	Ignore footnotes (used in making toc)-writerIncremental :: Bool	Incremental S5 lists-writerNumberSections :: Bool	Number sections in LaTeX-writerIncludeBefore :: String	String to include before the body-writerIncludeAfter :: String	String to include after the body-writerStrictMarkdown :: Bool	Use strict markdown syntax-writerReferenceLinks :: Bool	Use reference links in writing markdown, rst-writerWrapText :: Bool	Wrap text to line length-writerLiterateHaskell :: Bool	Write as literate haskell-writerEmailObfuscation :: ObfuscationMethod	How to obfu-->   {-ex <- liftIO $ system ("pandoc -s -f markdown -t html "->                          ++ src ++ " -o " ++ tgt)->   case ex of->     ExitFailure e -> throwError $ AEMisc $ "psql failed with " ++ show e->     ExitSuccess -> return ()-}--================================================================================--process doc commands--> -- | read a text file, and pull out the commands, run them and insert-> --   the results into the text-> hsTextize :: MonadIO m => String -> ErrorT AllErrors m String-> hsTextize s =->     liftIO (hsTextify->              (("hssqlsystem", hsSqlSystemCommand):defaultCommands)->              "docs/build"->              s) >>= throwEither . mapLeft AEMisc--> -- | run hssqlsystem using shell-> hsSqlSystemCommand :: String -> IO String-> hsSqlSystemCommand s =  shell ("HsSqlSystem " ++ s) >>= \m ->->                         return $ "$ HsSqlSystem " ++ s->                                  ++ "\n\n~~~~~~~~~~\n"->                                  ++ m->                                  ++ "\n~~~~~~~~~~\n\n"--================================================================================--> wrapperGen1 :: (MonadIO m, Error e) => String -> String -> ErrorT e m String-> wrapperGen1 db fn = liftIO $ wrapperGen db fn---================================================================================--errort stuff--wrap all our errors in an algebraic data type, not sure if there is a-more elegant way of doing this but it does the job for now--> data AllErrors = AEExtendedError ParseErrorExtra->                | AETypeErrors [TypeError]->                | AEMisc String->                  deriving (Show)--> instance Error AllErrors where->   noMsg = AEMisc "Unknown error"->   strMsg = AEMisc--> throwEEEither :: (MonadError AllErrors m) => Either ParseErrorExtra a -> m a-> throwEEEither = throwEither . mapLeft AEExtendedError--> throwTESEither :: (MonadError AllErrors m) => Either [TypeError] a -> m a-> throwTESEither = throwEither . mapLeft AETypeErrors--> throwEither :: (MonadError t m) => Either t a -> m a-> throwEither (Left err) = throwError err-> throwEither (Right val) = return val--================================================================================--read file as string - issues are:--want to support reading from stdin, and reading from a string passed-as an argument to the exe--> -- | read a file as text, will read from stdin if filename is '-'.-> readInput :: (Error e, MonadIO m) => FilePath -> ErrorT e m String-> readInput f =->   liftIO $ case f of->              "-" -> getContents->              _ | length f >= 2 &&->                  head f == '"' && last f == '"'->                    -> return $ drop 1 $ take (length f - 1) f->                | otherwise -> readFile f--================================================================================--> -- | write text to a file-> writeFile :: (Error e, MonadIO m) => FilePath -> String -> ErrorT e m ()-> writeFile fn =->     liftIO . System.IO.writeFile fn--================================================================================--Utilities--> -- | wrapper for putstrln-> message :: MonadIO m => String -> m ()-> message = liftIO . putStrLn--run in errort monad-should think of something better to do here than just rethrow as io error1--> -- wrapper to run in errorT monad and return right or error on left-> wrapET :: (Show e, Monad m) => ErrorT e m a -> m a-> wrapET c = runErrorT c >>= \x ->->          case x of->            Left er -> error $ show er->            Right l -> return l--> -- | print a list, using newlines instead of commas, no outer []-> printList :: (MonadIO m, Show a) => [a] -> m ()-> printList = mapM_ (liftIO . print)--> -- | run putstrln over each element of a list-> putStrLnList :: MonadIO m => [String]-> m ()-> putStrLnList = mapM_ (liftIO . putStrLn)--> -- | lifted fst-> lfst :: (Monad m, Error e) => (a,b) -> ErrorT e m a-> lfst = return . fst--> -- | lifted snd-> lsnd :: (Monad m, Error e) => (a,b) -> ErrorT e m b-> lsnd = return . snd--> -- | lifted concat-> lconcat :: (Monad m, Error e) => [[a]] -> ErrorT e m [a]-> lconcat = return . concat--
Database/HsSqlPpp/Dbms/DBAccess.lhs view
@@ -20,7 +20,7 @@ > runSqlCommand :: (IConnection conn) => >           conn -> String -> IO () > runSqlCommand conn query = do->     run conn query []+>     _ <- run conn query [] >     commit conn  > withConn :: String -> (Pg.Connection -> IO c) -> IO c@@ -48,7 +48,7 @@ >                  conn -> String -> [String] -> IO [[String]] > selectRelation conn query args = do >   sth <- prepare conn query->   execute sth $ map sToSql args+>   _ <- execute sth $ map sToSql args >   v <- fetchAllRows' sth >   return $ map (map sqlToS) v 
+ Database/HsSqlPpp/Dbms/DBAccess2.lhs view
@@ -0,0 +1,184 @@+Copyright 2010 Jake Wheat++More refined example wrapper generator, uses template haskell. See the+docs attached to sqlStmt function below++> {-# LANGUAGE TemplateHaskell #-}++> module Database.HsSqlPpp.Dbms.DBAccess2+>     (withConn+>     ,sqlStmt+>     ,IConnection) where++> import Language.Haskell.TH++> import Data.Maybe+> import Control.Applicative+> import Control.Monad.Error+> import Control.Monad+> import Control.Exception++> import Database.HDBC+> import qualified Database.HDBC.PostgreSQL as Pg++> import System.IO.Unsafe+> import Data.IORef++> import Database.HsSqlPpp.Dbms.WrapLib+> import qualified Database.HsSqlPpp.Ast.SqlTypes as Sql+> import Database.HsSqlPpp.Ast.Catalog+> import Database.HsSqlPpp.Ast.TypeChecker+> import Database.HsSqlPpp.Parsing.Parser+> import Database.HsSqlPpp.Ast.Annotation+> import Database.HsSqlPpp.Utils++> -- | template haskell fn to roughly do typesafe database access, pretty experimental atm+> --+> -- sketch is:+> --+> -- > $(sqlStmt connStr sqlStr)+> -- >+> -- > -- is transformed into+> -- >+> -- >  \conn a_0 a_0 ... ->+> -- >         selectRelation conn sqlStr [toSql (a_0::Ti0)+> -- >                                    ,toSql (a_1::Ti1), ... ] >>=+> -- >         return . map (\ [r_0, r_1, ...] ->+> -- >           (fromSql r_0::To0+> -- >           ,fromSql r_1::To1+> -- >           ,...)+> --+> -- example usage:+> --+> -- > pieces_at_pos = $(sqlStmt connStr "select * from pieces where x = ? and y = ?;")+> --+> -- will come close enough to inferring the type:+> --+> -- > pieces_at_pos :: IConnection conn =>+> -- >                 conn+> -- >              -> Maybe Int+> -- >              -> Maybe Int+> -- >              -> IO [(Maybe String, Maybe String, Maybe Int, Maybe Int, Maybe Int)]+> --+> -- (as well as producing a working function which accesses a database)+> --+> sqlStmt :: String -> String -> Q Exp+> sqlStmt dbName sqlStr = do+>   (StatementHaskellType inA outA) <- liftStType+>   let cnName = mkName "cn"+>   argNames <- getNNewNames "a" $ length inA+>   lamE (map varP (cnName : argNames))+>     [| selectRelation $(varE cnName) sqlStr+>                       $(ListE <$> zipWithM toSqlIt argNames inA) >>=+>        return . map $(mapTupleFromSql $ map snd outA)|]+>+>   where+>     liftStType :: Q StatementHaskellType+>     liftStType = runIO stType >>= (either (error . show) toH)+>+>     stType :: IO (Either String StatementType)+>     stType = runErrorT $ do+>       cat <- getCat+>       tsl (getStatementType cat sqlStr)+>+>     getCat :: ErrorT String IO Catalog+>     getCat = do+>       -- bad code to avoid reading the catalog multiple times+>       c1 <- liftIO $ readIORef globalCachedCatalog+>       case c1 of+>         Just c -> return c+>         Nothing -> do+>                    c <- liftIO (readCatalogFromDatabase dbName) >>=+>                           (tsl . updateCatalog defaultCatalog)+>                    liftIO $ writeIORef globalCachedCatalog (Just c)+>                    return c+>+>     -- lambda which does [SqlValue] -> (T1, T2, ...)+>     mapTupleFromSql :: [Type] -> Q Exp+>     mapTupleFromSql outT = do+>       retNames <- getNNewNames "r" $ length outT+>       lamE [listP (map varP retNames)]+>         (tupE $ zipWith fromSqlIt retNames outT)+>+>     toSqlIt :: Name -> Type -> Q Exp+>     toSqlIt n t = [| toSql $(castName n t)|]+>+>     fromSqlIt :: Name -> Type -> Q Exp+>     fromSqlIt n t = do+>       n1 <- [| fromSql $(varE n) |]+>       cast n1 t+>+>     cast :: Exp -> Type -> Q Exp+>     cast e = return . SigE e+>+>     castName :: Name -> Type -> Q Exp+>     castName = cast . VarE+>+>     getNNewNames :: String -> Int -> Q [Name]+>     getNNewNames i n = forM [1..n] $ const $ newName i++================================================================================++> -- | Simple wrapper so that all client code needs to do is import this file+> -- and use withConn and sqlStmt without importing HDBC, etc.++> withConn :: String -> (Pg.Connection -> IO c) -> IO c+> withConn cs = bracket (Pg.connectPostgreSQL cs) disconnect++================================================================================++evil hack to avoid reading the catalog from the database for each call+to sqlStmt. Atm this means that you can only read the catalog from one+database at compile time, but this should be an easy fix if too+limiting. TODO: make this change, in case the catalog ends up being+cached in ghci meaning if you change the database whilst developing in+emacs it will go wrong++> globalCachedCatalog :: IORef (Maybe Catalog)+> {-# NOINLINE globalCachedCatalog #-}+> globalCachedCatalog = unsafePerformIO (newIORef Nothing)++================================================================================++sql parsing and typechecking++get the input and output types for a parameterized sql statement:++> getStatementType :: Catalog -> String -> Either String StatementType+> getStatementType cat sql = do+>     ast <- tsl $ parseSql "" sql+>     let (_,aast) = typeCheck cat ast+>     let a = getTopLevelInfos aast+>     return $ fromJust $ head a++convert sql statement type to equivalent with sql types replaced with+haskell equivalents - HDBC knows how to convert the actual values using+toSql and fromSql as long as we add in the appropriate casts++> data StatementHaskellType = StatementHaskellType [Type] [(String,Type)]++> toH :: StatementType -> Q StatementHaskellType+> toH (StatementType i o) = do+>   ih <- mapM sqlTypeToHaskell i+>   oht <- mapM (sqlTypeToHaskell . snd) o+>   return $ StatementHaskellType ih $ zip (map fst o) oht+>   where+>     sqlTypeToHaskell :: Sql.Type -> TypeQ+>     sqlTypeToHaskell t =+>       case t of+>         Sql.ScalarType "text" -> [t| Maybe String |]+>         Sql.ScalarType "int4" -> [t| Maybe Int |]+>         Sql.ScalarType "int8" -> [t| Maybe Int |]+>         Sql.ScalarType "bool" -> [t| Maybe Bool |]+>         Sql.DomainType _ -> [t| Maybe String |]+>         x -> error $ show x++================================================================================++TODO:+get error reporting at compile time working nicely:+can't connect to database+problem getting catalog -> report connection string used and source+  position+problem getting statement type: parse and type check issues, report+  source position
+ Database/HsSqlPpp/Dbms/DBAccess3.lhs view
@@ -0,0 +1,284 @@+Copyright 2010 Jake Wheat++Do type safe database access using template haskell and+hlists. Limitation is that you have to edit this file to add the field+definitions and possibly exports. Suggested use is to copy this file+into your own project and edit it there.++> {-# LANGUAGE TemplateHaskell,EmptyDataDecls,DeriveDataTypeable #-}++> module Database.HsSqlPpp.Dbms.DBAccess3+>     (withConn+>     ,sqlStmt+>     ,IConnection++Export the field proxies for your project here.  If you want to write+down type signatures of the result hlists then export the proxy types+here also, exporting them isn't neccessarily neccessary otherwise.++>     ,ptype,allegiance,tag,x,y+>     ,get_turn_number,current_wizard,colour,sprite+>     ,Ptype,Allegiance,Tag,X,Y+>     ,Get_turn_number,Current_wizard,Colour,Sprite+++>     ) where++> import Language.Haskell.TH++> import Data.Maybe+> import Control.Applicative+> import Control.Monad.Error+> import Control.Exception++> import Database.HDBC+> import qualified Database.HDBC.PostgreSQL as Pg++> import Data.HList+> import Data.HList.Label4 ()+> import Data.HList.TypeEqGeneric1 ()+> import Data.HList.TypeCastGeneric1 ()+> import Database.HsSqlPpp.Dbms.MakeLabels++> import System.IO.Unsafe+> --import Data.IORef++> import Database.HsSqlPpp.Dbms.WrapLib+> import qualified Database.HsSqlPpp.Ast.SqlTypes as Sql+> import Database.HsSqlPpp.Ast.Catalog+> import Database.HsSqlPpp.Ast.TypeChecker+> import Database.HsSqlPpp.Parsing.Parser+> import Database.HsSqlPpp.Ast.Annotation+> import Database.HsSqlPpp.Utils+++================================================================================++If you are using this file, this is the bit where you add your own+fields.++> $(makeLabels ["ptype"+>              ,"allegiance"+>              ,"tag"+>              ,"x"+>              ,"y"+>              ,"get_turn_number"+>              ,"current_wizard"+>              ,"colour"+>              ,"sprite"])++================================================================================++> -- | template haskell fn to roughly do typesafe database access with+> -- hlists, pretty experimental atm+> --+> -- sketch is:+> --+> -- >+> -- > $(sqlStmt connStr sqlStr)+> -- >+> -- > -- is transformed into+> -- >+> -- >+> -- >  \conn a_0 a_1 ... ->+> -- >      selectRelation conn sqlStr [toSql (a_0::Ti0)+> -- >                                 ,toSql (a_1::Ti1), ... ] >>=+> -- >      return . map (\ [r_0, r_1, ...] ->+> -- >        f1 .=. fromSql (r_0::To0) .*.+> -- >        f2 .=. fromSql (r_1::To1) .*.+> -- >        ... .*.+> -- >        emptyRecord)+> -- >+> --+> -- where the names f1, f2 are the attribute names from the database,+> -- the types Ti[n] are the types of the placeholders in the sql+> -- string, and the types To[n] are the types of the attributes in+> -- the returned relation. To work around a limitation in the+> -- implementation, these names must be in scope in this file, so to+> -- use this in your own projects you need to copy the source and+> -- then add the field defitions in as needed.+> --+> -- example usage:+> --+> -- >+> -- > pieces_at_pos = $(sqlStmt connStr "select * from pieces where x = ? and y = ?;")+> -- >+> --+> -- might (!) infer the type:+> --+> -- >+> -- >   pieces_at_pos :: IConnection conn =>+> -- >                    conn+> -- >                 -> Maybe Int+> -- >                 -> Maybe Int+> -- >                 -> IO [Record (HCons (LVPair (Proxy Ptype)+> -- >                                              (Maybe String))+> -- >                               (HCons (LVPair (Proxy Allegiance)+> -- >                                              (Maybe String))+> -- >                               (HCons (LVPair (Proxy Tag)+> -- >                                              (Maybe Int))+> -- >                               (HCons (LVPair (Proxy X)+> -- >                                              (Maybe Int))+> -- >                               (HCons (LVPair (Proxy Y)+> -- >                                              (Maybe Int))+> -- >                                HNil)))))]+> -- >+> --+> -- (as well as producing a working function which accesses a database). Currently, I get+> --+> -- >+> -- > Test3.lhs:16:12:+> -- >     Ambiguous type variable `conn' in the constraint:+> -- >       `IConnection conn'+> -- >         arising from a use of `pieces' at Test3.lhs:16:12-22+> -- >     Probable fix: add a type signature that fixes these type variable(s)+> -- >+> --+> -- which can be worked around by adding a type signature like+> --+> -- >+> -- > pieces_at_pos :: IConnection conn =>+> -- >                  conn+> -- >               -> a+> -- >               -> b+> -- >               -> IO c+> -- >+> --+> -- and then ghc will complain and tell you what a,b,c should be (make+> -- sure you match the number of arguments after conn to the number+> -- of ? placeholders in the sql string).++> sqlStmt :: String -> String -> Q Exp+> sqlStmt dbName sqlStr = do+>   (StatementHaskellType inA outA) <- liftStType+>   let cnName = mkName "cn"+>   argNames <- getNNewNames "a" $ length inA+>   lamE (map varP (cnName : argNames))+>     [| selectRelation $(varE cnName) sqlStr+>                       $(ListE <$> zipWithM toSqlIt argNames inA) >>=+>        return . map $(mapHlistFromSql outA)|]+>+>   where+>     -- th code gen utils+>     mapHlistFromSql :: [(String,Type)] -> Q Exp+>     mapHlistFromSql outA = do+>       retNames <- getNNewNames "r" $ length outA+>       l1 <- mapM (\(a,b,c) -> toHlistField a b c) $ zipWith (\(a,b) c -> (a,b,c)) outA retNames+>       lamE [listP (map varP retNames)] $ foldHlist l1+>+>     toHlistField :: String -> Type -> Name -> Q Exp+>     toHlistField f t v = [| $(varE $ mkName f) .=. $(fromSqlIt v t) |]+>+>     foldHlist :: [Exp] -> Q Exp+>     foldHlist (e:e1) = [| $(return e) .*. $(foldHlist e1) |]+>     foldHlist [] = [| emptyRecord |]+>+>     toSqlIt :: Name -> Type -> Q Exp+>     toSqlIt n t = [| toSql $(castName n t)|]+>+>     fromSqlIt :: Name -> Type -> Q Exp+>     fromSqlIt n t = do+>       n1 <- [| fromSql $(varE n) |]+>       casti n1 t+>+>     casti :: Exp -> Type -> Q Exp+>     casti e = return . SigE e+>+>     castName :: Name -> Type -> Q Exp+>     castName = casti . VarE+>+>     getNNewNames :: String -> Int -> Q [Name]+>     getNNewNames i n = replicateM n $ newName i+>+>     -- statement type stuff+>     liftStType :: Q StatementHaskellType+>     liftStType = runIO stType >>= either (error . show) toH+>+>     stType :: IO (Either String StatementType)+>     stType = runErrorT $ do+>       cat <- getCat+>       tsl (getStatementType cat sqlStr)+>+>     getCat :: ErrorT String IO Catalog+>     getCat = do+>       -- bad code to avoid reading the catalog multiple times+>       c1 <- liftIO $ readIORef globalCachedCatalog+>       case c1 of+>         Just c -> return c+>         Nothing -> do+>                    c <- liftIO (readCatalogFromDatabase dbName) >>=+>                           (tsl . updateCatalog defaultCatalog)+>                    liftIO $ writeIORef globalCachedCatalog (Just c)+>                    return c+>++================================================================================++> -- | Simple wrapper so that all client code needs to do is import this file+> -- and use withConn and sqlStmt without importing HDBC, etc.++> withConn :: String -> (Pg.Connection -> IO c) -> IO c+> withConn cs = bracket (Pg.connectPostgreSQL cs) disconnect++================================================================================++evil hack to avoid reading the catalog from the database for each call+to sqlStmt. Atm this means that you can only read the catalog from one+database at compile time, but this should be an easy fix if too+limiting. TODO: make this change, in case the catalog ends up being+cached in ghci meaning if you change the database whilst developing in+emacs it will go wrong++> globalCachedCatalog :: IORef (Maybe Catalog)+> {-# NOINLINE globalCachedCatalog #-}+> globalCachedCatalog = unsafePerformIO (newIORef Nothing)++================================================================================++sql parsing and typechecking++get the input and output types for a parameterized sql statement:++> getStatementType :: Catalog -> String -> Either String StatementType+> getStatementType cat sql = do+>     ast <- tsl $ parseSql "" sql+>     let (_,aast) = typeCheck cat ast+>     let a = getTopLevelInfos aast+>     return $ fromJust $ head a++convert sql statement type to equivalent with sql types replaced with+haskell equivalents - HDBC knows how to convert the actual values using+toSql and fromSql as long as we add in the appropriate casts++> data StatementHaskellType = StatementHaskellType [Type] [(String,Type)]++> toH :: StatementType -> Q StatementHaskellType+> toH (StatementType i o) = do+>   ih <- mapM sqlTypeToHaskell i+>   oht <- mapM (sqlTypeToHaskell . snd) o+>   return $ StatementHaskellType ih $ zip (map fst o) oht+>   where+>     sqlTypeToHaskell :: Sql.Type -> TypeQ+>     sqlTypeToHaskell t =+>       case t of+>         Sql.ScalarType "text" -> [t| Maybe String |]+>         Sql.ScalarType "int4" -> [t| Maybe Int |]+>         Sql.ScalarType "int8" -> [t| Maybe Int |]+>         Sql.ScalarType "bool" -> [t| Maybe Bool |]+>         Sql.DomainType _ -> [t| Maybe String |]+>         z -> error $ show z++================================================================================++TODO:+get error reporting at compile time working nicely:+can't connect to database+problem getting catalog -> report connection string used and source+  position+problem getting statement type: parse and type check issues, report+  source position++turn this file into a toolkit of bits, which can import so can use+without having to copy then edit this file++figure out a better way of handling the proxies
+ Database/HsSqlPpp/Dbms/DBUtils.lhs view
@@ -0,0 +1,63 @@+Copyright 2010 Jake Wheat++This file contains a few hacked together utility functions for working+with postgres.++> module Database.HsSqlPpp.Dbms.DBUtils+>     (readCatalog+>     ,loadSqlUsingPsql+>     ,loadSqlUsingPsqlFromFile+>     ,clearDB+>     ,pgDump) where+++> import System++> import System.Process.Pipe+> --import Text.Pandoc+++> import Database.HsSqlPpp.Ast.Catalog++> import Database.HsSqlPpp.Ast.SqlTypes++> import Database.HsSqlPpp.Dbms.DBAccess++> -- | get the catalog from the database, and return an Catalog value+> readCatalog :: String -> IO (Either [TypeError] Catalog)+> readCatalog dbName =+>   (readCatalogFromDatabase dbName) >>=+>     return . updateCatalog defaultCatalog++> -- | run psql to load the sql text into a database.+> loadSqlUsingPsql :: String -> String -> IO String+> loadSqlUsingPsql dbName =+>   pipeString [("psql", [dbName+>                        ,"-q"+>                        ,"--set"+>                        ,"ON_ERROR_STOP=on"+>                        ,"--file=-"])]++> -- | run psql to load sql from the filename given into a database.+> loadSqlUsingPsqlFromFile :: String -> FilePath -> IO (Either String String)+> loadSqlUsingPsqlFromFile dbName fn = do+>   ex <- system ("psql " ++ dbName +++>                 " -q --set ON_ERROR_STOP=on" +++>                 " --file=" ++ fn)+>   case ex of+>     ExitFailure e -> return $ Left $ "psql failed with " ++ show e+>     ExitSuccess -> return $ Right ""++> -- | use a dodgy hack to clear the database given+> clearDB :: String -> IO ()+> clearDB db =+>   withConn ("dbname=" ++ db) $ \conn ->+>     runSqlCommand conn "drop owned by jake cascade;"++> -- | dump the given database to sql source using pg_dump+> pgDump :: String -> IO String+> pgDump db = pipeString [("pg_dump", [db+>                                              ,"--schema-only"+>                                              ,"--no-owner"+>                                              ,"--no-privileges"])] ""+
Database/HsSqlPpp/Dbms/DatabaseLoader.lhs view
@@ -34,13 +34,10 @@ >      loadIntoDatabase >     ) where -> import System.IO > import System.Directory-> import Control.Monad > import Control.Exception > import Text.Regex.Posix > import Data.List-> import Data.Maybe  > import Database.HsSqlPpp.PrettyPrinter.PrettyPrinter > import Database.HsSqlPpp.Ast.Ast as Ast@@ -62,7 +59,7 @@ >     loadStatement conn st = case st of >                                          Skipit -> return () >                                          VanillaStatement vs ->->                                              putStrLn (printSql [vs]) >>+>                                              {-putStrLn (printSql [vs]) >> -} >                                              handleError fn (getSourcePos vs) vs (runSqlCommand conn >                                                       (printSql [vs])) >                                          CopyStdin a b -> runCopy conn a b (getSourcePos a)
+ Database/HsSqlPpp/Dbms/MakeLabels.hs view
@@ -0,0 +1,126 @@+{-# LANGUAGE TemplateHaskell, FlexibleInstances, EmptyDataDecls, DeriveDataTypeable #-}++-- robbed from the darcs version of hlist++-- Making labels++{-+ The following TH splice+      $(makeLabels ["getX","getY","draw"])++should expand into the following declarations++data GetX;     getX     = proxy::Proxy GetX+data GetY;     getY     = proxy::Proxy GetY+data Draw;     draw     = proxy::Proxy Draw++-}++module Database.HsSqlPpp.Dbms.MakeLabels (makeLabels,label) where++import Data.HList.FakePrelude++import Language.Haskell.TH.Ppr () --pprint,Ppr)+import Language.Haskell.TH.Syntax++import Data.Char (toUpper, toLower)+import Control.Monad (liftM)++import Data.Typeable++capitalize, uncapitalize :: String -> String+capitalize   (c:rest) = toUpper c : rest+capitalize [] = []+uncapitalize (c:rest) = toLower c : rest+uncapitalize [] = []+++-- Make the name of the type constructor whose string representation+-- is capitalized str+make_tname :: String -> Name+make_tname str = mkName $ capitalize str++-- Make the name of the value identifier whose string representation+-- is uncapitalized str+make_dname :: String -> Name+make_dname str = mkName $ uncapitalize str++-- The template of our declaration. We will then replace all occurences+-- of Foo with the desired name+dcl_template :: Q [Dec]+dcl_template = [d| data Foo deriving Typeable; foo :: Proxy Foo; foo = proxy::Proxy Foo |]++-- A very dirty traversal/replacement...++class ReplaceSyntax a where+    replace_name :: (Name,Name) -> (Name,Name) -> a -> a++instance ReplaceSyntax [Dec] where+    replace_name frm to dcls = map (replace_name frm to) dcls++instance ReplaceSyntax Dec where+    replace_name (tfrom,_) (tto,_)+                 dcl@(DataD ctx n parms con othern) =+                     if tfrom == n then+                        DataD ctx tto parms con othern+                        else dcl+    replace_name (tfrom,dfrom) (tto,dto)+                 (ValD (VarP n) (NormalB body) []) =+          let n' = if n == dfrom then dto else n+          in ValD (VarP n')+                  (NormalB (replace_name (tfrom,dfrom) (tto,dto) body)) []++    replace_name (tfrom,dfrom) (tto,dto) (SigD n t) =+          let n' = if n == dfrom then dto else n+          in SigD n' (replace_name (tfrom,dfrom) (tto,dto) t)++    replace_name _ _ dcl =+        error $ "Can't handle: " ++ show dcl+++instance ReplaceSyntax Exp where+    replace_name from to (SigE exp' tp) =+                     SigE (replace_name from to exp')+                          (replace_name from to tp)+    replace_name _ _ exp' = exp'+++instance ReplaceSyntax Type where+    replace_name (tfrom,_) (tto,_) tp@(ConT n) =+        if n == tfrom then (ConT tto) else tp+    replace_name from to (AppT t1 t2) =+        (AppT (replace_name from to t1) (replace_name from to t2))+    replace_name _ _ t = error $ "Can't handle: " ++ show t+++-- Our main function+makeLabels :: [String] -> Q [Dec]+makeLabels = liftM concat . sequence . map repl+ where+ repl n = liftM (replace_name from (to n)) dcl_template+ from = (make_tname "foo",make_dname "foo")+ to n = (make_tname n,make_dname n)++label :: String -> Q [Dec]+label s = makeLabels [s]++{-+-- Show the code expression+show_code :: Ppr a => Q a -> IO ()+show_code cde = runQ cde >>= putStrLn . pprint++t1 :: IO ()+t1 = show_code [d| data Foo |]++t2 :: String+t2 = showName $ mkName "Foo"++t3 :: IO ()+t3 = show_code $+     liftM (replace_name+            (make_tname "foo",make_dname "foo")+            (make_tname "bar",make_dname "bar")) dcl_template++t4 :: IO ()+t4 = show_code $ makeLabels ["getX","getY","draw"]+-}
Database/HsSqlPpp/Dbms/WrapLib.lhs view
@@ -1,7 +1,6 @@ Copyright 2010 Jake Wheat -> {-# OPTIONS_HADDOCK hide #-}-+> -- | Utility function for use with WrapperGen example code > module Database.HsSqlPpp.Dbms.WrapLib where  > import Database.HDBC@@ -10,7 +9,7 @@ >                   conn -> String -> [SqlValue] -> IO [[SqlValue]] > selectRelation conn query args = do >   sth <- prepare conn query->   execute sth args+>   _ <- execute sth args >   v <- fetchAllRows' sth >   return v 
Database/HsSqlPpp/Dbms/WrapperGen.lhs view
@@ -7,8 +7,6 @@  > {-# LANGUAGE FlexibleContexts #-} -> {-# OPTIONS_HADDOCK hide #-}- > module Database.HsSqlPpp.Dbms.WrapperGen >     (wrapperGen) where @@ -21,25 +19,83 @@ > import Data.Maybe  > import Database.HsSqlPpp.Ast.SqlTypes as Sql-> import Database.HsSqlPpp.Ast.Environment+> import Database.HsSqlPpp.Ast.Catalog > import Database.HsSqlPpp.Ast.TypeChecker > import Database.HsSqlPpp.Parsing.Parser > import Database.HsSqlPpp.Ast.Annotation -> wrapperGen :: String -> String -> IO String++> -- | takes a haskell source file and produces a haskell source file+> -- with typesafe wrappers+> --+> -- Example:+> --+> -- > module Testhesql1 where+> -- > pieces = "select * from pieces;"+> -- > turn_number = "select get_turn_number();"+> -- > pieces_at_pos = "select * from pieces where x = ? and y = ?;"+> --+> -- is transformed to+> --+> -- > module Testhesql1 where+> -- > import Database.HDBC+> -- > import Database.HsSqlPpp.Dbms.WrapLib+> -- >+> -- > pieces ::+> -- >          (IConnection conn) =>+> -- >          conn ->+> -- >            IO [(Maybe String, Maybe String, Maybe Int, Maybe Int, Maybe Int)]+> -- > pieces conn+> -- >   = do r <- selectRelation conn "select * from pieces;" []+> -- >        return $+> -- >          flip map r $+> -- >            \ [a0, a1, a2, a3, a4] ->+> -- >              (fromSql a0, fromSql a1, fromSql a2, fromSql a3, fromSql a4)+> -- >+> -- > turn_number :: (IConnection conn) => conn -> IO [(Maybe Int)]+> -- > turn_number conn+> -- >   = do r <- selectRelation conn "select get_turn_number();" []+> -- >        return $ flip map r $ \ [a0] -> (fromSql a0)+> -- >+> -- > pieces_at_pos ::+> -- >                 (IConnection conn) =>+> -- >                 conn ->+> -- >                   Maybe Int ->+> -- >                     Maybe Int ->+> -- >                       IO [(Maybe String, Maybe String, Maybe Int, Maybe Int, Maybe Int)]+> -- > pieces_at_pos conn b0 b1+> -- >   = do r <- selectRelation conn+> -- >               "select * from pieces where x = ? and y = ?;"+> -- >               [toSql b0, toSql b1]+> -- >        return $+> -- >          flip map r $+> -- >            \ [a0, a1, a2, a3, a4] ->+> -- >              (fromSql a0, fromSql a1, fromSql a2, fromSql a3, fromSql a4)+> --+> -- This code is just an example of how to get the type information+> -- out for each sql statement, please see the source code for how it+> -- works.  It's not nearly good enough for production use.++> wrapperGen :: String -- ^ name of database to typecheck against+>            -> FilePath -- ^ haskell source filename to process+>            -> IO String -- ^ generated wrapper source code > wrapperGen db fn = do >   p <- parseFile fn >   case p of >     ParseOk ast -> do->                    envU <- readEnvironmentFromDatabase db->                    case updateEnvironment defaultEnvironment envU of+>                    catU <- readCatalogFromDatabase db+>                    case updateCatalog defaultCatalog catU of >                      Left er -> return $ show er->                      Right env ->->                          return $ {-ppShow ast ++  "\n\n" ++ -} prettyPrint (processTree env (addImports ast))+>                      Right cat ->+>                          return $ {-ppShow ast ++  "\n\n" ++ -} prettyPrint (processTree cat (addImports ast)) >     x -> return $ ppShow x -> processTree :: Data a => Environment -> a -> a-> processTree env =+This is the function which finds the statements which look like+ident = "string"+and converts them into hdbc wrappers with the correct types++> processTree :: Data a => Catalog -> a -> a+> processTree cat = >     transformBi $ \x -> >       case x of >         (PatBind _@@ -47,44 +103,18 @@ >              Nothing >              (UnGuardedRhs(Lit (Exts.String sqlSrc))) >              (BDecls [])) : tl->           -> createWrapper env fnName sqlSrc ++ tl+>           -> createWrapper cat fnName sqlSrc ++ tl >         x1 -> x1 -> addImports :: Data a => a -> a-> addImports =->     transformBi $ \x ->->       case x of->         Module sl mn o wt es im d -> Module sl mn o wt es (imports ++ im) d---> noSrcLoc :: SrcLoc-> noSrcLoc = (SrcLoc "" 0 0)--> imports :: [ImportDecl]-> imports = [ImportDecl {importLoc = noSrcLoc->                       ,importModule = ModuleName "Database.HDBC"->                       ,importQualified = False->                       ,importSrc = False->                       ,importPkg = Nothing->                       ,importAs = Nothing->                       ,importSpecs = Nothing->                       }->           ,ImportDecl {importLoc = noSrcLoc->                       ,importModule = ModuleName "Database.HsSqlPpp.Dbms.WrapLib"->                       ,importQualified = False->                       ,importSrc = False->                       ,importPkg = Nothing->                       ,importAs = Nothing->                       ,importSpecs = Nothing->                       }]-+for each bind to convert, lookup the haskell types needed, then+create a type sig and a function to use hdbc to run the sql -> createWrapper :: Environment+> createWrapper :: Catalog >               -> String >               -> String >               -> [Decl]-> createWrapper env fnName sql =->     let rt = getStatementType env sql+> createWrapper cat fnName sql =+>     let rt = getStatementType cat sql >     in case rt of >       Left e -> error e >       Right (StatementType pt ts) ->@@ -93,6 +123,44 @@ >           in [makeTypeSig fnName pts tns >              ,makeFn fnName sql pts tns] +================================================================================++create the type signature for a wrapper, produces something like+(IConnection conn) => conn -> inarg1 -> inarg2 -> ... ->+             IO [(outarg1, outarg2, ...)]++> makeTypeSig :: String -> [String] -> [String] -> Decl+> makeTypeSig fnName argTypes typeNames =+>   TypeSig noSrcLoc [Ident fnName] $+>     TyForall Nothing [ClassA (UnQual (Ident "IConnection")) [TyVar(Ident "conn")]] $+>       foldr TyFun lastArg args+>   where+>     tc = TyCon . UnQual . Ident+>     tntt = (TyApp (tc "Maybe")) . tc+>     args = ((TyVar (Ident "conn")) : map tntt argTypes)+>     lastArg = (TyApp (tc "IO") (TyList (TyTuple Boxed $ map tntt typeNames)))++================================================================================++create the function which calls hdbc++takes something like:+pieces_at_pos = "select * from pieces where x = ? and y = ?;"+and produces:++pieces_at_pos conn b0 b1+  = do r <- selectRelation conn+              "select * from pieces where x = ? and y = ?;"+              [toSql b0, toSql b1]+       return $+         flip map r $+           \ [a0, a1, a2, a3, a4] ->+             (fromSql a0, fromSql a1, fromSql a2, fromSql a3, fromSql a4)++doesn't really need to know the types, just the number of inargs and outargs,+since the work is done by hdbc's toSql and fromSql, and by the type signature+that is generated in the function above+ > makeFn :: String -> String -> [String] -> [String] -> Decl > makeFn fnName sql pts typeNames = FunBind >       [ Match noSrcLoc(@@ -139,33 +207,67 @@ >         pName n = "b" ++ show n >         pNames = map pName [0..length pts - 1] +================================================================================ +> addImports :: Data a => a -> a+> addImports =+>     transformBi $ \x ->+>       case x of+>         Module sl mn o wt es im d -> Module sl mn o wt es (imports ++ im) d -> makeTypeSig :: String -> [String] -> [String] -> Decl-> makeTypeSig fnName argTypes typeNames =->   TypeSig noSrcLoc [Ident fnName] $->     TyForall Nothing [ClassA (UnQual (Ident "IConnection")) [TyVar(Ident "conn")]] $->       foldr TyFun lastArg args->   where->     tc = TyCon . UnQual . Ident->     tntt = (TyApp (tc "Maybe")) . tc->     args = ((TyVar (Ident "conn")) : map tntt argTypes)->     lastArg = (TyApp (tc "IO") (TyList (TyTuple Boxed $ map tntt typeNames)))+> imports :: [ImportDecl]+> imports = [ImportDecl {importLoc = noSrcLoc+>                       ,importModule = ModuleName "Database.HDBC"+>                       ,importQualified = False+>                       ,importSrc = False+>                       ,importPkg = Nothing+>                       ,importAs = Nothing+>                       ,importSpecs = Nothing+>                       }+>           ,ImportDecl {importLoc = noSrcLoc+>                       ,importModule = ModuleName "Database.HsSqlPpp.Dbms.WrapLib"+>                       ,importQualified = False+>                       ,importSrc = False+>                       ,importPkg = Nothing+>                       ,importAs = Nothing+>                       ,importSpecs = Nothing+>                       }] +================================================================================++parsing and typechecking++get the input and output types for a parameterized sql statement:++> getStatementType :: Catalog -> String -> Either String StatementType+> getStatementType cat sql = do+>     ast <- tsl $ parseSql "" sql+>     let (_,aast) = typeCheck cat ast+>     let a = getTopLevelInfos aast+>     return $ fromJust $ head a++return the equivalent haskell type for a sql type as a string+ > sqlTypeToHaskellTypeName :: Sql.Type -> String > sqlTypeToHaskellTypeName t = >     case t of >        ScalarType "text" -> "String" >        ScalarType "int4" -> "Int"->        _ -> "a"+>        ScalarType "int8" -> "Int"+>        ScalarType "bool" -> "Bool"+>        DomainType _ -> "String"+>        x -> show x +================================================================================ -> getStatementType :: Environment -> String -> Either String StatementType-> getStatementType env sql = do->     ast <- tsl $ parseSql "" sql->     let (_,aast) = typeCheck env ast->     let a = getTopLevelInfos aast->     return $ fromJust $ head a+simple ast shortcuts++> noSrcLoc :: SrcLoc+> noSrcLoc = (SrcLoc "" 0 0)++================================================================================++error utility - convert either to ErrorT String  > tsl :: (MonadError String m, Show t) => Either t a -> m a > tsl x = case x of
Database/HsSqlPpp/Extensions/ChaosExtensions.lhs view
@@ -6,9 +6,17 @@  > {- | Experimental code to half implement some simple syntax >      extensions for plpgsql. Eventually, want to use this to write->      macro type things for plpgsql, have implementation of all these->      in pure plpgsql code but it's a mess, and the plpgsql->      implementation is opaque to the hssqlppp type checker.+>      macro type things for plpgsql.+>+>      The transforms here were already implemented as dynamic pl/pgsql+>      generation from pl/pgsql itself, hopefully this approach will+>      turn out to be a bit more maintainable, and the resultant code+>      visible to the hssqlppp type checking process.+>+>      Only some of the extensions needed are here, and they are only+>      part implemented, the first milestone is to get the type+>      checking working, without e.g. worrying about the bodies of+>      generated functions. >  -}  > module Database.HsSqlPpp.Extensions.ChaosExtensions@@ -28,7 +36,7 @@ >     ) where  > import Data.Generics-> import Data.Generics.PlateData+> import Data.Generics.Uniplate.Data > import Debug.Trace  > import Text.Parsec hiding(many, optional, (<|>))
Database/HsSqlPpp/Parsing/Lexer.lhs view
@@ -33,8 +33,6 @@ > import Control.Applicative > import Control.Monad.Identity -> import Data.Char- > import Database.HsSqlPpp.Parsing.ParseErrors > import Database.HsSqlPpp.Utils 
Database/HsSqlPpp/Parsing/ParseErrors.lhs view
@@ -11,7 +11,6 @@  > import Text.Parsec > import Control.Monad.Error-> import Data.Maybe  > showPE :: ParseError -> Maybe (Int,Int) -> String -> String > showPE pe sp src = show pe ++ "\n" ++ pePosToEmacs pe ++ "\n" ++ peToContext pe sp src
Database/HsSqlPpp/Parsing/Parser.lhs view
@@ -65,7 +65,7 @@ > import Database.HsSqlPpp.Ast.Ast > import Database.HsSqlPpp.Ast.Annotation as A > import Database.HsSqlPpp.Utils-> import Database.HsSqlPpp.Ast.Environment+> import Database.HsSqlPpp.Ast.Catalog  The parse state is used to keep track of source positions inside function bodies, these bodies are parsed separately to the rest of the@@ -1226,10 +1226,10 @@ (symbols and whitespace are ok) so we know that we aren't reading an identifier which happens to start with a complete keyword -> keyword :: String -> ParsecT [Token] ParseState Identity String+> keyword :: String -> ParsecT [Token] ParseState Identity () > keyword k = mytoken (\tok -> >                                case tok of->                                IdStringTok i | lcase k == lcase i -> Just k+>                                IdStringTok i | lcase k == lcase i -> Just () >                                _ -> Nothing) >                       where >                         lcase = map toLower@@ -1240,9 +1240,9 @@ >                                      IdStringTok i -> Just i >                                      _ -> Nothing) -> symbol :: String -> ParsecT [Token] ParseState Identity String+> symbol :: String -> ParsecT [Token] ParseState Identity () > symbol c = mytoken (\tok -> case tok of->                                    SymbolTok s | c==s -> Just c+>                                    SymbolTok s | c==s -> Just () >                                    _           -> Nothing)  > integer :: MyParser Integer
Database/HsSqlPpp/PrettyPrinter/AnnotateSource.lhs view
@@ -108,7 +108,7 @@ >              flip filter anns (\a -> >                                case a of >                                       TypeAnnotation _ -> False->                                       EnvUpdates [] -> False+>                                       CatUpdates [] -> False >                                       _ -> True)  >      isSp t = case t of
Database/HsSqlPpp/PrettyPrinter/PrettyPrinter.lhs view
@@ -23,13 +23,12 @@ >     where  > import Text.PrettyPrint-> import Data.Maybe > import Data.Char > import Data.List  > import Database.HsSqlPpp.Ast.Ast > import Database.HsSqlPpp.Ast.Annotation-> import Database.HsSqlPpp.Ast.Environment+> import Database.HsSqlPpp.Ast.Catalog > import Database.HsSqlPpp.Utils  ================================================================================@@ -562,7 +561,7 @@ >                        _ -> parens (convExp (head es)) <> brackets (csvExp (tail es)) >      "!rowctor" -> text "row" <> parens (hcatCsvMap convExp es) >      _ | isOperatorName n ->->         case getOperatorType defaultTemplate1Environment n of+>         case forceRight (getOperatorType defaultTemplate1Catalog n) of >                           BinaryOp -> >                               parens (convExp (head es) >                                       <+> text (filterKeyword n)
Database/HsSqlPpp/Tests/ExtensionTests.lhs view
@@ -9,8 +9,6 @@ > import Test.HUnit > import Test.Framework > import Test.Framework.Providers.HUnit-> import Data.Char-> import Control.Monad.Error > --import Debug.Trace  > import Database.HsSqlPpp.Parsing.Parser
+ Database/HsSqlPpp/Tests/LocalBindingsTests.lhs view
@@ -0,0 +1,225 @@+Copyright 2010 Jake Wheat++Tests for the local bindings lookup code, which is a bit convoluted in+places, particularly for joins++> module Database.HsSqlPpp.Tests.LocalBindingsTests (localBindingsTests) where++> import Test.HUnit+> import Test.Framework+> import Test.Framework.Providers.HUnit+> --import Text.Show.Pretty+> --import Debug.Trace++> import Database.HsSqlPpp.AstInternals.TypeChecking.LocalBindings++> import Database.HsSqlPpp.Ast.SqlTypes+> --import Database.HsSqlPpp.Ast.Annotation+> --import Database.HsSqlPpp.Parsing.Parser+> --import Database.HsSqlPpp.Ast.TypeChecker+> --import Database.HsSqlPpp.Ast.Catalog++> data Item = Group String [Item]+>           | Lookup [([LocalBindingsUpdate]+>                     ,String -- correlation name+>                     ,String -- id name+>                     ,Either [TypeError] (String,String,String,Type))] -- source, corr, type+>           | StarExpand [([LocalBindingsUpdate], String, Either [TypeError] [(String,String,String,Type)])]++> localBindingsTests :: [Test.Framework.Test]+> localBindingsTests = itemToTft testData++test plan:+no updates uncor lookup, star+cor lookup,star+1 update+  uncor match, match sys, no match, star (with sys not appearing)+  cor same "+  join update: join col type tests + incompatible+               join on system columns+               ambiguous ids+               do cor tests with both cors+2 updates: just one pair: lookup in head with shadowing+           lookup in tail+           no match+           use difference cor to get to shadowed in tail+case insensitive tests+expand composite tests+n layers of joins with ids from each layer cor and uncor, plus star expands++> testData :: Item+> testData =+>   Group "local bindings tests" [ Lookup [+>     testUnRec [] "" "test"+>    ,testUnRec [] "test" "test"+>    ,testRec [LBQualifiedIds "source1"+>                      ""+>                      [("test1", typeInt)+>                      ,("test2", typeBool)]+>                      []]+>              ("source1","","test1",typeInt)++>    ,testRec [unquids1] res11+>    ,testRec [unquids1] res12+>    ,testRec [unquids1] res13+>    ,testRec [unquids1] res14+>    ,testUnRec [unquids1] "" "asdasd"++>    ,testRec [quids1] res21+>    ,testRec [quids1] res22+>    ,testRec [quids1] res23+>    ,testRec [quids1] res24+>    ,testUnRec [quids1] "qid1" "asdasd"+>    ,testUnRec [quids1] "" "asdasd"++>    ,testRec [quids2] res31+>    ,testRec [quids2] res32+>    ,testRec [quids2] res33+>    ,testRec [quids2] res34+>    ,testUnRec [quids2] "qid2" "asdasd"+>    ,testUnRec [quids2] "" "asdasd"++>    ,testRecNoCor [quids2] res31+>    ,testRecNoCor [quids2] res32+>    ,testRecNoCor [quids2] res33+>    ,testRecNoCor [quids2] res34+++>    ]+>    ,StarExpand [+>     testStar [unquids1] "" $ Right [res11,res12]+>    ,testStar [unquids1] "test" $ Left [UnrecognisedCorrelationName "test"]+>    ,testStar [quids1] "" $ Right [res21,res22]+>    ,testStar [quids1] "test2" $ Left [UnrecognisedCorrelationName "test2"]+>    ,testStar [quids2] "" $ Right [res31,res32]+>    ,testStar [quids2] "qid2" $ Right [res31,res32]+>    ,testStar [quids2] "qid3" $ Left [UnrecognisedCorrelationName "qid3"]++>   ]]+>   where+>     unquids1 = LBUnqualifiedIds "unqid1s"+>                             [("test1", typeInt)+>                             ,("test2", typeBool)]+>                             [("inttest1", typeInt)+>                             ,("inttest2", typeBool)]+>     res11 = ("unqid1s","","test1",typeInt)+>     res12 = ("unqid1s","","test2",typeBool)+>     res13 = ("unqid1s","","inttest1",typeInt)+>     res14 = ("unqid1s","","inttest2",typeBool)++>     unquids2 = LBUnqualifiedIds "unqid2s"+>                             [("test1", ScalarType "text")+>                             ,("test3", ScalarType "int2")]+>                             [("inttest1", ScalarType "text")+>                             ,("inttest3", ScalarType "int2")]+>     res211 = ("unqid2s","","test1",ScalarType "text")+>     res212 = ("unqid2s","","test3",ScalarType "int2")+>     res213 = ("unqid2s","","inttest1",ScalarType "text")+>     res214 = ("unqid2s","","inttest3",ScalarType "int2")+++>     quids1 = LBQualifiedIds "qid1s"+>                             ""+>                             [("test1", typeInt)+>                             ,("test2", typeBool)]+>                             [("inttest1", typeInt)+>                             ,("inttest2", typeBool)]+>     res21 = ("qid1s","","test1",typeInt)+>     res22 = ("qid1s","","test2",typeBool)+>     res23 = ("qid1s","","inttest1",typeInt)+>     res24 = ("qid1s","","inttest2",typeBool)++>     quids2 = LBQualifiedIds "qid2s"+>                             "qid2"+>                             [("test3", typeInt)+>                             ,("test4", typeBool)]+>                             [("inttest3", typeInt)+>                             ,("inttest4", typeBool)]+>     res31 = ("qid2s","qid2","test3",typeInt)+>     res32 = ("qid2s","qid2","test4",typeBool)+>     res33 = ("qid2s","qid2","inttest3",typeInt)+>     res34 = ("qid2s","qid2","inttest4",typeBool)+++>     testUnRec :: [LocalBindingsUpdate] -> String -> String+>               -> ([LocalBindingsUpdate]+>                  ,String -- correlation name+>                  ,String -- id name+>                  ,Either [TypeError] (String,String,String,Type))+>     testUnRec lbus cor i = (lbus,cor,i+>                            , Left [UnrecognisedIdentifier $+>                                    if cor == "" then i else cor ++ "." ++ i])+>     testRec :: [LocalBindingsUpdate]+>             -> (String,String,String,Type)+>             -> ([LocalBindingsUpdate]+>                ,String -- correlation name+>                ,String -- id name+>                ,Either [TypeError] (String,String,String,Type))+>     testRec lbus (src,cor,i,ty) = (lbus,cor,i,Right (src,cor,i,ty))++>     testRecNoCor :: [LocalBindingsUpdate]+>                  -> (String,String,String,Type)+>                  -> ([LocalBindingsUpdate]+>                     ,String -- correlation name+>                     ,String -- id name+>                     ,Either [TypeError] (String,String,String,Type))+>     testRecNoCor lbus (src,cor,i,ty) = (lbus,"",i,Right (src,cor,i,ty))+++>     testStar :: [LocalBindingsUpdate]+>              -> String+>              -> Either [TypeError] [(String,String,String,Type)]+>              -> ([LocalBindingsUpdate]+>                 ,String -- correlation name+>                 ,Either [TypeError] [(String,String,String,Type)])+>     testStar lbus cor res = (lbus,cor,res)++LBQualifiedIds {+                              source :: String+                             ,correlationName :: String+                             ,ids :: [(String,Type)]+                             ,internalIds :: [(String,Type)]+                             }+                          | LBUnqualifiedIds {+                              source :: String+                             ,ids :: [(String,Type)]+                             ,internalIds :: [(String,Type)]+                             }+                          | LBJoinIds {+                              source1 :: String+                             ,correlationName1 :: String+                             ,ids1 :: [(String,Type)]+                             ,internalIds1 :: [(String,Type)]+                             ,source2 :: String+                             ,correlationName2 :: String+                             ,ids2 :: [(String,Type)]+                             ,internalIds2 :: [(String,Type)]+                             ,joinIds :: [String]+                             }+++================================================================================++> testIdLookup :: [LocalBindingsUpdate]+>              -> String+>              -> String+>              -> Either [TypeError] (String,String,String,Type)+>              -> Test.Framework.Test+> testIdLookup lbus cn i res = testCase ("lookup " ++ cn ++ "." ++ i) $ do+>     let lb = foldr lbUpdate emptyBindings lbus+>         r = lbLookupID lb cn i+>     assertEqual "lookupid" res r++> testStarExpand :: [LocalBindingsUpdate]+>                -> String+>                -> Either [TypeError] [(String,String,String,Type)]+>                -> Test.Framework.Test+> testStarExpand lbus cn res = testCase ("expand star " ++ cn) $ do+>     let lb = foldr lbUpdate emptyBindings lbus+>         r = lbExpandStar lb cn+>     assertEqual "lookupid" res r++> itemToTft :: Item -> [Test.Framework.Test]+> itemToTft (Lookup es) = map (\(a,b,c,d) -> testIdLookup a b c d) es+> itemToTft (StarExpand es) = map (\(a,b,c) -> testStarExpand a b c) es+> itemToTft (Group s is) = [testGroup s $ concatMap itemToTft is]
Database/HsSqlPpp/Tests/ParameterizedStatementTests.lhs view
@@ -9,16 +9,18 @@ > import Test.HUnit > import Test.Framework > import Test.Framework.Providers.HUnit-> import Data.Char+> --import Text.Show.Pretty+> --import Debug.Trace + > import Database.HsSqlPpp.Ast.SqlTypes > import Database.HsSqlPpp.Ast.Annotation > import Database.HsSqlPpp.Parsing.Parser > import Database.HsSqlPpp.Ast.TypeChecker-> import Database.HsSqlPpp.Ast.Environment+> import Database.HsSqlPpp.Ast.Catalog  > data Item = Group String [Item]->           | Statements [(String, [EnvironmentUpdate], StatementType)]+>           | Statements [(String, [CatalogUpdate], StatementType)]  > parameterizedStatementTests :: [Test.Framework.Test] > parameterizedStatementTests = itemToTft testData@@ -28,23 +30,66 @@ >   Group "parameterized statement tests" [ >     Group "simple selects" [ Statements [ >        ("select test();"->        ,[EnvCreateFunction FunName "test" [] (Pseudo Void) False]+>        ,[CatCreateFunction FunName "test" [] (Pseudo Void) False] >        ,StatementType [] []) >       ,("select adnum,adbin from pg_attrdef;" >        ,[] >        ,StatementType [] [("adnum", ScalarType "int2")->                          ,("adbin", ScalarType "text")])]->     ]->    ,Group "simple fn calls" [ Statements [->        ("select test($1);"->        ,[EnvCreateFunction FunName "test" [ScalarType "int4"] (ScalarType "text") False]+>                          ,("adbin", ScalarType "text")])+>       ,("select adnum,adbin from pg_attrdef where oid= ?;"+>        ,[]+>        ,StatementType [ScalarType "oid"] [("adnum", ScalarType "int2")+>                                           ,("adbin", ScalarType "text")])+>       ,("select count(1) from pg_attrdef;"+>        ,[]+>        ,StatementType [] [("count", ScalarType "int8")])+>        {-,("select test($1);"+>        ,[CatCreateFunction FunName "test" [ScalarType "int4"] (ScalarType "text") False] >        ,StatementType [ScalarType "int4"] [("test",ScalarType "text")])+>       ,-} >       ,("select test(?);"->        ,[EnvCreateFunction FunName "test" [ScalarType "int4"] (ScalarType "text") False]+>        ,[CatCreateFunction FunName "test" [ScalarType "int4"] (ScalarType "text") False] >        ,StatementType [ScalarType "int4"] [("test",ScalarType "text")]) >        ] >     ]->   ]+>    ,Group "simple dml" [ Statements [+>        ("insert into testt values (1, 'test');"+>        ,[CatCreateTable "testt" [("c1", typeInt)+>                                 ,("c2", ScalarType "text")] []]+>        ,StatementType [] [])+>       ,("insert into testt (c1,c2) values (?, ?);"+>        ,[CatCreateTable "testt" [("c1", typeInt)+>                                 ,("c2", ScalarType "text")] []]+>        ,StatementType [typeInt, ScalarType "text"] [])+>       ,("insert into testt (c1,c2) values (1, 'test') returning c1;"+>        ,[CatCreateTable "testt" [("c1", typeInt)+>                                 ,("c2", ScalarType "text")] []]+>        ,StatementType [] [("c1",typeInt)])+>       ,("insert into testt (c1,c2) values (?, ?) returning c1 as d1, c2;"+>        ,[CatCreateTable "testt" [("c1", typeInt)+>                                 ,("c2", ScalarType "text")] []]+>        ,StatementType [typeInt, ScalarType "text"] [("d1", typeInt)+>                                                    ,("c2", ScalarType "text")])+>       {-,("insert into testt (c1,c2) values (?, ?) returning *;"+>        ,[CatCreateTable "testt" [("c1", typeInt)+>                                 ,("c2", ScalarType "text")] []]+>        ,StatementType [typeInt, ScalarType "text"] [("c1", typeInt)+>                                                    ,("c2", ScalarType "text")])-}+>       ,("update testt set c1= ?,c2= ? where c1= ? returning c2;"+>        ,[CatCreateTable "testt" [("c1", typeInt)+>                                 ,("c2", ScalarType "text")] []]+>        ,StatementType [typeInt, ScalarType "text", typeInt] [("c2", ScalarType "text")])+>       ,("update testt set (c1,c2) = (?,?);"+>        ,[CatCreateTable "testt" [("c1", typeInt)+>                                 ,("c2", ScalarType "text")] []]+>        ,StatementType [typeInt, ScalarType "text"] [])+>       ,("delete from blah where c1= ? returning c2;"+>        ,[CatCreateTable "blah" [("c1", typeInt)+>                                 ,("c2", ScalarType "text")] []]+>        ,StatementType [typeInt] [("c2", ScalarType "text")])+>       ]+>     ]+>    ]  select a,b from c where d=e group by f having  g=h orderby i limit j offset k; select function(a,b);@@ -52,21 +97,47 @@ update a set b=c,d=e where f=g returning h,i delete from t where a=b returning c,d -> testStatementType :: String -> [EnvironmentUpdate] -> StatementType -> Test.Framework.Test+rough list of grammar elements to possibly add inference support to:++where top level - >maybeboolexpr+having+limit, offset+values for table literal or insert+set clause+rowsetclause+onexpr, joinon?+windowfn+liftoperator+selectitem?+castexpression+caseexpression+funcall+inpredicate++  TODO: add support in each of these places for position args only when+        doing typecheckPS+        do typecheck error if come across ? when not doing typecheckPS+        make sure ? fails type check if not in a valid place in the ast++================================================================================+++> testStatementType :: String -> [CatalogUpdate] -> StatementType -> Test.Framework.Test > testStatementType src eu st = testCase ("typecheck " ++ src) $ >   let ast = case parseSql "" src of >                               Left e -> error $ show e >                               Right l -> l->   in case typeCheckPS makeEnv (head ast) of+>   in case typeCheckPS makeCat (head ast) of >        Left e -> error $ show e->        Right aast -> let is = getTopLevelInfos [aast]+>        Right aast -> --trace (ppShow aast) $+>                      let is = getTopLevelInfos [aast] >                          er = concatMap snd $ getTypeErrors [aast] >                      in case is of >                                 _ | not (null er) -> assertFailure $ show er >                                 [Just is1] -> assertEqual ("typecheck " ++ src) st is1 >                                 _ -> assertFailure ("expected onne statementinfo, got " ++ show is) >   where->     makeEnv = case updateEnvironment defaultTemplate1Environment eu of+>     makeCat = case updateCatalog defaultTemplate1Catalog eu of >                         Left x -> error $ show x >                         Right e -> e 
Database/HsSqlPpp/Tests/ParserTests.lhs view
@@ -7,18 +7,16 @@  There are no tests for invalid sql at the moment. -temporarily disabled because of haddock issue:-{-# LANGUAGE QuasiQuotes #-}+> {-# LANGUAGE QuasiQuotes #-}  > module Database.HsSqlPpp.Tests.ParserTests (parserTests) where  > import Test.HUnit > import Test.Framework > import Test.Framework.Providers.HUnit-> import Data.Char > import Data.Generics -> -- import Database.HsSqlPpp.Here+> import Database.HsSqlPpp.Here  > import Database.HsSqlPpp.Ast.Ast > import Database.HsSqlPpp.Ast.Annotation@@ -148,12 +146,16 @@ >      ]]  >    ,Group "case expressions" [Expressions [->       p -- [$here|->          "case when a,b then 3\n\->          \     when c then 4\n\->          \     else 5\n\->          \end"->          --    |]+>       p {-"case when a,b then 3\n\+>         \     when c then 4\n\+>         \     else 5\n\+>         \end" -}+>         [$here|+>          case when a,b then 3+>               when c then 4+>               else 5+>          end+>          |] >         (Case [] [([Identifier [] "a", Identifier [] "b"], IntegerLit [] 3) >               ,([Identifier [] "c"], IntegerLit [] 4)] >          (Just $ IntegerLit [] 5))
Database/HsSqlPpp/Tests/RoundtripTests.lhs view
@@ -1,30 +1,39 @@ Copyright 2010 Jake Wheat -Test sql by typechecking it, then running it through Postgres and comparing.--Stage 1:-read sql files: produce catalog using type checker-load sql files into postgres using psql-read catalog from psql and compare with catalog from typechecker-stage 2:-as above, but load via databaseloader-stage 3:-load using database loader-dump using pg_dump-attempt to compare original ast to ast of dump-+Test sql by typechecking it, then running it through Postgres and comparing:+* compare the catalog from typechecking to the one read from postgres+* load then dump the sql and compare post and pre asts+* (NOT STARTED ON YET) create views and check the type from type+  checking to the one from pg  > module Database.HsSqlPpp.Tests.RoundtripTests (roundtripTests) where  > import Test.HUnit > import Test.Framework > import Test.Framework.Providers.HUnit+> import Control.Monad.Error+> import Data.List+> import Data.Generics+> import Data.Generics.PlateData+> import Data.Char +> import Database.HsSqlPpp.Utils > import Database.HsSqlPpp.Parsing.Parser-> import Database.HsSqlPpp.Ast.Environment+> import Database.HsSqlPpp.Ast.Catalog > import Database.HsSqlPpp.Ast.TypeChecker-> import Database.HsSqlPpp.Commands.CommandComponents+> import Database.HsSqlPpp.Dbms.DBUtils+> import Database.HsSqlPpp.Dbms.DatabaseLoader+> import Database.HsSqlPpp.Ast.Annotation+> import Database.HsSqlPpp.Ast.Ast+> import Database.HsSqlPpp.Ast.SqlTypes +slightly dodgy, these tests automatically connect to this database and+clear it. hopefully no-one running these tests is storing important+data in a database with this name++> testDatabaseName :: String+> testDatabaseName = "hssqlpppautomatedtests"+ > data Item = Group String [Item] >           | Src [(String,String)] @@ -33,21 +42,208 @@  > roundtripTestData :: Item > roundtripTestData =->   Group "round trip tests" []+>     Group "round trip tests" [ Src [+>       ("simple select"+>       ,"select 1 from pg_attrdef;")+>      ,("create domain"+>       ,"create domain testd as text;")+>      ,("create domain with check"+>       ,"create domain testd as text check (length(value) > 2);")+>      ,("create composite"+>       ,"create type pos as (\n\+>        \  x int,\n\+>        \  y int);")+>      ,("create table"+>       ,"create table ttable (\n\+>        \  x int,\n\+>        \  y int);")+>      --,("create table with constraints"+>      -- ,"create table ttable (\n\+>      --  \  x int primary key,\n\+>      --  \  y int not null);")+>      ,("create view"+>       ,"create view v1 as select * from pg_attrdef;")+>      ,("create function"+>       ,"create function test1() returns integer as $$\n\+>        \  select 1;\n\+>        \$$ language sql;")+>      ,("create plpgsql function"+>       ,"create language plpgsql;\n\+>        \create function test1() returns void as $$\n\+>        \begin\n\+>        \  null;\n\+>        \end;\n\+>        \$$ language plpgsql;")+>     ]] +TODO for test data:+run through constraints in create table after attribute and as seperate rows+do multiple constraints on a line+use create view to run through select variations+++================================================================================++ > itemToTft :: Item -> [Test.Framework.Test] > itemToTft (Group s is) = [testGroup s $ concatMap itemToTft is] > itemToTft (Src ss) = map (uncurry testRoundtrip) ss  > testRoundtrip :: String -> String -> Test.Framework.Test-> testRoundtrip name sql = testCase ("test " ++ name) $->   checkStage1+> testRoundtrip name sql = testCase ("test " ++ name) $ wrapETT $ do+>   astOrig <- tsl $ parseSql "" sql+>   let (catOrig, astOrigTC) = typeCheck defaultTemplate1Catalog astOrig+>   failIfTypeErrors astOrigTC+>   -- run the tests first using psql to load the sql into the database+>   -- and then using hssqlppp's database loader to load the sql into+>   -- the database+>   doPgTests astOrig catOrig (liftIO (loadSqlUsingPsql testDatabaseName sql >> return ()))+>   doPgTests astOrig catOrig (liftIO $ loadIntoDatabase testDatabaseName "" astOrig) >   where->     checkStage1 = do->       cat1 <- getCatalog sql->       return ()+>     doPgTests :: [Statement] -> Catalog -> ErrorT String IO () -> ErrorT String IO () -- a -> a+>     doPgTests astOrig catOrig loadIntoDb = do+>       -- parse and type check the test sql+>       -- load this sql into pg+>       liftIO $ clearDB testDatabaseName+>       loadIntoDb+>       -- check the catalog in pg is the same as the one from type checking+>       catPsql <- liftIO (readCatalog testDatabaseName) >>= tsl+>       compareCats "load" catOrig catPsql+>       -- dump the database to get the sql having been normalized by passing+>       -- it through pg's digestive system+>       dumpSql <- liftIO $ pgDump testDatabaseName+>       astDumped <- tsl $ parseSql "" dumpSql+>       let (catDumped, astDumpedTC) = typeCheck defaultTemplate1Catalog astDumped+>       failIfTypeErrors $ astDumpedTC+>       -- check the original catalog from the catalog gotten from+>       -- dumping then typechecking the dump, maybe a little excessive+>       compareCats "dump" catOrig catDumped+>       -- compare the original ast to the dump ast, uses a transform+>       -- to match the changes that happen to the sql when loaded+>       -- then dumped by pg+>       let astOrigAdj = adjustAstToLookLikeDump $ adjTree astOrig+>           astDumpedAdj = adjTree astDumped+>       -- do this when a test fails to help diagnose why+>       when (astOrigAdj /= astDumpedAdj) $+>             liftIO $ putStrLn $ sql ++ "\n" ++ dumpSql+>       liftIO $ assertEqual "check dump ast" astOrigAdj astDumpedAdj - > getCatalog :: String -> EitherEnvironment+>     compareCats s c1 c2 =+>       case compareCatalogs defaultTemplate1Catalog c1 c2 of+>               CatalogDiff [] [] -> liftIO $ return ()+>               c -> liftIO $ assertFailure $ s ++ ", catalogs different: " ++ ppCatDiff c+>     -- adjust tree is the normalization that we run on the original ast as+>     -- well as the dumped ast+>     adjTree :: [Statement] -> [Statement]+>     adjTree = canonicalizeTypeNames . stripAnnotations+>     failIfTypeErrors xast = do+>       let te = getTypeErrors xast+>       when (not $ null te) $ throwError $ show te -> getCatalog sql = ->   parseSql1 "" sql >>= typeCheckC defaultTemplate1Environment >>= lfst+take the parse tree and change the type names to the canonical versions++> canonicalizeTypeNames :: Data a => a -> a+> canonicalizeTypeNames =+>   transformBi $ \x ->+>       case x of+>         SimpleTypeName a tn -> SimpleTypeName a $ canonicalizeTypeName tn+>         x1 -> x1+++================================================================================++ast roundtrip tests:+want to compare the asts of parsed sql, with the asts of the sql+loaded into pg, dumped and parsed+issues:+some statements are split apart e.g. create table with constraints+some statements are reordered in the dump+a create, select and then drop will be a problem+so need some sort of map function to convert between, and use+extensions to cover the dynamic ddl+++one of the things really want to double check is associativity and+precedence mainly in select expressions, pg_dump puts in the implicit+brackets which we can use to check these things+++> adjustAstToLookLikeDump :: [Statement] -> [Statement]+> adjustAstToLookLikeDump ast =+>   (addPresets . stripDml . addConstraintNames) ast+>   where+>     -- add the following at the beginning of the ast, since this is what pg_dump does+>     -- SET statement_timeout = 0;+>     -- SET client_encoding = 'UTF8';+>     -- SET standard_conforming_strings = off;+>     -- SET check_function_bodies = false;+>     -- SET client_min_messages = warning;+>     -- SET escape_string_warning = off;+>+>     -- SET search_path = public, pg_catalog;+>     noDml = stripDml ast+>     addPresets = adjustForCreatePlpgsql . (presets ++)+>     adjustForCreatePlpgsql =+>       transformBi $ \x ->+>           case x of+>             s@(Set _ "search_path" _):s1@(CreateLanguage _ _):s2 -> s1:s:s2+>             z -> z++>     presets = [Set [] "statement_timeout" [SetNum [] 0.0]+>               ,Set [] "client_encoding" [SetStr [] "UTF8"]+>               ,Set [] "standard_conforming_strings" [SetId [] "off"]+>               ,Set [] "check_function_bodies" [SetId [] "false"]+>               ,Set [] "client_min_messages" [SetId [] "warning"]+>               ,Set [] "escape_string_warning" [SetId [] "off"]]+>               -- if there are no statements, pg_dump doesn't spit out the search path+>               ++ if null noDml then [] else+>                      [Set [] "search_path" [SetId [] "public", SetId [] "pg_catalog"]]+>               -- these two sets get added if there are create tables+>               ++ case flip find ast (\s ->+>                                   case s of+>                                     CreateTable _ _ _ _ -> True+>                                     _ -> False) of+>                    Nothing -> []+>                    Just _ -> [Set [] "default_tablespace" [SetStr [] ""]+>                              ,Set [] "default_with_oids" [SetId [] "false"]]+>     -- dml statements don't appear in the dump+>     stripDml = filter (\s -> case s of+>                                SelectStatement _ _ -> False+>                                Insert _ _ _ _ _ -> False+>                                Update _ _ _ _ _ -> False+>                                Delete _ _ _ _ -> False+>                                Copy _ _ _ _ -> False+>                                CopyData _ _ -> False+>                                Truncate _ _ _ _ -> False+>                                _ -> True)++when pg comes across a constraint without a name, it generates one+automatically and this appears in the dump, so try to follow the+generation here, also any 'value' identifiers will be in uppercase++> addConstraintNames :: Data a => a -> a+> addConstraintNames =+>   transformBi $ \x ->+>       case x of+>         CreateDomain a name base "" cons ->+>             CreateDomain a name base+>               (case cons of+>                          Nothing -> ""+>                          Just _ -> name ++ "_check") (upcaseValue cons)+>                   where+>                     upcaseValue = transformBi $ \y ->+>                                   case y of+>                                     Identifier a1 i | map toUpper i == "VALUE" ->+>                                           Identifier a1 "VALUE"+>                                     y1 -> y1+>         x1 -> x1++================================================================================++some random support functions, to be tidied up++> wrapETT :: (Show e) => ErrorT e IO () -> IO ()+> wrapETT c = runErrorT c >>= \x ->+>          case x of+>            Left er -> assertFailure $ show er+>            Right l -> return l
Database/HsSqlPpp/Tests/TypeCheckTests.lhs view
@@ -9,22 +9,21 @@ > import Test.HUnit > import Test.Framework > import Test.Framework.Providers.HUnit-> import Data.Char > import Data.List  > import Database.HsSqlPpp.Parsing.Parser > import Database.HsSqlPpp.Ast.TypeChecker > import Database.HsSqlPpp.Ast.Annotation-> import Database.HsSqlPpp.Ast.Environment+> import Database.HsSqlPpp.Ast.Catalog > import Database.HsSqlPpp.Ast.SqlTypes  > data Item = Expressions [(String, Either [TypeError] Type)] >           | StatementTypes [(String, Either [TypeError] [Maybe StatementType])]->           | EnvUpStatementTypes [(String->                                  ,[EnvironmentUpdate]+>           | CatUpStatementTypes [(String+>                                  ,[CatalogUpdate] >                                  ,Either [TypeError] [Maybe StatementType])]->           | DdlStatements [(String, [[EnvironmentUpdate]])]->           | DdlStatementsEnv [(String, [EnvironmentUpdate])]+>           | DdlStatements [(String, [[CatalogUpdate]])]+>           | DdlStatementsCat [(String, [CatalogUpdate])] >           | Group String [Item]  > typeCheckTests :: [Test.Framework.Test]@@ -40,7 +39,9 @@ >      ,p "'test'" $ Right UnknownType >      ,p "true" $ Right typeBool >      ,p "array[1,2,3]" $ Right (ArrayType typeInt)->      ,p "array['a','b']" $ Right (ArrayType (ScalarType "text"))+>      ,p "array['a','b']" $ Right (ArrayType UnknownType)+>      ,p "array['a'::text,'b']" $ Right (ArrayType (ScalarType "text"))+>      ,p "array['a','b'::text]" $ Right (ArrayType (ScalarType "text")) >      ,p "array[1,'b']" $ Right (ArrayType typeInt) >      ,p "array[1,true]" $ Left [NoMatchingOperator "!arrayctor" [ScalarType "int4",ScalarType "bool"]] >      ]]@@ -68,7 +69,8 @@ >                                 ,typeBool]]  >      ,p "array[1,2,3][2]" $ Right typeInt->      ,p "array['a','b'][1]" $ Right (ScalarType "text")+>      ,p "array['a','b'][1]" $ Right UnknownType+>      ,p "array['a'::text,'b'][1]" $ Right (ScalarType "text")   >      ,p "array['a','b'][true]" (TypeError ("",0,0)  >                                   (WrongType@@ -117,7 +119,8 @@ >                                                   ,ScalarType "int4" >                                                   ,ScalarType "bool" >                                                   ,UnknownType]]->      ,p "nullif('hello','hello')" $ Right (ScalarType "text")+>      ,p "nullif('hello','hello')" $ Right UnknownType+>      ,p "nullif('hello'::text,'hello')" $ Right (ScalarType "text") >      ,p "nullif(3,4)" $ Right typeInt >      ,p "nullif(true,3)" >             $ Left [NoMatchingOperator "nullif" [ScalarType "bool"@@ -194,9 +197,14 @@ >         \ when 1=2 then 'stuff'\n\ >         \ when 2=3 then 'blah'\n\ >         \ else 'test'\n\->         \end" $ Right (ScalarType "text")+>         \end" $ Right UnknownType >      ,p "case\n\ >         \ when 1=2 then 'stuff'\n\+>         \ when 2=3 then 'blah'\n\+>         \ else 'test'::text\n\+>         \end" $ Right $ ScalarType "text"+>      ,p "case\n\+>         \ when 1=2 then 'stuff'\n\ >         \ when true=3 then 'blah'\n\ >         \ else 'test'\n\ >         \end" $ Left [NoMatchingOperator "=" [typeBool,typeInt]]@@ -229,7 +237,11 @@ >       p "array_append(ARRAY[1,2], 3)" >         $ Right (ArrayType typeInt) >      ,p "array_append(ARRAY['a','b'], 'c')"+>         $ Right (ArrayType UnknownType)+>      ,p "array_append(ARRAY['a','b'], 'c'::text)" >         $ Right (ArrayType $ ScalarType "text")+>      ,p "array_append(ARRAY['a','b'::text], 'c')"+>         $ Right (ArrayType $ ScalarType "text") >      ,p "array_append(ARRAY['a'::int,'b'], 'c')" >         $ Right (ArrayType typeInt) >      ]]@@ -349,18 +361,18 @@  >      ]] ->   ,Group "simple selects from 2" [ EnvUpStatementTypes [+>   ,Group "simple selects from 2" [ CatUpStatementTypes [ >       t "select a,b from testfunc();"->         [EnvCreateComposite "testType" [("a", ScalarType "text")+>         [CatCreateComposite "testType" [("a", ScalarType "text") >                                        ,("b", typeInt) >                                        ,("c", typeInt)]->         ,EnvCreateFunction FunName "testfunc" []+>         ,CatCreateFunction FunName "testfunc" [] >          (SetOfType $ NamedCompositeType "testType") False] >         $ Right [Just $ StatementType [] >                  [("a",ScalarType "text"),("b",ScalarType "int4")]]  >      ,t "select testfunc();"->         [EnvCreateFunction FunName "testfunc" [] (Pseudo Void) False]+>         [CatCreateFunction FunName "testfunc" [] (Pseudo Void) False] >         $ Right [Just $ StatementType [] []]  >      ]]@@ -574,7 +586,7 @@ >         \   a int,\n\ >         \   b text\n\ >         \);"->         [[EnvCreateTable "t1" [("a",ScalarType "int4")+>         [[CatCreateTable "t1" [("a",ScalarType "int4") >                               ,("b",ScalarType "text")] >                               [("tableoid", ScalarType "oid") >                               ,("cmax", ScalarType "cid")@@ -586,19 +598,19 @@ >         \   a int,\n\ >         \   b text\n\ >         \);"->         [[EnvCreateComposite "t1" [("a",ScalarType "int4")+>         [[CatCreateComposite "t1" [("a",ScalarType "int4") >                                   ,("b",ScalarType "text")]]]  >      ,p "create domain t1 as text;"->         [[EnvCreateDomain (DomainType "t1") (ScalarType "text")]]+>         [[CatCreateDomain (DomainType "t1") (ScalarType "text")]]  >      ,p "create domain t1 as text check (value in ('a', 'b'));\n\ >         \select 'text'::t1;"->         [[EnvCreateDomain (DomainType "t1") (ScalarType "text")]]+>         [[CatCreateDomain (DomainType "t1") (ScalarType "text")]]   >      ,p "create view v1 as select * from pg_attrdef;"->         [[EnvCreateView "v1" [("adrelid",ScalarType "oid")+>         [[CatCreateView "v1" [("adrelid",ScalarType "oid") >                              ,("adnum",ScalarType "int2") >                              ,("adbin",ScalarType "text") >                              ,("adsrc",ScalarType "text")]]]@@ -606,8 +618,11 @@ >      ,p "create function t1(text) returns text as $$\n\ >         \null;\n\ >         \$$ language sql stable;"->         [[EnvCreateFunction FunName "t1" [ScalarType "text"]+>         [[CatCreateFunction FunName "t1" [ScalarType "text"] >                             (ScalarType "text") False]]+>      ,p "create language plpgsql;"+>         [[CatCreateFunction FunName "plpgsql_call_handler" [] (Pseudo LanguageHandler) False+>          ,CatCreateFunction FunName "plpgsql_validator" [ScalarType "oid"] (Pseudo Void) False]] >      ]]  @@ -842,7 +857,7 @@ read fields of composite  array_contains -> match anyelement-createtable as env update+createtable as cat update window functions assign domain <-> base sql function not working@@ -989,13 +1004,13 @@ >                   ,("row_number",ScalarType "int8")]] >      ]] ->   ,Group "drop stuff" [ DdlStatementsEnv [+>   ,Group "drop stuff" [ DdlStatementsCat [ >       p "create function test(a int) returns void as $$\n\ >         \begin\n\ >         \  null;\n\ >         \end\n\ >         \$$ language plpgsql;"->         [EnvCreateFunction FunName "test" [typeInt] (Pseudo Void) False]+>         [CatCreateFunction FunName "test" [typeInt] (Pseudo Void) False] >      ,p "create function test(a int) returns void as $$\n\ >         \begin\n\ >         \  null;\n\@@ -1024,7 +1039,7 @@ >   let ast = case parseExpression "" src of >                                      Left e -> error $ show e >                                      Right l -> l->       aast = typeCheckExpression defaultTemplate1Environment ast+>       aast = typeCheckExpression defaultTemplate1Catalog ast >       ty = getTopLevelTypes [aast] >       er = concatMap snd $ getTypeErrors aast >   in case (length er, length ty) of@@ -1038,7 +1053,7 @@ >   let ast = case parseSql "" src of >                               Left e -> error $ show e >                               Right l -> l->       aast = snd $ typeCheck defaultTemplate1Environment ast+>       aast = snd $ typeCheck defaultTemplate1Catalog ast >       is = getTopLevelInfos aast >       er = concatMap snd $ getTypeErrors aast >   in {-trace (show aast) $-} case (length er, length is) of@@ -1047,15 +1062,15 @@ >        _ -> assertEqual ("typecheck " ++ src) sis $ Left er  -> testEnvUpStatementType :: String->                        -> [EnvironmentUpdate]+> testCatUpStatementType :: String+>                        -> [CatalogUpdate] >                        -> Either [TypeError] [Maybe StatementType] >                        -> Test.Framework.Test-> testEnvUpStatementType src eu sis = testCase ("typecheck " ++ src) $+> testCatUpStatementType src eu sis = testCase ("typecheck " ++ src) $ >   let ast = case parseSql "" src of >                               Left e -> error $ show e >                               Right l -> l->       aast = snd $ typeCheck makeEnv ast+>       aast = snd $ typeCheck makeCat ast >       is = getTopLevelInfos aast >       er = concatMap snd $ getTypeErrors aast >   in {-trace (show aast) $-} case (length er, length is) of@@ -1063,32 +1078,32 @@ >        (0,_) -> assertEqual ("typecheck " ++ src) sis $ Right is >        _ -> assertEqual ("typecheck " ++ src) sis $ Left er >   where->     makeEnv = case updateEnvironment defaultTemplate1Environment eu of+>     makeCat = case updateCatalog defaultTemplate1Catalog eu of >                         Left x -> error $ show x >                         Right e -> e -> testEnvUp :: String -> [[EnvironmentUpdate]] -> Test.Framework.Test-> testEnvUp src eu = testCase ("typecheck " ++ src) $+> testCatUp :: String -> [[CatalogUpdate]] -> Test.Framework.Test+> testCatUp src eu = testCase ("typecheck " ++ src) $ >   let ast = case parseSql "" src of >                               Left e -> error $ show e >                               Right l -> l->       aast = snd $ typeCheck defaultTemplate1Environment ast+>       aast = snd $ typeCheck defaultTemplate1Catalog ast >       er = concatMap snd $ getTypeErrors aast->       eu' = getTopLevelEnvUpdates aast+>       eu' = getTopLevelCatUpdates aast >   in {-trace (show aast) $-} case (length er, length eu') of->        (0,0) -> assertFailure "didn't get any infos or envupdates?"+>        (0,0) -> assertFailure "didn't get any infos or catupdates?" >        (0,_) -> assertEqual ("eu " ++ src) eu eu' >        (_,_) -> assertFailure $ show er  -> testEnv :: String -> [EnvironmentUpdate] -> Test.Framework.Test-> testEnv src eu = testCase ("check catalog: " ++ src) $+> testCat :: String -> [CatalogUpdate] -> Test.Framework.Test+> testCat src eu = testCase ("check catalog: " ++ src) $ >   let ast = case parseSql "" src of >                               Left e -> error $ show e >                               Right l -> l->       (nenv,aast) = typeCheck defaultTemplate1Environment ast+>       (ncat,aast) = typeCheck defaultTemplate1Catalog ast >       er = concatMap snd $ getTypeErrors aast->       neu = deconstructEnvironment nenv \\ deconstructEnvironment defaultTemplate1Environment+>       neu = deconstructCatalog ncat \\ deconstructCatalog defaultTemplate1Catalog >   in if not (null er) >        then assertFailure $ show er >        else assertEqual "check eus" eu neu@@ -1097,8 +1112,8 @@ > itemToTft :: Item -> [Test.Framework.Test] > itemToTft (Expressions es) = map (uncurry testExpressionType) es > itemToTft (StatementTypes es) = map (uncurry testStatementType) es-> itemToTft (EnvUpStatementTypes es) = map (\(s,eu,si) -> testEnvUpStatementType s eu si) es-> itemToTft (DdlStatements es) = map (uncurry testEnvUp) es-> itemToTft (DdlStatementsEnv es) = map (uncurry testEnv) es+> itemToTft (CatUpStatementTypes es) = map (\(s,eu,si) -> testCatUpStatementType s eu si) es+> itemToTft (DdlStatements es) = map (uncurry testCatUp) es+> itemToTft (DdlStatementsCat es) = map (uncurry testCat) es  > itemToTft (Group s is) = [testGroup s $ concatMap itemToTft is]
Database/HsSqlPpp/Utils.lhs view
@@ -3,16 +3,18 @@ This file contains some generic utility stuff  > {-# OPTIONS_HADDOCK hide #-}+> {-# LANGUAGE FlexibleContexts #-} + > module Database.HsSqlPpp.Utils where -> import Data.Maybe > import Data.List > import Data.Either > import Control.Arrow > import Control.Monad.Error > import Control.Applicative + > errorWhen :: (Error a) => Bool -> a -> Either a () > errorWhen cond = when cond . Left @@ -78,3 +80,30 @@ > liftThrows :: (MonadError t m) => Either t a -> m a > liftThrows (Left err) = throwError err > liftThrows (Right val) = return val++run in errort monad, throw error as io error++> wrapET :: (Show e, Monad m) => ErrorT e m a -> m a+> wrapET c = runErrorT c >>= \x ->+>          case x of+>            Left er -> error $ show er+>            Right l -> return l++error utility - convert either to ErrorT String++> tsl :: (MonadError String m, Show t) => Either t a -> m a+> tsl x = case x of+>                Left s -> throwError $ show s+>                Right b -> return b+++> listEither :: [Either a b] -> Either [a] [b]+> listEither es = let (l,r) = partitionEithers es+>                in if null l+>                   then Right r+>                   else Left l+++> forceRight :: Show e => Either e a -> a+> forceRight (Left x) = error $ show x+> forceRight (Right x) = x
− Database/HsSqlPpp/Wrapper/WrapperTemplate.lhs
@@ -1,45 +0,0 @@--> module Database.HsSqlPpp.Wrapper.WrapperTemplate where--> import Language.Haskell.TH-> import Language.Haskell.TH.Quote-> import Language.Haskell.TH.Lib-> --import Control.Exception--> --import qualified Database.HDBC.PostgreSQL as Pg-> --import Database.HDBC-> import Control.Monad.Error--> import Database.HsSqlPpp.Commands.CommandComponents-> import Database.HsSqlPpp.Ast.SqlTypes as HsSql-> import Database.HsSqlPpp.Ast.TypeChecker-> import Database.HsSqlPpp.Ast.Annotation-> import Database.HsSqlPpp.Parsing.Parser----> select :: QuasiQuoter-> select = QuasiQuoter (litE . stringL) (litP . stringL)--> conv :: String -> String-> conv s = show $ parseSql "" s---> getSelectResultType :: String -> String -> IO [(String,HsSql.Type)]-> getSelectResultType dbName sqlText = wrapET $ do->   cat <- readCatalog dbName->   ast <- parseSql1 "" sqlText >>= typeCheckC cat >>= lsnd->   a <- case getTopLevelInfos ast of->          [Just (SelectInfo (SetOfType (CompositeType atts)))] ->->            return atts->          _ -> throwError $ AEMisc "expected one info"->   return a-- > select :: String -> IO (Q Exp)- > select s = return $ stringE s-- > select :: String -> Q Exp- > select s = stringE s--- undefined
HsSqlSystem.lhs view
@@ -8,99 +8,50 @@ ./HsSqlSystem.lhs -? to get a list of commands and purpose and usage info -> {-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables #-}+Uses cmdargs to do command line processing and despatch. +The code is a bit messy at the moment, still working out how to use+ErrorT.++> {-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables,FlexibleContexts #-}+ > import System.Console.CmdArgs > import System.IO > import System.Directory-> import Data.List > import Control.Monad.Error-> import Data.Char-> --import Control.Applicative +> import Text.Show.Pretty > import Test.Framework (defaultMainWithArgs) +> import Data.List+ > import Database.HsSqlPpp.Tests.ParserTests > import Database.HsSqlPpp.Tests.TypeCheckTests > import Database.HsSqlPpp.Tests.ExtensionTests > import Database.HsSqlPpp.Tests.ParameterizedStatementTests+> import Database.HsSqlPpp.Tests.RoundtripTests+> import Database.HsSqlPpp.Tests.LocalBindingsTests -> import Database.HsSqlPpp.Ast.Environment+> import Database.HsSqlPpp.Utils+ > import Database.HsSqlPpp.Ast.Ast-> import Database.HsSqlPpp.Commands.CommandComponents as C+> import Database.HsSqlPpp.Ast.Catalog+> import qualified Database.HsSqlPpp.Ast.TypeChecker as A+> import Database.HsSqlPpp.Ast.Annotation+> import Database.HsSqlPpp.Ast.SqlTypes -> data HsSqlSystem = Lex {files :: [String]}->                  | Parse {files :: [String]}->                  | ParseExpression {files :: [String]}->                  | Pppp {files :: [String]}->                  | Ppp {files :: [String]}->                  | TypeCheck {database :: String->                              ,files :: [String]}->                  | TypeCheckExpression {database :: String->                                        ,files :: [String]}->                  | AllAnnotations {database :: String->                                   ,files :: [String]}->                  | AnnotateSource {database :: String->                                   ,file :: String}->                  | PPCatalog {database :: String->                              ,files :: [String]}->                  | Clear {database :: String}->                  | Load {database :: String->                         ,files :: [String]}->                  | ClearLoad {database :: String->                              ,files :: [String]}->                  | DBCatalog {database :: String}->                  | LoadPsql {database :: String->                             ,files :: [String]}->                  | PgDump {database :: String}->                  | TestBattery {database :: String->                                ,files :: [String]}->                  | Test {extra :: [String]}->                  | GenWrap {database :: String->                            ,file :: String}->                  | BuildDocs->                    deriving (Show, Data, Typeable)+> import qualified Database.HsSqlPpp.Parsing.Parser as P+> import Database.HsSqlPpp.Parsing.Lexer -> main :: IO ()-> main = do->        cmd <- cmdArgs "HsSqlSystem, Copyright Jake Wheat 2009"->                       [lexA, parseA, ppppA, pppA,->                        parseExpressionA, typeCheckExpressionA,->                        typeCheckA,allAnnotationsA,->                        annotateSourceA, ppCatalogA,->                        clearA, loadA, clearLoadA, catalogA, loadPsqlA,->                        pgDumpA, testBatteryA,->                        testA,buildDocsA, genWrapA] ->        case cmd of->          Lex fns -> lexFiles fns->          Parse fns -> showAst fns->          Pppp fns -> testPppp fns->          Ppp fns -> showAst fns->          ParseExpression fns -> parseExpression fns->          TypeCheck db fns -> typeCheck2 db fns->          TypeCheckExpression db fns -> typeCheckExpression db fns->          AllAnnotations db fns -> typeCheck2 db fns->          AnnotateSource db fn -> annotateSourceF db fn->          PPCatalog db fns -> ppCatalog db fns->          Clear db -> cleardb db->          Load db fns -> loadSql db fns->          ClearLoad db fns -> clearAndLoadSql db fns->          DBCatalog db -> readCat db->          LoadPsql db fns -> loadSqlPsql db fns->          PgDump db -> pgDump1 db->          TestBattery db fns -> runTestBattery db fns->          Test as -> runTests as->          BuildDocs -> buildDocs->          GenWrap db f -> genWrap db f+> import Database.HsSqlPpp.PrettyPrinter.PrettyPrinter+> import Database.HsSqlPpp.PrettyPrinter.AnnotateSource -would like to have the database argument be a common arg, don't know-how to do this+> import Database.HsSqlPpp.Dbms.DatabaseLoader+> import Database.HsSqlPpp.Dbms.WrapperGen+> import Database.HsSqlPpp.Dbms.DBUtils -> lexA, parseA, ppppA, pppA, annotateSourceA, clearA, loadA,->   clearLoadA, catalogA, loadPsqlA, pgDumpA, testBatteryA,->   typeCheckA, testA, parseExpressionA, typeCheckExpressionA,->   buildDocsA, allAnnotationsA, ppCatalogA, genWrapA :: Mode HsSqlSystem+> import Database.HsSqlPpp.Extensions.ChaosExtensions  =============================================================================== @@ -110,8 +61,8 @@ > lexFiles :: [FilePath] -> IO () > lexFiles fns = wrapET $ >                forM_ fns (\f ->->                     message ("lexing " ++ f) >>->                     readInput f >>= lexSql f >>= printList)+>                     (liftIO . putStrLn) ("lexing " ++ f) >>+>                     readInput f >>= tsl . lexSqlText f >>= mapM_ (liftIO . print))  ================================================================================ @@ -120,8 +71,9 @@  > showAst :: [String] -> IO () > showAst = wrapET . mapM_ (\f ->->                message ("-- ast of " ++ f) >>->                readInput f >>= parseSql1 f >>= stripAnn >>= ppSh >>= message)+>                (liftIO . putStrLn) ("-- ast of " ++ f) >>+>                readInput f >>= tsl . P.parseSql f >>=+>                return . stripAnnotations >>= return . ppShow >>= liftIO . putStrLn)  ================================================================================ @@ -132,15 +84,15 @@  > testPppp :: [String] -> IO () > testPppp = wrapET . mapM_ (\f -> do->             ast1 <- readInput f >>= parseSql1 f >>= stripAnn->             ast2 <- ppSql ast1 >>= parseSql1 "" >>= stripAnn+>             ast1 <- readInput f >>= tsl . P.parseSql f >>= return . stripAnnotations+>             ast2 <- (return . printSql) ast1 >>= tsl . P.parseSql "" >>= return . stripAnnotations >             if ast1 /= ast2->                then do->                     message "asts are different\n-- original"->                     ppSh ast1 >>= message->                     message "-- ppp'd"->                     ppSh ast2 >>= message->                else message "success")+>                then liftIO $ do+>                       putStrLn "asts are different\n-- original"+>                       putStrLn $ ppShow ast1+>                       putStrLn "-- ppp'd"+>                       putStrLn $ ppShow ast2+>                else (liftIO . putStrLn) "success")  ================================================================================ @@ -149,8 +101,8 @@ >               \hasn't mangled the sql."  > ppp :: String -> IO()-> ppp f = wrapET $ message ("--ppp " ++ f) >>->         readInput f >>= parseSql1 f >>= ppSql >>= message+> ppp f = wrapET $ (liftIO . putStrLn) ("--ppp " ++ f) >>+>         readInput f >>= tsl . P.parseSql f >>= return . printSql >>= liftIO . putStrLn  ================================================================================ @@ -160,9 +112,10 @@  > parseExpression :: [String] -> IO () > parseExpression = wrapET . mapM_ (\f ->->                message ("-- ast of " ++ f) >>->                readInput f >>= parseExpression1 f >>= stripAnn->                >>= ppSh >>= message)+>                (liftIO . putStrLn) ("-- ast of " ++ f) >>+>                readInput f >>= tsl . P.parseExpression f+>                >>= return . stripAnnotations+>                >>= return . ppShow >>= liftIO . putStrLn)  ================================================================================ @@ -174,11 +127,11 @@ > annotateSourceF :: String -> FilePath -> IO () > annotateSourceF db f = >   wrapET $ do->     message ("--annotated source of " ++ f)+>     (liftIO . putStrLn) ("--annotated source of " ++ f) >     src <- readInput f->     cat <- readCatalog db->     parseSql1 f src >>= typeCheckC cat >>= lsnd >>=->       ppAnnOrig False src >>= message+>     cat <- liftIO (readCatalog db) >>= tsl+>     tsl (P.parseSql f src) >>= return . A.typeCheck cat >>= return . snd >>=+>       return . annotateSource False src >>= liftIO . putStrLn  ================================================================================ @@ -189,12 +142,11 @@  > ppCatalog :: String -> [FilePath] -> IO () > ppCatalog db fns = wrapET $ do->   scat <- readCatalog db+>   scat <- liftIO (readCatalog db) >>= tsl >   (ncat, _) <- mapM (\f -> readInput f >>=->                            parseSql1 f) fns >>=->                  lconcat >>= typeCheckC scat->   compareCatalogs scat emptyEnvironment ncat >>=->       ppCatDiff >>= message+>                            tsl . P.parseSql f) fns >>=+>                  return . concat >>= return . A.typeCheck scat+>   return (ppCatDiff $ compareCatalogs scat emptyCatalog ncat) >>= liftIO . putStrLn  ================================================================================ @@ -205,9 +157,9 @@  > typeCheck2 :: String -> [FilePath] -> IO () > typeCheck2 db fns = wrapET $->   readCatalog db >>= \cat ->->   mapM (\f -> readInput f >>= parseSql1 f) fns >>= lconcat >>=->   typeCheckC cat >>= lsnd >>= getTEs >>= ppTypeErrors >>= putStrLnList+>   liftIO (readCatalog db) >>= tsl >>= \cat ->+>   mapM (\f -> readInput f >>= tsl . P.parseSql f) fns >>= return . concat >>=+>   return . A.typeCheck cat >>= return . snd >>= return . A.getTypeErrors >>= return . ppTypeErrors >>= mapM_ (liftIO . putStrLn)  ================================================================================ @@ -218,9 +170,9 @@  > allAnnotations :: String -> [FilePath] -> IO () > allAnnotations db fns = wrapET $->   readCatalog db >>= \cat ->->   mapM (\f -> readInput f >>= parseSql1 f) fns >>= lconcat >>=->   typeCheckC cat >>= lsnd >>= ppSh >>= message+>   liftIO (readCatalog db) >>= tsl >>= \cat ->+>   mapM (\f -> readInput f >>= tsl . P.parseSql f) fns >>= return . concat >>=+>   return . A.typeCheck cat >>= return . snd >>= return . ppShow >>= liftIO . putStrLn   ================================================================================@@ -233,12 +185,12 @@  > typeCheckExpression :: String -> [FilePath] -> IO () > typeCheckExpression db fns = wrapET $ do->   aasts <- readCatalog db >>= \cat ->->               forM fns (\f -> readInput f >>= parseExpression1 f->                                    >>= typeCheckExpressionC cat)->   tes <- mapM getTEs aasts->   mapM_ (\x -> ppTypeErrors x >>= putStrLnList) $ filter (not . null) tes->   mapM_ (\a -> liftM (show . head) (getTopLevelTypes a) >>= message) aasts+>   aasts <- liftIO (readCatalog db) >>= tsl >>= \cat ->+>               forM fns (\f -> readInput f >>= tsl . P.parseExpression f+>                                    >>= return . A.typeCheckExpression cat)+>   tes <- mapM (return . A.getTypeErrors) aasts+>   mapM_ (\x -> return (ppTypeErrors x) >>= mapM_ (liftIO . putStrLn)) $ filter (not . null) tes+>   mapM_ (\a -> liftM (show . head) (return $ A.getTopLevelTypes [a]) >>= liftIO . putStrLn) aasts  ================================================================================ @@ -251,7 +203,7 @@ >          &= text "hacky util to clear a database"  > cleardb :: String -> IO ()-> cleardb = wrapET . clearDB+> cleardb = clearDB  ================================================================================ @@ -265,8 +217,8 @@ > loadSql :: String -> [String] -> IO () > loadSql db fns = wrapET $ >      liftIO (hSetBuffering stdout NoBuffering) >>->      mapM (\f -> readInput f >>= parseSql1 f) fns >>= lconcat >>=->      runExtensions >>= loadAst db ""+>      mapM (\f -> readInput f >>= tsl . P.parseSql f) fns >>= return . concat >>=+>      return . extensionize >>= liftIO . loadIntoDatabase db ""  ================================================================================ @@ -276,9 +228,7 @@  > loadSqlPsql :: String -> [String] -> IO () > loadSqlPsql db = wrapET .->   --srcs <- mapM readInput fns->   --mapM_ (\s -> loadSqlUsingPsql db s >>= message) (map snd srcs)->   mapM_ (\s -> loadSqlUsingPsqlFromFile db s >>= message)+>   mapM_ (\s -> liftIO (loadSqlUsingPsqlFromFile db s) >>= tsl >>= liftIO . putStrLn)  ================================================================================ @@ -286,7 +236,7 @@ >           &= text "run pg dump, used for testing."  > pgDump1 :: String -> IO ()-> pgDump1 db = wrapET $ pgDump db >>= message+> pgDump1 db = pgDump db >>= putStrLn   ================================================================================@@ -310,33 +260,27 @@ >                    \format, used to create the catalog value for template1"  > readCat :: String -> IO ()-> readCat dbName = wrapET $ do->   cat <- readCatalog dbName->   message preamble->   ppSh cat >>= prefixLines >>= message+> readCat dbName = do+>   cat <- readCatalogFromDatabase dbName+>   putStrLn preamble+>   putStrLn $ prefixLines $ ppShow cat >   where->     preamble = "\n\->                \Copyright 2009 Jake Wheat\n\->                \\n\->                \This file contains\n\->                \\n\->                \> {-# OPTIONS_HADDOCK hide  #-}\n\+>     preamble = "> {-# OPTIONS_HADDOCK hide  #-}\n\ >                \\n\->                \> module Database.HsSqlPpp.AstInternals.Environment.DefaultTemplate1Environment\n\->                \>     (defaultTemplate1Environment\n\+>                \> module Database.HsSqlPpp.AstInternals.Catalog.DefaultTemplate1Catalog\n\+>                \>     (defaultTemplate1Catalog\n\ >                \>      ) where\n\ >                \\n\->                \> import Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal\n\+>                \> import Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal\n\ >                \> import Database.HsSqlPpp.AstInternals.TypeType\n\ >                \\n\->                \> defaultTemplate1Environment :: Environment\n\->                \> defaultTemplate1Environment =\n\+>                \> defaultTemplate1Catalog :: Catalog\n\+>                \> defaultTemplate1Catalog =\n\ >                \>    (\\l -> case l of\n\ >                \>             Left x -> error $ show x\n\ >                \>             Right e -> e) $\n\->                \>     updateEnvironment defaultEnvironment\n"->     prefixLines :: (Monad m, Error e) => String -> ErrorT e m String->     prefixLines = return . unlines . map (">        " ++) . lines+>                \>     updateCatalog defaultCatalog\n"+>     prefixLines = unlines . map (">        " ++) . lines   ================================================================================@@ -385,38 +329,38 @@  > runTestBattery :: String -> [FilePath] -> IO () > runTestBattery dbName fns = wrapET $ do->     clearDB dbName->     startingCat <- readCatalog dbName->     (originalCat :: Environment,+>     liftIO $ clearDB dbName+>     startingCat <- liftIO (readCatalog dbName) >>= tsl+>     (originalCat :: Catalog, >      originalAast :: StatementList) <-->        mapM (\f -> readInput f >>= parseSql1 f) fns >>= lconcat >>=->        runExtensions >>= typeCheckC startingCat+>        mapM (\f -> readInput f >>= tsl . P.parseSql f) fns >>= return . concat >>=+>        return . extensionize >>= return . A.typeCheck startingCat  >     headerMessage "type errors from initial parse:\n"->     getTEs originalAast >>= ppTypeErrors >>= putStrLnList+>     (return . A.getTypeErrors) originalAast >>= return . ppTypeErrors >>= mapM_ (liftIO . putStrLn) ->     mapM_ (\s -> loadSqlUsingPsqlFromFile dbName s >>= message) fns->     properCat <- readCatalog dbName+>     mapM_ (\s -> liftIO (loadSqlUsingPsqlFromFile dbName s) >>= tsl >>= liftIO . putStrLn) fns+>     properCat <- liftIO (readCatalog dbName) >>= tsl >     headerMessage "catalog differences from initial parse and vanilla load:\n"->     compareCatalogs startingCat originalCat properCat >>=->       ppCatDiff >>= message+>     return (ppCatDiff (compareCatalogs startingCat originalCat properCat)) >>= liftIO . putStrLn  >     (dumpCat,dumpAast) <-->       pgDump dbName >>= parseSql1 "dump" >>= typeCheckC startingCat+>       liftIO (pgDump dbName) >>= tsl . P.parseSql "dump" >>= return . A.typeCheck startingCat  >     headerMessage "type errors from dump:\n"->     getTEs dumpAast >>= ppTypeErrors >>= putStrLnList+>     (return . A.getTypeErrors) dumpAast >>= return . ppTypeErrors >>= mapM_ (liftIO . putStrLn)  >     headerMessage "catalog differences from initial parse and rechecked pg dump:\n"->     compareCatalogs startingCat originalCat dumpCat >>=->       ppCatDiff >>= message+>     return (ppCatDiff (compareCatalogs startingCat originalCat dumpCat)) >>= liftIO . putStrLn ->     message "complete!"+>     (liftIO . putStrLn) "complete!" >     where->       headerMessage = message . ("-----------------------------\n" ++)+>       headerMessage = liftIO . putStrLn . ("-----------------------------\n" ++)  ================================================================================ +run the test suite+ > testA = mode $ Test {extra = def &= typ "ANY" & args & unknownFlags} >         &= text "run automated tests, uses test.framework can pass arguments \ >                 \to this e.g. HsSqlSystem test -t parserTests"@@ -426,7 +370,9 @@ >   flip defaultMainWithArgs as $ >     parserTests ++ >     typeCheckTests ++->     --parameterizedStatementTests +++>     parameterizedStatementTests +++>     roundtripTests +++>     localBindingsTests ++ >     [extensionTests]  ================================================================================@@ -436,6 +382,8 @@  create target folder if doesn't exist +broken at the moment+ > buildDocsA = mode $ BuildDocs >         &= text "build the documention in the docs/ folder" @@ -447,11 +395,79 @@ >                        flip map inputFiles >                             (\f -> "docs/build/" ++ f ++ ".html") >              forM_ sts $ \(s,t) ->->                      readInput s >>= pandoc >>= C.writeFile t+>                      readInput s >>= pandoc >>= liftIO . writeFile t >             where >               sources = liftM (filter (isSuffixOf ".txt")) >                           (liftIO (getDirectoryContents "docs")) +> -- | Documentation command to produce some hssqlppp docs, takes a+> --   pandoc source file and converts to html, can run and insert+> --   commands embedded in the source+> pandoc :: MonadIO m => String -> ErrorT String m String+> pandoc txt = return txt+> {-+>   liftM (writeHtmlString wopt . readMarkdown defaultParserState)+>     (hsTextize txt)+>   where+>     wopt = defaultWriterOptions {+>                writerStandalone = True+>               ,writerTitlePrefix = "HsSqlPpp documentation"+>               ,writerTableOfContents = True+>               ,writerHeader = "<style>\n\+>                               \pre {\n\+>                               \    border: 1px dotted gray;\n\+>                               \    background-color: #ececec;\n\+>                               \    color: #1111111;\n\+>                               \    padding: 0.5em;\n\+>                               \}\n\+>                               \</style>"+>              }-}+++writerStandalone :: Bool	Include header and footer+writerHeader :: String	Header for the document+writerTitlePrefix :: String	Prefix for HTML titles+writerTabStop :: Int	Tabstop for conversion btw spaces and tabs+writerTableOfContents :: Bool	Include table of contents+writerS5 :: Bool	We're writing S5+writerHTMLMathMethod :: HTMLMathMethod	How to print math in HTML+writerIgnoreNotes :: Bool	Ignore footnotes (used in making toc)+writerIncremental :: Bool	Incremental S5 lists+writerNumberSections :: Bool	Number sections in LaTeX+writerIncludeBefore :: String	String to include before the body+writerIncludeAfter :: String	String to include after the body+writerStrictMarkdown :: Bool	Use strict markdown syntax+writerReferenceLinks :: Bool	Use reference links in writing markdown, rst+writerWrapText :: Bool	Wrap text to line length+writerLiterateHaskell :: Bool	Write as literate haskell+writerEmailObfuscation :: ObfuscationMethod	How to obfu++>   {-ex <- liftIO $ system ("pandoc -s -f markdown -t html "+>                          ++ src ++ " -o " ++ tgt)+>   case ex of+>     ExitFailure e -> throwError $ AEMisc $ "psql failed with " ++ show e+>     ExitSuccess -> return ()-}++process doc commands++> -- | read a text file, and pull out the commands, run them and insert+> --   the results into the text+> {-hsTextize :: MonadIO m => String -> ErrorT String m String+> hsTextize s =+>     liftIO (hsTextify+>              (("hssqlsystem", hsSqlSystemCommand):defaultCommands)+>              "docs/build"+>              s) >>= tsl -- . mapLeft ++> -- | run hssqlsystem using shell+> hsSqlSystemCommand :: String -> IO String+> hsSqlSystemCommand s =  shell ("HsSqlSystem " ++ s) >>= \m ->+>                         return $ "$ HsSqlSystem " ++ s+>                                  ++ "\n\n~~~~~~~~~~\n"+>                                  ++ m+>                                  ++ "\n~~~~~~~~~~\n\n" -}++ ================================================================================  > genWrapA = mode $ GenWrap {database = def@@ -462,8 +478,8 @@ > genWrap db f = >   wrapET doit >     where->       doit :: (MonadIO m) => ErrorT AllErrors m ()->       doit = wrapperGen1 db f >>= message+>       doit :: (MonadIO m) => ErrorT String m ()+>       doit = liftIO (wrapperGen db f) >>= liftIO . putStrLn  ================================================================================ @@ -552,4 +568,114 @@ other command arguments: - on its own is read from stdin --input='xxx' add literal input rather than from file/stdin+++================================================================================++> -- | Pretty print list of type errors with optional source position+> --   in emacs readable format.+> ppTypeErrors :: [(Maybe AnnotationElement, [TypeError])] -> [String]+> ppTypeErrors tes =+>   map showSpTe tes+>   where+>     showSpTe (Just (SourcePos fn l c), e) =+>         fn ++ ":" ++ show l ++ ":" ++ show c ++ ":\n" ++ show e+>     showSpTe (_,e) = "unknown:0:0:\n" ++ show e++================================================================================++read file as string - issues are:++want to support reading from stdin, and reading from a string passed+as an argument to the exe++> -- | read a file as text, will read from stdin if filename is '-'.+> readInput :: (Error e, MonadIO m) => FilePath -> ErrorT e m String+> readInput f =+>   liftIO r+>   where+>     r :: IO String+>     r = case f of+>              "-" -> getContents+>              _ | length f >= 2 &&+>                  head f == '"' && last f == '"'+>                    -> return $ drop 1 $ take (length f - 1) f+>                | otherwise -> readFile f++================================================================================++cmdargs stuff and main++> data HsSqlSystem = Lex {files :: [String]}+>                  | Parse {files :: [String]}+>                  | ParseExpression {files :: [String]}+>                  | Pppp {files :: [String]}+>                  | Ppp {files :: [String]}+>                  | TypeCheck {database :: String+>                              ,files :: [String]}+>                  | TypeCheckExpression {database :: String+>                                        ,files :: [String]}+>                  | AllAnnotations {database :: String+>                                   ,files :: [String]}+>                  | AnnotateSource {database :: String+>                                   ,file :: String}+>                  | PPCatalog {database :: String+>                              ,files :: [String]}+>                  | Clear {database :: String}+>                  | Load {database :: String+>                         ,files :: [String]}+>                  | ClearLoad {database :: String+>                              ,files :: [String]}+>                  | DBCatalog {database :: String}+>                  | LoadPsql {database :: String+>                             ,files :: [String]}+>                  | PgDump {database :: String}+>                  | TestBattery {database :: String+>                                ,files :: [String]}+>                  | Test {extra :: [String]}+>                  | GenWrap {database :: String+>                            ,file :: String}+>                  | BuildDocs+>                    deriving (Show, Data, Typeable)++> main :: IO ()+> main = do+>        cmd <- cmdArgs "HsSqlSystem, Copyright Jake Wheat 2010"+>                       [lexA, parseA, ppppA, pppA,+>                        parseExpressionA, typeCheckExpressionA,+>                        typeCheckA,allAnnotationsA,+>                        annotateSourceA, ppCatalogA,+>                        clearA, loadA, clearLoadA, catalogA, loadPsqlA,+>                        pgDumpA, testBatteryA,+>                        testA,buildDocsA, genWrapA]++>        case cmd of+>          Lex fns -> lexFiles fns+>          Parse fns -> showAst fns+>          Pppp fns -> testPppp fns+>          Ppp fns -> showAst fns+>          ParseExpression fns -> parseExpression fns+>          TypeCheck db fns -> typeCheck2 db fns+>          TypeCheckExpression db fns -> typeCheckExpression db fns+>          AllAnnotations db fns -> typeCheck2 db fns+>          AnnotateSource db fn -> annotateSourceF db fn+>          PPCatalog db fns -> ppCatalog db fns+>          Clear db -> cleardb db+>          Load db fns -> loadSql db fns+>          ClearLoad db fns -> clearAndLoadSql db fns+>          DBCatalog db -> readCat db+>          LoadPsql db fns -> loadSqlPsql db fns+>          PgDump db -> pgDump1 db+>          TestBattery db fns -> runTestBattery db fns+>          Test as -> runTests as+>          BuildDocs -> buildDocs+>          GenWrap db f -> genWrap db f++would like to have the database argument be a common arg, don't know+how to do this++> lexA, parseA, ppppA, pppA, annotateSourceA, clearA, loadA,+>   clearLoadA, catalogA, loadPsqlA, pgDumpA, testBatteryA,+>   typeCheckA, testA, parseExpressionA, typeCheckExpressionA,+>   buildDocsA, allAnnotationsA, ppCatalogA, genWrapA :: Mode HsSqlSystem 
README view
@@ -1,28 +1,26 @@ Summary: A parser, pretty printer, and type checker for PostgreSQL SQL and PL/pgSQL. BSD licensed. -** Some of the documentation here and in the other files is out of-   date, will be updated before the first alpha release. Please email-   me (address below) if you have any questions in the meantime **- The current aims of the project is to provide a parser and type checker for a substantial portion of PostgreSQL SQL and PL/pgSQL, and then hopefully to build on this to make tools and libraries to help-developing PL/pgSQL code.+developing PL/pgSQL code, possibly: macros/ code generation/ custom+syntax, type safe access from Haskell, Lint-like checking,+documentation generation.  Status: it successfully parses and accurately pretty prints the three moderate sized SQL files from another project of mine, but there are lots of missing bits. Coverage of SQL is sort of reasonable - it's-possible that your SQL files will parse ok, but it's also possible-that they won't parse at all. Please report any sql which doesn't+possible that your SQL files will parse OK, but it's also possible+that they won't parse at all. Please report any SQL which doesn't parse.  It also has the beginnings of a type checker, which currently can type check a fair bit of the three files mentioned above. You can run the type checker on your SQL in various ways from the command line. Please-report any sql which doesn't type check correctly. Coming soon: a+report any SQL which doesn't type check correctly. Coming soon: a command to produce a report on how well this code can parse and type-check your sql.+check your SQL.  It comes with a small test suite. @@ -31,15 +29,17 @@ then cabal install hssqlppp -I think it should work on all GHC 6.10.x and possibly also GHC 6.8.x,-YMMV. GHC 6.12.x untested so far.+It's currently developed on GHC 6.12, but is tested on 6.10 before+each release so should work there too. -There are more doc files in the docs/ folder, and you can view the-haddock docs on hackage (see below for link). Better documentation is-coming soon.+There isn't much in the way of documentation at the moment. See the+haddock docs locally or on hackage (link below), which also contain+links to a few example files. The source has a fair bit of comments,+which are currently OK in some places and poor in others. -The main dependencies of this project are: Parsec 3, HUnit, HDBC,-UUAGC. You currently need PostgreSQL installed.+The main dependencies of this project are: Parsec 3, HDBC,+HDBC-postgresql, and UUAGC is needed only for development). You need+PostgreSQL installed.  ================================================================================ @@ -58,10 +58,6 @@ You can get the latest development code from Launchpad using Bazaar: bzr branch lp:~jakewheat/hssqlppp/trunk -To get a snapshot release, see the downloads on the Launchpad page, or-use cabal install.-- ================================================================================  Contact@@ -76,18 +72,50 @@  ================================================================================ -= Some provisional future plans:+Example files: -* use this system to develop a Lint-type checker for PL/pgSQL;+(remove the prefix+http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/+to get the local relative path) -* provide support to help developing SQL from an IDE (targeting Emacs-  mainly)+The test files for parsing and for type checking contain examples of+what parses/ typechecks and what the asts and annotations look like: -* support type checking simple SQL statements that you'd embed in-  Haskell code, including with ? placeholders, to support generating-  type safe wrappers - could integrate with MetaHDBC?;+http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/Database/HsSqlPpp/Tests/ParserTests.lhs+http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/Database/HsSqlPpp/Tests/TypeCheckTests.lhs -* possibly a lightweight code generation/ simple macro support to help-  with developing more robust PL/pgSQL code.+The HsSqlSystem command source - HsSqlSystem.lhs. -* documentation generation+AST transform code to extend plpgsql without any custom syntax, for+another project, early days:++http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/Database/HsSqlPpp/Extensions/ChaosExtensions.lhs++Some type safe database access rough example code, all just half+finished demo ideas at the moment:++Simple idea to work as a preprocess to parse a haskell file and+convert some declarations into calls to a wrapper around HDBC, with+the correct type signatures, with the return type as a list of haskell+tuples:++http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/Database/HsSqlPpp/Dbms/WrapperGen.lhs++Similar to previous idea, but using template haskell to do the+substitution at compile time, not as a preprocessor:++http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/Database/HsSqlPpp/Dbms/DBAccess2.lhs++example usage:++http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/testfiles/DBAccess2Test.lhs++Use template haskell again, but type the return values as lists of+hlists instead of tuples, so that field names in haskell code are also+checked at compile time:++http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/Database/HsSqlPpp/Dbms/DBAccess3.lhs++example usage:++http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/testfiles/DBAccess3Test.lhs
− docs/Introduction.txt
@@ -1,154 +0,0 @@-# Introduction--This is a short guide to what hssqlsystem can do.--## Expression types--<%Command HsSqlSystem typecheckexpression '"2+2"'%>--<%Command HsSqlSystem typecheckexpression '"2+'3'"'%>--<%Command HsSqlSystem typecheckexpression '"2||'3'"'%>--<%Command HsSqlSystem typecheckexpression '"2+a"'%>--<%Command HsSqlSystem typecheckexpression '"noexist(2)"'%>--<%Command HsSqlSystem typecheckexpression '"'dsf'||'sadfsdf'"'%>--<%Command File SelectExpression.sql-(select attname as attribute_name,-       typname as type_name,-       relname as relvar_name-  from pg_attribute inner join pg_class on (attrelid = pg_class.oid)-  inner join pg_type on (atttypid = pg_type.oid)-  inner join (select relname as relvar_name from pg_class where relnamespace =-    (select oid from pg_namespace where nspname = 'public')-    and relkind = 'r') base_relvars on (relname = base_relvars.relvar_name)-  where attnum >= 1)-%>-- ;--<%Command HsSqlSystem typecheckexpression SelectExpression.sql%>--this shouldn't be hint: this needs different command as wrapper-to say it's wrapped in wrapET--<%Command File Select1.sql-select attname as attribute_name,-       typname as type_name,-       relname as relvar_name-  from pg_attribute inner join pg_class on (attrelid = pg_class.oid)-  inner join pg_type on (atttypid = pg_type.oid)-  inner join (select relname as relvar_name from pg_class where relnamespace =-    (select oid from pg_namespace where nspname = 'public')-    and relkind = 'r') base_relvars on (relname = base_relvars.relvar_name)-  where attnum >= 1;-%>--<%Command HsSqlSystem annotatesource -f=Select1.sql%>---: annotate source-aast-ppp--dig some big examples out of chaos--then with errors--## catalog info--<%Command File suppliers_and_parts_ddl.sql-create table s (-       s_no int primary key,-       sname text not null,-       status int not null,-       city text not null-);--create table p (-       p_po int primary key,-       pname text not null,-       color text not null,-       weight int not null,-       city text not null-);--create table sp (-       s_no int not null references s,-       p_no int not null references p,-       qty int not null,-       primary key (s_no,p_no)-);%>--<%Command HsSqlSystem ppcatalog -d=template1 suppliers_and_parts_ddl.sql%>--show catalog--compare catalogs--# extensions--demonstrate create_var extension--+ haskell source?--# stuff to write which will look good here:--function match resolution annotation--better pretty printer for type errors--better pretty printer for annotations--better pretty printer for catalog updates--typechecking ? strings---reference for commands in hssqlppp with examples for each---add sql files for suppliers and parts database?--------more referency section with each command, a description, plus example-usage of each, and examples of all the options, and how to use a-config file----# ??literatize this file some more:--embed these notes into HsSqlSystem.lhs then provide two documentation-processes, one to htmlize without the source as a command line users-guide, and to htmlize the entire file as a programmers guide: extend-this to commands.lhs as the start of a tutorial/ guide for someone-using this as a library.---> then the system will allow conversion of HsSqlSystem.lhs to html-   for:-end user guide: how to use the program-library user guide: includes source as example code for haskell programmers-haddock generated documentation-and also to produce an executable.---> need some way to mark which bits are excluded from the end user guide-   need to be able to pandoc-up the file with syntax highlighting also-   need to have some system to preprocess the file to run embedded-   commands and feed the output into the file before it is-   pandoc'd/syntax highlighted.---~~~~~~~~{.sql}-(select attname as attribute_name,-       typname as type_name,-       relname as relvar_name-  from pg_attribute inner join pg_class on (attrelid = pg_class.oid)-  inner join pg_type on (atttypid = pg_type.oid)-  inner join base_relvars on (relname = base_relvars.relvar_name)-  where attnum >= 1)-~~~~~~~~
− docs/TODO
@@ -1,670 +0,0 @@-= new immediate todos:--get typing working for wrapper generator demo -> release-then in some order:-- docs and examples - some basics-- roundtrip + report-  start with users sql: either source files, a database or mixture-  say if parse ok, -> source files or pg_dumps-  list type errors from typechecking asts-  pretty print the catalog from sql source or dumps from typechecking-  check this catalog against pg catalog-  also, rename environment type at least-- nullability plus support in wrapper generator-then maybe:-  full api review, renames, error handling work, plus sqltypes review---= milestones-not in any particular order--== type check for implicit join: need brain to work on--== use better database config-command line args and config file for db, username and password, and-   add prompt style so works like psql-== separate out documentation program to separate package--> how to do plugins for extra commands?--== documentation work-reorganise doc files (changelog, development, questions, README, TODO,-   usage, introduction, etc.)-do test/example doc stuff for parsing and typechecking-parse transform pretty print example: basics of approach in chaos - do-   some notes on how this can be improved-hssqlsystem commands reference-== tidy files, comment work-particularly ag files, redo comments, review all code for crufty bits-check todos at top of files: move to bottom-== nullability-== example code gen for typesafe access-== api review-tidyups, renames - rename everything pending, review public api-   function names (particularly environment->catalog, and-   localidentifierbindings to localenvironment)-   get rid of inconsistent suffixes in hssqlsystem and command components-== error handling work-  remove all calls to error-  try to catch all places where errors are being ignored (mainly in-   the type checking: add these errors to the aast)-== roundtrip tests -> report-== get chaos stuff working again-get chaos sql loading via hssqlppp again so can run roundtrip tests on-== module system, show used catalog-== better pretty printers for annotation types-== extensions code tidy?-== annotation generics style-== non sql syntax extensions work-== catalog ish: triggers, sequences, constraints, index, defaults-== haddock work-== do makefile type thing for development and deployment of db projects--maybe these:-builddocs work-hssqlsystem commands-  better cat diff-  show used catalog-finish intro docs-haskell intro docs-other docs-haddock in command components-testbattery-extensions - tidy code-annotation generics: tidy code-pretty printer for annotation-ppshow less newlines-better syntax for extensions-modules extension + public/private-syntax extension with non sql syntax using preprocessor?-multiline strings with string type e.g. sql-some sort of report mode to parse, typecheck and roundtrip some sql,-   and report back what works and what doesn't-work on parse errors--long term todos-milestones for next release-todo for chaos (extensions, etc.)-divide todo categories-  investigation, end user docs, internal docs, hygiene/maintenance,-  testing, new functionality, bug fixes-docs: motivation/genesis, history?, high level criteria for 0.1-think about dependencies: make hdbc/pg dependency a flag?, split out-   exes and tests somehow?----= documentation todo--write command processor thingy for builddocs-add extra commands to hssqlsystem for intro-finish intro-add haskell intro which uses the commandcomponents instead-other documentation files:-  reference for hssqlsystem-  hssqlsystem reference is generated from hssqlsystem.lhs:-    inside this file is the reference information for each-    command, plus example usage, so these appear next to the actual-    source. then when building docs, filter this file first to leave-    only the reference docs, then commandize and pandoc it-  installation guide--do haddock for commandcomponents so it has examples and stuff---= New functionality--get checkbig mostly working: not trying to get no type errors or-   differences, but to get all the different aspects of the tests-   written and running so can see from the output what remains to be-   fixed-   main issues:-   databaseloader isn't working on the chaos sql files anymore, I-   think this is an issue with the pretty printer producing invalid-   sql-   finish extensions: for the tests to mostly work, need to flesh out-   the current extension implementations which are mainly stubs-   add missing items to catalog: triggers, sequences, constraints,-   indexes, defaults--= Amending existing functionality--add dbms database name, username and password support-review holes:-   round off parsing support for sql - make a list of what-     needs to be added-   should try to get as much typechecking working on what parses as-     possible-   work on organising the type checking tests, and make the tests much-     more comprehensive--= Housecleaning--rename Environment type to Catalog-change type annotation from Type to either typecheckfailed Type so can-   use monad style to propagate typecheckfaileds-work on error handling: try to add a lot better error reporting:-   a few errors are being ignored rather than added to the aast, also-   try to change all the calls to error into eithers to be added to-   the aast-review commands in hssqlppp: mainly review names and arguments for-   consistency (i.e. make sure every command accepts first a-   databasename and then a list of sql files where this makes sense),-   also redo annotate source so it can be run multiple times on the-   same source, and run to update the annotation comments when the-   source is changed. Maybe think about better error reporting?-tidy up code, refactor and add lots of comments, particularly in the-   ag files--= Documentation--work on haddock documentation-find way to do nice html example documentation: short-   intro/tour/tutorial to give people a flavour of what the-   hssqlsystem exe can do-want to be able to show what the code can do easily and debug-   annotations - so do a pretty printer which works the following way:-   output source code on left side of a table (with syntax-   highlighting, hyperlinks, etc? - use html?) and on the right output-   the interesting annotations pretty printed, draw lines from the-   pretty printed annotations to the sourcepositions in the source on-   the left. Looks like might be able to do this using gtk:-   http://www.bravegnu.org/gtktext/x498.html - maybe convert to png to-   allow viewing in a web browser---= other issues to maybe fix:-check associativity of combine selects and join trefs without parens --   write tests using pg_dump output-ids in joins issue-redo order by parsing/ast to add direction to each element-write some notes on hacking: source overview rewrite, file overview-   rewrites, and rough howto on adding new constructs: altering-   parser, altering ast and altering type checking process-typecheck old and new pseudo records in trigger functions-explore creating template syntax for simple expansions of function-   calls to make writing some extensions easier-makefile stuff?-plpgsql stuff: blocks, assignments in declarations, strict into,-   labels,loops,continue-look into running test suite from cabal-todo for checkbig:-get initial catalog tests passing:-  still some extra table triggers: think it may that foreign keys that-   pg supports directly and primary keys don't add a table trigger-  name/text result set resolution issue-  uniquify constraint names support-  trim constraint names support-  distance function return type issue-  plpgsql language functions---support multiple files in annotate source and check source-match pgdump output for adding explicit parens e.g. in select unions-   and table refs, add tests for associativity in the absence of-   parens-tidy up code and docs as usual - lots of work needed on type checking-   code-redo catalog stuff (see below)-find some way to produce documentation: want motivation, examples,-   etc. in nice html-get chaos pgdump output parsing and partially type checking, todo:-  two parsing issues: not not, and count(distinct *)-  type checking issues exposed:-    old,new in trigger functions--old todoage:--================================================================================--== 2nd next release-fix catalog type, lots of work to make more robust:-  rename environment to catalog-  better pretty printer for catalog, and for bindings-  add annotations to catalog, so can see where bits came from-  do uniqueness testing e.g. disallow two tables with same name, two-   attributes with same name, etc.-fix tests using new catalog approach: don't want to have tests which-   use sql to alter catalog then use sql to test the catalog changes-   have been made - use separate tests (more unit-y tests)--=== types and internal errors handling--move type check failed to left of either, make node types an either-when there is a type error, add that as separate annotation, and add-type as left typecheckfailed. This way can use the haskell type system-to check we are chaining type check failed properly.-look at all the places where type lists are wrapped in-   unnamedcomposite and get rid of most of them - just use the type-   list directly.-Look at all the contexts where pg types can be used, and split into-   separate haskell types, and use sums to put them back together-   to use the haskell type system better e.g. different set of types-   can be used for an attribute in a table, for a function parameter,-   function return type, variable declaration, etc. - want to use the-   haskell type system to enforce this and get rid of a load of-   runtime checks (mainly the unwrap setof, etc. in typetype).--make sure errors aren't ignored, lots of places where this currently-   happens, e.g. updating environment - these errors need to end up in-   the ast. Get all the env functions to return eithers, and stick-   errors from these in the ast. Convert error calls to either return-   type and stick these errors in the ast.--=== parse/typecheck errors to user--pretty printers for type check failed, work on error messages from parsing-investigate alternative parser libs which can e.g. continue parsing-   after an error to provide more parse errors at once.-write a show for parsec errors which formats the lex tokens and-   expected lists properly (was broken when moved to the separate-   lexer)--================================================================================--== other soon todos--not sure which ones should be done before 0.1 release. rough guide is-   0.1 release should be something that regular sql programmers can-   try out/use without being overwhelmed with half finished/ missing-   bits, and actually see something useful.--=== schemas--think of a way to handle schemas, what about changes to schema search-   path mid code.--=== catalog and bindings annotation--want to add the catalog and current catalog to the annotations, so-   e.g. we can pretty print what exact updates are made to the catalog-   from a ddl statement-Add the current bindings as annotation everywhere, this can be used by-   the ambiguous identifier checks, etc., and to understand errors-also: add annotations to the catalog so we can see where an entity in-   the catalog has come from, what update and what source line-add similar to bindings, so each binding annotation contains a little-   explanation for where each binding has come from (e.g. identifier a-   with type b comes from this tref at source position x,y)--=== casting annotation--for each casting operation, add a log which explains what the relevant-   algorithm has done to either find the appropriate cast or what it's-   considered before failing. (e.g. can provide a list of steps taken-   with the candidate lists in the findcallmatch routine, might be-   useful for errors when it can't find a match, and if it is calling-   an unexpected function instead of the one you want).-add the prototype of the function actually matched at each funcall-   site--=== definition annotations-add sourcepos/reference to definition where each item is referenced-   (table, function, view, identifier binding, etc.)--=== documentation produce--=== null checking--null treatment-Basic motivation is to keep nulls carefully walled off, controlled,-   and be able to catch them when they sneak back into expressions,-   etc.. For each value, etc. we determine statically if it might be-   null. This can be done for return types of functions, fields in a-   select expression, etc.. (will do mappings e.g. if a functions-   inputs are all non null, then the output is non null, etc.). Once-   this is working ok, the second stage is to implement the anti null-   warnings/ errors.-Allow nulls in tables, outer joins, in coalesce, to be produced by-   selects (maybe add or remove from this allowed list, maybe make it-   configurable on a per project basis).-Never allow nulls to be an argument to a function call, (including-   ops, keyword ops, etc.). So every time you have a field being used-   in an expression and it cannot be statically verified to be non-   null, you have to insert a coalesce or fix it in some other way.-So nulls can still be used to represent optional values, n/a,-   etc.. and output to clients doing selects, but there is no need to-   grapple with:-* 3vl (or whatever it is that sql uses instead),-* what the result of a function call is if the some or all the-  arguments are null,-* what the result of a sum aggregate is if some of the values are null,-* etc.,-because none of these things are allowed.--=== do sql support todo--fill in the main gaps, some notes below-want to cover '90% of regularly used sql', no attempt for v0.1 to be-   comprehensive or nearly comprehensive--=== shadowed identifier test--use the bindings annotation to add warnings--=== modules extension--stage 1: set the current module with a function call-do creating the module and adding objects to the current module using-   extension instead of the sql functions used at the moment-find a way to annotate the source with modules stuff, want to use it-   for documentation-stage 2: add import/export stuff and check this--=== other extensions for chaos-mark generated code with annotation: make annotation types open with type-   class or something? - can get rid of typeerrora, statementinfoa-   wrappers this way-check for all ddl, etc. run in functions/executes and turn into-   extensions so the type checker can see these things-out of order definitions: want to write defs in any order and-   have the extension reorder them into something which can be loaded-   into postgres-finish create_var extension: add constraints-constraint system: make a bunch of stuff automatic, like using 'pg-   accelerators'-add notify triggers automatically, including for views-convert the sql tests (maybe some of the haskell tests) into static-   checks on the ast-find a better way to work with the tables with null fields:-  initial values - the copy statements are completely unreadable and-   uneditable-  what else?-crufty bits to try and simplify: turn sequence progression, action-   valid tables, ai-see if can make the multiple update hack more automatic---=== development/deployment support:-build file for development, just lists sql files in order, and lists-   which extensions are used-deployment: use system to load all sql via extensions into pg, then-to a regular pg dump which can then be deployed.---=== crufty bits to tidy-ag files constantly need fixing up for documentation and code clarity-syb stuff is a bit messy in astannotations (maybe use uniplate here to-   reduce dependencies?)-tidy the annotating functions in astinternals, implement then in terms-   of eachother-review local bindings use and decide how much logic to implement-   inside the local bindings module rather than eg. tablerefs.ag-want to stop having to write explicit backtrees everywhere. The key to-   fixing this is some way to read the existing annotation and supply-   an altered annotation within uuagc code-think about how doing multiple passes could help (e.g. star-   expansion).-think about where can use quickcheck-review when function bodies are typechecked - see if can do better-annotatesource function is a mess, also, make it overwrite it's own-   annotations instead of adding them so you can run it over a file-   multiple times.--=== testing-work on making the tests more comprehensive, want a test for each-   branch/option where feasible--=== write some automated tests for various roundtrips-add script to test chaos sql in various ways: parse roundtrip, load-   into database via psql and via hssqlppp comparison, and check-   catalog consistency--=== do way to produce aast from live database--use psql dump, and then can do type checks, lint checks, produce-   documentation--=== api-review/work on api and do haddock--=== prepare code for use by non haskell programmers + user docs-provide installation instructions-do usage documentation file, want to run code embedded in doc source-   and have results outputted to html output.--=== prepare code for use by haskell client programmers:-user docs as above for using the parser, the extension system, the-   annotator and annotations, examples for generating sql and writing-   extensions, etc.--=== ? place holder statements--=== precedence and operator parsing-add missing operators to parser-see if @ as prefix and infix just works in parsec-some a_expr and b_expr support properly by looking at pg grammar file-------------some new random notes--literal sql mode, with workspace idea: can write code/sql inline-in the source, and run it against a database and view the results-inline like in some text books where code is executed then the results-printed inline into the result - so this is a partial replacement for-   ghci, emacs haskell-mode ghci, psql, maybe bash, maybe ide, and-   also a runtime diagnosis tool which can be embedded into production-   exes. Pretty ambitious, need to focus on useful and easy features.--variant:-hssqlppp workspace: text view can type in commands and get results-   back, create multiple workspaces and they're persistent, maybe-   a wrapper round ghci but not conventional repl style, more like-   entering elisp and evaluating it in emacs? want to use-   as replacement for the ghci thing in emacs, and as a shell for working with-   the ast stuff and actual databases--use template haskell to simplify generics in extensions: cases and-   replacements are a bit verbose and difficult to write and read?---= parse and/or type check todo list:-(rough/incomplete)-"identifier"-6.5e-5-type 'string' style type cast-[:] slice-missing keyword ops-default template1 operators should all parse-agg(all expr) agg(distinct expr), agg(*)-window frame clauses, named windows-parse inside string literals when cast, for common types-multidimensional arrays-default values-serial-make sure can type check everything that parses-constraint names-provide list of keys in info for create/alter table: include unique-   not null and serials-type check fks, and other constraints-alter table: add/remove column-                        constraint-                        default value-                        column type-                        rename column-                        rename table-what other alters/creates-views, functions, operators, types, domains, triggers, rules-selects:-implicit joins-group by, having + group by with unaggregated and aggregated fields-distinct, on-order by - do properly-limit, offset-with queries-type modifiers-data type names with spaces in them-timestamps-schemas-alternative text for true and false-enums-geometric types weird syntax-composites: selector variants, rowctors, component get/update-do all keyword and template1 operators-any/some/all subqueries and arrays-check over rowwise comparisons-indexes: create/alter/drop--another todo list:-catalog:-constraints, pg_constraint-triggers-rules-indexes-add drops for all creates-review which alters to add-default columns values + insert checking-support pks,fks better-support serial properly-type modifiers-sequences-enums-listen, notify, pg_listener-blocks in plpgsql, assignments in declarations, not null checking-strict in into-lables, loops, exit, continue-raise % counts-create schema--once all this is done, work on documenting precisely what is supported-   and what isn't.--================================================================================--example for generating sql code from haskell using the ast-get database loader and typesafe access generators good enough to use-   in chaos-example usage of each of these-look at the error message formatting, particularly try to fix the-   parser errors so they make more sense-add annotation field to most ast nodes, store type and source-   positioning in this field, fix parser to add lots of accurate-   positioning information when parsing.-make sure the lint process works on text dumps of databases.-try checking the sample databases: http://pgfoundry.org/projects/dbsamples/---================================================================================--some syntax todo, not organised:---------------add support for following sql syntax (+ type checking)-alter table, common variations-create index-create rule-create trigger-+ drops for all creates-+ maybe alters?-ctes-loop, exit, labels-easy ones: transactions, savepoints, listen-prepare, execute + using-some more:-create or replace-alter table-transactions: begin, checkpoint, commit, end, rollback-cursors: declare, open, fetch, move, close, where current of-copy - parse properly-create database-create index-create rule-create trigger + plpgsql support-grant,revoke-listen, notify, unlisten-prepare, execute-savepoint, release savepoint, rollback to savepoint-set, reset-set constraints-set role-set transaction-correlated subquery attrs--plpgsql--blocks which aren't at the top level of a function-% types-strict on intos-not null for var defs-exception-execute using-get diagnostics-return query execute-raise missing bits-out params-elsif-loop-exit-labels-reverse, by in for-for in execute--expressions:-process string escapes, support dollar quoting and other quoting more-   robustly in the pretty printer-full user operator support (?)-fix expression parser properly to handle things like between - see-   grammar in pg source for info on how to do this-[:] array slices-aggregate: all and distinct-multi dimensional arrays: selectors and subscripting-missing keyword operators-datetime extract-time zone-subquery operators: any, some, all-in general, parsing operators is wrong, the lexer needs to be able to-   lex sequences of symbols into single/multiple operators correctly,-   what happens at the moment is a kludge, also, general operator-   parsing will change how operators are represented in the ast--================================================================================--some other random ideas:--more tests:-   add parse and type check roundtrips automated tests for chaos sql-   add parse check which parses a single statement, then loads it into-   pg, pg_dumps it, then parses the output to see if it is the same:-   since pg sticks plenty of parens in, this should test the-   associativity and precedence. pg also rewrites some of the sql so-   will have to match that--parser, converter and pretty printer for explain output, want to view-   how a query is executed in human readable pseudocode. Add lint type-   checks, etc. to this, which can suggest ways to rewrite the query-   to get better performance. Another idea is to make the dependencies-   on the values in the tables more explicit, so you can see how much-   the data can change before another plan is chosen, or you can see a-   bad assumption about the kind of data the query will be run on.--incorporate pg regression test sql into parsing and type checking-   tests - can run the roundtrip tests on them, check the-   documentation generator, etc.--redo cabal file to add compile time options: exes, pg support, tests- or split into separate packages?--work on error reporting, add tests for malformed sql, already some-   tests and plan for more for sql which fails type checks.--want to report multiple parse errors, perhaps can bodge this because-   of the property that ';' can only appear inside a string or-   comment, or otherwise at the end of a statement, so add some code-   to jump to the next end of statement looking ';' and continue to-   parse to end of file in an attempt to catch at least some further-   syntax errors--get property checker working again - one problem is that the pretty-   printer will reject some asts (which the parser cannot-   produce), and the parser will probably reject some invalid sql that-   the pretty printer will happily produce from some asts.--plpgsql on 'roids:-write libraries in haskell, and then write syntax extensions for-   plpgsql using the extension mechanism to access these libs from-   extended plpgsql e.g. ui lib written in haskell, accessed by syntax-   extensions in plpgsql then can write the database and ui all in the-   same source code in the same language, with first class support for-   properly typed relation valued expressions, avoiding multiple-   languages and mapping/'impedance mismatch' between database types-   and types in the language you write the ui in.
− docs/changelog
@@ -1,60 +0,0 @@-cleaning--typechecking support for a few more contexts for expressions (e.g. on-expressions in joins, check expressions, wheres in updates and-deletes, etc.)-type checking support for a few more statement types-work on implicit casts-improvements to checksource command-prototype idea for extension system-hack to improve typechecking of function bodies - they are now type-checked after the whole rest of the file-lots of work on catalog typechecking--main internal changes:-lots of refactoring-heavy rearrangement of ag code, it's not a complete mess anymore-split local binding code from catalog code--environment--New environment data type with abstracted implementation, can now-process ddl in a script and type check against it. Some work on-variable scoping, and annotations. New commands: annotateSource (adds-some annotations for statements into the original source code as-comments), and checksource, which outputs type errors in emacs-friendly format.--annotated tree--The API and type checking code has had a major overhaul, now uses-annotations inline in the ast, has rudimentary haddock documentation,-and the API is starting to take shape. No significant progress on-actual parsing or typechecking since last release.--secondtypechecking--typechecks a fair amount of select statements, and does some type-checking of insert, update, delete and create statements. It can also-take a sql file and parse, type check, and spit it back out with type-checking information interspersed with the statements (but with the-formatting mangled and the comments stripped).---earlytypechecking--hasn't fixed the error messages, but can now type check some select-statements, it includes a command to read a sql file in, type check it-against a database, then pretty print the ast interspersed with the-inferred types of each statement in comments.---lexing--parses with a separate lexer, unfortunately the error messages have-gone wrong.---prealpha1--parses without a separate lexer and gives ok error messages
− docs/development
@@ -1,150 +0,0 @@-Some brief notes on developing with this code.--UUAGC is used in the type checking, there are some links at the top of-AstInternal.ag for more information.--The code uses a few GHC extensions, I don't know if they are-conservative extensions or not, see the cabal file and grep to find-out the current list.--Two of the files are generated:--DefaultTemplate1Environment.hs -> generated using- ./HsSqlSystem.lhs readenv template1 > something && cp something ...- You shouldn't need to regenerate this file unless you change the- Environment data type.--AstInternal.hs -> this is generated from AstInternal.ag and- Typechecking.ag using uuagc, see AstInternal.ag for the exact- arguments to use.--If you are editing either of these generated files directly you're-probably doing something wrong.--See the file 'usage' which documents a bunch of utility functions you-can run from the command line, you can look and HsSqlSystem.lhs source-for some example usage.--There are rudimentary test for a lot of the functionality, see-ParserTests.lhs and AstCheckTests.lhs (for type checking). These-contain some small examples of how the code can be used. The-HsSqlSystem.lhs file contains a few more examples.--Source file overview:--HsSqlSystem.lhs--Main executable to provide command line access to library functions,-mainly utilities to help with developing the source. Run-'./HsSqlSystem.lhs help' to list the commands. You can run the-automated tests using './HsSqlSystem.lhs test'.--All the other source code is under Database/HsSqlSystem/--Database/HsSqlPpp/Utils.lhs contains some small utility functions.--The main folders under Database/HsSqlPpp are:--Ast: public modules which forward parts of the internal ast and-typechecking code--AstInternals: private modules for ast, annotations, typechecking, etc.-  also contains all the .ag files.--Commands: ErrorT wrappers for many library functions, used heavily in-HsSqlSystem.lhs--Dbms: Some rudimentary and half baked code to access databases.--Extensions: expermental code for a syntax extension system for plpgsql--HsText: code to help producing documentation: will process a text-file, extract commands, run them, and interpolate the output into the-text.--Parsing: the parsing code--PrettyPrinter: pretty printing code--Tests: hunit tests---Main code files:--The main parsing code is in Database/HsSqlPpp/Parsing/Lexer.lhs and-Database/HsSqlPpp/Parsing/Parser.lhs--The main pretty printing code is in-Database/HsSqlPpp/PrettyPrinter/PrettyPrinter.lhs and there is also-some code to insert types, etc. into the original source in-Database/HsSqlPpp/PrettyPrinter/AnnotateSource.lhs--The main ast and typechecking code is in the following files:--attribute grammar files:-Database/HsSqlPpp/AstInternals/AstInternal.ag contains the ast nodes-Database/HsSqlPpp/AstInternals/Typechecking/ contains the ATTR and SEM code-for type checking-These are supplemented by a bunch of helper modules:--Database/HsSqlPpp/AstInternals/TypeConversion.lhs - contains the code-which handles the implicit type cast resolution (these are postgresql-algorithms used to lookup function calls, work out the types of result-sets and check assignments).--Database/HsSqlPpp/AstInternals/TypeCheckingH.lhs - contains some code-which has been moved out of TypeChecking.ag for ease of development--Database/HsSqlPpp/AstInternals/AstAnnotation.lhs - contains the data-types and a few helper functions for the annotation data types.--Database/HsSqlPpp/AstInternals/TypeType.lhs - contains the data types-and a few helper functions for postgresql types, and also type errors.--Database/HsSqlPpp/AstInternals/AstUtils.lhs - contains some error handling utils--Database/HsSqlPpp/AstInternals/AnnotationUtils.lhs - contains some-additional annotation functions which depend on the ast nodes--the code to track environment changes during type checking-(e.g. catalog changes, variables/bindings) is in the following two files:-Database/HsSqlPpp/AstInternals/EnvironmentInternal.lhs - the main code-to create, update and use environments.-Database/HsSqlPpp/AstInternals/EnvironmentReader.lhs - code to read a-catalog from a database and produce an environment value.-Database/HsSqlPpp/AstInternals/DefaultTemplate1Environment.lhs - this-is a copy of the default template1 database environment--The code under Database/HsSqlPpp/AstInternals/ is hidden behind the-public modules in Database/HsSqlPpp/Ast/:-Database/HsSqlPpp/Ast/Annotator.lhs-Database/HsSqlPpp/Ast/Ast.lhs-Database/HsSqlPpp/Ast/Environment.lhs-Database/HsSqlPpp/Ast/Annotation.lhs-These pretty much just forward exports, and add a bit of haddock-organisation.--The hunit tests are in:-Database/HsSqlPpp/Tests/AstCheckTests.lhs-Database/HsSqlPpp/Tests/ParserTests.lhs-and also this file which isn't really used yet:-Database/HsSqlPpp/Tests/DatabaseLoaderTests.lhs--There are a few utilities to access databases in-Database/HsSqlPpp/Dbms/, this code is very sketchy.--These files all have (hopefully) useful comments, although many of-these haven't been kept up to date.--The error handling in the type checking code is in flux so quite a lot-of the code there is a bit of a mess unfortunately (I'm still not sure-what the best way to do this is.).--Also, some of the annotation functions use SYB which I'm a bit crap-with so that code is also a bit of a mess.--The test coverage isn't really great, but it's not bad (this will be-fixed at some point).--The bits which I hope aren't too bad are the ast node data types, the-parser code, and the catalog code.
− docs/recordtests.sql
@@ -1,370 +0,0 @@-/*--record tests: try to find out exactly how records work-run a bunch of functions and check the results--run this file by loading psql then issuing \i recordtests.sql--the output from doing this has been manually pasted into this file in-comments--start with something to help understand the psql output--*/-create or replace function doingfn(fn text) returns void as $$-begin-  raise notice '\n===================================================\nFUNCTION: %\n-------------------------------------------',fn;-end;-$$ language plpgsql;----select doingfn('t1');--create or replace function t1() returns void as $$-declare-  r record;-  t pg_attrdef;-begin-  select into r * from pg_attrdef;-  t := r;-  raise notice 'r: %',r;-  raise notice 't: %',t;-end;-$$ language plpgsql;--select t1();--/*-result from this select is:-*************************-psql:recordtests.sql:20: NOTICE:  r: (258241,3,"{FUNCEXPR :funcid 480 :funcresulttype 23 :funcretset false :funcformat 2 :args ({FUNCEXPR :funcid 1574 :funcresulttype 20 :funcretset false :funcformat 0 :args ({CONST :consttype 2205 :consttypmod -1 :constlen 4 :constbyval true :constisnull false :location -1 :constvalue 4 [ -65 -16 3 0 ]}) :location -1}) :location -1}","nextval('modules_module_order_seq'::regclass)")-psql:recordtests.sql:20: NOTICE:  t: (258241,3,"{FUNCEXPR :funcid 480 :funcresulttype 23 :funcretset false :funcformat 2 :args ({FUNCEXPR :funcid 1574 :funcresulttype 20 :funcretset false :funcformat 0 :args ({CONST :consttype 2205 :consttypmod -1 :constlen 4 :constbyval true :constisnull false :location -1 :constvalue 4 [ -65 -16 3 0 ]}) :location -1}) :location -1}","nextval('modules_module_order_seq'::regclass)")- t1 ------ -(1 row)-*************************--the output is a list of values, looks like each has a type but we-don't get any field names, will investigate the field name aspects-below--The output from t and r are exactly the same - looks like the record-is pointing to exactly the same type of value that the composite variable is.--*/---- test two: build a record out of bits and then try to assign to a composite-select doingfn('t2');--create or replace function t2() returns void as $$-declare-  r record;-  t pg_attrdef;-begin-  r.adrelid := 1;-  --r.adnum := 2;-  --r.adbin = 'adbinval';-  --r.adsrc = 'adsrcval';-  --raise notice 'r: %',t;-  --t := r;-  --raise notice 't: %',t;-end;-$$ language plpgsql;--select t2();-/*-psql:recordtests.sql:37: ERROR:  record "r" is not assigned yet-DETAIL:  The tuple structure of a not-yet-assigned record is indeterminate.-CONTEXT:  PL/pgSQL function "t1" line 5 at assignment--didn't know whether this would work or not, but this is only because I-didn't read the postgresql manual properly, it's noted in-38.3.4. Record Types--*/---- test three - assign to record from row ctor-select doingfn('t3');--create or replace function t3() returns void as $$-declare-  r record;-  t pg_attrdef;-begin-  r := row(1,2,'adbinval','adsrcval');-  raise notice 'r: %',r;-  t := r;-  raise notice 't: %',t;-end;-$$ language plpgsql;--select t3();-/*-output is:-psql:recordtests.sql:105: NOTICE:  r: (,,,)-psql:recordtests.sql:105: NOTICE:  t: (1,2,adbinval,adsrcval)--so:-the assignment worked, but we can't see the fields with the row-constructor value in the record for some reason. This suggests the row-isn't the same type as the composite or even the same kind of type,-but it is compatible. Next check: see what happens when the row ctor-value types are in the wrong order.-*/--select doingfn('t4');--create or replace function t4() returns void as $$-declare-  r record;-  t pg_attrdef;-begin-  r := row('adbinval',1,2,'adsrcval');-  raise notice 'r: %',t;-  t := r;-  raise notice 't: %',t;-end;-$$ language plpgsql;--select t4();--/*-psql:recordtests.sql:143: NOTICE:  r: (,,,)-psql:recordtests.sql:143: ERROR:  invalid input syntax for type oid: "adbinval"-CONTEXT:  PL/pgSQL function "t4" line 7 at assignment--so this fails. So the the order of values counts. I think this would-mean our row ctor which assign succeeds above produces an anonymous-composite type with the structure:--(a:number,b:number,c:unknownstringlit,d:unknownstringlit)--where a,b,c,d are anonymous name placeholders, so we can't use them to-access the individual parts.--then we use the check assignment cast value one by one over the values to work out if the assign from the record to the composite type works.--next: check the number of fields behaviour-*/---select doingfn('t5');--create or replace function t5() returns void as $$-declare-  r record;-  t pg_attrdef;-  b bool;-begin-  r := row(1,2,'adbinval','adsrcval', 3,null,true,'is this ignored?');-  raise notice 'r: %',t;-  t := r;-  raise notice 't: %',t;-  --todo: investigate equalities in same way as assignments-  b := row(1,2,'adbinval','adsrcval') = row(1,2,'adbinval','a1dsrcval');-  raise notice 'b: %',b;-end;-$$ language plpgsql;--select t5();--/*-psql:recordtests.sql:173: NOTICE:  r: (,,,)-psql:recordtests.sql:173: NOTICE:  t: (1,2,adbinval,adsrcval)--slightly disappointing - it works instead of giving an error, with the-extra fields ignored.--test composite variations on this - see if extra fields are ignored there too--Want to check if the field names are significant for named composite-types with non anonymous field names.-- check composite to composite assignment with-  same names and types-  different names same types-  same names and types but different order-  check if extra fields get ignored or cause error as with row values--*/--select doingfn('t6');-drop type if exists fake_pg_attrdef;-create type fake_pg_attrdef as (-  adrelid oid,-  adnum int2,-  adbin text,-  adsrc text-);----just test a bunch of stuff which should definitely work as sanity check-create or replace function t6() returns void as $$-declare-  t pg_attrdef;-  u fake_pg_attrdef;-  r record;-begin-  u := (1,2,'adbinval','adsrcval');-  t := u;-  raise notice 'u: %',u;-  raise notice 't: %',t;-  r := u;-  t := r;-  raise notice 'u: %',r;-  raise notice 'r: %',r;-  raise notice 't: %',t;-end;-$$ language plpgsql;--select t6();--/*-works fine:-psql:recordtests.sql:220: NOTICE:  u: (1,2,adbinval,adsrcval)-psql:recordtests.sql:220: NOTICE:  t: (1,2,adbinval,adsrcval)-psql:recordtests.sql:220: NOTICE:  u: (1,2,adbinval,adsrcval)-psql:recordtests.sql:220: NOTICE:  r: (1,2,adbinval,adsrcval)-psql:recordtests.sql:220: NOTICE:  t: (1,2,adbinval,adsrcval)--check if field names are significant:-*/--select doingfn('t7');-drop type if exists fake_renamed_pg_attrdef;-create type fake_renamed_pg_attrdef as (-  a oid,-  b int2,-  c text,-  d text-);--create or replace function t7() returns void as $$-declare-  t pg_attrdef;-  u fake_renamed_pg_attrdef;-  r record;-begin-  u := (1,2,'adbinval','adsrcval');-  t := u;-  raise notice 'u: %',u;-  raise notice 't: %',t;-  r := u;-  t := r;-  raise notice 'u: %',r;-  raise notice 'r: %',r;-  raise notice 't: %',t;-end;-$$ language plpgsql;--select t7();--/*-works fine also:-psql:recordtests.sql:261: NOTICE:  u: (1,2,adbinval,adsrcval)-psql:recordtests.sql:261: NOTICE:  t: (1,2,adbinval,adsrcval)-psql:recordtests.sql:261: NOTICE:  u: (1,2,adbinval,adsrcval)-psql:recordtests.sql:261: NOTICE:  r: (1,2,adbinval,adsrcval)-psql:recordtests.sql:261: NOTICE:  t: (1,2,adbinval,adsrcval)--check field order is important:-*/--select doingfn('t8');-drop type if exists fake_renamed2_pg_attrdef;-create type fake_renamed2_pg_attrdef as (-  adnum int2,-  adbin text,-  adsrc text,-  adrelid oid-);--create or replace function t8() returns void as $$-declare-  t pg_attrdef;-  u fake_renamed2_pg_attrdef;-  r record;-begin-  u := (2,'adbinval','adsrcval',1);-  --t := u;-  raise notice 'u: %',u;-  raise notice 't: %',t;-  r := u;-  t := r;-  raise notice 'u: %',r;-  raise notice 'r: %',r;-  raise notice 't: %',t;-end;-$$ language plpgsql;--select t8();--/*-fails:-psql:recordtests.sql:300: ERROR:  invalid input syntax for integer: "adbinval"-also fails with same error earlier if you uncomment the commented out line-confirmation: pg is just looking at the types in order and ignoring-the names. This seems consistent with the rest of sql (e.g. unions)...--check extra fields-*/--select doingfn('t9');-drop type if exists fake_renamed3_pg_attrdef;-create type fake_renamed3_pg_attrdef as (-  adrelid oid,-  adnum int2,-  adbin text,-  adsrc text,-  hello text-);--create or replace function t9() returns void as $$-declare-  t pg_attrdef;-  u fake_renamed3_pg_attrdef;-  r record;-begin-  u := (1,2,'adbinval','adsrcval','test');-  r := u;-  t := r;-  raise notice 'u: %',r;-  raise notice 'r: %',r;-  raise notice 't: %',t;-end;-$$ language plpgsql;--select t9();-/*-yes, it works just like the row ctor. ignores the extra field-psql:recordtests.sql:340: NOTICE:  u: (1,2,adbinval,adsrcval,test)-psql:recordtests.sql:340: NOTICE:  r: (1,2,adbinval,adsrcval,test)-psql:recordtests.sql:340: NOTICE:  t: (1,2,adbinval,adsrcval)--check with missing fields:-*/--select doingfn('t10');-create or replace function t10() returns void as $$-declare-  t pg_attrdef;-  u fake_renamed3_pg_attrdef;-  r record;-begin-  u := (1,2,'adbinval');-  r := u;-  t := r;-  raise notice 'u: %',r;-  raise notice 'r: %',r;-  raise notice 't: %',t;-end;-$$ language plpgsql;--select t10();-/*-yep, works-psql:recordtests.sql:363: NOTICE:  u: (1,2,adbinval,,)-psql:recordtests.sql:363: NOTICE:  r: (1,2,adbinval,,)-psql:recordtests.sql:363: NOTICE:  t: (1,2,adbinval,)--*/
− docs/status
@@ -1,87 +0,0 @@-Rough notes on status, probably a bit out of date. You can also see the test files:--http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/Database/HsSqlPpp/Tests/ParserTests.lhs--and--http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head%3A/Database/HsSqlPpp/Tests/AstCheckTests.lhs--to see a load of examples of what type checks.--= Syntax supported/ not supported:--== Parsing--Partially supports:-select statements (selectlists (*, qualified, aliased/correlation names, expressions)-       distinct, basic window functions,-       from (with explicit joins - natural, inner, cross, left, right,-       full outer, on and using), aliases, from functions-       where, group by, having, order by, limit, offset-       except, intersect, union--expressions: subselects, in, row ctors, strings + dollar strings,-             integers, case, exists, boolean literals, null, arrays-             and subscripting (slightly limited), function calls,-             identifiers, cast(x as y), between (quite limited),-             substring(x from a for b)--also partially supports:-insert (with multiple values and select support), update, delete (all-three with returning)-create and drop table, type, view, domain-create function for sql and plpgsql functions-all constraint types-sort of skips copy statements instead of erroring--plpgsql statements:-        select into-        null-        continue-        perform-        execute-        assignment-        if-        return, return next, return query-        raise-        for (select and integer variants)-        while-        case statement--Many things are missing at the moment, in particular-  selects: cte, implicit joins-  joins in updates (delete from, update using)-  alter statements-  create and drop apart from table, view, domain, type, function-  transaction commands-  triggers and trigger functions-  loop statement, labels-  error trapping-  cursors-This is a non-exhaustive list.--Expression support is patchy, should work pretty well for a lot of-simple stuff though. There is a strong possibility that for some-complex selects and expressions, the implicit precedence (that is,-bits without enclosing parenthesis) may parse in the wrong-direction. Please let me know if you encounter such an error.--== Type checking--Type checking supports a good subset of expressions and select-statements that the parser parses, and has basic support for insert,-update, delete and the various create statements that the parser-supports. Development work is currently focused in this area.--= Other current downsides:--The design of the AST node types is pretty basic.--Not much work has been done on correctly rejecting invalid SQL-(although it does pretty well despite this) and not much thought has-been put into error messages and error reporting yet, this is slowly-improving, and at some point will become a major focus - I hope this-code will provide substantial benefits when developing in PL/pgSQL in-the future.--Only supports PostgreSQL SQL and PL/pgSQL.
− docs/usage
@@ -1,145 +0,0 @@-Here are some notes on what you can currently do with the code:--** This file is a bit out of date, you can run 'HsSqlSystem -?'  to-   get started **--= HsSqlSystem--Command line access to a number of functions is provided by-HsSqlSystem.lhs. You can list the commands using 'HsSqlSystem help',-and you can get the descriptions of what these commands do using-'HsSqlSystem help all'. (Assuming you have cabal installed the-software and have the cabal binary folder in your path.)--The commands which access postgresql probably won't work right on your-system, they are in a very early alpha state.--The most interesting commands are:-* parsefile-* roundtripfile, loadsql-* annotateSource-* checksource---== parsefile--Pass in one or more filenames for files containing sql source, and the-program will attempt to parse, then pretty print and reparse to see if-the two asts are the same. This can be used to check the program can-successfully parse your sql, and if pretty printing then parsing the-result mangles it - lack of such mangling might give you slightly more-confidence that it has parsed ok.--== roundtripfile, loadsql--Similar to parse file, pass in a source filename and a target-filename, and the code with parse then pretty print the text. You can-then load the pretty printed code into a database and run your test-suite to see if the code made it through the parsing and pretty-printing process ok, or you can just eyeball the resultant-sql.--The related command is loadsql, which will attempt to parse one or-more files then pretty print them line by line, loading each line-straight into a database to help with testing. This may be a bit more-fragile than using roundtripfile.--Loading the roundtripped sql into a database then running tests on it-will hopefully can give a bit more confidence that the sql has been-parsed accurately.--== annotateSource--This command takes a filename, parses and type checks the file, and-then outputs a copy of the source with the main annotations attached-to the statements interspersed into the source in comments. This can-be used e.g. to view the attribute names and types of a view. After-some more work has been done on this command, it is intended that this-is expanded to provide lots of useful comments which are maintained in-your actual source and checked in to source control, etc..--== checksource--This command takes a set of files and type checks each one in turn-(later files can depend on definitions appearing in files earlier in-the file list). It outputs all the type errors found in Emacs friendly-format. This mostly just shows you all the bits that haven't been-implemented in the type checker yet. This is the early precursor to-the lint checking process.--Pretty printers and other work for the Annotation types are planned,-to make the annotateSource comments and error messages more readable.--== reasonably up to date output of './HsSqlSystem.lhs help all'--commands available-help-use 'help' to see a list of commands-use 'help all' to see a list of commands with descriptions-use 'help [command]' to see the description for that command--cleardb-hacky util to clear a database--loadsql-This takes one or more files with sql source text, parses them then-loads them into the database given.--clearandloadsql-cleardb then loadsql--lexfile-lex the file given and output the tokens on separate lines--parsefile-Routine to parse sql from a file, check that it appears to parse ok,-that pretty printing it and parsing that text gives the same ast, and-then displays the pretty printed version so you can see how well it's-done--roundtripfile-Used to test the parsing and pretty printing round trip. Takes two-arguments, a source filename and a target filename. If the target file-exists, it quits. Parses the source file then pretty prints it to the-target filename.--readenv-read the catalogs for the given db and dump a Environment value source-text to stdout--annotateSource-reads a file, parses, type checks, then outputs info on each statement-interspersed with the original source code--checksource-reads each file, parses, type checks, then outputs any type errors--================================================================================--= library usage--See the haddock docs to get a basic idea of using the libraries. The-source for HsSqlSystem.lhs might also be worth a look for some-examples. You should be able to view the haddock docs online on the-hackagedb page here:-http://hackage.haskell.org/package/hssqlppp--Quick notes:--to parse some sql use the parse functions in-Database.HsSqlPpp.Parsing.Parser: 'parseSql' to parse from a string,-'parseSqlFile' to parse from a file. This will give you an ast with-source position annotations. If you want to get rid of these-annotations, use 'Database.HsSqlPpp.Ast.Annotation.stripAnnotations'.-To typecheck and add other information to the ast, use-'Database.HsSqlPpp.Ast.TypeChecker.typeCheck'. You can read the-environment value from a database to check against that database, or-parse the ddl source along with your dml and concatenate them both to-pass to the typeCheck function.--================================================================================--= run the automated tests--To run the test suite run ./HsSqlSystem.lhs test. This will run the tests-for parsing and pretty printing, and for type checking.
hssqlppp.cabal view
@@ -1,60 +1,36 @@ Name:                hssqlppp-Version:             0.1.0+Version:             0.2.0 Synopsis:            Sql parser and type checker Description:     Sql parser, pretty printer and type checker, targets PostgreSQL SQL-    and PL/pgSQL, uses Parsec and UUAGC.+    and PL/pgSQL.     .-    Overview:+    See the project page+    <https://launchpad.net/hssqlppp> for more information and+    documentation links, there are also links to some example usage+    files there.     .-    see the module 'Ast' for the ast types;+    Quick module guide:     .-    'Parser' for converting text to asts;+    'Ast' - ast types;     .-    'PrettyPrinter' for converting asts to text;+    'Parser' - converting strings to asts;     .-    'AnnotateSource' for pretty printing annotations inline with original source;+    'PrettyPrinter' - converting asts to strings containing valid SQL;     .-    'TypeChecker' for type checking and annotating asts and working+    'TypeChecker' - type checking and annotating asts and working     with annotated trees;     .-    'SqlTypes' for the data types which represent SQL types, the data+    'SqlTypes' - the data types which represent SQL types, the data     type for type errors, and some support functions;     .-    'Annotation' for the annotation data types and utilities;-    .-    'Environment' to read a catalog from a database to type check against,-    or to generate catalog information;-    .-    'DatabaseLoader' for the beginnings of a routine to load SQL into-    a database (e.g. to generate an ast then load it into a database-    without loading it via psql). The loader just about does the job-    but error handling is a bit crap at the moment.-    .-    'CommandComponents' for the component functions used in the HsSqlSystem-    exe.-    .-    'ChaosExtensions' for the experimental plpgsql syntax extensions.-    .-    Comes with command line access to some-    functions via a exe called HsSqlSystem, run this file with no-    arguments to get some help. Has a HUnit test suite which you can-    run using the HsSqlSystem executable. for the time being you can-    look at the source of this command to see what it can do:-    .-    <http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head:/HsSqlSystem.lhs>-    .-    See the project page-    <https://launchpad.net/hssqlppp> for more information and-    documentation links.-    .-    The test files for parsing and for type checking contain examples-    of what parses/ typechecks and what the asts and annotations look-    like:+    'Annotation' - the annotation data types and utilities;     .-    <http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head:/Database/HsSqlPpp/Tests/ParserTests.lhs>+    'Catalog' - read a catalog from a database to type check against,+    or to generate catalog information.     .-    <http://bazaar.launchpad.net/~jakewheat/hssqlppp/trunk/annotate/head:/Database/HsSqlPpp/Tests/TypeCheckTests.lhs>+    Also comes with command line access to some functions via a exe called+    HsSqlSystem, run this file with no arguments to get some help.  License:             BSD3 License-file:        LICENSE@@ -62,7 +38,7 @@ Maintainer:          jakewheatmail@gmail.com Build-Type:          Simple Cabal-Version:       >=1.2.3-copyright:           Copyright 2009 Jake Wheat+copyright:           Copyright 2010 Jake Wheat stability:           pre-alpha homepage:            https://launchpad.net/hssqlppp bug-reports:         mailto:jakewheatmail@gmail.com@@ -70,31 +46,23 @@  extra-source-files:  README                      LICENSE-                     docs/changelog-                     docs/development-                     docs/Introduction.txt-                     docs/recordtests.sql-                     docs/status-                     docs/TODO-                     docs/usage-                     sqltestfiles/system.sql-                     sqltestfiles/server.sql-                     sqltestfiles/client.sql                      --find Database/ -type f -a ! -iname '*.o' -a ! -iname '*.hi'                      Database/HsSqlPpp/Utils.lhs-                     Database/HsSqlPpp/Commands/CommandComponents.lhs                      Database/HsSqlPpp/Dbms/DBAccess.lhs+                     Database/HsSqlPpp/Dbms/DBAccess2.lhs+                     Database/HsSqlPpp/Dbms/DBAccess3.lhs+                     Database/HsSqlPpp/Dbms/MakeLabels.hs                      Database/HsSqlPpp/Dbms/DatabaseLoader.lhs                      Database/HsSqlPpp/Dbms/WrapLib.lhs                      Database/HsSqlPpp/Dbms/WrapperGen.lhs+                     Database/HsSqlPpp/Dbms/DBUtils.lhs                      Database/HsSqlPpp/Extensions/ChaosExtensions.lhs                      Database/HsSqlPpp/AstInternals/AnnotationUtils.lhs                      Database/HsSqlPpp/AstInternals/AstAnnotation.lhs                      Database/HsSqlPpp/AstInternals/AstInternal.hs-                     Database/HsSqlPpp/AstInternals/Environment/DefaultTemplate1Environment.lhs-                     Database/HsSqlPpp/AstInternals/Environment/EnvironmentReader.lhs-                     Database/HsSqlPpp/AstInternals/Environment/EnvironmentInternal.lhs-                     Database/HsSqlPpp/AstInternals/Environment/LocalIdentifierBindings.lhs+                     Database/HsSqlPpp/AstInternals/Catalog/CatalogInternal.lhs+                     Database/HsSqlPpp/AstInternals/Catalog/CatalogReader.lhs+                     Database/HsSqlPpp/AstInternals/Catalog/DefaultTemplate1Catalog.lhs                      Database/HsSqlPpp/AstInternals/AstInternal.ag                      Database/HsSqlPpp/AstInternals/TypeType.lhs                      Database/HsSqlPpp/AstInternals/TypeChecking/Dml.ag@@ -103,6 +71,7 @@                      Database/HsSqlPpp/AstInternals/TypeChecking/TableRefs.ag                      Database/HsSqlPpp/AstInternals/TypeChecking/Plpgsql.ag                      Database/HsSqlPpp/AstInternals/TypeChecking/TypeChecking.ag+                     Database/HsSqlPpp/AstInternals/TypeChecking/LocalBindings.lhs                      Database/HsSqlPpp/AstInternals/TypeChecking/Misc.ag                      Database/HsSqlPpp/AstInternals/TypeChecking/ErrorUtils.lhs                      Database/HsSqlPpp/AstInternals/TypeChecking/CreateTable.ag@@ -112,8 +81,9 @@                      Database/HsSqlPpp/AstInternals/TypeChecking/Expressions.ag                      Database/HsSqlPpp/AstInternals/TypeChecking/Drops.ag                      Database/HsSqlPpp/AstInternals/TypeChecking/MiscCreates.ag-                     Database/HsSqlPpp/Wrapper/WrapperTemplate.lhs+                     Database/HsSqlPpp/AstInternals/TypeChecking/LocalIdentifierBindings.lhs                      Database/HsSqlPpp/Tests/ExtensionTests.lhs+                     Database/HsSqlPpp/Tests/LocalBindingsTests.lhs                      Database/HsSqlPpp/Tests/ParserTests.lhs                      Database/HsSqlPpp/Tests/DatabaseLoaderTests.lhs                      Database/HsSqlPpp/Tests/RoundtripTests.lhs@@ -128,8 +98,8 @@                      Database/HsSqlPpp/Parsing/Parser.lhs                      Database/HsSqlPpp/Parsing/ParseErrors.lhs                      Database/HsSqlPpp/Ast/Ast.lhs-                     Database/HsSqlPpp/Ast/Environment.lhs                      Database/HsSqlPpp/Ast/Annotation.lhs+                     Database/HsSqlPpp/Ast/Catalog.lhs                      Database/HsSqlPpp/Ast/SqlTypes.lhs                      Database/HsSqlPpp/Ast/TypeChecker.lhs @@ -152,31 +122,29 @@                      filepath,                      template-haskell,                      haskell-src-exts+                     --HList    Exposed-modules:   Database.HsSqlPpp.Ast.Ast                      Database.HsSqlPpp.Ast.TypeChecker-                     Database.HsSqlPpp.Ast.Environment+                     Database.HsSqlPpp.Ast.Catalog                      Database.HsSqlPpp.Ast.Annotation                      Database.HsSqlPpp.Ast.SqlTypes                      Database.HsSqlPpp.Parsing.Parser                      Database.HsSqlPpp.PrettyPrinter.PrettyPrinter-                     Database.HsSqlPpp.PrettyPrinter.AnnotateSource-                     Database.HsSqlPpp.Dbms.DatabaseLoader-                     Database.HsSqlPpp.Commands.CommandComponents-                     Database.HsSqlPpp.Extensions.ChaosExtensions    Other-Modules:     Database.HsSqlPpp.Utils-                     --Database.HsSqlPpp.Here+                     Database.HsSqlPpp.Here                      Database.HsSqlPpp.Dbms.DBAccess-                     Database.HsSqlPpp.Dbms.WrapperGen-                     Database.HsSqlPpp.Dbms.WrapLib+                     --Database.HsSqlPpp.Dbms.MakeLabels+                     Database.HsSqlPpp.Dbms.DBUtils                      Database.HsSqlPpp.AstInternals.AnnotationUtils                      Database.HsSqlPpp.AstInternals.AstAnnotation                      Database.HsSqlPpp.AstInternals.AstInternal-                     Database.HsSqlPpp.AstInternals.Environment.DefaultTemplate1Environment-                     Database.HsSqlPpp.AstInternals.Environment.EnvironmentReader-                     Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal-                     Database.HsSqlPpp.AstInternals.Environment.LocalIdentifierBindings+                     Database.HsSqlPpp.AstInternals.Catalog.DefaultTemplate1Catalog+                     Database.HsSqlPpp.AstInternals.Catalog.CatalogReader+                     Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal+                     Database.HsSqlPpp.AstInternals.TypeChecking.LocalIdentifierBindings+                     Database.HsSqlPpp.AstInternals.TypeChecking.LocalBindings                      Database.HsSqlPpp.AstInternals.TypeType                      Database.HsSqlPpp.AstInternals.TypeChecking.TypeConversion                      Database.HsSqlPpp.AstInternals.TypeChecking.ErrorUtils@@ -185,10 +153,18 @@                      Database.HsSqlPpp.Tests.ParserTests                      Database.HsSqlPpp.Tests.DatabaseLoaderTests                      Database.HsSqlPpp.Tests.ParameterizedStatementTests+                     Database.HsSqlPpp.Tests.LocalBindingsTests                      Database.HsSqlPpp.HsText.Commands                      Database.HsSqlPpp.HsText.HsText                      Database.HsSqlPpp.Parsing.Lexer                      Database.HsSqlPpp.Parsing.ParseErrors+                     Database.HsSqlPpp.Dbms.DatabaseLoader+                     Database.HsSqlPpp.Dbms.WrapperGen+                     Database.HsSqlPpp.Dbms.WrapLib+                     Database.HsSqlPpp.Dbms.DBAccess2+                     --Database.HsSqlPpp.Dbms.DBAccess3+                     Database.HsSqlPpp.Extensions.ChaosExtensions+                     Database.HsSqlPpp.PrettyPrinter.AnnotateSource    extensions:        DeriveDataTypeable,RankNTypes,ScopedTypeVariables @@ -205,20 +181,27 @@                      test-framework-hunit,                      HUnit,                      cmdargs+                     --HList    Other-Modules:     Database.HsSqlPpp.Utils-                     --Database.HsSqlPpp.Here-                     Database.HsSqlPpp.Commands.CommandComponents+                     Database.HsSqlPpp.Here                      Database.HsSqlPpp.Dbms.DBAccess+                     Database.HsSqlPpp.Dbms.DBAccess2+                     --Database.HsSqlPpp.Dbms.DBAccess3+                     --Database.HsSqlPpp.Dbms.MakeLabels+                     Database.HsSqlPpp.Dbms.WrapperGen+                     Database.HsSqlPpp.Dbms.WrapLib                      Database.HsSqlPpp.Dbms.DatabaseLoader+                     Database.HsSqlPpp.Dbms.DBUtils                      Database.HsSqlPpp.Extensions.ChaosExtensions                      Database.HsSqlPpp.AstInternals.AnnotationUtils                      Database.HsSqlPpp.AstInternals.AstAnnotation                      Database.HsSqlPpp.AstInternals.AstInternal-                     Database.HsSqlPpp.AstInternals.Environment.DefaultTemplate1Environment-                     Database.HsSqlPpp.AstInternals.Environment.EnvironmentReader-                     Database.HsSqlPpp.AstInternals.Environment.EnvironmentInternal-                     Database.HsSqlPpp.AstInternals.Environment.LocalIdentifierBindings+                     Database.HsSqlPpp.AstInternals.Catalog.DefaultTemplate1Catalog+                     Database.HsSqlPpp.AstInternals.Catalog.CatalogReader+                     Database.HsSqlPpp.AstInternals.Catalog.CatalogInternal+                     Database.HsSqlPpp.AstInternals.TypeChecking.LocalBindings+                     Database.HsSqlPpp.AstInternals.TypeChecking.LocalIdentifierBindings                      Database.HsSqlPpp.AstInternals.TypeType                      Database.HsSqlPpp.AstInternals.TypeChecking.TypeConversion                      Database.HsSqlPpp.AstInternals.TypeChecking.ErrorUtils@@ -226,6 +209,7 @@                      Database.HsSqlPpp.Tests.TypeCheckTests                      Database.HsSqlPpp.Tests.ParserTests                      Database.HsSqlPpp.Tests.DatabaseLoaderTests+                     Database.HsSqlPpp.Tests.LocalBindingsTests                      Database.HsSqlPpp.PrettyPrinter.AnnotateSource                      Database.HsSqlPpp.PrettyPrinter.PrettyPrinter                      Database.HsSqlPpp.HsText.Commands@@ -235,7 +219,7 @@                      Database.HsSqlPpp.Parsing.ParseErrors                      Database.HsSqlPpp.Ast.TypeChecker                      Database.HsSqlPpp.Ast.Ast-                     Database.HsSqlPpp.Ast.Environment+                     Database.HsSqlPpp.Ast.Catalog                      Database.HsSqlPpp.Ast.Annotation                      Database.HsSqlPpp.Ast.SqlTypes 
− sqltestfiles/client.sql
@@ -1,1721 +0,0 @@-/*--Copyright 2009 Jake Wheat--= Overview--windows manager widget-extra stuff - colours, sprites, wizard display info-              (additional info for each wizard)-board widget-info widget-spell book widget-new game widget-planned widgets--actions-key config-action valid view-turn phase-cursor/go-new game--see chaos.lhs for then main ui docs-*/-select new_module('client', 'chaos');--/*-================================================================================--= windows manager-Store window positions, size, maximised/minimised,-  open/close so this is restored when-  you restart the program or if it crashes-*/-select new_module('window_management', 'client');-/*-windows relvar-*/-create domain window_state as text-       check (value in ('maximised', 'minimised',-                        'hidden', 'normal'));-/*--Window with name name: top left corner of window is at position px, py-and the size of the window is sx, sy.  It is in state 'state'.--*/-create table windows (-  window_name text,-  px integer, --position-  py integer,-  sx integer, --size-  sy integer,-  state window_state-); --assert there is a row for every widget type.-select add_key('windows', 'window_name');-select set_relvar_type('windows', 'data');--/*--function to reset the windows to default, can be used if the windows-get too messed up or e.g. the window manager row is deleted--*/-create function action_reset_windows() returns void as $$-begin-  delete from windows;-  insert into windows (window_name, px, py, sx, sy, state) values-    --('window_manager', 0,28, 92,320, 'normal'),-    ('info', 0,371, 579,213, 'normal'),-    ('spell_book', 587,28, 268,556, 'normal'),-    ('new_game', 514, 27, 500, 500, 'hidden'),-    ('board', 99,28, 480,320, 'normal'),-    ('action_history', 843,28, 429,556, 'normal');-end;-$$ language plpgsql volatile;--create function action_hide_window(vname text) returns void as $$-begin-  if vname = 'window_manager' then-    raise exception 'cannot hide window manager';-  end if;-  update windows set state='hidden' where window_name = vname;-end;-$$ language plpgsql volatile;-select set_module_for_preceding_objects('window_management');--/*--When another window is closed that window is hidden.  when the window-manager is closed, the app exits--TODO: add window zoom and scroll positions to relvar-*/--create function action_refresh_widgets() returns void as $$-begin---doesn't do owt at the moment, all in the haskell code,--- just has this stub here to avoid special casing it in the---haskell code-end;-$$ language plpgsql volatile;--/*-================================================================================--= extras-== colours-*/-create table colours (-       name text,-       red int,-       green int,-       blue int-);-select add_key('colours', 'name');-select set_relvar_type('colours', 'readonly');--copy colours (name,red,green,blue) from stdin;-grid	32767	32767	32767-background	0	0	32767-black	0	0	0-blue	0	0	65535-green	0	65535	0-red	65535	0	0-pink	65535	49407	49407-purple	65535	0	65535-cyan	0	65535	65535-yellow	65535	65535	0-orange	65535	41215	0-grey	32767	32767	32767-white	65535	65535	65535-\.---/*--================================================================================--== sprites--just the list of the names of the sprites and their animation speed.-todo: add the png data here--pngs for every sprite listed in this table must exist on the disk to-be loaded or the game will refuse to run--*/-select new_module('sprites', 'client');--create table sprites (-  sprite text, -- name of sprite, also part of the name of the png frames-  animation_speed int---todo: add sprite data here-);-select add_key('sprites', 'sprite');-select set_relvar_type('sprites', 'readonly');-select set_module_for_preceding_objects('sprites');--copy sprites (sprite,animation_speed) from stdin;-bat	8-dead_bat	250-bear	23-dead_bear	250-centaur	23-dead_centaur	250-crocodile	34-dead_crocodile	250-dark_citadel	50-dire_wolf	12-dead_dire_wolf	250-eagle	14-dead_eagle	250-elf	26-dead_elf	250-faun	20-dead_faun	250-ghost	15-giant	23-dead_giant	250-giant_rat	13-dead_giant_rat	250-goblin	12-dead_goblin	250-golden_dragon	27-dead_golden_dragon	250-gooey_blob	40-gorilla	18-dead_gorilla	250-green_dragon	32-dead_green_dragon	250-gryphon	10-dead_gryphon	250-harpy	13-dead_harpy	250-horse	21-dead_horse	250-hydra	36-dead_hydra	250-king_cobra	30-dead_king_cobra	250-lion	38-dead_lion	250-magic_castle	50-magic_fire	12-magic_tree	250-manticore	13-dead_manticore	250-ogre	23-dead_ogre	250-orc	21-dead_orc	250-pegasus	16-dead_pegasus	250-red_dragon	34-dead_red_dragon	250-shadow_tree	30-skeleton	17-spectre	15-unicorn	16-dead_unicorn	250-vampire	40-wall	30-wizard0	250-wizard1	250-wizard2	250-wizard3	250-wizard4	250-wizard5	250-wizard6	250-wizard7	250-wizard_magic_armour	250-wizard_magic_bow	50-wizard_magic_knife	50-wizard_magic_shield	250-wizard_magic_sword	50-wizard_magic_wings	50-wizard0_shadow	20-wizard1_shadow	20-wizard2_shadow	20-wizard3_shadow	20-wizard4_shadow	20-wizard5_shadow	20-wizard6_shadow	20-wizard7_shadow	20-wizard_magic_armour_shadow	20-wizard_magic_bow_shadow	20-wizard_magic_knife_shadow	20-wizard_magic_shield_shadow	20-wizard_magic_sword_shadow	20-wizard_magic_wings_shadow	20-wraith	10-zombie	25-magic_bolt	250-lightning	250-law	250-large_law	250-chaos	250-large_chaos	250-vengeance	250-subversion	250-turmoil	250-disbelieve	250-justice	250-dark_power	250-decree	250-raise_dead	250-cursor	250-highlight_cast_target_spell	250-highlight_select_piece_at_position	250-highlight_walk	250-highlight_fly	250-highlight_attack	250-highlight_ranged_attack	250-effect_attack	250-\.--/*-================================================================================--== wizard display info--This table associates a wizards name (= the allegiance) from the-server with a colour for the wizard and his army and a wizard sprite-for display purposes.--The sprite in this table is what the wizard uses if he doesn't have-any upgrades.--Wizard named 'name' started with sprite default_sprite, his army is-coloured 'colour'.--*/-select new_module('wizard_display_info', 'client');--create table wizard_display_info (-  wizard_name text,-  default_sprite text, -- and matches /wizard.*/-  colour text-);-select add_key('wizard_display_info', 'wizard_name');-select add_key('wizard_display_info', 'default_sprite');-select add_key('wizard_display_info', 'colour');-select add_foreign_key('wizard_display_info', 'wizard_name', 'wizards');-select add_foreign_key('wizard_display_info', 'default_sprite',-                        'sprites', 'sprite');-select set_relvar_type('wizard_display_info','data');--create table init_wizard_display_info_argument (-  wizard_name text,-  sprite text, -- starts with wizard-  colour text --todo: make list of colours-);-select add_key('init_wizard_display_info_argument', 'wizard_name');-select add_key('init_wizard_display_info_argument', 'sprite');-select add_key('init_wizard_display_info_argument', 'colour');-select add_foreign_key('init_wizard_display_info_argument',-                       'wizard_name', 'wizards');-select add_foreign_key('init_wizard_display_info_argument',-                       'sprite', 'sprites');-select set_relvar_type('init_wizard_display_info_argument', 'stack');--create function init_wizard_display_info() returns void as $$-begin-    insert into wizard_display_info (wizard_name, default_sprite,  colour)-       select wizard_name,sprite,colour-       from init_wizard_display_info_argument;-end;-$$ language plpgsql volatile;---select set_module_for_preceding_objects('wizard_display_info');--/*-================================================================================--== action history with colours--create a view to supply grey as colour for corpses (corpses don't have-an allegiance)--*/-create view allegiance_colours as-  select wizard_name as allegiance, colour from wizard_display_info union-  select 'dead' as allegiance, 'grey' as colour;--create view action_history_colour_mr as-select a.*, colour-  from action_history_mr a-  natural inner join allegiance_colours;--/*-================================================================================--= board widget--*/-select new_module('board_widget', 'client');-/*-== cursor position + ops--The cursor is at position x,y--The server code has no concept of the cursor.-In the end, this has just made the code more complicated for no reason.-*/-create table cursor_position (-  x int,-  y int-);-select add_constraint('cursor_position_coordinates_valid',-$$ not exists (select 1 from cursor_position-  cross join board_size-  where x >= width or y >= height)$$,-array['cursor_position', 'board_size']);-select constrain_to_zero_or_one_tuple('cursor_position');-select set_relvar_type('cursor_position', 'data');--/*-=== actions-cursor movement-*/--create function safe_move_cursor(px int, py int) returns void as $$-begin-  update cursor_position-    set x = min(max(x + px, 0), (select width from board_size) - 1),-        y = min(max(y + py, 0), (select height from board_size) - 1);-end;-$$ language plpgsql volatile;--create function action_move_cursor(direction text) returns void as $$-begin-  case direction-  when 'up' then-    perform safe_move_cursor(0, -1);-  when 'down' then-    perform safe_move_cursor(0, 1);-  when 'left' then-    perform safe_move_cursor(-1, 0);-  when 'right' then-    perform safe_move_cursor(1, 0);-  when 'up-left' then-    perform safe_move_cursor(-1, -1);-  when 'up-right' then-    perform safe_move_cursor(1, -1);-  when 'down-left' then-    perform safe_move_cursor(-1, 1);-  when 'down-right' then-    perform safe_move_cursor(1, 1);-  else-    raise exception-      'asked to move cursor in direction % which isn''t valid',-      direction;-  end case;-end;-$$ language plpgsql volatile;--/*-=== internals-When next phase is called, moved the cursor to that wizard-*/-create function action_move_cursor_to_current_wizard() returns void as $$-declare- p pos;-begin-  --don't move cursor during autonomous phase-  if get_turn_phase() != 'autonomous' then-    select into p x,y from pieces-         inner join current_wizard_table-         on (current_wizard = allegiance)-         where ptype = 'wizard';-    update cursor_position set (x,y) = (p.x,p.y);-  end if;-end;-$$ language plpgsql volatile;--create function init_cursor_position() returns void as $$-begin-  insert into cursor_position (x,y) values (0,0);-end;-$$ language plpgsql volatile;--/*--the plan is to have a board_sprites view for the board widget. This-contains all the sprites on the board (basically everything drawn on-the board: piece sprites, cursor, highlights, etc.)  all the board-needs is x,y,sprite and order. The order is used to make sure-overlapping sprites e.g. a piece, the cursor and a highlight, are-drawn in the right order--*/---/*-== piece sprites-Want to produce a list of x,y,sprite rows-for the pieces on top, the cursor,-and the highlights for the currently available actions--wizard sprites: look in the action history to find the most recent upgrade-*/-create view wizard_sprites as-  select wizard_name,sprite,colour from-  (select row_number() over(partition by wizard_name order by o desc) as rn,-    wizard_name,-    case when shadow_form then sprite || '_shadow'-         else sprite-    end as sprite, w.colour from-  (select -1 as o, wizard_name, default_sprite as sprite-      from wizard_display_info-    union-    select id as o, allegiance as wizard_name,-      'wizard_' || spell_name-      from action_history_mr-      natural inner join spells-      where spell_name != 'shadow_form'-      and spell_category = 'wizard'-      and history_name = 'spell_succeeded'-      ) as a-  natural inner join wizard_display_info as w-  natural inner join wizards) as w where rn = 1;--/*--piece ptype-allegiance-tag is at x,y, allegiance colour is 'colour',-sprite is 'sprite', sprite priority is sp.--*/-create view piece_sprite as-  select x,y,ptype,-    case when ptype='wizard' then w.sprite-         when allegiance='dead' then 'dead_' || ptype-         else ptype-    end as sprite,-    ac.colour,tag,allegiance-  from pieces p-  left outer join wizard_sprites w-    on (allegiance = wizard_name and ptype='wizard')-  inner join allegiance_colours ac-    using (allegiance);--/*-== highlights-*/--create view board_highlights as--- include the squares for the selected spell--- when still in the choose phase, so the user can---see what squares are valid for their chosen spell-select x,y,'highlight_cast_target_spell' as sprite-  from current_wizard_spell_squares-  where get_turn_phase() = 'choose'-union-select x,y,'highlight_' || action as sprite-  from valid_target_actions;--/*-== animation--we save a starting tick against each piece. Not really sure what the-best way to do this, some options are:--these are updated in the action_key_pressed and client_ai_continue fns--*/-create table piece_starting_ticks (-  ptype text,-  allegiance text,-  tag int,-  start_tick int-);-select add_key('piece_starting_ticks',-               array['ptype', 'allegiance', 'tag']);-select add_foreign_key('piece_starting_ticks',-                       array['ptype', 'allegiance', 'tag'], 'pieces');-select set_relvar_type('piece_starting_ticks', 'data');---create function update_missing_startticks()-  returns void as $$-begin-  insert into piece_starting_ticks (ptype,allegiance,tag,start_tick)-    select ptype,allegiance,tag, random()*2500 from pieces-      where (ptype,allegiance,tag) not in-        (select ptype,allegiance,tag-        from piece_starting_ticks);-end;-$$ language plpgsql volatile;--/*--== board sprites--put the piece sprites, the highlight and the cursor-together to give the full list of sprites--split this up so the cursor movement isn't really laggy, just a hack --needs some more thought.--*/-create view board_sprites1_view as-  select x,y,ptype,allegiance,tag,sprite,colour,sp,-    start_tick, animation_speed, selected from-    (select x,y,ptype,allegiance,tag,-      sprite,colour,sp,start_tick,-      case when not move_phase is null then true-        else false-      end as selected-      from piece_sprite-    natural inner join pieces_on_top-    natural inner join piece_starting_ticks-    natural inner join sprites-    natural left outer join selected_piece-    union-    select x,y, '', '', -1, sprite, 'white', 5,0,false-      from board_highlights) as a-  natural inner join sprites-  order by sp;--create table board_sprites1_cache as-  select * from board_sprites1_view;-select set_relvar_type('board_sprites1_cache', 'data');--create function update_board_sprites_cache() returns void as $$-begin-  if get_running_effects() then-    return;-  end if;-  --raise notice 'update bpc';-  delete from board_sprites1_cache;-  insert into board_sprites1_cache-    select * from board_sprites1_view;-end;-$$ language plpgsql volatile;--create view board_sprites as- select * from board_sprites1_cache-union-select x,y, '', '', -1,'cursor', 'white', 6,0, animation_speed, false-  from cursor_position-  inner join sprites on sprite='cursor';-----/*-== effects--two sorts of effects: beam and square--*/-create table board_square_effects (-  id serial,-  subtype text,-  x1 int,-  y1 int,-  queuePos int-);-select add_key('board_square_effects', 'id');-select set_relvar_type('board_square_effects', 'data');--create table board_beam_effects (-  id serial,-  subtype text,-  x1 int,-  y1 int,-  x2 int,-  y2 int,-  queuePos int-);-select add_key('board_beam_effects', 'id');-select set_relvar_type('board_beam_effects', 'data');--create table board_sound_effects (-  id serial,-  subtype text,-  sound_name text,-  queuePos int-);-select add_key('board_sound_effects', 'id');-select set_relvar_type('board_sound_effects', 'data');--create function get_running_effects() returns boolean as $$-begin-  return exists (select 1 from board_beam_effects)-      or exists (select 1 from board_square_effects)-      or exists (select 1 from board_sound_effects);-end;-$$ language plpgsql stable;---create table history_sounds (-  history_name text,-  sound_name text-);-select add_key('history_sounds', array['history_name', 'sound_name']);-select set_relvar_type('history_sounds', 'readonly');--copy history_sounds (history_name,sound_name) from stdin;-walked	walk-fly	fly-attack	attack-ranged_attack	shoot-game_drawn	draw-game_won	win-spell_failed	fail-spell_succeeded	success-shrugged_off	shrugged_off-wizard_up	wizard_up-new_game	new_game-chinned	kill-attempt_target_spell	cast-\.--create table history_no_visuals (-  history_name text-);-select add_key('history_no_visuals', 'history_name');-select set_relvar_type('history_no_visuals', 'readonly');--copy history_no_visuals (history_name) from stdin;-wizard_up-new_turn-new_game-game_won-game_drawn-choose_spell-set_imaginary-set_real-\.--select create_var('last_history_effect_id', 'int');-select set_relvar_type('last_history_effect_id_table', 'data');--create function check_for_effects() returns void as $$-begin-  insert into board_square_effects (subtype, x1, y1, queuePos)-    select history_name,case when tx is null then x else tx end,-                        case when ty is null then y else ty end,id-    from action_history_mr-    where id > get_last_history_effect_id()-         and x is not null and y is not null-         and history_name not in (select history_name from history_no_visuals);-  insert into board_beam_effects (subtype,x1,y1,x2,y2,queuePos)-    select history_name,x,y,tx,ty,id-    from action_history_mr-    where id > get_last_history_effect_id()-         and x is not null and y is not null-         and tx is not null and ty is not null-         and history_name not in (select history_name from history_no_visuals);-  insert into board_sound_effects (subtype, sound_name,queuePos)-    select history_name,sound_name,id-    from action_history_mr-    natural inner join history_sounds-    left outer join wizards on allegiance = wizard_name-    where id > get_last_history_effect_id()---exclude turn sound for computer controlled wizards choose phase-      and not(history_name='wizard_up'-              and turn_phase='choose'-              and coalesce(computer_controlled,false))-;-  update last_history_effect_id_table set-    last_history_effect_id = (select max(id) from action_history_mr);-end;-$$ language plpgsql volatile;--/*--call this function before reading the current effects table and it-will leave those tables the same if the current effects are still-playing, or it will clear the old effects and fill them with the next-set of effects.--call it after reading the current effects table to clear the current-row of sounds, that way the sounds will only be returned to the ui-once and thus will only be played once.--*/--create table current_effects (-  ticks int,-  queuePos int-);-select set_relvar_type('current_effects', 'data');-select constrain_to_zero_or_one_tuple('current_effects');--create view current_board_sound_effects as-  select * from board_sound_effects-  natural inner join current_effects;--create view current_board_beam_effects as-  select * from board_beam_effects-  natural inner join current_effects;--create view current_board_square_effects as-  select * from board_square_effects-  natural inner join current_effects;--create function action_reset_current_effects() returns void as $$-begin-    delete from board_sound_effects;-    delete from board_beam_effects;-    delete from board_square_effects;-    delete from current_effects;-end;-$$ language plpgsql volatile;--create function action_update_effects_ticks(pticks int) returns void as $$-declare-  wasEffects boolean := false;-  nextQp int;-begin-  if exists(select 1 from current_effects) then-    wasEffects := true;-  end if;-  --always delete sound effects after the first time they are returned-  if exists(select 1 from current_board_sound_effects) then-    delete from board_sound_effects-      where queuePos = (select queuePos from current_effects);-  end if;-  --see if we need a new row of effects-  if not exists(select 1 from current_effects)-    or pticks > (select ticks + 6 from current_effects) then-    delete from board_sound_effects-      where queuePos = (select queuePos from current_effects);-    delete from board_beam_effects-      where queuePos = (select queuePos from current_effects);-    delete from board_square_effects-      where queuePos = (select queuePos from current_effects);-    delete from current_effects;-    nextQp := (select min(queuePos) from-                 (select queuePos from board_sound_effects-                  union all-                  select queuePos from board_beam_effects-                  union all-                  select queuePos from board_square_effects) as a);-    if nextQp is not null and nextQp <> 0 then-      insert into current_effects (ticks, queuePos)-        values (pticks, nextQp);-    end if;-  end if;-  if not exists(select 1 from current_effects)-     and wasEffects then-    perform update_board_sprites_cache();-  end if;-end;-$$ language plpgsql volatile;--create function action_client_ai_continue() returns void as $$-begin-  if get_running_effects() then-    return;-  end if;--  perform action_ai_continue();-  perform update_missing_startticks();-  if (select computer_controlled from wizards-      inner join current_wizard_table on wizard_name=current_wizard)-     and get_turn_phase() = 'choose' then-    perform action_client_ai_continue();-  else-    perform check_for_effects();-    perform update_board_sprites_cache();-  end if;-  if not (select computer_controlled from wizards-          inner join current_wizard_table-          on wizard_name=current_wizard) then-    perform action_move_cursor_to_current_wizard();-  end if;-end;-$$ language plpgsql volatile;--create function action_client_ai_continue_if() returns void as $$-begin-  if exists(select 1 from valid_activate_actions-            where action='ai_continue') then-    perform action_client_ai_continue();-  end if;-end;-$$ language plpgsql volatile;--/*--================================================================================--= info widget--create a few views to help with the stuff shown-in the info widget--*/--create view piece_details as-  select * from pieces_mr-            full outer join-      (select 'wizard'::text as wtype,* from live_wizards) as a-            on (allegiance = wizard_name and ptype = wtype)-    natural inner join pieces_with_priorities-    natural inner join piece_sprite;--create view cursor_piece_details as-  select * from piece_details-      natural inner join cursor_position;--create view selected_piece_details as-  select * from piece_details-      natural inner join selected_piece-      natural full outer join remaining_walk_table;--select set_module_for_preceding_objects('board_widget');--/*-================================================================================--= spell book widget--order the spells:-wizard, attack, object, misc, monster-law spells, then neutral, then chaos,-highest to lowest base chance,-alpha by spell name--this is a proper mess--== sprites-*/-create table spell_sprites (-  spell_name text,-  sprite text-);-select add_key('spell_sprites', 'spell_name');-select add_foreign_key('spell_sprites', 'sprite', 'sprites');-select add_foreign_key('spell_sprites', 'spell_name', 'spells_mr');-select set_relvar_type('spell_sprites', 'readonly');--copy spell_sprites(spell_name, sprite) from stdin;-magic_wood	magic_tree-shadow_wood	shadow_tree-magic_fire	magic_fire-gooey_blob	gooey_blob-wall	wall-magic_castle	magic_castle-dark_citadel	dark_citadel-magic_bolt	magic_bolt-lightning	lightning-vengeance	vengeance-justice	justice-dark_power	dark_power-decree	decree-magic_armour	wizard_magic_armour-magic_shield	wizard_magic_shield-magic_knife	wizard_magic_knife-magic_sword	wizard_magic_sword-magic_bow	wizard_magic_bow-magic_wings	wizard_magic_wings-law	law-large_law	large_law-chaos	chaos-large_chaos	large_chaos-raise_dead	raise_dead-subversion	subversion-turmoil	turmoil-disbelieve	disbelieve-eagle	eagle-elf	elf-faun	faun-ghost	ghost-giant	giant-giant_rat	giant_rat-goblin	goblin-golden_dragon	golden_dragon-gorilla	gorilla-green_dragon	green_dragon-gryphon	gryphon-harpy	harpy-horse	horse-hydra	hydra-king_cobra	king_cobra-lion	lion-manticore	manticore-ogre	ogre-orc	orc-pegasus	pegasus-red_dragon	red_dragon-skeleton	skeleton-spectre	spectre-unicorn	unicorn-vampire	vampire-wraith	wraith-zombie	zombie-shadow_form	chaos-\.---select new_module('spell_book_widget', 'client');--/*-== show all setting-*/-select create_var('spell_book_show_all', 'boolean');-select set_relvar_type('spell_book_show_all_table', 'data');--create function action_spell_book_show_all_update(v boolean)-  returns void as $$-begin-  update spell_book_show_all_table set spell_book_show_all=v;-end;-$$ language plpgsql volatile;---/*-=== internals-==== ordering-order the spells by spell category-*/-create view section_order as-  select 1 as section_order, 'wizard' as spell_category-    union-  select 2 as section_order, 'attacking' as spell_category-    union-  select 3 as section_order, 'object' as spell_category-    union-  select 4 as section_order, 'miscellaneous' as spell_category-    union-  select 5 as section_order, 'monster' as spell_category;--create view spells_with_order as-  select *, case-          when alignment > 0 then 0-              when alignment = 0 then 1-        when alignment < 0 then 2-      end as alignment_order-  from spells natural inner join section_order;-/*-==== spell counts-*/-create view current_wizard_spell_counts as-  select spell_name, 0 as count from-    (select spell_name from spells except-     select spell_name from spell_books-       inner join current_wizard_table-       on (wizard_name = current_wizard)) as a- union-  select spell_name, count(spell_name)-  from spell_books-  inner join current_wizard_table-    on (wizard_name = current_wizard)-  group by spell_name;----create a string to represent the number of copies of each spell-create function count_icons(int) returns text as $$-  select repeat('#', $1) as result;-$$ language sql immutable;----create a string to represent the alignment of each spell-create function align_icons(int) returns text as $$-  select case-    when $1 < 0 then  repeat('*', -$1)-    when $1 > 0 then  repeat('+', $1)-    else '-'-  end as result-$$ language sql immutable;-/*-==== colours-colour each spell according to the probability of casting success-*/--create function chance_colour(chance int) returns text as $$-begin-  return case-    when chance = 0 then 'grey'-    when chance between 1 and 20 then 'red'-    when chance between 21 and 40 then 'purple'-    when chance between 41 and 60 then 'green'-    when chance between 61 and 80 then 'cyan'-    when chance between 81 and 99 then 'yellow'-    when chance = 100 then 'white'-    else 'blue'-  end;-end;-$$ language plpgsql immutable;--create view spell_colours as-  select spell_name, chance_colour(chance) as colour-    from spell_cast_chance;--create function spell_colour(vspell text, vcount int) returns text as $$-declare-  colour text;-begin-  --if spell is current wizard's selected spell then highlight it-  --if spell count is 0 or we aren't in choose phase then colour is grey-  --else colour spell according to casting chance-  if (exists (select 1 from wizard_spell_choices-             inner join current_wizard_table-        on wizard_name = current_wizard-        where spell_name = vspell)) then-    colour := 'inverse-' || chance_colour(spell_cast_chance(vspell));-  elseif (vcount = 0 or get_turn_phase() != 'choose') then-    colour := 'grey';-  else-    colour := chance_colour(spell_cast_chance(vspell));-  end if;-  return coalesce(colour, 'blue');-end;-$$ language plpgsql stable;---- format function for alignment-create function format_alignment(alignment int) returns text as $$-begin-  if (alignment < 0) then-    return 'chaos-' || cast(@ alignment as text);-  elseif (alignment > 0) then-    return 'law-' || cast(alignment as text);-  else-    return 'neutral';-  end if;-end;-$$ language plpgsql immutable;-/*-== spell choice controls-*/-create table spell_keys (-  spell_name text,-  key text-);-select add_key('spell_keys', 'spell_name');-select add_key('spell_keys', 'key');-select add_foreign_key('spell_keys', 'spell_name', 'spells_mr');-select set_relvar_type('spell_keys', 'readonly');--copy spell_keys (spell_name, key) from stdin;-magic_knife	1-magic_shield	2-magic_armour	3-magic_bow	4-magic_sword	5-shadow_form	6-magic_wings	7-decree	A-justice	B-lightning	C-magic_bolt	D-vengeance	E-dark_power	F-magic_wood	G-magic_castle	H-wall	I-gooey_blob	J-magic_fire	K-dark_citadel	L-shadow_wood	M-law	O-large_law	P-disbelieve	Q-subversion	R-turmoil	S-chaos	T-large_chaos	U-raise_dead	V-horse	a-king_cobra	b-eagle	c-elf	d-unicorn	e-gryphon	f-lion	g-pegasus	h-giant	i-golden_dragon	j-giant_rat	k-gorilla	l-goblin	m-orc	o-zombie	p-faun	q-ogre	r-skeleton	s-harpy	t-spectre	u-ghost	v-hydra	w-manticore	x-wraith	z-vampire	W-green_dragon	X-red_dragon	Z-\.--/*-== stuff-*/-create view spell_book_table as-  select spell_category, spell_name, count,-    spell_cast_chance(spell_name) as chance,-    alignment, format_alignment(alignment) as alignment_string,-    key, sprite, section_order, alignment_order, base_chance,-    count_icons(count::int), align_icons(alignment::int),-    spell_colour(spell_name, count::int) as colour-  from spells_with_order-  natural inner join current_wizard_spell_counts-  natural inner join spell_keys-  natural inner join spell_sprites-  cross join spell_book_show_all_table-  where not (spell_book_show_all = false and count = 0);--create view spell_details as-  select * from spells_mr-  full outer join spell_sprites using (spell_name)-  full outer join (-    select /*spell_category,*/ spell_name, count, chance,-    /*alignment,*/ alignment_string,-    key, /*sprite,*/ section_order, alignment_order, /*base_chance,*/-    count_icons, align_icons,-    colour-    from spell_book_table-    ) as balls using (spell_name);--create view current_wizard_selected_spell_details as-  select spell_name, spell_category, sprite, base_chance, description,-    num, range, count, chance, alignment_string-  from spell_details-  natural inner join wizard_spell_choices-  inner join current_wizard_table on (wizard_name = current_wizard);-select set_module_for_preceding_objects('spell_book_widget');--/*-================================================================================--= new game widget--Starting new game involves the following choices:-number of wizards (2-8)-computer wizards same ai same stats as player-for each wizard:-    name text - autogenerated, can be changed-    computer_controlled bool-    sprite and colour displayed but cannot currently be changed--to add-    AI level for each computer controlled wizard-    change playing area size, square or hexagon tiles-*/-select new_module('new_game_widget', 'client');--/*-== data-*/--create domain new_wizard_state as text-  check (value in ('human', 'computer', 'none'));--create table new_game_widget_state (-  line int,-  wizard_name text,-  sprite text,-  colour text,-  state new_wizard_state-);-select add_key('new_game_widget_state', 'line');-select add_key('new_game_widget_state', 'wizard_name');-select add_key('new_game_widget_state', 'sprite');-select add_key('new_game_widget_state', 'colour');-select add_foreign_key('new_game_widget_state', 'sprite', 'sprites');-select add_constraint('new_game_widget_state_line_valid',-' not exists(select 1 from new_game_widget_state-  where line >= 8)',-array['new_game_widget_state']);-select set_relvar_type('new_game_widget_state', 'data');--/*-== helpers-*/--create function extract_wizard_state(state text) returns boolean as $$-declare-  ret boolean;-begin-  if state = 'human' then-    ret = false;-  elseif state = 'computer' then-    ret = true;-  else-    raise exception-      'argument must be human or computer, called with %', state;-  end if;-  return ret;-end-$$ language plpgsql immutable;--create function action_reset_new_game_widget_state() returns void as $$-begin-    delete from new_game_widget_state;-    insert into new_game_widget_state-      (line, wizard_name, sprite, colour, state) values-      (0, 'Buddha', 'wizard0', 'blue', 'human'),-      (1, 'Kong Fuzi', 'wizard1', 'purple', 'computer'),-      (2, 'Laozi', 'wizard2', 'cyan', 'computer'),-      (3, 'Moshe', 'wizard3', 'yellow', 'computer'),-      (4, 'Muhammad', 'wizard4', 'green', 'computer'),-      (5, 'Shiva', 'wizard5', 'red', 'computer'),-      (6, 'Yeshua', 'wizard6', 'white', 'computer'),-      (7, 'Zarathushthra', 'wizard7', 'orange', 'computer');-end-$$ language plpgsql volatile;--/*-== actions-*/--create function action_client_new_game_using_new_game_widget_state()-  returns void as $$-begin-  delete from action_client_new_game_argument;-  insert into action_client_new_game_argument-    (place, wizard_name, sprite, colour, computer_controlled)-    select line, wizard_name, sprite, colour,-      case when state = 'computer' then true-           else false end-      from new_game_widget_state-      where state != 'none';-  perform action_client_new_game();-end-$$ language plpgsql volatile;--select set_module_for_preceding_objects('new_game_widget');--/*--================================================================================--= info widget (split?)--turn phase spell, cursor info & highlight key, cursor & selected piece info--================================================================================--= planned widget notes:--== help widget-=== controls-=== tutorials/ examples-=== rules reference-== spell info, monster info - reference widget-== wizard army widget-== versioning access widget-== action history widget-== game manager widget-== power/ debugger widget--================================================================================--= actions-*/-select new_module('client_actions', 'client');--/*-== action valid views--we add this view to cover the actions which are defined-in the client to supplement the action valid views-for the server actions define in the server.-*/-create view client_valid_target_actions as-  select * from valid_target_actions-  where not exists (select 1 from game_completed_table);--create view client_valid_activate_actions as-select * from (-  select * from valid_activate_actions-union select 'move_cursor_up'-union select 'move_cursor_down'-union select 'move_cursor_left'-union select 'move_cursor_right'-union select 'move_cursor_up_left'-union select 'move_cursor_down_left'-union select 'move_cursor_up_right'-union select 'move_cursor_down_right'-union select 'print_widget_info'-union select 'refresh_windows'-union select 'spell_book_show_all_update_on'-union select 'spell_book_show_all_update_off'-union select 'client_next_phase'-union select 'go') as a-  where not exists (select 1 from game_completed_table);--/*-== key controls-create a table to map gtk key descriptions to the-names of the action functions which are called.--*/--select new_module('key_controls', 'client');--create table key_control_settings (-  key_code text,-  action_name text-);-select add_key('key_control_settings', array['key_code','action_name']);-select set_relvar_type('key_control_settings', 'readonly');--copy key_control_settings(key_code, action_name) from stdin;-Up	move_cursor_up-KP_Up	move_cursor_up-Left	move_cursor_left-KP_Left	move_cursor_left-Right	move_cursor_right-KP_Right	move_cursor_right-Down	move_cursor_down-KP_Down	move_cursor_down-KP_Home	move_cursor_up_left-KP_Page_Up	move_cursor_up_right-KP_Page_Down	move_cursor_down_right-KP_End	move_cursor_down_left-End	cancel-F11	print_widget_info-F12	refresh_widgets-0	choose_no_spell-Insert	spell_book_show_all_update_on-Delete	spell_book_show_all_update_off-space	client_next_phase-KP_Begin	go-Return	go-KP_5	go-y	set_imaginary-Y	set_imaginary-n	set_real-N	set_real-\.--/*-== key press actions-*/-create function create_client_action_wrapper(client_action_name text,-                                              action_call text)-  returns void as $$-begin-  execute $f$-create function action_$f$ || client_action_name || $f$() returns void as $a$-begin-  perform action_$f$ || action_call || $f$;-end;-$a$ language plpgsql volatile;$f$;-end;-$$ language plpgsql volatile;--/*-cursor movement action redirections, used to make sense but don't-anymore - todo: split the move_cursor function into separate ones.-*/--select create_client_action_wrapper('move_cursor_down',-       $$move_cursor('down')$$);-select create_client_action_wrapper('move_cursor_up',-       $$move_cursor('up')$$);-select create_client_action_wrapper('move_cursor_left',-       $$move_cursor('left')$$);-select create_client_action_wrapper('move_cursor_right',-       $$move_cursor('right')$$);-select create_client_action_wrapper('move_cursor_up_left',-       $$move_cursor('up-left')$$);-select create_client_action_wrapper('move_cursor_up_right',-       $$move_cursor('up-right')$$);-select create_client_action_wrapper('move_cursor_down_right',-       $$move_cursor('down-right')$$);-select create_client_action_wrapper('move_cursor_down_left',-       $$move_cursor('down-left')$$);-select create_client_action_wrapper('spell_book_show_all_update_on',-       $$spell_book_show_all_update(true)$$);-select create_client_action_wrapper('spell_book_show_all_update_off',-       $$spell_book_show_all_update(false)$$);--create function action_key_pressed(pkeycode text) returns void as $$-declare-  a text;-  cursor_move boolean := false;-begin-/*-basic plan-have a table with key code, and action name-then a strategy of taking an action and-     a. deciding where to get the arguments-     b. deciding if it is allowed--profiling progress: started out about 1 sec to run when using for-loop, got rid of that, got it down to about 0.1 sec but this is for an-unmatched keypress, need to be faster.--*/-  if get_running_effects() then-    return;-  end if;--  if exists(select 1 from valid_activate_actions-            where action='ai_continue')-     and pkeycode = 'space' then-    perform action_client_ai_continue();-  else-    select into a action_name from key_control_settings k-      inner join client_valid_activate_actions v-        on k.action_name = v.action-        where key_code = pkeycode;-    if not a is null then-        if substr(a,0,11) =  'move_cursor' then-          cursor_move := true;-        end if;-        execute 'select action_' || a || '();';-    else-      select into a action_name from key_control_settings k-        inner join client_valid_target_actions v-          on k.action_name = v.action-        natural inner join cursor_position-          where key_code = pkeycode;-      if substr(a,0,11) =  'move_cursor' then-        cursor_move := true;-      end if;-      if not a is null then-        execute 'select action_' || a ||-                '(' || (select x from cursor_position) ||-                ', ' || (select y from cursor_position) || ');';-      else-        null;-      end if;-    end if;-  end if;-  perform update_missing_startticks();-  perform check_for_effects();-  if not cursor_move then-    perform update_board_sprites_cache();-  end if;-end;-$$ language plpgsql volatile;--/*-=== spell choice-*/---  insert into key_control_settings(key_code, action_name)-    select key, 'choose_' || spell_name || '_spell'-    from spell_keys;---/*--================================================================================--== turn phases-*/--create function action_client_next_phase() returns void as $$-begin-  perform action_next_phase();-  if not (select computer_controlled from wizards-          inner join current_wizard_table-          on wizard_name=current_wizard) then-    perform action_move_cursor_to_current_wizard();-  end if;-end;-$$ language plpgsql volatile;--/*-================================================================================--== cursor/go actions-*/--create function action_go() returns void as $$-declare-  r record;-  s text;-begin-  select into r x,y,action from client_valid_target_actions-    natural inner join cursor_position;-  if r is not null then-    s :=  'select action_' || r.action || '(' || r.x || ',' || r.y || ')';-    execute s;-  else-    select into r action-      from client_valid_activate_actions-       where action in ('cast_activate_spell');-    if r is not null then-      s := 'select action_' || r.action || '()';-      execute s;-    end if;-  end if;-  return ;-end;-$$ language plpgsql volatile;--/*-================================================================================--== prompt--use the action valid views to provide the user with information on-what their options are.--*/-create view action_instructions as-select 'cast_target_spell'::text as action,-       'Cast spell: Select a square to cast ' ||-        get_current_wizard_spell() || ' on' as help-union-select 'select_piece_at_position',-       'Select: choose a piece to move by selecting its square'-union-select 'walk',-       'Walk: select a square to move piece to'-union-select 'fly',-       'Fly: select a square to move piece to'-union-select 'attack',-       'Attack: select a square to attack that piece'-union-select 'ranged_attack',-       'Ranged attack: select a square to attack that piece'-union-select 'next_phase',-       'Next phase: press space to finish this wizard''s turn'-union-select 'set_imaginary',-       'Press y to cast an imaginary monster'-union-select 'set_real',-       'Press n to cast a real monster'-union-select 'cast_activate_spell',-       'Cast: Press enter to cast ' || get_current_wizard_spell()-union-select 'cancel',-       'Cancel: press End to cancel move/attack/ranged attack'-union-select 'choose_disbelieve_spell',-       'Press a key from the spell book to choose that spell to cast'-;--create view prompt as-select action, help-  from action_instructions-  natural inner join-  (select action from client_valid_target_actions-   union-   select action from client_valid_activate_actions) as a;--/*--TODO: improve these messages, maybe add in relevant sprites inline,-draw lines onto the playing board, be more specific e.g. the help for-enter could say exactly what options are available, next phase is-context specific (e.g. next phase to decline to move pieces which-haven't moved, or to not use additional shots of the currently casting-spell, or if no parts have been cast, to say cancel spell cast, cancel-also more specific.--TODO: in addition to this help, want to make available a "why can't I-do this" facility, which explains why a particular action can't be run-at this time (for target actions, why a particular action can't be run-at this time on this square).--New idea:-state what activate action is available-or// state what target actions are available for some square-and state what target action will run on the current square--also: for squares with no valid action, try to provide a message-guessing what the user might want to run on that square and explain-why they can't: need to work through some examples to see how obvious-these messages will be to create--*/--/*--================================================================================--== new game action-*/--select new_module('client_new_game', 'client');--create table action_client_new_game_argument (-  place int,-  wizard_name text,-  sprite text,-  colour text,-  computer_controlled boolean-);-select add_key('action_client_new_game_argument', 'place');-select add_key('action_client_new_game_argument', 'wizard_name');-select add_key('action_client_new_game_argument', 'sprite');-select add_key('action_client_new_game_argument', 'colour');-select add_foreign_key('action_client_new_game_argument',-                       'sprite', 'sprites');-select add_constraint('action_client_new_game_place_valid',-'(select count(*) from action_client_new_game_argument-  where place >=-  (select count(*) from action_client_new_game_argument)) = 0',- array['action_client_new_game_argument']);-select set_relvar_type('action_client_new_game_argument', 'stack');----this calls server new game-create function action_client_new_game() returns void as $$-begin-  --assert: argument has between 2 and 8 active wizards-  delete from action_new_game_argument;-  delete from init_wizard_display_info_argument;-  -- clear data tables-  delete from cursor_position;-  delete from wizard_display_info;--  delete from last_history_effect_id_table;-  insert into last_history_effect_id_table values (-1);-  delete from board_square_effects;-  delete from board_beam_effects;-  delete from board_sound_effects;-  delete from current_effects;--  -- don't reset windows, see below-  --call server new_game-  --populate argument first-  delete from action_new_game_argument;-  insert into action_new_game_argument-    (wizard_name, computer_controlled, place)-    select wizard_name, computer_controlled, place-      from action_client_new_game_argument;-  perform action_new_game();--  --wizard display_info-  delete from init_wizard_display_info_argument;-  insert into init_wizard_display_info_argument-      (wizard_name, sprite, colour)-    select wizard_name, sprite, colour-    from action_client_new_game_argument;-  perform init_wizard_display_info();--  --populate window data,-  -- preserve settings from previous game if there are some-  if not exists(select 1 from windows) then-    perform action_reset_windows();-  end if;--  if not exists(select 1 from spell_book_show_all_table) then-    insert into spell_book_show_all_table values (false);-  end if;--  perform update_board_sprites_cache();-  perform check_for_effects();-  perform init_cursor_position();-end-$$ language plpgsql volatile;--select set_module_for_preceding_objects('client_new_game');--select protect_readonly_relvars();-select set_all_attributes_to_not_null();-select set_notifies_on_all_data_tables();
− sqltestfiles/server.sql
@@ -1,4645 +0,0 @@-/*--Copyright 2009 Jake Wheat--= Overview--metadata - the readonly,data,stack tags for relvars-read only data - piece prototypes and spells revlars-game data - mainly wizards, spellbooks and pieces relvars-turn sequence - relvars for turn sequence progression-actions - action valid, actions for turn sequence, casting, moving, etc.-history - relar to record actions-new game - functions to reset data relvars and set up new games-test board support - functions to set up a few board layouts for testing-ai - ai for computer controlled wizards--================================================================================--= metadata-== base relvar tags--This stuff is mainly used to produce some half-baked documentation/-diagrams of the database.--*/-select new_module('chaos', 'root');-select new_module('server', 'chaos');-select new_module('metadata', 'server');--create table base_relvar_metadata (-  relvar_name text,-  type text check (type in('readonly', 'data', 'stack'))-);-select add_key('base_relvar_metadata', 'relvar_name');-select add_foreign_key('base_relvar_metadata', 'relvar_name', 'base_relvars');--create function set_relvar_type(vname text, vtype text) returns void as $$-begin-  insert into base_relvar_metadata (relvar_name, type)-    values (vname, vtype);-end;-$$ language plpgsql volatile;--select set_relvar_type('base_relvar_metadata', 'readonly');--/*-This view is only used in the check_code_some_tags function.-*/--create view chaos_base_relvars as-  select object_name,object_type from public_database_objects-  where object_type = 'base_relvar'-  except-        select object_name,object_type from module_objects-        where module_name = 'catalog' and object_type='base_relvar';-/*-part of the tests, will check all the relvars which aren't defined in-system.sql are tagged.-*/--create function check_code_some_tags() returns boolean as $$-declare-  r record;-  success boolean;-begin-  success := true;-  for r in select object_name from chaos_base_relvars-    except select relvar_name from base_relvar_metadata loop-    success := false;-      raise notice-        'table % is not tagged with one of readonly, data, stack',-        r.object_name;-  end loop;-  return success;-end;-$$ language plpgsql volatile;--/*--After we've loaded the sql, we can protect all the readonly relvars-from being updated again using transition constraints (see below for-how they are implemented). This might catch some programming errors.-- */--create function protect_readonly_relvars() returns void as $$-declare-  r record;-begin-  for r in select relvar_name, type-           from base_relvar_metadata-           where type='readonly' loop-    perform create_update_transition_tuple_constraint(-      r.relvar_name, r.relvar_name || '_u_readonly', 'false');-    perform create_delete_transition_tuple_constraint(-      r.relvar_name, r.relvar_name || '_d_readonly', 'false');-    perform create_insert_transition_tuple_constraint(-      r.relvar_name, r.relvar_name || '_i_readonly', 'false');-    -- get module-    perform set_module_for_preceding_objects(-    (select module_name from module_objects-          where object_type = 'base_relvar'-            and object_name = r.relvar_name));-  end loop;-end;-$$ language plpgsql volatile;--/*--todo: find way to enforce stack tables empty outside transaction, or-some sort of partial tests on this--*/--/*-== callback notes--add a notify on each table when it is changed. Haven't worked out how-to listen from haskell yet so is unused at the moment.--*/--create function set_notifies_on_all_data_tables() returns void as $$-declare-  r record;-begin-  for r in select relvar_name from base_relvar_metadata where type='data'-  except-  select relvar_name from triggers where trigger_name like '%_changed' loop-    perform notify_on_changed(r.relvar_name);-  end loop;-end;-$$ language plpgsql volatile;--select set_module_for_preceding_objects('metadata');--/*-================================================================================--= read only data--This section defines all the constant data which doesn't change either-during a game or from one game to the next. These are the piece-prototypes, and the spells.--== piece prototypes--=== ddl--Each type of piece starts with the same stats. Once a piece is on the-board, some of these stats can be changed.--So - use a kind of prototype system.  The template for each creature-is held in a read only table, and when a new creature is created on-the board, its stats are copied from this table, and then they can-change if needed.--*/-select new_module('piece_prototypes', 'server');----creature ranged weapons can be either projectiles or fireballs-create domain ranged_weapon_type as text-  check (value in ('projectile', 'fire'));--create table piece_prototypes_mr (-  ptype text not null,-  flying boolean null,-  speed int null,-  agility int null,-  undead boolean null,-  ridable boolean null,-  ranged_weapon_type ranged_weapon_type null,-  range int null,-  ranged_attack_strength int null,-  attack_strength int null,-  physical_defense int null,-  magic_defense int null-);-select add_key('piece_prototypes_mr', 'ptype');-select set_relvar_type('piece_prototypes_mr', 'readonly');--create view piece_prototypes as-  select ptype from piece_prototypes_mr;--create view creature_prototypes as-  select ptype, flying, speed, agility-    from piece_prototypes_mr-    where flying is not null-    and speed is not null-     and agility is not null;--create view monster_prototypes as-  select ptype, flying, speed, agility, undead, ridable-    from piece_prototypes_mr-    where undead is not null and ridable is not null;--create view object_piece_types as-  select ptype from piece_prototypes_mr where speed is null;--create view ridable_prototypes as-  select ptype from piece_prototypes_mr-    where ridable;--create view enterable_piece_types as-  select 'magic_tree'::text as ptype-  union-  select 'magic_castle'-  union-  select 'dark_citadel';-/*-=== data--TODO: find a way to represent data like this in the source in a much-more readable format.--*/---copy piece_prototypes_mr(ptype,flying,speed,agility,undead,ridable,-ranged_weapon_type,ranged_attack_strength,range,attack_strength,-physical_defense,magic_defense) from stdin;-bat	t	5	4	f	f	\N	\N	\N	1	1	9-bear	f	2	2	f	f	\N	\N	\N	6	7	6-centaur	f	4	5	f	t	projectile	2	4	1	3	5-crocodile	f	1	2	f	f	\N	\N	\N	5	6	2-dark_citadel	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N-dire_wolf	f	3	2	f	f	\N	\N	\N	3	2	7-eagle	t	6	2	f	f	\N	\N	\N	3	3	8-elf	f	1	7	f	f	projectile	2	6	1	2	5-faun	f	1	8	f	f	\N	\N	\N	3	2	7-ghost	t	2	6	t	f	\N	\N	\N	1	3	9-giant	f	2	5	f	f	\N	\N	\N	9	7	6-giant_rat	f	3	2	f	f	\N	\N	\N	1	1	8-goblin	f	1	4	f	f	\N	\N	\N	2	4	4-golden_dragon	t	3	5	f	f	fire	5	4	9	9	5-gooey_blob	\N	\N	\N	\N	\N	\N	\N	\N	\N	1	\N-gorilla	f	1	2	f	f	\N	\N	\N	6	5	4-green_dragon	t	3	4	f	f	fire	4	6	5	8	4-gryphon	t	5	6	f	t	\N	\N	\N	3	5	5-harpy	t	5	5	f	f	\N	\N	\N	4	2	8-horse	f	4	1	f	t	\N	\N	\N	1	3	8-hydra	f	1	6	f	f	\N	\N	\N	7	8	4-king_cobra	f	1	1	f	f	\N	\N	\N	4	1	6-lion	f	4	3	f	f	\N	\N	\N	6	4	8-magic_castle	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N-magic_fire	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N-magic_tree	\N	\N	\N	\N	\N	\N	\N	\N	\N	5	\N-manticore	t	5	8	f	t	projectile	1	3	3	6	6-ogre	f	1	6	f	f	\N	\N	\N	4	7	3-orc	f	1	4	f	f	\N	\N	\N	2	1	4-pegasus	t	5	7	f	t	\N	\N	\N	2	4	6-red_dragon	t	3	5	f	f	fire	3	5	7	9	4-shadow_tree	\N	\N	\N	\N	\N	\N	\N	\N	2	4	\N-skeleton	f	1	4	t	f	\N	\N	\N	3	2	3-spectre	f	1	4	t	f	\N	\N	\N	4	2	6-unicorn	f	4	7	f	t	\N	\N	\N	5	4	9-vampire	t	4	5	t	f	\N	\N	\N	6	8	6-wall	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N-wizard	f	1	3	\N	\N	\N	\N	\N	3	3	5-wraith	f	2	5	t	f	\N	\N	\N	5	5	4-zombie	f	1	3	t	f	\N	\N	\N	1	1	2-\.--select set_module_for_preceding_objects('piece_prototypes');-/*--== spells--Spells come in a number of flavours, the user interface breaks them-down into the same groups that the original chaos instructions did:--wizard spells: upgrade your wizard in some way, most add weaponry--attacking spells: are cast directly on enemy wizards and their-          monsters to kill them or destroy all of a wizards creations.--object spells: create object pieces--miscellaneous spells: various spells not in the other categories--monster spells: summon monsters for a wizard's army--The code breaks the spells down differently: target spells need a-square to be chosen to cast them on activate spells are all the other-spells.--Target spells are further be broken down into summon spells which-create new pieces on the board, and all the other target spells.--casting chance notes:--Each time you cast a spell it can affect the world alignment, which in-turn affects the spell casting chances.--=== ddl-*/-select new_module('spells', 'server');--create domain spell_category as text-       check (value in ('object', 'attacking',-       'wizard', 'miscellaneous', 'monster'));----what kind of squares can spells be cast on?--create domain spell_square_category as text-  check (value in (-    'empty',-    'empty_or_corpse_only',-    'attackable', --attackable - not in castle, incidental corpses allowed-    'creature_on_top', --creature on top - no blob,-                       --castle, wood, incidental corpses allowed-    'monster_on_top',-    'corpse_only',-    'empty_and_not_adjacent_to_tree'-));--create table spells_mr (-  spell_name text not null,-  base_chance int not null,-  alignment int not null,-  spell_category spell_category not null,-  description text not null,-  activate boolean null,-  target boolean null,-  range int null,-  num int null,-  ptype text null,-  valid_square_category spell_square_category null-);--select add_key('spells_mr', 'spell_name');-select set_relvar_type('spells_mr', 'readonly');--create view spells as- select spell_name, base_chance, alignment,-   spell_category, description- from spells_mr;--create view monster_spells as-  select s.* from spells_mr s-    inner join monster_prototypes m-          on s.ptype=m.ptype;--create view spell_valid_square_types as- select spell_name, base_chance, alignment, spell_category,-   description, valid_square_category- from spells_mr- where valid_square_category is not null;--create view spell_ranges as-  select spell_name, base_chance, alignment, spell_category,-   description, range-  from spells_mr-  where range is not null;--create view summon_spells as-  select spell_name, base_chance, alignment, spell_category,-   description, ptype-  from spells_mr-  where ptype is not null;--create view activate_spells as-  select spell_name-  from spells_mr-  where activate is not null-        and activate;--create view target_spells as-  select spell_name-  from spells_mr-  where target is not null-        and target;--create view spells_with_num_shots as-  select spell_name, base_chance, alignment, spell_category,-   description, num-  from spells_mr-  where num is not null;--/*-=== data--*/-copy spells_mr (spell_name, base_chance, alignment, spell_category, description,-  activate, target, range, num, ptype, valid_square_category) from stdin;-dark_citadel	50	-1	object	Gives wizard building to hide in.	\N	\N	8	1	dark_citadel	empty-dark_power	50	-2	attacking	When cast on a wizard it kills all that wizards creations if successful. Allows 3 attacks on enemy creatures	\N	t	20	3	\N	creature_on_top-decree	90	1	attacking	When cast on a wizard it kills all that wizards creations if successful. Allows 1 attack on an enemy creature.	\N	t	20	1	\N	creature_on_top-disbelieve	100	0	miscellaneous	Allows illusion creatures to be destroyed. This spell has 100% casting chance, and is always available.	\N	t	20	1	\N	monster_on_top-eagle	70	1	monster	monster	\N	\N	1	1	eagle	empty_or_corpse_only-elf	70	2	monster	monster	\N	\N	1	1	elf	empty_or_corpse_only-chaos	80	-2	miscellaneous	Makes the world more chaos.	t	\N	\N	\N	\N	\N-faun	80	-1	monster	monster	\N	\N	1	1	faun	empty_or_corpse_only-ghost	50	-1	monster	monster	\N	\N	1	1	ghost	empty_or_corpse_only-giant	40	1	monster	monster	\N	\N	1	1	giant	empty_or_corpse_only-giant_rat	100	0	monster	monster	\N	\N	1	1	giant_rat	empty_or_corpse_only-goblin	100	-1	monster	monster	\N	\N	1	1	goblin	empty_or_corpse_only-golden_dragon	10	2	monster	monster	\N	\N	1	1	golden_dragon	empty_or_corpse_only-law	80	2	miscellaneous	Makes the world more law.	t	\N	\N	\N	\N	\N-gooey_blob	100	-1	object	Attacks enemy units it covers and randomly spreads across the map. Any unit covered up by a gooey blob will be able to carry on once it is uncovered (except wizards who are killed by gooey blobs).	\N	\N	6	1	gooey_blob	empty_or_corpse_only-gorilla	70	0	monster	monster	\N	\N	1	1	gorilla	empty_or_corpse_only-green_dragon	10	-1	monster	monster	\N	\N	1	1	green_dragon	empty_or_corpse_only-gryphon	60	1	monster	monster	\N	\N	1	1	gryphon	empty_or_corpse_only-harpy	60	-1	monster	monster	\N	\N	1	1	harpy	empty_or_corpse_only-horse	90	1	monster	monster	\N	\N	1	1	horse	empty_or_corpse_only-hydra	50	-1	monster	monster	\N	\N	1	1	hydra	empty_or_corpse_only-justice	50	2	attacking	When cast on a wizard it kills all that wizards creations if successful. Allows 3 attacks.	\N	t	20	3	\N	creature_on_top-king_cobra	90	1	monster	monster	\N	\N	1	1	king_cobra	empty_or_corpse_only-large_chaos	60	-4	miscellaneous	Makes the world more chaos.	t	\N	\N	\N	\N	\N-large_law	60	4	miscellaneous	Makes the world more law.	t	\N	\N	\N	\N	\N-lightning	100	0	attacking	Attacks creature it is cast at (more powerful than magic bolt)	\N	t	4	1	\N	attackable-lion	60	1	monster	monster	\N	\N	1	1	lion	empty_or_corpse_only-magic_armour	50	1	wizard	Gives wizard increased protection from attack.	t	\N	\N	\N	\N	\N-magic_bolt	100	0	attacking	Attacks creature it is cast at.	\N	t	6	1	\N	attackable-magic_bow	50	1	wizard	Gives wizard ranged weapon including undead creatures.	t	\N	\N	\N	\N	\N-magic_castle	50	1	object	Gives wizard building to hide in.	\N	\N	8	1	magic_castle	empty-magic_fire	80	-1	object	Attacks and kills enemy units it covers and randomly spreads across the map.	\N	\N	6	1	magic_fire	empty-magic_knife	70	1	wizard	Gives wizard increase attack power including undead creatures.	t	\N	\N	\N	\N	\N-magic_shield	70	1	wizard	Gives wizard increased protection from attack.	t	\N	\N	\N	\N	\N-magic_sword	40	1	wizard	Gives wizard increase attack power including undead creatures.	t	\N	\N	\N	\N	\N-magic_wings	60	0	wizard	Gives wizard ability to fly.	t	\N	\N	\N	\N	\N-magic_wood	80	1	object	Summons up to eight magic trees near your wizard. If you put your wizard in a magic tree and leave him there, he gets a new spell after a few turns.	\N	\N	8	8	magic_tree	empty_and_not_adjacent_to_tree-manticore	50	-1	monster	monster	\N	\N	1	1	manticore	empty_or_corpse_only-ogre	70	-1	monster	monster	\N	\N	1	1	ogre	empty_or_corpse_only-orc	100	-1	monster	monster	\N	\N	1	1	orc	empty_or_corpse_only-pegasus	60	2	monster	monster	\N	\N	1	1	pegasus	empty_or_corpse_only-raise_dead	60	-1	miscellaneous	Allows reanimation of dead bodies left on screen. Any creatures raised from the dead become undead creatures, able to attack other undeads.	\N	t	4	1	\N	corpse_only-red_dragon	10	-2	monster	monster	\N	\N	1	1	red_dragon	empty_or_corpse_only-shadow_form	80	0	wizard	Gives wizard increased protection and allows movement of 3 spaces per turn. Disappears if wizard attacks anything.	t	\N	\N	\N	\N	\N-shadow_wood	50	-1	object	Allows you to place up to eight shadow trees near your wizard. No two trees can be adjacent, and line of sight is needed in placing. Shadow trees can attack anything in contact with them (except undead).	\N	\N	8	8	shadow_tree	empty_and_not_adjacent_to_tree-skeleton	70	-1	monster	monster	\N	\N	1	1	skeleton	empty_or_corpse_only-spectre	60	-1	monster	monster	\N	\N	1	1	spectre	empty_or_corpse_only-subversion	100	0	miscellaneous	Realigns enemy creature to your side.	\N	t	7	1	\N	monster_on_top-turmoil	100	-2	miscellaneous	Randomly moves all objects onscreen to a different location. Only available from a magic tree.	t	\N	\N	\N	\N	\N-unicorn	70	2	monster	monster	\N	\N	1	1	unicorn	empty_or_corpse_only-vampire	20	-2	monster	monster	\N	\N	1	1	vampire	empty_or_corpse_only-vengeance	90	-1	attacking	When cast on a wizard it kills all that wizards creations if successful. Allows 1 attack on an enemy creature.	\N	t	20	1	\N	creature_on_top-wall	80	0	object	Allows four wall blocks to be built near the wizard, which blocks creatures paths, but can be flown over.	\N	\N	8	4	wall	empty-wraith	50	-1	monster	monster	\N	\N	1	1	wraith	empty_or_corpse_only-zombie	90	-1	monster	monster	\N	\N	1	1	zombie	empty_or_corpse_only-\.--select set_module_for_preceding_objects('spells');--/*-================================================================================--= game data--Players should not be able to see each others spells before the cast-phase. This is difficult when they are all on the same computer, but-should be easy when they are not.--Imaginary attribute should only be visible to owning player, same-notes as previous.--== global data-*/-select new_module('global_data', 'server');-/*-=== board size-The playing area is 'width' by 'height' squares.-*/-create table board_size (-  width int,-  height int-);-select add_key('board_size', array['width', 'height']);-select constrain_to_zero_or_one_tuple('board_size');-select set_relvar_type('board_size', 'data');-----update operator out param: board_size-create function init_board_size() returns void as $$-begin-  -- default board size-  insert into board_size (width, height) values (15, 10);-end;-$$ language plpgsql volatile;--/*-=== law/ chaos rating--The world has a law/ chaos rating which can be chaos-N, neutral or-law-N. It starts neutral. When the world is chaos, then chaos spells-become easier to cast, and law spells harder, and vice versa. It-becomes more chaos when chaos spells are cast, and more law when law-spells are cast.--*/--create domain alignment as text check (value in ('law', 'neutral', 'chaos'));----if world alignment = 0, world is neutral, if -ve world is chaos by that amount---if +ve world is law by that amount-select create_var('world_alignment', 'int');-select set_relvar_type('world_alignment_table', 'data');--create function init_world_alignment() returns void as $$-begin-  insert into world_alignment_table values (0);-end;-$$ language plpgsql volatile;-select set_module_for_preceding_objects('global_data');--/*-== wizards--*/-select new_module('wizards', 'server');--create table wizards (-  wizard_name text,-  shadow_form boolean default false,-  magic_sword boolean default false,-  magic_knife boolean default false,-  magic_shield boolean default false,-  magic_wings boolean default false,-  magic_armour boolean default false,-  magic_bow boolean default false,-  computer_controlled boolean,-  original_place int, -- 0 <= n < num wizards-  expired boolean default false-);-select add_key('wizards', 'wizard_name');-select set_relvar_type('wizards', 'data');--create view live_wizards as-  select *,-         row_number() over(order by original_place) - 1 as place-  from wizards where not expired;--/*-== spell books-Wizard 'wizard_name' is able to cast spell 'spell_name'.-*/--create table spell_books (-  id serial,-  wizard_name text,-  spell_name text-);-select add_key('spell_books', 'id');-select add_foreign_key('spell_books', 'wizard_name', 'wizards');-select add_constraint('no_spells_for_stiffs',-  $$ not exists(select 1 from spell_books-  natural inner join wizards where expired = true)$$,-  array['spell_books', 'wizards']);-select add_foreign_key('spell_books', 'spell_name', 'spells');-select set_relvar_type('spell_books', 'data');--select set_module_for_preceding_objects('wizards');--/*-== pieces-=== piece natural keys-Keys consist of three parts:-type-allegiance-number--- if piece is a wizard -> type is "wizard", allegiance is wizard name,-  number is 0 for all wizards?--- else if dead -> dead aren't owned, allegiance is "dead". (use-  dead-[monster type]-[n] where n is integer, incremented for each-  corpse type. e.g. you can have dead-giant-0, dead-giant-1 and-  dead-eagle-0. Corpses which existed in current game but no longer do-  leave a gap in the numbering.)--- else -> [owning wizard's name]-[type]-[m] where wizard[n] is the-  owning wizard, m is integer incremented per wizard[n]-type, e.g. you-  can have wizard1-goblin-0, wizard2-goblin-0, wizard1-ogre-0,-  etc. (Assuming wizard names are wizard1, etc.). Pieces which existed-  in current game but no longer do leave a gap in the numbering.--To do this will need to roll own sequence type because there will be-many many sequences? Like to create one table to hold all the-sequences: pieces_sequences (prefix text, current_number integer),-where prefix text is the prefix given above. This might be better as-(allegiance text, type text, current_number integer). Locking: intend-to use a server schema database wide lock every update. fastest-solution may be to use row level locking, probably write a function-like sequences to lock row, increment, get number, unlock and return-number.--For simplicity, just use same serial for all pieces for now.--=== relvars--*/-select new_module('pieces', 'server');----pieces are either a member of a particular wizard's army or--- they are dead, in which case they are not a member of--- any wizard's army-create view allegiances as-   select wizard_name as allegiance from wizards-     where expired = false-   union select 'dead' as allegiance;--/*--TODO: maybe make pieces_mr a table called pieces with just the piece-key and position, and then use a view for an analog to pieces with-the stats. Create this view from the prototype stats, the pieces-table, and have table(s) containing things that can affect the stats-and the view selects from the the piece_prototypes and these tables.--I think all the ways stats can change from the prototypes are listed-here:-monster raised from the dead-wizard with upgrade--err... that's it.--*/--create table pieces (-    ptype text,-    allegiance text,-    tag int,---Piece is on the board at grid position 'x', 'y'.-    x int,-    y int);--select add_key('pieces', array['ptype', 'allegiance', 'tag']);-select add_foreign_key('pieces', 'ptype', 'piece_prototypes');---piece must be on the board, not outside it-select add_constraint('piece_coordinates_valid',-  ' not exists(select 1 from pieces-  cross join board_size-  where x >= width or y >= height)',-  array['pieces', 'board_size']);-select add_foreign_key('pieces', 'allegiance', 'allegiances');---temporary constraint while 'fks' to non base relvars are buggy-select add_constraint('dead_wizard_army_empty',-  $$ not exists(select 1 from pieces-    inner join wizards-    on (allegiance = wizard_name)-    where expired = true)$$,-  array['wizards', 'pieces']);-select set_relvar_type('pieces', 'data');--create type piece_key as (-    ptype text,-    allegiance text,-    tag int-);----create function piece_key_equals(piece_key, piece_key) returns boolean as $$---  select $1.ptype = $2.ptype and---         $1.allegiance = $2.allegiance and---         $1.tag = $2.tag;---$$ language sql stable;---- create operator = (---     leftarg = piece_key,---     rightarg = piece_key,---     procedure = piece_key_equals,---     commutator = =--- );--create type pos as (-  x int,-  y int-);---- create function pos_equals(pos, pos) returns boolean as $$---   select $1.x = $2.x and---          $1.y = $2.y;--- $$ language sql stable;---- create operator = (---     leftarg = pos,---     rightarg = pos,---     procedure = pos_equals,---     commutator = =--- );---/*--add two auxiliary tables to track imaginary monsters and raised-monsters who are now undead--*/-create table imaginary_pieces (-    ptype text,-    allegiance text,-    tag int);--select set_relvar_type('imaginary_pieces', 'data');-select add_key('imaginary_pieces', array['ptype', 'allegiance', 'tag']);-select add_foreign_key('imaginary_pieces',-       array['ptype', 'allegiance', 'tag'], 'pieces');-select add_foreign_key('imaginary_pieces', 'ptype',-       'monster_prototypes');--create table crimes_against_nature (-    ptype text,-    allegiance text,-    tag int-);--select set_relvar_type('crimes_against_nature', 'data');-select add_key('crimes_against_nature', array['ptype', 'allegiance', 'tag']);-select add_foreign_key('crimes_against_nature',-       array['ptype', 'allegiance', 'tag'], 'pieces');-select add_foreign_key('crimes_against_nature', 'ptype',-       'monster_prototypes');--create view wizard_upgrade_stats as-select pp.ptype,-       allegiance,-       tag,-       x,-       y,-       false as imaginary,-       magic_wings as flying,-       case when magic_wings then 6-            when shadow_form then 3-            else speed-       end as speed,-       case when shadow_form then agility + 2-            else agility-       end as agility,-       undead,-       ridable,-       case when magic_bow then 'projectile'-            else null-       end as ranged_weapon_type,-       case when magic_bow then 6-            else null-       end as range,-       case when magic_bow then 6-            else null-       end as ranged_attack_strength,-       case when magic_sword then attack_strength + 4-            when magic_knife then attack_strength + 2-            else attack_strength-       end as attack_strength,-       case when magic_armour and shadow_form then physical_defense + 6-            when magic_shield and shadow_form then physical_defense + 4-            when magic_armour then physical_defense + 4-            when magic_shield then physical_defense + 2-            when shadow_form then physical_defense + 2-            else physical_defense-       end as physical_defense,-       magic_defense-  from pieces p-  inner join wizards-    on allegiance = wizard_name-  inner join piece_prototypes_mr pp-    on pp.ptype='wizard'-  where p.ptype = 'wizard';---- create view imaginary_or_not_pieces as--- select ptype,allegiance,tag,x,y,coalesce(imaginary,false) as imaginary---   from pieces---   natural left outer join (select *,true as imaginary---                            from imaginary_pieces) as a;--create view pieces_mr as-select ptype,-       allegiance,-       tag,-       x,-       y,-       coalesce(imaginary,case when not ridable is null then false-                               else null end) as imaginary,-       flying,-       speed,-       agility,-       coalesce(raised, undead) as undead,-       ridable,-       ranged_weapon_type,-       range,-       ranged_attack_strength,-       attack_strength,-       physical_defense,-       magic_defense-  from pieces-  natural inner join piece_prototypes_mr-  natural left outer join (select *,true as imaginary-                           from imaginary_pieces) as a-  natural left outer join (select *,true as raised-                           from crimes_against_nature) as b-  where ptype <> 'wizard'-union-select * from wizard_upgrade_stats;--create view creature_pieces as-  select ptype,allegiance,tag,x,y,-    flying,speed,agility-    from pieces_mr-  where flying is not null-    and speed is not null-    and agility is not null;--create view monster_pieces as-  select ptype,allegiance,tag,x,y,-    flying,speed,agility,-    undead,ridable,imaginary-  from pieces_mr-  where flying is not null-    and speed is not null-    and agility is not null-    and undead is not null-    and ridable is not null;--create view dead_monster_pieces as-  select * from monster_pieces-    where allegiance = 'dead';--create view attacking_pieces as-  select ptype,allegiance,tag,x,y,-    attack_strength-  from pieces_mr-  where attack_strength is not null-    and allegiance <> 'dead';--create view ranged_weapon_pieces as-  select ptype,allegiance,tag,x,y,-    ranged_weapon_type,range,ranged_attack_strength-  from pieces_mr-  where ranged_weapon_type is not null-    and range is not null-    and ranged_attack_strength is not null;--create view attackable_pieces as-  select ptype,allegiance,tag,x,y,physical_defense-  from pieces_mr-  where physical_defense is not null;--create view magic_attackable_pieces as-  select ptype,allegiance,tag,x,y,magic_defense-  from pieces_mr-  where magic_defense is not null;---/*--Rules for multiple pieces on one square: only one piece of each-type may occupy a square in particular you can't have two dead bodies-on one square. These are the traditional chaos rules which may change-for other rulesets.--When multiple pieces occupy one square, one is considered to be 'on-top'. This piece-* is the one piece displayed in the UI currently-* the piece upon which any spell cast on that square hits-* the piece which is attacked when another piece attacks or range-  attacks that square--1 item-any-2 items-creature, stiff : creature on top-wizard, mountable monster: mountable monster on top-wizard, box : box on top-stiff, gooey blob : blob on top-monster, gooey blob : blob on top-3 items-wizard, stiff, mountable monster : mountable on top-stiff, monster, blob : blob on top--*/--select set_module_for_preceding_objects('pieces');-/*--================================================================================--= turn sequence--see readme for overview of turn sequence--For the player, there are three phases, but for the computer there are-four phases, the extra one is the autonomous phase in between casting-and moving. In this phase magic fire and gooey blob spread, castles-may disappear, and wizards may receive a new spell from a magic tree.--There are lots of constraints in this section. For an app like this-where all the updates are through stored procs which carefully check-their preconditions, and there are never any multiple updates, this is-a bit excessive. The main takeaway is that you need deferred-constraints or multiple updates for most constraints that involve more-that one table.--== ddl-*/-select new_module('turn_sequence', 'server');--/*-use this to simulate multiple updates:-for a constraint which refers to multiple tables which get updated-during an action_next_phase call, this will be set to true,-false at all other times, so using this can defer constraint checking-till the end of the action_next_phase call after all the relevant-turn phase relvars have been updated. Don't forget to put-in_next_phase_hack_table in the relvar list for the constraint.--*/-select create_var('in_next_phase_hack', 'boolean');-insert into in_next_phase_hack_table values (false);-select set_relvar_type('in_next_phase_hack_table', 'stack');--select create_var('creating_new_game', 'boolean');-insert into creating_new_game_table values (true);-select set_relvar_type('creating_new_game_table', 'stack');----Turn number, starts at 0 goes up 1 each full turn, just used to provide---info on how long the game has been going.-select create_var('turn_number', 'int');-select set_relvar_type('turn_number_table', 'data');----if not creating new game cardinality = 1--select create_update_transition_tuple_constraint(-  'turn_number_table',-  'turn_number_change_valid',-  '(NEW.turn_number = OLD.turn_number + 1)');--create function no_deletes_inserts_except_new_game(relvar_name text)-  returns void as $$-begin-  perform create_delete_transition_tuple_constraint(-    relvar_name,-    relvar_name || '_no_delete',-    'exists(select 1 from creating_new_game_table-      where creating_new_game = true)');-  perform create_insert_transition_tuple_constraint(-    relvar_name,-    relvar_name || '_no_insert',-    'exists(select 1 from creating_new_game_table-      where creating_new_game = true)');--end;-$$ language plpgsql volatile;--select no_deletes_inserts_except_new_game('turn_number_table');--/*-turn phase-must follow choose-cast-auto-move-choose-etc.--wizard spell choices-added row must be for current wizard, and in current wizard's spell book-  in choose phase-removed row must be for current wizard-  in cast phase--spell parts to cast-pieces to move-squares left to walk--*/--create view next_wizard as-select wizard_name, new_wizard_name from-  (select wizard_name as new_wizard_name, place-     from live_wizards) as a inner join-  (select wizard_name,-     (place + 1) %-       (select max(place) + 1 from live_wizards)-      as old_place from live_wizards) as b-  on (place = old_place);---create function next_wizard(text) returns text as $$-  select new_wizard_name from next_wizard-    where wizard_name = $1;-$$ language sql stable;--/*select next_wizard('Buddha');-select next_wizard('Kong Fuzi');-select next_wizard('Laozi');-select next_wizard('Moshe');-select next_wizard('Muhammad');-select next_wizard('Shiva');-select next_wizard('Yeshua');-select next_wizard('Zarathushthra');-*/----current wizard is the wizard who's turn it is to do stuff in current phase-select create_var('current_wizard', 'text');-select set_relvar_type('current_wizard_table', 'data');-select add_foreign_key('current_wizard_table', 'current_wizard',-  'wizards', 'wizard_name');-select create_update_transition_tuple_constraint(-  'current_wizard_table',-  'next_wizard_change_valid',-  'NEW.current_wizard = next_wizard(OLD.current_wizard)');-select create_delete_transition_tuple_constraint(-    'current_wizard_table',-    'current_wizard_table_no_delete',-    'exists(select 1 from creating_new_game_table-      where creating_new_game = true)-     or exists (select 1 from game_completed_table)');-select create_insert_transition_tuple_constraint(-    'current_wizard_table',-    'current_wizard_table_no_insert',-    'exists(select 1 from creating_new_game_table-      where creating_new_game = true)');-----select no_deletes_inserts_except_new_game('current_wizard_table');-select add_constraint('current_wizard_must_be_alive',-  $$(select not expired from current_wizard_table-     inner join wizards on current_wizard = wizard_name)$$,-  array['wizards', 'current_wizard_table']);--/*-wizard field in most tables and views is named wizard_name--instead of tediously writing out inner join blah on wizard_name =-current_wizard use the following view to instead write natural inner-join current_wizard . Not that much less tedious though.--*/--create view current_wizard as-  select current_wizard as wizard_name from current_wizard_table;----turn phase enum: choose spell, cast spell, autonomous, move-create domain turn_phase_enum as text-       check (value in ('choose', 'cast', 'autonomous', 'move'));--create function next_turn_phase(text) returns text as $$-  select case-    when $1='choose' then 'cast'-    when $1='cast' then 'autonomous'-    when $1='autonomous' then 'move'-    when $1='move' then 'choose'-  end as result-$$ language sql immutable;--select create_var('turn_phase', 'turn_phase_enum');-select set_relvar_type('turn_phase_table', 'data');-select create_update_transition_tuple_constraint(-  'turn_phase_table',-  'turn_phase_change_valid',-  'NEW.turn_phase = next_turn_phase(OLD.turn_phase)');-select no_deletes_inserts_except_new_game('turn_phase_table');--create type turn_pos as (-    turn_number int,-    turn_phase turn_phase_enum,-    current_wizard text-);---- create function turn_pos_equals(turn_pos, turn_pos) returns boolean as $$---   select $1.turn_number = $2.turn_number and---          $1.turn_phase = $2.turn_phase and---          $1.current_wizard = $2.current_wizard;--- $$ language sql stable;---- create operator = (---     leftarg = turn_pos,---     rightarg = turn_pos,---     procedure = turn_pos_equals,---     commutator = =--- );--create function get_current_turn_pos() returns turn_pos as $$-  select (turn_number, turn_phase, current_wizard)::turn_pos-    from turn_number_table-    cross join turn_phase_table-    cross join current_wizard_table;-$$ language sql stable;---/*--Both spell casting and moving have a bunch of state local to each-wizards turn in the that phase. Wizard spell choices is a piece of-turn phase state which is constructed bit by bit in the choice phase-then read in the cast phase, so this lasts from the start of the-choice phase to the end of the cast phase.--*/-create table wizard_spell_choices_mr (-  wizard_name text not null,-  spell_name text not null,-  imaginary boolean null-);-select add_key('wizard_spell_choices_mr', 'wizard_name');-select add_constraint('dead_wizard_no_spell',-  $$ not exists(select 1 from wizard_spell_choices_mr-    natural inner join wizards-    where expired = true)$$,-  array['wizards', 'pieces']);--create view wizard_spell_choices as-  select wizard_name, spell_name-    from wizard_spell_choices_mr;--create view wizard_spell_choices_imaginary as-  select wizard_name, imaginary-    from wizard_spell_choices_mr-    where imaginary is not null;--/*--todo: add constraint to say imaginary must be set for monsters and-must not be set for non-monsters (will need a multiple update hack to-go with this)--*/----shortcut for current wizard's spell-create view current_wizard_spell as-  select spell_name from wizard_spell_choices-    natural inner join current_wizard;--create function get_current_wizard_spell() returns text as $$-  select spell_name from current_wizard_spell;-$$ language sql stable;--/*this really needs multiple updates----select add_foreign_key('wizard_spell_choices', array['wizard_name',---  'spell_name'], 'spell_books');--the problem is that in the action_next_phase for the end of a wizards-cast phase we want to delete the spell choice from this table, and-also delete the spell from the wizards spell book. The code deletes-the spell from the spell book first, but since the spell choice-references the spell book table, the reference stops the delete.--We can't use a conventional cascade delete since there may be multiple-rows in the spell book for the same spell/wizard combo - this isn't a-foreign key in sql sense.--One alternative is to save the wizard and spell names in a variable so-we can delete the spell choice first then the spell book entry, but-that is pretty inelegant.--We could do it properly with multiple updates, so simulate this by-writing out the fk by hand and adding the in next phase hack.--*/-select create_var('spell_choice_hack', 'boolean');-insert into spell_choice_hack_table values (false);-select set_relvar_type('spell_choice_hack_table', 'stack');--select add_constraint('wizard_spell_choices_wizard_name_spell_name_fkey',-$$((select spell_choice_hack from spell_choice_hack_table) or-not exists(select wizard_name, spell_name from wizard_spell_choices-  except-select wizard_name, spell_name from spell_books))$$,-array['spell_choice_hack_table', 'wizard_spell_choices_mr', 'spell_books']);---/*-if choose phase: only current and previous wizards may have a row-if cast phase: only current and subsequent wizards may have a row-this constraint really needs multiple updates.-*/-select add_constraint('chosen_spell_phase_valid',-$$-((select in_next_phase_hack from in_next_phase_hack_table) or-(((select turn_phase='choose' from turn_phase_table) and- (select max(place) from wizard_spell_choices-   natural inner join live_wizards) <=- (select place from live_wizards-   inner join current_wizard_table-     on wizard_name = current_wizard))-or-((select turn_phase='cast' from turn_phase_table) and- (select min(place) from wizard_spell_choices-    natural inner join live_wizards) >=-  (select place from live_wizards-    inner join current_wizard_table-      on wizard_name = current_wizard))-or not exists(select 1 from wizard_spell_choices)-))$$, array['turn_phase_table', 'current_wizard_table',-    'wizard_spell_choices_mr', 'wizards', 'in_next_phase_hack_table']);--select create_update_transition_tuple_constraint(-  'wizard_spell_choices_mr',-  'update_spell_choice_restricted',-  $$(select turn_phase = 'choose' from turn_phase_table)-    and (NEW.wizard_name = OLD.wizard_name)-    and (select current_wizard = NEW.wizard_name from current_wizard_table)$$);-select create_insert_transition_tuple_constraint(-  'wizard_spell_choices_mr',-  'insert_spell_choice_restricted',-  $$(select turn_phase = 'choose' from turn_phase_table)-    and (select current_wizard = NEW.wizard_name from current_wizard_table)$$);-select create_delete_transition_tuple_constraint(-  'wizard_spell_choices_mr',-  'delete_spell_choice_restricted',-  $$(select turn_phase in ('cast', 'choose') from turn_phase_table)$$);--select set_relvar_type('wizard_spell_choices_mr', 'data');--/*--if wizard is skipping casting a spell then no tuple appears in this-relvar for that wizard--spellparts to cast is local to spell casting phase for each wizard--current wizard has cast amount spell parts in this turn phase--when entering spell cast phase, this is set to 0 if wizard has no-spell or max number of casts otherwise--*/--select create_var('spell_parts_to_cast', 'int');-select set_relvar_type('spell_parts_to_cast_table', 'data');--select add_constraint('parts_to_cast_only', $$-  ((select turn_phase = 'cast' from turn_phase_table)-  or not exists(select 1 from spell_parts_to_cast_table))-$$, array['turn_phase_table', 'spell_parts_to_cast_table']);--/*-If casting multipart spell, only check success on first part.-Store whether current wizard's spell needs a success check here.-make sure to reset it each next phase during cast phase-*/--select create_var('cast_success_checked', 'boolean');-select set_relvar_type('cast_success_checked_table', 'data');-select add_constraint('cast_checked_cast_only', $$-  ((select turn_phase = 'cast' from turn_phase_table)-  or not exists(select 1 from cast_success_checked_table))-$$, array['cast_success_checked_table', 'turn_phase_table']);--/*--casting affecting alignment--how does a successful or unsuccessful spell affect world alignment?-do unsuccessful spells have any effect?-does the current world alignment affect the effect?-is there a limit to how much the alignment can change in a turn?-is each spell's effect independent of what other spells are cast that turn?--what about:-  each spell can affect the world alignment-  spell alignments don't add up, the result is taken by random-    from one of the spells cast that turn-  e.g.-  0, -1, -4, 2, -1: five spells cast with alignments given-    chose one of these at random, each with 1/5 chance-    then adjust alignment by this (align/2 with probability for halfs?)--current plan:-only successful spells affect alignment-keep track of all spells during cast phase-sum up total alignment, divide by 2, each full number affects alignment-the fractional part has probability to affect it-maximum change is 2--this means that law increases alignment by one and large law does it-by two in the absence of any other spells.--*/-select create_var('cast_alignment', 'integer');-select set_relvar_type('cast_alignment_table', 'stack');--select add_constraint('cast_alignment_empty',-  $$((get_turn_phase() = 'cast') or-  not exists(select 1 from cast_alignment_table))$$,-  array['turn_phase_table', 'cast_alignment_table']);--create function adjust_world_alignment() returns void as $$-declare-  abs_change float;-begin-  select into abs_change-    min(abs(get_cast_alignment()) / 2, 2);-  update world_alignment_table-    set world_alignment = world_alignment-      + trunc(abs_change) * sign(get_cast_alignment());-  --get fractional part-  if (random() < abs_change - trunc(abs_change)) then-    update world_alignment_table-      set world_alignment = world_alignment +-        sign(get_cast_alignment());-  end if;-  update cast_alignment_table set cast_alignment = 0;-end;-$$ language plpgsql volatile;----/*--pieces to move and selected piece are local to move phase for each-wizard--Piece in this table from current wizard's army hasn't yet moved-in this turn.--TODO: i think switching this from pieces to move to pieces_moved will-be a bit more straightforward--*/-create table pieces_to_move (-    ptype text,-    allegiance text,-    tag int-);-select add_key('pieces_to_move', array['ptype', 'allegiance', 'tag']);---cascade delete here:-select add_foreign_key('pieces_to_move', array['ptype', 'allegiance', 'tag'],-                       'pieces');-select add_foreign_key('pieces_to_move', 'allegiance',-                       'current_wizard_table', 'current_wizard');-select set_relvar_type('pieces_to_move', 'data');-select add_constraint('pieces_to_move_empty',-$$((select turn_phase = 'move' from turn_phase_table) or-not exists (select 1 from pieces_to_move))$$,-array['pieces_to_move', 'turn_phase_table']);--create domain move_phase as text-  check (value in ('motion', 'attack', 'ranged_attack'));--create table selected_piece (-  ptype text,-  allegiance text,-  tag int,-  move_phase move_phase,-  engaged boolean-); -- 0 to 1 tuple when in move phase,--- piece key from current wizards army, empty otherwise-select add_key('selected_piece', array['ptype', 'allegiance', 'tag']);-select add_foreign_key('selected_piece', array['ptype', 'allegiance', 'tag'],-                       'pieces');-select add_foreign_key('selected_piece', 'allegiance',-                       'current_wizard_table', 'current_wizard');-select constrain_to_zero_or_one_tuple('selected_piece');-select set_relvar_type('selected_piece', 'data');---/*--squares left to walk is local to the current moving piece during-its walking phase, not used if piece is not a walker.--TODO: this doesn't take into account e.g. move of 3 squares, move-diagonal, second diagonal move all move used up, can't do three-diagonal moves.--*/-select create_var('remaining_walk', 'int');-select set_relvar_type('remaining_walk_table', 'data');-select create_var('remaining_walk_hack', 'boolean');-select set_relvar_type('remaining_walk_hack_table', 'stack');-insert into remaining_walk_hack_table values (false);--select add_constraint('remaining_walk_only_motion',-$$ ((not exists(select 1 from remaining_walk_table)) or-   exists(select 1 from creating_new_game_table-      where creating_new_game = true) or-   (select remaining_walk_hack-     from remaining_walk_hack_table) or-   (exists(select 1 from selected_piece)-      and (select move_phase = 'motion' from selected_piece)-      and exists (select 1 from creature_pieces-                  natural inner join selected_piece)-      and (select not flying from creature_pieces-           natural inner join selected_piece))) $$,-  array['selected_piece', 'pieces', 'remaining_walk_table',-        'remaining_walk_hack_table', 'creating_new_game_table']);----this function is used to initialise the turn phase data.-create function init_turn_stuff() returns void as $$-begin-  --this should catch attempts to start a game-  --which has already been started-  if exists(select 1 from turn_number_table) then-    raise exception 'new game started when turn number table not empty';-  end if;-  insert into turn_number_table values (0);-  insert into turn_phase_table-    values ('choose');-  insert into current_wizard_table-    select wizard_name from live_wizards-    order by place limit 1;-end;-$$ language plpgsql volatile;--/*--table to cache if the game is over: someone has one or it's a draw.-(This also makes it possible to have a draw when there are wizards-remaining.)--*/--select create_var('game_completed', 'boolean');-select set_relvar_type('game_completed_table', 'data');-select add_constraint('game_completed_wizards',-       $$(not exists(select 1 from game_completed_table)-           or (select count(1) <= 1 from live_wizards))$$,-       array['game_completed_table']);--create function game_completed() returns void as $$-begin-  insert into game_completed_table-    select true where not exists (select 1 from game_completed_table);-end;-$$ language plpgsql volatile;---- 1 tuple iff current moving piece walks, empty otherwise---/*-================================================================================--= Actions-*/-select new_module('actions', 'server');-/*-== Testing--for testing purposes sometimes want to make a given nondeterministic-action always fail or always succeed.--The categories are:-castle disappear-gooey blob spread-attack-ranged attack-resist: decree, lightning, subversion-cast spell--you have to set the override each time you want to override something--*/--create domain random_test text check (value in-       ('disappear', 'spread', 'attack',-        'ranged_attack', 'resist', 'cast',-        'bonus','break_engaged'));--create table test_action_overrides (-  override random_test,-  setting bool-);-select set_relvar_type('test_action_overrides', 'data');--create function action_rig_action_success(poverride random_test,-       psetting boolean) returns void as $$-begin-  insert into test_action_overrides (override, setting)-    values (poverride, psetting);-end;-$$ language plpgsql volatile;--select add_key('test_action_overrides', 'override');--/*-== random numbers-run all random tests through this, so that we can hook into them-during testing.-*/-create function check_random_success(t random_test, successPercentage int)-  returns boolean as $$-declare-  o boolean;-begin-  o := (select setting from test_action_overrides-       where override = t);-  if o is null then --normal random-    return (random() * 100) < successPercentage;-  else --overriden-    delete from test_action_overrides-      where override = t;-    return o;-  end if;-end;-$$ language plpgsql volatile;--create function min(integer, integer) returns integer as $$-  select min(n) from (select $1 as n union select $2 as n) as a;-$$ language sql immutable;--create function max(integer, integer) returns integer as $$-  select max(n) from (select $1 as n union select $2 as n) as a;-$$ language sql immutable;--create function limit_chance(integer) returns integer as $$-  select max(10, min($1, 100));-$$ language sql immutable;--/*-== action validity--*/-select new_module('squares_valid', 'actions');--/*-=== pieces on top--The topmost piece on each square is the one you interact with most of-the time, e.g. when selecting, attacking, etc.--The exception to this rule is when you select a wizard that is in a-magic tree or castle or mounted on a monster.--The pieces_on_top view also determines what sprite is shown in a-square in the ui--*/--create view pieces_with_priorities as-  select ptype,allegiance,tag,x,y,-    case-      when allegiance='dead' then 3-      when ptype='wizard' then 2-      when ptype in (select ptype from monster_prototypes) then 1-      else 0-    end as sp-    from pieces;----restrict this view taking only the top piece from each square to get---the final result--create view pieces_on_top as-  select x,y,ptype,allegiance,tag,sp from-    (select row_number() over(partition by (x,y) order by sp) as rn,-            x, y, ptype, allegiance, tag, sp-      from pieces_with_priorities) as pwp where rn = 1;----create a full view to help with updates---- question: why does pieces_view natural inner join pieces_on_top--- return too many rows?--create view pieces_on_top_view as-  select p.* from pieces_mr p-    inner join pieces_on_top-    using (ptype,allegiance,tag);--/*-=== selectable squares and pieces--We can't use the pieces on top for the selection because of-the exceptions re castles, magic wood and mounted wizards,-so create a similar view so we can determine the piece that-gets selected by square, this part is just the pieces on top-combined with all the wizards even if they are not on top.--This is finished off using the pieces_to_move relvar.--*/-create view moving_pieces as-  select ptype, allegiance, tag,x,y from pieces_mr-    where speed is not null-      or attack_strength is not null-      or ranged_attack_strength is not null;--create view selectable_pieces_with_priorities as-  select ptype,allegiance,tag,x,y,-    case-      when ptype='wizard' then 0-      else 1-    end as sp-    from moving_pieces-    where (x,y) not in(select x,y from pieces-                     where ptype = 'gooey_blob');--/*--=== internals-*/--create function distance(int, int, int, int) returns float(24) as $$-  select (point($1, $2) <-> point($3, $4))::float(24) as result;-$$ language sql immutable;--create view board_ranges as---iterate x,y over each square on board---  iterate d over 0 to 20---    iterate tx,ty over each square on board---      include x,y,d, tx, ty iff d(x,y,tx,ty) < d---so: we include squares <= to the range, not just squares at that---range--  select * from generate_series(0, 14) as x-                cross join generate_series(0, 9) as y-                cross join generate_series(1, 20) as range-                cross join generate_series(0, 14) as tx-                cross join generate_series(0, 9) as ty-  where-    --slightly hacky, we never need the centre square to be included so-    --exclude it here even though it's not quite mathematically correct-    (x,y) != (tx,ty) and-    distance(x,y,tx,ty) - 0.5 <= range; --round to closest int--select set_module_for_preceding_objects('squares_valid');----this view contains all the squares with no pieces in them-create view empty_squares as-  select x,y from generate_series(0, 14) as x-                cross join generate_series(0, 9) as y-  except-  select x,y from pieces;---- this view contains all the squares containing corpses and nothing else-create view corpse_only_squares as-  select x,y from pieces_on_top-    natural inner join dead_monster_pieces;----empty or corpse only doubles as the list of squares moveable to---either by walking or flying-create view empty_or_corpse_only_squares as---empty squares union-  select * from empty_squares-  union-  select * from corpse_only_squares;---- this view contains all the squares which are exactly one square--- away from a tree (doesn't include the tree squares themselves)-create view adjacent_to_tree_squares as-  select tx as x, ty as y-    from board_ranges-    natural inner join pieces-    where ptype in ('magic_tree', 'shadow_tree')-      and range = 1;----create view empty_and_not_adjacent_to_tree_squares as-  select * from empty_squares-  except-  select * from adjacent_to_tree_squares;----this view contains squares which the 'top piece' is attackable-create view attackable_squares as-  select x,y from attackable_pieces-    natural inner join pieces_on_top;----this view contains squares which the 'top piece' is a creature-create view creature_on_top_squares as-  select x,y from creature_pieces-  natural inner join pieces_on_top;----this view contains squares which the 'top piece' is a monster-create view monster_on_top_squares as-  select x,y from monster_pieces-  natural inner join pieces_on_top;---- this view contains all the squares which are valid for the--- different spell target categories. Doesn't take into account range-create view spell_valid_squares as-  select 'empty' as valid_square_category, *-    from empty_squares-  union-  select 'empty_or_corpse_only' as valid_square_category, *-    from empty_or_corpse_only_squares-  union-  select 'attackable' as valid_square_category, *-    from attackable_squares-  union-  select 'creature_on_top' as valid_square_category, *-    from creature_on_top_squares-  union-  select 'monster_on_top' as valid_square_category, *-    from monster_on_top_squares-  union-  select 'corpse_only' as valid_square_category, *-    from corpse_only_squares-  union-  select 'empty_and_not_adjacent_to_tree' as valid_square_category, *-    from empty_and_not_adjacent_to_tree_squares;----this view contains all the squares which would be valid---for the current wizard's current spell, not taking into---account the wizard's position and the spell's range.-create view current_wizard_spell_type_squares as-  select x,y from wizard_spell_choices-       inner join current_wizard_table on (wizard_name = current_wizard)-       natural inner join spell_valid_square_types-       natural inner join spell_valid_squares;----rewrote joining to board_ranges as a where for speed purposes-create view current_wizard_spell_range_squares as-  select tx as x, ty as y-  from board_ranges-  where (x,y,range) =-       (select x, y, range-          from pieces-          inner join current_wizard_table-            on (allegiance = current_wizard)-          inner join wizard_spell_choices-            on (wizard_name = current_wizard)-          natural inner join spell_ranges-          where ptype = 'wizard');----this view contains all the squares which are valid targets--- for the current wizard's current spell---taking into account the spell target category, the wizard's---position and the range, i.e. the final product---this is directly used in action valid during spell casting-create view current_wizard_spell_squares as-  select * from current_wizard_spell_type_squares-  intersect-  select * from current_wizard_spell_range_squares-  except-  select x, y from pieces-    inner join current_wizard_table-    on (allegiance = current_wizard) where ptype='wizard';--/*-create a view containing all the squares the selected piece-could move to if they had unlimited speed-*/-create view selected_piece_move_squares as-  select x,y from empty_or_corpse_only_squares-  union-  select x,y from pieces-  natural inner join-    (select ptype from enterable_piece_types-       where (select ptype='wizard' from selected_piece)-     union-     select ptype from ridable_prototypes-       where (select ptype='wizard' from selected_piece)) as a-  where allegiance = (select allegiance from selected_piece);---- = all squares range one from piece, which--- dont contain anything but-create view selected_piece_walk_squares as-  select x,y from-    selected_piece_move_squares-  intersect---adjust for 1 square away from selected piece:---get the ranges-  select tx as x, ty as y from board_ranges-    natural inner join selected_piece-    natural inner join pieces---restrict to 1 range---exclude flying creatures-    where range = 1--      and not (select flying or engaged-               from creature_pieces-               natural inner join selected_piece)--- only if the selected piece has squares left to walk-    and get_remaining_walk() > 0;--create view squares_within_selected_piece_flight_range as-  select tx as x, ty as y from board_ranges-  natural inner join selected_piece-  natural inner join creature_pieces-  where flying and range <= speed;----this view is the analogue of selected_piece_walk_squares--- for flying creatures-create view selected_piece_fly_squares as-select x,y from selected_piece_move_squares-intersect-select x,y from squares_within_selected_piece_flight_range--- only if the selected piece hasn't moved-  where (select move_phase from selected_piece) = 'motion';--create view selected_piecexy as-  select * from selected_piece-  natural inner join pieces;----create view selected_piece_shootable_squares as---  select x,y from pieces_on_top---  natural inner join attackable_pieces;--create function is_equipped(text) returns boolean as $$--  select magic_sword or magic_knife or magic_bow-    from wizards where wizard_name = $1;--$$ language sql stable;--create view selected_piece_attackable_squares as-  select x,y from pieces_on_top t-  natural inner join pieces_mr p-  cross join selected_piece s-  where physical_defense is not null-    and p.allegiance <> s.allegiance-    and p.allegiance <> 'dead'-  --wizards can't attack magic trees but monsters can-    and not (p.ptype='magic_tree' and s.ptype='wizard')--/*--logic isn't quite right - a wizard can only attack undead with the-magic weapon so e.g. they shouldn't be able to attack h2h if they only-have a magic bow--*/-     and (not coalesce(undead,false)-          or coalesce((select coalesce(undead,false) from pieces_mr-                        natural inner join selected_piece), false)-          or coalesce(s.ptype = 'wizard'-                      and is_equipped(s.allegiance), false));--create view selected_piece_walk_attack_squares as-  select x,y from selected_piece_attackable_squares-  intersect-  select tx,ty from board_ranges r-    natural inner join selected_piecexy-    where range = 1-      and move_phase in ('motion','attack');--create view selected_piece_fly_attack_squares as-  select x,y from selected_piece_attackable_squares-  natural inner join squares_within_selected_piece_flight_range-  where (select move_phase from selected_piece) = 'motion';--create view selected_piece_in_range_squares as-  select tx as x, ty as y from board_ranges b-  natural inner join ranged_weapon_pieces s-  natural inner join selected_piece-  where b.range <= s.range;--create view selected_piece_ranged_attackable_squares as-  select x,y from selected_piece_attackable_squares-  natural inner join selected_piece_in_range_squares;--/*-this view lists all the squares which have pieces which can be-selected. It is empty when:-  not in move phase-  there is a currently selected piece-  the current wizard has no pieces left to select-the pieces to move only has entries for- the current wizard who's moving, else it's empty- so only need to switch the contents dependant on- whether there is a selected piece or not-*/--create view selectable_pieces as-  select * from-    (select row_number() over (partition by (x,y) order by sp) as rn, *-       from selectable_pieces_with_priorities-       natural inner join pieces_to_move-       where not exists(select 1 from selected_piece)-    ) as s where rn = 1;-----  select distinct on (x,y) * from selectable_pieces_with_priorities---  natural inner join pieces_to_move---  where not exists(select 1 from selected_piece)---  order by x,y,sp;--/*-=== valid actions--The end result: two relvars, one with x,y,-to list all the valid actions at any time.-*/-create view valid_target_actions as-select * from (---target spells-select x,y, 'cast_target_spell'::text as action-  from current_wizard_spell_squares-  where get_turn_phase() = 'cast'---selecting a piece-union-select x,y,action from (-select x,y, 'select_piece_at_position':: text as action-  from selectable_pieces---walking-union-select x,y, 'walk'::text as action-  from selected_piece_walk_squares---flying-union-select x,y, 'fly'::text as action-  from selected_piece_fly_squares---attacking-union-select x,y, 'attack'::text as action-  from selected_piece_walk_attack_squares---fly attacking-union-select x,y, 'attack'::text as action-  from selected_piece_fly_attack_squares---shooting-union-select x,y, 'ranged_attack'::text as action-  from selected_piece_ranged_attackable_squares-)as s1-where get_turn_phase()='move'-) as s-where not exists (select 1 from game_completed_table);--create function current_wizard_replicant() returns bool as $$-  select computer_controlled from wizards-    inner join current_wizard_table-      on wizard_name=current_wizard;-$$ language sql stable;--/*-create a view with the choose spell predicates automatically-*/--create view valid_activate_actions as-select * from (---next_phase - always valid-select 'next_phase'::text as action---choose spell - need one for each spell, add programmatically---set imaginary-union-select 'set_imaginary'::text as action-  from monster_spells-  where get_current_wizard_spell() is not null-    and spell_name = get_current_wizard_spell()---set real-union-select 'set_real'::text as action-  from monster_spells-  where get_current_wizard_spell() is not null-    and spell_name = get_current_wizard_spell()---cast activate spell-union-select 'cast_activate_spell'::text as action-  where exists (select 1-         from current_wizard_spell-         natural inner join activate_spells-         where get_turn_phase() = 'cast')-      or (select spell_name ='magic_wood'-          from current_wizard_spell-          where get_turn_phase() = 'cast')---skip spell---union---select 'skip_spell'::text as action---  where get_turn_phase() = 'cast'---unselect-union-select 'unselect_piece'::text as action-  from selected_piece---next subphase-union-select 'cancel'::text as action-  from selected_piece-union-/*--generate a separate choose action wrapper for each spell--without this, we can add a general choose spell action but then we-first check if the current player can choose a spell at this time, and-then check if they have the particular spell they are trying to-choose.--By creating these simple wrappers, we can check both at once, and also-the ui has one simple test to see if a spell choice action is valid-instead of two stages.--*/-select 'choose_' || spell_name || '_spell'::text as action-  from spell_books where wizard_name = get_current_wizard()-  and get_turn_phase()='choose'-union-select 'choose_no_spell'::text as action-  from turn_phase_table where turn_phase ='choose'-union-select 'ai_continue'-  from wizards-  inner join current_wizard_table-    on wizard_name = current_wizard-    where computer_controlled-) as a-where not exists (select 1 from game_completed_table);--/*-==== internals-provide shortcut functions to check if an action can be run using-these views--*/-create function check_can_run_action(action_name text) returns void as $$-begin-  if not exists (select 1 from valid_activate_actions-     where action = action_name) then-    raise exception 'cannot run % here', action_name;-  end if;-end;-$$ language plpgsql stable;--create function check_can_run_action(action_name text, px int, py int)-  returns void as $$-begin-  if not exists (select 1 from valid_target_actions-     where action = action_name and (x,y) = (px,py)) then-    raise exception 'cannot run % on %,% here', action_name, px, py;-  end if;-end;-$$ language plpgsql stable;--/*-== next phase--next phase strings the enter and exits all together in the right order-and provides a simple API for clients--there seems to be some nomenclaturic confusion as to whether a single-phase is all wizards choosing, or all casting, or all moving, or if-it's one wizard casting, i.e. whether there are 3 (choose, cast, move,-or 4 including autonomous) phases per turn or roughly 3 * number of-live wizards ( + 1 for autonomous) phases per turn.--Next_phase implies each wizard is a new phase, but sometimes e.g. the-whole of the cast phase for all wizards is refered to as the phase or-a phase...?--*/----select create_var('dont_nest_ai_next_phase', 'bool');---select set_relvar_type('dont_nest_ai_next_phase_table', 'stack');--create function action_next_phase() returns void as $$-declare-  c int;-  next_phase_again boolean := false;-begin-/*-=== check for game completion-*/-  if (exists (select 1 from game_completed_table)) then-    return;-  end if;-  --check for win or draw-  c := (select count(1) from wizards-         where not expired);-  if c = 1 then --someone has won-    perform game_completed();-    update current_wizard_table set current_wizard =-      (select wizard_name from wizards where not expired);-    perform add_history_game_won();-    return;-  elseif c = 0 then --game is drawn-    perform game_completed();-    perform add_history_game_drawn();-    delete from current_wizard_table;-    return;-  end if;--/*-=== current wizard clean up phase--If the user selects next phase when they have a spell to cast, then we-want to call the usual skip spell action so as not to duplicate the-work. But skip spell will call next_phase itself automatically and we-don't want to do two next phases, so if there is a spell to be-skipped, run that and don't run the rest of the next_phase function-since it will be called via skip spell.--*/-    -- if the current spell isn't completed, then skip it-  if exists(select 1 from wizard_spell_choices-       inner join current_wizard_table-       on (current_wizard = wizard_name)-       where get_turn_phase() = 'cast') then-    perform skip_spell();-    return;-  end if;--  --multiple update hack to get round constraints-  update in_next_phase_hack_table-    set in_next_phase_hack = true;--  --complete current phase:-  if (select turn_phase = 'move' from turn_phase_table) then-    delete from pieces_to_move;-  end if;--/*-=== all wizards clean up phase--clean up if this is the last wizard for this phase, then move to next-phase, if this is autonomous, then do it and move to move phase this-works because all the end phase stuff happens before the autonomous-phase is run in this function, and all the setup runs after it is run.--*/--  if is_last_wizard() then-    --clear the cast alignment which is used to adjust the world-    --alignment when a spell is cast-    if get_turn_phase() = 'cast' then-      delete from cast_alignment_table;-    end if;--    --if this is the end of the move phase then we're on the next turn-    if (select turn_phase = 'move' from turn_phase_table) then-      update turn_number_table-        set turn_number = turn_number + 1;-      perform add_history_new_turn();-    end if;--    --move to the next turn phase-    update turn_phase_table-      set turn_phase = next_turn_phase(turn_phase);--    if (select turn_phase = 'autonomous' from turn_phase_table) then-      perform do_autonomous_phase();-      update turn_phase_table-        set turn_phase = next_turn_phase(turn_phase);-    end if;-  end if;--/*-=== init new current phase-*/-  -- move to the next wizard, this is the meat of this function-  update current_wizard_table-    set current_wizard = next_wizard(current_wizard);--  --setup the cast alignment table if this is the start of the cast-  --phases-  if get_turn_phase() = 'cast' and is_first_wizard() then-    insert into cast_alignment_table values(0);-  end if;--  --initialise the spell for this phase-  if (select turn_phase = 'cast' from turn_phase_table) then-    if exists(select 1 from current_wizard_spell) then-      insert into spell_parts_to_cast_table-        select coalesce(num, 0) from spells_with_num_shots-        natural inner join current_wizard_spell;-      insert into cast_success_checked_table values (false);-    else-      --skip to the next phase automatically-      next_phase_again := true;-    end if;-  elseif (select turn_phase = 'move' from turn_phase_table) then-    insert into pieces_to_move-      select ptype, allegiance, tag-        from moving_pieces-        inner join current_wizard_table-        on allegiance = current_wizard;-  end if;--  --finished our updates for this next phase-  update in_next_phase_hack_table-    set in_next_phase_hack = false;--  perform add_history_wizard_up();-/*-=== continue-*/-  --if there is nothing to do in the new current phase - continue to-  --next phase automatically-  if next_phase_again then-    perform action_next_phase();-  end if;-end;-$$ language plpgsql volatile;--/*-=== internals-*/-create function is_last_wizard() returns boolean as $$-begin-  return ((select place from live_wizards-        natural inner join current_wizard)-     = (select max(place) from live_wizards));-end;-$$ language plpgsql stable;--create function is_first_wizard() returns boolean as $$-begin-  return ((select place from live_wizards-       natural inner join current_wizard)-     = (select min(place) from live_wizards));-end;-$$ language plpgsql stable;--/*-== spell choice--*/-create function action_choose_spell(vspell_name text)-  returns void as $$-begin-  --create the argumentless action name so we can check the action-  --valid table-  perform check_can_run_action('choose_' || vspell_name || '_spell');--  --do nothing if this is the same as the currently selected spell-  if (select spell_name from wizard_spell_choices-            where wizard_name = get_current_wizard()) = vspell_name then-    null;-  else-    --if wizard already has a chosen spell then remove it-    delete from wizard_spell_choices_mr-      where wizard_name = get_current_wizard();-    insert into wizard_spell_choices_mr (wizard_name, spell_name)-        values-      (get_current_wizard(), vspell_name);-    ---    -- set imaginary to false if this is a monster spell-    if exists(select 1 from monster_spells-      where spell_name = vspell_name) then-      update wizard_spell_choices_mr-        set imaginary = false-        where wizard_name = get_current_wizard();-    else-      update wizard_spell_choices_mr-        set imaginary = null-        where wizard_name = get_current_wizard();-    end if;-  end if;-  perform add_history_choose_spell();-end;-$$ language plpgsql volatile;--create function action_choose_no_spell() returns void as $$-begin-  perform check_can_run_action('choose_no_spell');-  delete from wizard_spell_choices_mr where wizard_name = get_current_wizard();-end;-$$ language plpgsql volatile;--create function action_set_imaginary() returns void as $$-begin-  perform check_can_run_action('set_imaginary');-  update wizard_spell_choices_mr-    set imaginary = true-    where wizard_name = get_current_wizard();-end;-$$ language plpgsql volatile;--create function action_set_real() returns void as $$-begin-  perform check_can_run_action('set_real');-  update wizard_spell_choices_mr-    set imaginary = false-    where wizard_name = get_current_wizard();-end;-$$ language plpgsql volatile;-/*-=== internals-generate the individual spell choice actions--*/-create function generate_spell_choice_actions() returns void as $$-declare-  sn text;-  s text;-begin-  for sn in select spell_name from spells loop-  s := $a$-create function action_choose_$a$ || sn || $a$_spell() returns void as $b$-begin-  perform check_can_run_action('choose_$a$ || sn || $a$_spell');-  perform action_choose_spell('$a$ || sn || $a$');-end;-$b$ language plpgsql volatile;-$a$;-  execute s;-  end loop;-end;-$$ language plpgsql volatile;--select generate_spell_choice_actions();-drop function generate_spell_choice_actions();--/*-== cast spells-*/-create function skip_spell() returns void as $$-begin-  perform add_history_spell_skipped();-  perform spend_current_wizard_spell();-end;-$$ language plpgsql volatile;--create function action_cast_target_spell(px int, py int) returns void as $$-declare-  vspell_name text;-begin-  perform check_can_run_action('cast_target_spell', px, py);-  perform add_history_attempt_target_spell(px,py);--  if not check_spell_success() then-    return;-  end if;--  if exists(select 1 from current_wizard_spell-      natural inner join monster_spells) then-    perform cast_monster_spell(px, py);-  else--    select into vspell_name spell_name from current_wizard_spell;-    if vspell_name = 'disbelieve' then-      if not cast_disbelieve(px, py) then-        return;-      end if;-    elseif vspell_name = 'subversion' then-      if not cast_subversion(px, py) then-        return;-      end if;-    elseif vspell_name = 'raise_dead' then-      perform cast_raise_dead(px, py);-    elseif vspell_name in ('decree', 'justice', 'vengeance', 'dark_power') then-      perform cast_decree_spell(px, py);-    elseif vspell_name in ('lightning', 'magic_bolt') then-      perform cast_ballistic_spell(px, py);-    elseif vspell_name in ('shadow_wood',-      'magic_fire', 'gooey_blob', 'wall',-      'magic_castle', 'dark_citadel') then-      perform cast_object_spell(px, py);-    else-      raise exception 'unrecognised target spell %', vspell_name;-    end if;-  end if;-  --todo: only update alignment once per spell-  perform update_alignment_from_cast();--  update spell_parts_to_cast_table-    set spell_parts_to_cast = spell_parts_to_cast - 1;-  if get_spell_parts_to_cast() = 0 then-    perform spend_current_wizard_spell();-  end if;-end;-$$ language plpgsql volatile;--create function action_cast_activate_spell() returns void as $$-begin-  perform check_can_run_action('cast_activate_spell');---  perform check_can_cast_spell_now();-  perform add_history_attempt_activate_spell();-  if not check_spell_success() then-    return;-  end if;-  --call the appropiate function to handle the spell-  if (select spell_category = 'wizard' from spells-      natural inner join current_wizard_spell) then-    perform action_cast_wizard_spell(get_current_wizard(),-      get_current_wizard_spell());-  elseif exists(select 1 from spells-      natural inner join current_wizard_spell-      where spell_name in('law', 'chaos', 'large_law',-      'large_chaos')) then-    perform cast_lawchaos();-  elseif (select spell_name='turmoil' from current_wizard_spell) then-    perform cast_turmoil();-  elseif (select spell_name='magic_wood' from current_wizard_spell) then-    perform cast_magic_wood();-  else-    raise exception 'unrecognised activate spell: %',-      (select spell_name from current_wizard_spell);-  end if;-  perform update_alignment_from_cast();-  perform spend_current_wizard_spell();-end;-$$ language plpgsql volatile;---/*-=== internals--*/-create function spend_current_wizard_spell() returns void as $$-begin-  --remove current wizard's spell from spell book-  --make sure we only remove one shot of the spell-  --don't remove disbelieve-  update spell_choice_hack_table-    set spell_choice_hack = true;--  delete from spell_parts_to_cast_table;-  delete from cast_success_checked_table;--  delete from spell_books where id =-    (select id from spell_books-       natural inner join wizard_spell_choices-       where wizard_name = get_current_wizard()-         and spell_name != 'disbelieve'-         limit 1);-  -- and wipe it from the wizard_spell_choices_table-  delete from wizard_spell_choices_mr-    where wizard_name = get_current_wizard();--  update spell_choice_hack_table-    set spell_choice_hack = false;--  --auto move to next wizard-  perform action_next_phase();-end;-$$ language plpgsql volatile;--create view spell_cast_chance as-  select spell_name, base_chance as chance from-    --all spells if world is neutral, neutral spells unirregardless-    -- of world alignment-    (select spell_name, sign(alignment) as salign, base_chance,-      'neutral' as alignment from spells-    union-    --world alignment same as spell alignment-    --  proportionately more easy-    select spell_name, sign(alignment) as salign,-      limit_chance(base_chance + (@ get_world_alignment()) * 10),-      'same' as alignment from spells-    union-    --world alignment opposite, spell slightly harder-    select spell_name, sign(alignment) as salign,-      limit_chance(base_chance - 10),-      'opposite' as alignment from spells) as a-  where (salign = 0 and alignment = 'neutral') --neutral spells always-                                               --same alignment-    or (sign(get_world_alignment()) = 0 and alignment = 'neutral')-    or (sign(get_world_alignment()) = 1 and --world law-          ((salign = 1 and alignment = 'same') --law spells benefit-            or salign = -1 and alignment = 'opposite'))-    or (sign(get_world_alignment()) = -1 and -- world chaos-          ((salign = -1 and alignment = 'same') --chaos spells benefit-            or salign = 1 and alignment = 'opposite'));--create function spell_cast_chance(text) returns integer as $$-  select chance from spell_cast_chance where spell_name = $1;-$$ language sql stable;--create function action_cast_wizard_spell(-       pwizard_name text, spell_name text)-  returns void as $$-begin-  --todo: update stats-  if spell_name = 'magic_armour' then-      update wizards-        set magic_armour = true-        where wizard_name = pwizard_name;-  elseif spell_name = 'magic_shield' then-      update wizards-        set magic_shield = true-        where wizard_name = pwizard_name;-  elseif spell_name = 'magic_knife' then-      update wizards-        set magic_knife = true-        where wizard_name = pwizard_name;-  elseif spell_name = 'magic_sword' then-      update wizards-        set magic_sword = true-        where wizard_name = pwizard_name;-  elseif spell_name = 'magic_bow' then-      update wizards-        set magic_bow = true-        where wizard_name = pwizard_name;-  elseif spell_name = 'magic_wings' then-    update wizards set magic_wings = true-      where wizard_name = pwizard_name;-  elseif spell_name = 'shadow_form' then-      update wizards-        set shadow_form = true-        where wizard_name = pwizard_name;-  else-    raise exception 'unrecognised wizard spell %', spell_name;-  end if;-  perform add_history_spell_succeeded();-end;-$$ language plpgsql volatile;--create function cast_lawchaos() returns void as $$-begin-  --don't need to do anything, the effect is-  --restricted to the alignment effect which-  --is handled in the same place for all spells-  perform add_history_spell_succeeded();-end;-$$ language plpgsql volatile;--create function cast_turmoil() returns void as $$-declare-  r record;-  s record;-  tx int;-  ty int;-begin-  --algorithm: similar to the original chaos I think-  -- run through each square in turn, starting at top-  --left across top then along each row till you get to the-  --bottom right-  --move all the pieces in a square to a new random empty-  --square at the time of the move (so if pieces on the-  --same square as each other before turmoil is cast-  --will still be on the same square as each other-  --afterwoods. (since we do one square at a time we-  -- won't get exact random distribution).--  -- the for loop does actually save the full query-  -- at the start so updates in the for loop are not-  -- seen by the for loop so there is no risk of a-  -- piece teleporting twice-  for r in select x,y from pieces_on_top order by x,y loop-    select x,y into tx,ty from empty_squares order by random() limit 1;-    update pieces set x = tx, y = ty-      where (x,y) = (r.x,r.y);-    --add histories-/*    for s in select ptype, allegiance, tag-      from pieces where x = tx and y = ty loop--  perform einsert(array['action_history',-    'action_history_piece_teleport'],-    array['history_name', 'ptype', 'allegiance', 'tag'],-    array['piece teleport', s.ptype, s.allegiance, s.tag::text]);-    end loop;*/-  end loop;-  perform add_history_spell_succeeded();-end;-$$ language plpgsql volatile;--create function cast_decree_spell(px int, py int) returns void as $$-declare-  r piece_key;-  m int;--begin-  --if cast on wizard then success destroys all wizards objects-  --else if cast on monster then success destroys monster-  --get target magic defense-  --todo: should this take into account the spell/attack?-  m := (select magic_defense-        from pieces_on_top-        natural inner join magic_attackable_pieces-        where (x,y)=(px,py));--  if not check_random_success('resist', m * 10) then-    select into r ptype, allegiance, tag-      from pieces_on_top-      where (x,y)=(px,py);-    if r.ptype = 'wizard' then-      for r in select ptype, allegiance, tag from pieces-        where allegiance = r.allegiance and ptype != 'wizard' loop-        perform disintegrate(r);-      end loop;-    else-      perform disintegrate(r);-    end if;-    perform add_history_spell_succeeded();-  end if;-end;-$$ language plpgsql volatile;--create function cast_ballistic_spell(px int, py int) returns void as $$-declare-  r piece_key;-begin-  --todo: should factor in the attack strength?-  if not check_random_success('resist',-      (select physical_defense * 10-       from pieces_on_top_view-       where (x,y) = (px,py))) then-    --need to added the chinned history before the-    --piece is killed or we loose the allegiance-    --need to add the spell successful before the-     --chinned history or the order is wrong-    perform add_history_spell_succeeded();-    perform add_chinned_history(px,py);-    select into r ptype,allegiance,tag-      from pieces_on_top-      where (x,y) = (px,py);-    perform kill_piece(r);-  else-    --spell didn't do any damage-    perform add_history_spell_succeeded();-    perform add_history_shrugged_off(px, py);-  end if;-end;-$$ language plpgsql volatile;--create function cast_raise_dead(px int, py int) returns void as $$-declare-  r piece_key;-begin-  --turn dead creature on square to live undead-  select into r ptype,allegiance,tag-    from pieces_on_top-    where (x,y) = (px,py);-  update pieces-    set allegiance = get_current_wizard(),-        tag = get_next_tag(r.ptype,get_current_wizard())-    where (ptype,allegiance,tag)::piece_key = r-    returning tag into r.tag;-  insert into crimes_against_nature (ptype,allegiance,tag)-    values (r.ptype,get_current_wizard(),r.tag);-  perform add_history_spell_succeeded();-end;-$$ language plpgsql volatile;--create function cast_subversion(px int, py int) returns boolean as $$-declare-  r piece_key;-begin-    if check_random_success('resist',-      (select magic_defense * 10-        from pieces_on_top_view-        where (x,y) = (px, py))) then-    perform add_history_shrugged_off(px, py);-    perform action_cast_failed();-    return false;-  end if;-  select into r ptype,allegiance,tag from pieces_on_top-    where (x,y) = (px, py);-  update pieces-    set allegiance = get_current_wizard(),-        tag = get_next_tag(r.ptype,get_current_wizard())-    where (ptype,allegiance,tag)::piece_key = r;-  perform add_chinned_history(px, py);-  perform add_history_spell_succeeded();-  return true;-end;-$$ language plpgsql volatile;--create function cast_disbelieve(px int, py int) returns boolean as $$-declare-  r piece_key;-begin-  if not (select imaginary from pieces_on_top_view where (x,y) = (px,py)) then-    perform add_history_shrugged_off(px, py);-    perform action_cast_failed();-    return false;-  end if;-  select into r ptype, allegiance, tag-    from pieces_on_top_view where (x,y) = (px,py);--  perform add_history_spell_succeeded();-  perform add_chinned_history(px, py);-  perform disintegrate(r);-  return true;-end;-$$ language plpgsql volatile;--create function cast_object_spell(px int, py int) returns void as $$-begin-  perform create_object(-    (select ptype from current_wizard_spell-     natural inner join summon_spells),-     get_current_wizard(), px, py);-  perform add_history_spell_succeeded();-end;-$$ language plpgsql volatile;---create function cast_monster_spell(x int, y int) returns void as $$-begin-  perform create_monster(-    (select ptype from current_wizard_spell-      natural inner join summon_spells),-    get_current_wizard(), x, y, coalesce((-      select imaginary-      from wizard_spell_choices_imaginary-      where wizard_name = get_current_wizard()),false));-  perform add_history_spell_succeeded();-end;-$$ language plpgsql volatile;--create function check_spell_success() returns boolean as $$-begin-  -- if already checked then return true-  if (select cast_success_checked-    from cast_success_checked_table) then-    return true;-  end if;--  -- if imaginary monster then always succeed-  if (select coalesce(imaginary, false)-    from wizard_spell_choices_mr-    natural inner join current_wizard) then-    return true;-  end if;--  if not check_random_success('cast',-       (select chance-        from spell_cast_chance-        natural inner join current_wizard_spell)) then-     perform action_cast_failed();-     return false;-  else-     update cast_success_checked_table-       set cast_success_checked = true;-     return true;-  end if;-end;-$$ language plpgsql volatile;--create function update_alignment_from_cast() returns void as $$-begin-  update cast_alignment_table-    set cast_alignment = cast_alignment +-      (select alignment from spells-        natural inner join current_wizard_spell);-  perform adjust_world_alignment();-end;-$$ language plpgsql volatile;--create function action_cast_failed() returns void as $$-begin-  perform add_history_spell_failed();-  perform spend_current_wizard_spell();-end;-$$ language plpgsql volatile;---create table cast_magic_wood_squares (-  x int,-  y int,-  unique (x,y)-);-select set_relvar_type('cast_magic_wood_squares', 'stack');--create view adjacent_to_new_tree_squares as-  select tx as x, ty as y from-    board_ranges natural inner join-    cast_magic_wood_squares-    where range = 1;----take into account range, line of sight,---atm only takes into account empty squares---and trees cannot be next to each other-create view cast_magic_wood_available_squares as-select * from empty_and_not_adjacent_to_tree_squares-except select * from adjacent_to_new_tree_squares;--create type ipos as (-  index int,-  x int,-  y int-);-create function get_square_range(x int, y int, range int)-  returns setof ipos as $$-declare-  p ipos;-begin-  p.index := 0;-  if range < 1 then-    return;-  end if;-  --top row-  p.y = y - range;-  for i in 0 .. (range * 2) loop-    p.x = x - range + i;-    return next p;-    p.index := p.index + 1;-  end loop;-  --sides-  for i in 1 .. (range * 2 + 1) - 2 loop-    p.x = x - range;-    p.y = y - range + i;-    return next p;-    p.index := p.index + 1;-    p.x = x + range;-    return next p;-    p.index := p.index + 1;-  end loop;-  --bottom row-    p.y = y + range;-  for i in 0 .. (range * 2) loop-    p.x = x - range + i;-    return next p;-    p.index := p.index + 1;-  end loop;-end;-$$ language plpgsql immutable;---  /*-  idea is to create a view with all the valid squares in it-  and to start with a square series of squares 1 square away from-  the wizard:-   XXX-   XWX-   XXX-  starting with the top left one, cast trees in the available squares-  then move to 2 squares away:-   XXXXX-   X...X-   X.W.X-   X...X-   XXXXX-  and keep going until we are at the range of the spell (if-  the view takes the range into account then we keep going-  to max(width of board, height of board) if this isn't too slow-  pos_in_square is used to track which square we are looking at e.g.-  at range one:-   123-   4W5-   678-  range two-   12345-   6...7-   8.W.9-   0...1-   23456-   (the 012346 on the second to last and last rows-     represent 10,11,12,13,14,15,16-  */--create function cast_magic_wood() returns void as $$-declare-  casted int;-  range int;-  pos_in_square int;-  max_pos_in_square int;-  wx int;-  wy int;-  r record;-  s text;-begin-  casted := 0;-  range := 1;-  pos_in_square := 0;-  max_pos_in_square := 7;-  wx := (select x from pieces-     where ptype = 'wizard'-     and allegiance = get_current_wizard());-  wy := (select y from pieces-     where ptype = 'wizard'-     and allegiance = get_current_wizard());--  while (casted < 8 and range <= 15) loop-    select into r * from get_square_range(wx, wy, range)-      where index = pos_in_square;---    s := 'checking ' || ip.x || ',' || ip.y;-    if exists(select 1 from cast_magic_wood_available_squares-       where (x,y) = (r.x, r.y)) then-       insert into cast_magic_wood_squares(x,y) values (r.x, r.y);-       casted := casted + 1;-    else-      null;-    end if;-    if pos_in_square = max_pos_in_square then-      range := range + 1;-      pos_in_square = 0;-      max_pos_in_square = (select max(index) from get_square_range(0,0,range));-    else-      pos_in_square := pos_in_square + 1;-    end if;-  end loop;-  for r in select * from cast_magic_wood_squares loop-    perform create_object(-      'magic_tree', get_current_wizard(), r.x, r.y);-  end loop;-  delete from cast_magic_wood_squares;-  perform add_history_spell_succeeded();-end;-$$ language plpgsql volatile;---/*-== move-Individual Piece move notes-A piece may be 'selected' iff it can move or attack or has a ranged attack.--Once a piece is selected it must first move, then attack, then ranged-attack (skipping bits which don't apply).--The piece can forfeit any part of this (and can choose to move only-part of it's move if walking).--The parts must be in this strict order.--If a piece is unselected before it has moved or done anything then it-remains able to move this turn otherwise its move is over for this-turn.--=== selection and subphase-*/--create function select_piece(pk piece_key) returns void as $$-declare-  nextp text;-  p pos;-begin-  nextp:= piece_next_subphase('start', false, 'none', pk);-  if nextp = 'end' then-    --nothing to do-    delete from pieces_to_move-      where (ptype, allegiance, tag)::piece_key = pk;-    if not exists(select 1 from pieces_to_move) then-      perform action_next_phase();-    end if;-    return;-  end if;-  insert into selected_piece (ptype, allegiance, tag, move_phase, engaged) values-    (pk.ptype, pk.allegiance, pk.tag, nextp, false);--  if nextp = 'motion' and-       exists(select 1 from selected_piece-              natural inner join creature_pieces-              where not flying) then-    update remaining_walk_hack_table-      set remaining_walk_hack = true;-    insert into remaining_walk_table-      select speed from creature_pieces-        natural inner join selected_piece;-    update remaining_walk_hack_table-      set remaining_walk_hack = false;-    perform check_engaged();-  end if;-end;-$$ language plpgsql volatile;-----short cut for interface---this fails silently if the action is not valid---client may wrap this in select piece at cursor, but the---server doesn't require that the client iface uses a cursor-create function action_select_piece_at_position(vx int, vy int)-  returns void as $$-declare-  r piece_key;-begin-  perform check_can_run_action('select_piece_at_position', vx,vy);-  select into r ptype,allegiance, tag from selectable_pieces-         where (x,y) = (vx,vy);-  perform select_piece(r);-end;-$$ language plpgsql volatile;--create function action_unselect_piece() returns void as $$-begin-  perform check_can_run_action('unselect_piece');-  --remove piece from pieces to move-  delete from pieces_to_move where (ptype, allegiance, tag) =-    (select ptype, allegiance, tag from selected_piece);-  --empty selected piece, squares left_to_walk-  update remaining_walk_hack_table-    set remaining_walk_hack = true;-  delete from selected_piece;-  delete from remaining_walk_table;-  update remaining_walk_hack_table-    set remaining_walk_hack = false;-  --if there are no more pieces that can be selected then move to next-  --phase automatically, todo: take into account monsters in blob-  if not exists(select 1 from pieces_to_move) then-    perform action_next_phase();-  end if;--  --insert history-end;-$$ language plpgsql volatile;--create function action_cancel() returns void as $$-begin-  perform check_can_run_action('cancel');-  perform do_next_move_subphase(true,'none');-end;-$$ language plpgsql volatile;-/*-==== internals-*/-create function do_next_move_subphase(skip_attack boolean, phase_done text)-    returns void as $$-declare-  r record;-  nextp text;-begin-  if not exists (select 1 from selected_piece) then-    return;-  end if;-  select into r * from selected_piece-    natural inner join pieces;-  nextp := piece_next_subphase((select move_phase from selected_piece),-             skip_attack, phase_done, (r.ptype, r.allegiance, r.tag)::piece_key);-  if r.move_phase = 'motion' then-    update remaining_walk_hack_table-      set remaining_walk_hack = true;-      delete from remaining_walk_table;-    update remaining_walk_hack_table-      set remaining_walk_hack = false;-  end if;--  if nextp = 'end' then-    perform action_unselect_piece();-  else-    update selected_piece set move_phase = nextp;-  end if;-end;-$$ language plpgsql volatile;---/*-=== movement-*/-create function action_walk(px int, py int) returns void as $$-declare-  p pos;-begin-  perform check_can_run_action('walk', px, py);-  select into p x,y from pieces natural inner join selected_piece;-  perform selected_piece_move_to(px, py);-  perform add_history_walked(p.x,p.y);-  if get_remaining_walk() = 0 then-    perform do_next_move_subphase(false, 'motion');-  end if;-end;-$$ language plpgsql volatile;--create function action_fly(px int, py int) returns void as $$-declare-  p pos;-begin-  perform check_can_run_action('fly', px, py);-  select into p x,y from pieces natural inner join selected_piece;-  perform selected_piece_move_to(px, py);-  perform add_history_fly(p.x,p.y);-  perform do_next_move_subphase(false, 'motion');-end;-$$ language plpgsql volatile;--/*-=== attacking-*/-create function action_attack(px int, py int) returns void as $$-declare-  ap piece_key;-  r piece_key;-  att int;-  def int;-begin-  perform check_can_run_action('attack', px, py);--  --if the attacker is a wizard with shadow form, they lose the shadow-  --form when they attack--  att := (select attack_strength-         from attacking_pieces-         natural inner join selected_piece);-  def := (select physical_defense-         from attackable_pieces-         natural inner join pieces_on_top-         where (x,y) = (px,py));--  --check for shadow form--  select into ap ptype, allegiance,tag-    from selected_piece;--  if ap.ptype = 'wizard' and-     exists(select 1 from wizards-            where wizard_name = ap.allegiance-            and shadow_form) then-    update wizards-      set shadow_form = false-      where wizard_name = ap.allegiance;-  end if;--  select into r ptype, allegiance,tag-    from pieces_on_top-    where (x,y) = (px,py);--  perform add_history_attack(r);---  if not check_random_success('attack', max((att - def) * 10 + 50, 10)) then-    --failure-    perform add_history_shrugged_off(r);-    perform do_next_move_subphase(true, 'attack');-    return;-  end if;--  perform add_history_chinned(r);-  perform kill_piece(r);--  --move to the square if walker and square empty-  if exists(select 1 from creature_prototypes-              natural inner join selected_piece)-     and exists(select 1 from selected_piece_move_squares-                where (x,y) = (px,py)) then-    perform selected_piece_move_to(px, py);-  end if;-  perform do_next_move_subphase(true, 'attack');-end;-$$ language plpgsql volatile;--create function action_ranged_attack(px int, py int)-    returns void as $$-declare-  r piece_key;-  att int;-  def int;-begin-  perform check_can_run_action('ranged_attack', px, py);--  att := (select ranged_attack_strength-         from ranged_weapon_pieces-         natural inner join selected_piece);-  def := (select physical_defense-         from attackable_pieces-         natural inner join pieces_on_top-         where (x,y) = (px, py));--  select into r ptype, allegiance,tag-    from pieces_on_top-    where (x,y) = (px, py);--  perform add_history_ranged_attack(r);--  if not check_random_success('ranged_attack', max((att - def) * 10 + 50, 10)) then-    --failure-    perform add_history_shrugged_off(r);-    perform do_next_move_subphase(false, 'ranged_attack');-    return;-  end if;--  perform add_history_chinned(r);-  perform kill_piece(r);-  perform do_next_move_subphase(false, 'ranged_attack');-end;-$$ language plpgsql volatile;--/*-=== internals--subphase progression--skip attack is used to tell this routine to skip the attack sub-phase. this is if either the motion subphase was just cancelled, or if-the piece attacked when it was in the motion subphase--*/--create function piece_next_subphase(-  current_subphase text, skip_attack boolean, just_done text, pk piece_key)-  returns text as $$-declare-  r record;-begin-  select into r x,y from pieces-    where (ptype,allegiance,tag)::piece_key=pk;-  if current_subphase = 'start'-     and just_done='none'-     and exists(select 1 from creature_pieces-                where (ptype,allegiance,tag)::piece_key = pk) then-    return 'motion';-  elseif current_subphase not in ('attack','ranged_attack')-         and not skip_attack-         and just_done not in ('attack', 'ranged_attack')-         and exists(select 1 from attacking_pieces-                where (ptype,allegiance,tag)::piece_key=pk)-         and exists(select 1 from attackable_pieces ap-           natural inner join pieces_on_top-           --want to keep rows where the attack piece is range 1 from-           --the piece in question, so the board range source x,y is the-           --x,y of the piece in question, and the target x,y is the-           --x,y positions of the enemy attackable pieces-           inner join board_ranges b on (b.x,b.y,tx,ty)=(r.x,r.y,ap.x,ap.y)-           where allegiance <> pk.allegiance-             and range = 1) then-    return 'attack';-  elseif current_subphase not in ('ranged_attack')-    and just_done not in ('ranged_attack')-    and exists(select 1 from ranged_weapon_pieces-                where (ptype,allegiance,tag)::piece_key = pk) then-    return 'ranged_attack';-  else-    return 'end';-  end if;-end;-$$ language plpgsql volatile;--create function add_chinned_history(px int, py int) returns void as $$-declare-  r piece_key;-begin-    select into r ptype, allegiance, tag-      from pieces_on_top where (x,y) = (px,py);-    perform add_history_chinned(r);-end;-$$ language plpgsql volatile;--create function add_history_shrugged_off(px int, py int) returns void as $$-declare-  r piece_key;-begin-    select into r ptype, allegiance, tag-      from pieces_on_top where (x,y) = (px,py);-    perform add_history_shrugged_off(r);-end;-$$ language plpgsql volatile;--create function selected_piece_move_to(px int, py int) returns void as $$-begin-  -- this is used to move a piece when it walks/flies and as part of a-  -- successful attack to keep the logic for moving a wizard piece-  -- along with his mount in one place-  if-     --this is a ridable monster-     exists(select 1 from selected_piece-       natural inner join monster_pieces-       where ridable) and-     --there is also a wizard on this square-     exists(select 1-      from (select x,y from pieces-            natural inner join selected_piece) as a-      natural inner join pieces-      where ptype='wizard') then-     -- move the wizard also-    update pieces-      set x = px,-          y = py-      where (ptype,allegiance,tag) =-        (select ptype, allegiance, tag-         from (select x,y from pieces-               natural inner join selected_piece) as a-         natural inner join pieces-         where ptype='wizard');-  end if;--  update pieces-    set x = px,-        y = py-    where (ptype,allegiance,tag) =-      (select ptype,allegiance,tag from selected_piece);--  --todo: if diagonal, reduce by 1.5-  if exists(select 1 from creature_pieces-            natural inner join selected_piece-            where not flying) and-     (select move_phase from selected_piece)='motion' then-    update remaining_walk_table-    set remaining_walk = remaining_walk - 1;-    perform check_engaged();-  end if;--end;-$$ language plpgsql volatile;--create view selected_piece_adjacent_attacking_squares as-  select x,y from pieces_on_top-  natural inner join pieces_mr-  where attack_strength is not null-    and allegiance <> (select allegiance-                       from selected_piece)-    and allegiance <> 'dead'-  intersect-  select tx,ty from board_ranges r-  natural inner join selected_piecexy-  where range = 1;---create function check_engaged() returns void as $$-declare-  ag int;-begin-  if exists(select 1 from selected_piece_adjacent_attacking_squares) then-    select into ag agility from pieces_mr-    natural inner join selected_piece;-    if check_random_success('break_engaged', ag * 10) then-      update selected_piece set engaged = false;-    else-      update selected_piece set engaged = true;-    end if;-  else-    update selected_piece set engaged = false;-  end if;-end;-$$ language plpgsql volatile;---/*-== autonomous-*/--create view wizards_in_trees as-select ptype,allegiance,tag from pieces-  where ptype='wizard'-    and (x,y) in (select x,y from pieces-                  where ptype='magic_tree');--create function do_autonomous_phase() returns void as $$-declare-  r piece_key;-  r1 piece_key;-begin-  --castles-  for r in select ptype,allegiance,tag from pieces-    where ptype in ('magic_castle', 'dark_citadel') loop-    if check_random_success('disappear', 20) then-      perform disintegrate(r);-    end if;-  end loop;-  --magic trees- for r in select ptype,allegiance,tag from wizards_in_trees loop-    if check_random_success('bonus', 20) then-      select into r1 ptype,allegiance,tag-             from pieces-             where ptype ='magic_tree'-               and (x,y) = (select x,y from pieces-                            where (ptype,allegiance,tag)::piece_key = r);-      perform disintegrate(r1);-      insert into spell_books (wizard_name, spell_name)-      values (r.allegiance,-       (select spell_name from spells-         where spell_name <> 'disbelieve'-          order by random() limit 1));-    end if;-  end loop;-  perform do_spreading();-end;-$$ language plpgsql volatile;--/*-can't find this function in the postgresql docs...?-*/--create function array_contains(ar anyarray, e anyelement) returns boolean as $$-declare-  i int;-begin-  if ar = '{}' then-    return false;-  end if;-  for i in (array_lower(ar,1))..(array_upper(ar,1)) loop-    if ar[i] = e then-      return true;-    end if;-  end loop;-  return false;-end;-$$ language plpgsql immutable;---/*-rules:-each piece has 10% chance of disappearing-each piece has 20% chance of spawning a new piece-each piece has 20% chance of spawning two new pieces--can't spread to object squares-can't spread to same allegiance squares-blob spreading over wizard kills wizard-blob spreading on monster leaves monster trapped until blob is killed/recedes-fire spreading onto anything kills & disintegrates it--need hack to prevent blobs trying to spread which are owned by wizards-killed previously during this spreading.  I think we need to keep-track of these manually since the database won't let us read a-partially updated wizards or pieces table during the transaction--insert into spell_books (wizard_name,spell_name)-  select wizard_name, 'magic_wood' from wizards-  where not expired;---insert into spell_books (wizard_name,spell_name)-  select wizard_name, 'gooey_blob' from wizards-  union-  select wizard_name, 'magic_fire' from wizards;--*/--create view spreadable_squares as-  select x,y from generate_series(0, 14) as x-    cross join generate_series(0, 9) as y-  except-  select x,y from pieces natural inner join object_piece_types;--select create_var('disable_spreading', 'boolean');-insert into disable_spreading_table values (false);-select set_relvar_type('disable_spreading_table', 'data');--create function do_spreading() returns void as $$-declare-  r piece_key;-  r1 piece_key;-  p pos;-  sp record;-  i int;-  c int;-  tg int;-  killed_wizards text[] = '{}';-begin-  if get_disable_spreading() then-    return;-  end if;-  for sp in select ptype,allegiance,tag,x,y from pieces-           where ptype in ('gooey_blob', 'magic_fire') loop-    --raise notice 'check % e %', sp.allegiance, killed_wizards;-    if array_contains(killed_wizards, sp.allegiance) then-      --raise notice 'skip piece %', sp.allegiance;-      continue;-    end if;-    c := (random() * 100)::Int;-    if c < 10 then-      --recede-      perform add_history_recede(r);-      perform disintegrate((sp.ptype,sp.allegiance,sp.tag));-    elseif c < 50 then-      for i in 1..(case when c < 30 then 1 else 2 end) loop-        select into p tx,ty from (-          select tx, ty from board_ranges b-          inner join spreadable_squares s-            on (s.x,s.y) = (b.tx,b.ty)-          where range = 1-            and (b.x,b.y) = (sp.x,sp.y)-          except-          select x as tx,y as ty-            from pieces-            where allegiance=sp.allegiance) as a-              order by random() limit 1;-        if p.x is null then continue; end if;-        if exists(select 1 from pieces-               where (x,y) = (p.x,p.y)-                 and ptype = 'wizard') then-          select into r1 ptype,allegiance,tag from pieces-               where (x,y) = (p.x,p.y)-                 and ptype = 'wizard';-          if r1.allegiance = sp.allegiance then-            raise exception 'spread tried to get friendly piece';-          end if;-          killed_wizards := array_append(killed_wizards, r1.allegiance);-          --raise notice 'killed_wizards %', killed_wizards;-          perform add_chinned_history(p.x,p.y);-          perform kill_piece(r1);-        end if;-        --magic fire removes all pieces-        for r1 in select ptype,allegiance,tag from pieces-            where (x,y) = (p.x,p.y) loop-          if r1.allegiance = sp.allegiance then-            raise exception 'spread tried to get friendly piece';-          end if;-          perform disintegrate(r1);-        end loop;-        --raise notice 'spreading %', sp.allegiance;-        tg := create_object(sp.ptype, sp.allegiance, p.x,p.y);-        perform add_history_spread((sp.ptype,sp.allegiance,tg));-      end loop;-    end if;-  end loop;-end;-$$ language plpgsql volatile;--/*-== helpers for piece creation and destruction-*/--/*-help to speed up start game - this allows us to select 19 non unique-random spells quicker than using order by random() limit 1 in a loop-*/--create table spell_indexes_no_dis_turm (-  row_number serial,-  spell_name text-);-select set_relvar_type('spell_indexes_no_dis_turm', 'readonly');-select add_key('spell_indexes_no_dis_turm', 'row_number');---create type random_entry as (-  line int,-  num int-);--create function makeNRandoms(n int, maxi int) returns setof random_entry as $$-begin-  return query-    select generate_series(0, n - 1),-      (random() * maxi + 0.5)::int as num;-end;-$$ language plpgsql volatile;---insert into spell_indexes_no_dis_turm (spell_name)-  select spell_name from spells_mr-    where spell_name not in ('disbelieve', 'turmoil');--create function create_object(vptype text, vallegiance text, x int, y int)-  returns int as $$-begin-  --assert ptype is an object ptype-  if not exists(select 1 from object_piece_types where ptype = vptype) then-    raise exception 'called create object on % which is not an object', vptype;-  end if;-  return create_piece_internal(vptype, vallegiance, x, y, false);-end-$$ language plpgsql volatile;---create function create_monster(vptype text, allegiance text, x int, y int,-                               imaginary boolean) returns void as $$-begin-  if not exists(select 1 from monster_prototypes where ptype = vptype) then-    raise exception 'called create monster on % which is not a monster', vptype;-  end if;-  perform create_piece_internal(vptype, allegiance, x, y, imaginary);-end-$$ language plpgsql volatile;--create function create_corpse(vptype text, px int, py int, imaginary boolean)-  returns void as $$-declare-  vtag int;-  twiz text;-begin-  if not exists(select count(*) from monster_prototypes-                where ptype = vptype) then-    raise exception 'called create corpse on % which is not a monster', vptype;-  end if;-  vtag := create_piece_internal(vptype,-                                'Buddha',-                                px, py, imaginary);-  perform kill_monster((vptype, 'Buddha', vtag));-end-$$ language plpgsql volatile;--------------------------------------------------------create function get_next_tag(pptype text, pallegiance text) returns int as $$--  select coalesce(max(tag) + 1, 0) from pieces-  where (ptype,allegiance) = ($1,$2);--$$ language sql stable;--create function create_piece_internal(vptype text, vallegiance text,-                                      vx int, vy int, vimaginary boolean)-                                      returns int as $$-declare-  vtag int;-begin--  insert into pieces (ptype, allegiance, tag, x, y)-    select vptype, vallegiance, get_next_tag(vptype,vallegiance), vx, vy-    returning tag into vtag;--  insert into imaginary_pieces (ptype,allegiance,tag)-    select vptype,vallegiance,vtag where coalesce(vimaginary,false);-  return vtag;-end-$$ language plpgsql volatile;--create function make_piece_undead(vptype text, vallegiance text, vtag int)-  returns void as $$-begin-  if not exists(select 1 from piece_prototypes_mr-                where ptype=vptype and undead)-      and not exists (select 1 from crimes_against_nature-                      where (ptype,allegiance,tag) =-                        (vptype,vallegiance,vtag)) then-    insert into crimes_against_nature-      (ptype,allegiance,tag) values-      (vptype,vallegiance,vtag);-  end if;-end;-$$ language plpgsql volatile;-------------------------------------------------/*-new plan for piece killing and stuff-disintegrate: removes piece, no corpse even for non undead monster-kill piece: calls appropriate routine:-  kill monster: creates corpse if not undead else calls disintegrate-  kill object: calls disintegrate-  kill wizard: calls disintegrate on army and wizard, and other clean up-*/--create function disintegrate(pk piece_key)-  returns void as $$-begin-  delete from pieces where (ptype, allegiance, tag)::piece_key = pk;-end;-$$ language plpgsql volatile;--create function kill_monster(pk piece_key)-  returns void as $$-begin-  --todo some asserts: monster, non undead-  --  undead cannot be dead - add constraint-  --  non monster cannot be dead: shouldn't be possible, check this-  --  after adding update rule to pieces_view-  --todo: generate update rules automatically for entities-  -- and use a single update here-  -- do the sub ones first since the pieces update changes the key-  update pieces set allegiance = 'dead',-                    tag = get_next_tag(pk.ptype,'dead')-    where (ptype, allegiance, tag) = pk;-end-$$ language plpgsql volatile;--create function disintegrate_wizards_army(pwizard_name text) returns void as $$-declare-  r piece_key;-begin-  for r in select ptype, allegiance, tag from pieces-    where allegiance = pwizard_name loop-    perform disintegrate(r);-  end loop;-end;-$$ language plpgsql volatile;--create function kill_wizard(pwizard_name text) returns void as $$-begin---if current wizard then next_wizard-  if get_current_wizard() = pwizard_name then-    perform action_next_phase();-    --check if this is the last wizard, slightly hacky-    if get_current_wizard() = pwizard_name then-      perform game_completed();-      perform add_history_game_drawn();-      delete from current_wizard_table;-    end if;-  end if;- --this should all be handled with cascades...?-  delete from wizard_spell_choices_mr where wizard_name = pwizard_name;---wipe spell book-  delete from spell_books where wizard_name = pwizard_name;---kill army-  perform disintegrate_wizards_army(pwizard_name);---set expired to true-  update wizards set expired = true-    where wizard_name = pwizard_name;-end;-$$ language plpgsql volatile;--create function kill_piece(pk piece_key)-  returns void as $$-begin-  if (select coalesce(undead,false) from pieces_mr-        where (ptype, allegiance, tag)::piece_key = pk)-    or exists(select 1 from object_piece_types-                where ptype = pk.ptype) then-    perform disintegrate(pk);-  elseif exists(select 1 from monster_prototypes where ptype = pk.ptype) then-    perform kill_monster(pk);-  elseif pk.ptype = 'wizard' then-    perform kill_wizard(pk.allegiance);-  else-    raise exception 'don''t know how to kill piece with ptype %', pk.ptype;-  end if;--end;-$$ language plpgsql volatile;----- testing function-create function kill_top_piece_at(px int, py int) returns void as $$-declare-  r piece_key;-begin-  select into r ptype,allegiance,tag-    from pieces_on_top where (x,y) = (px,py);-  perform kill_piece(r);-end;-$$ language plpgsql volatile;--select set_module_for_preceding_objects('actions');--/*-================================================================================--= history-save a short description of each action completed during play--TODO: create a detailed history that allows a game to be replayed-then create a view to show the player visible log with some events-removed and some combined.-*/--select new_module('action_history', 'server');--create domain history_name_enum as text-       check (value in (-                        'spell_succeeded'-                       ,'spell_failed'-                       ,'chinned'-                       ,'shrugged_off'-                       ,'walked'-                       ,'fly'-                       ,'attack'-                       ,'ranged_attack'-                       ,'set_imaginary'-                       ,'set_real'-                       ,'game_won'-                       ,'game_drawn'-                       ,'spell_skipped'-                       ,'new_turn'-                       ,'wizard_up'-                       ,'choose_spell'-                       ,'spread'-                       ,'recede'-                       ,'disappear'-                       ,'new_game'-                       ,'attempt_target_spell'-                       ));---create table action_history_mr (-  id serial not null,-  history_name history_name_enum not null,-  ptype  text null,-  allegiance text  null,-  tag int null,-  spell_name text null,-  turn_number int null,-  turn_phase  turn_phase_enum null,-  num_wizards int null,-  x int null,-  y int null,-  tx int null,-  ty int null-);-select add_key('action_history_mr', 'id');-select set_relvar_type('action_history_mr', 'data');----Turns--create function get_current_wizard_pos() returns pos as $$-  select x,y from pieces-    where allegiance=get_current_wizard()-      and ptype = 'wizard';-$$ language sql stable;--create function add_history_new_turn() returns void as $$-begin-  insert into action_history_mr (history_name, turn_number)-    values ('new_turn', get_turn_number());-end;-$$ language plpgsql volatile;--create function add_history_wizard_up() returns void as $$-declare-  w pos;-begin-  w := get_current_wizard_pos();-  insert into action_history_mr (history_name, allegiance, turn_phase, x, y)-    values ('wizard_up', get_current_wizard(), get_turn_phase(), w.x, w.y);-end;-$$ language plpgsql volatile;--create function add_history_new_game() returns void as $$-begin-  insert into action_history_mr (history_name, num_wizards)-    values ('new_game', (select count(1) from wizards));-end;-$$ language plpgsql volatile;--create function add_history_game_won() returns void as $$-declare-  w pos;-begin-  w := get_current_wizard_pos();-  insert into action_history_mr (history_name, allegiance, x, y)-    values ('game_won', (select allegiance-                         from pieces-                         where ptype='wizard'),-                         w.x, w.y);-end;-$$ language plpgsql volatile;--create function add_history_game_drawn() returns void as $$-begin-  insert into action_history_mr (history_name)-    values ('game_drawn');-end;-$$ language plpgsql volatile;----Choosing--create function add_history_choose_spell() returns void as $$-declare-  w pos;-begin-  w := get_current_wizard_pos();-  insert into action_history_mr (history_name, allegiance, spell_name,x,y)-    values ('choose_spell', get_current_wizard(), get_current_wizard_spell(),-            w.x,w.y);-end;-$$ language plpgsql volatile;--create function add_history_set_imaginary() returns void as $$-begin-  insert into action_history_mr (history_name, allegiance)-    values ('set_imaginary', get_current_wizard());-end;-$$ language plpgsql volatile;--create function add_history_set_real() returns void as $$-begin-  insert into action_history_mr (history_name, allegiance)-    values ('set_real', get_current_wizard());-end;-$$ language plpgsql volatile;----Casting--create function add_history_attempt_target_spell(px int, py int) returns void as $$-declare-  w pos;-begin-  select into w x,y from pieces-    where allegiance=get_current_wizard()-      and ptype = 'wizard';-  insert into action_history_mr (history_name, allegiance, spell_name, x, y, tx, ty)-    values ('attempt_target_spell', get_current_wizard(),-            get_current_wizard_spell(), w.x, w.y, px, py);-end;-$$ language plpgsql volatile;--create function add_history_attempt_activate_spell() returns void as $$-declare-  w pos;-begin-  select into w x,y from pieces-    where allegiance=get_current_wizard()-      and ptype = 'wizard';-  insert into action_history_mr (history_name, allegiance, spell_name, x, y)-    values ('attempt_target_spell', get_current_wizard(),-            get_current_wizard_spell(), w.x, w.y);-end;-$$ language plpgsql volatile;---create function add_history_spell_succeeded() returns void as $$-begin-  insert into action_history_mr (history_name, allegiance, spell_name)-    values ('spell_succeeded', get_current_wizard(), get_current_wizard_spell());-end;-$$ language plpgsql volatile;--create function add_history_spell_failed() returns void as $$-begin-  insert into action_history_mr (history_name, allegiance, spell_name)-    values ('spell_failed', get_current_wizard(), get_current_wizard_spell());-end;-$$ language plpgsql volatile;--create function add_history_spell_skipped() returns void as $$-begin-  insert into action_history_mr (history_name, allegiance, spell_name)-    values ('spell_skipped', get_current_wizard(), get_current_wizard_spell());-end;-$$ language plpgsql volatile;----chinned and shrugged off--create function add_history_chinned(k piece_key) returns void as $$-declare-  w pos;-begin-  select into w x,y from pieces where (ptype,allegiance,tag) = k;-  insert into action_history_mr (history_name, ptype, allegiance,tag, x, y)-    values ('chinned', k.ptype, k.allegiance, k.tag, w.x, w.y);--end;-$$ language plpgsql volatile;--create function add_history_shrugged_off(k piece_key) returns void as $$-declare-  w pos;-begin-  select into w x,y from pieces where (ptype,allegiance,tag) = k;-  insert into action_history_mr (history_name, ptype, allegiance,tag, x, y)-    values ('shrugged_off', k.ptype, k.allegiance, k.tag,w.x, w.y);-end;-$$ language plpgsql volatile;----Autonomous--create function add_history_receive_spell(pwizard_name text, pspell_name text) returns void as $$-declare-  w pos;-begin-  select into w x,y from pieces-    where allegiance=pwizard_name-      and ptype = 'wizard';-  insert into action_history_mr (history_name, allegiance, spell_name, x, y)-    values ('choose_spell', pwizard_name, pspell_name, w.x, w.y);-end;-$$ language plpgsql volatile;--create function add_history_spread(k piece_key) returns void as $$-declare-  w pos;-begin-  select into w x,y from pieces where (ptype,allegiance,tag) = k;-  insert into action_history_mr (history_name, ptype,allegiance,tag, x, y)-    values ('spread', k.ptype,k.allegiance,k.tag, w.x, w.y);-end;-$$ language plpgsql volatile;--create function add_history_recede(k piece_key) returns void as $$-declare-  w pos;-begin-  select into w x,y from pieces where (ptype,allegiance,tag) = k;-  insert into action_history_mr (history_name, ptype,allegiance,tag,x, y)-    values ('recede', k.ptype,k.allegiance,k.tag, w.x, w.y);-end;-$$ language plpgsql volatile;--create function add_history_disappear(k piece_key) returns void as $$-declare-  w pos;-begin-  select into w x,y from pieces where (ptype,allegiance,tag) = k;-  insert into action_history_mr (history_name, ptype,allegiance,tag, x, y)-    values ('disappear', k.ptype,k.allegiance,k.tag, w.x, w.y);-end;-$$ language plpgsql volatile;-----Move-create function add_history_walked(sx int, sy int) returns void as $$-declare-  w pos;-  k piece_key;-begin-  select into w x,y from pieces where (ptype,allegiance,tag) = k;-  select into k ptype,allegiance,tag from selected_piece;-  insert into action_history_mr (history_name, ptype, allegiance,tag,x, y, tx, ty)-    values ('walked', k.ptype, k.allegiance, k.tag, w.x,w.y, sx, sy);-end;-$$ language plpgsql volatile;--create function add_history_fly(sx int, sy int) returns void as $$-declare-  w pos;-  k piece_key;-begin-  select into w x,y from pieces where (ptype,allegiance,tag) = k;-  select into k ptype,allegiance,tag from selected_piece;-  insert into action_history_mr (history_name, ptype, allegiance,tag,x, y, tx, ty)-    values ('fly', k.ptype, k.allegiance, k.tag, w.x,w.y, sx, sy);-end;-$$ language plpgsql volatile;--create function add_history_attack(t piece_key) returns void as $$-declare-  sp record;-  tp pos;-begin-  select into sp ptype,allegiance,tag,x,y from selected_piece-    natural inner join pieces;-  select into tp x,y from pieces where (ptype,allegiance,tag) = t;-  insert into action_history_mr (history_name, ptype, allegiance,tag,x,y,tx,ty)-    values ('attack', sp.ptype, sp.allegiance, sp.tag, sp.x,sp.y, tp.x,tp.y);-end;-$$ language plpgsql volatile;--create function add_history_ranged_attack(t piece_key) returns void as $$-declare-  sp record;-  tp pos;-begin-  select into sp ptype,allegiance,tag,x,y from selected_piece-    natural inner join pieces;-  select into tp x,y from pieces where (ptype,allegiance,tag) = t;-  insert into action_history_mr (history_name, ptype, allegiance,tag,x,y,tx,ty)-    values ('ranged_attack', sp.ptype, sp.allegiance, sp.tag, sp.x,sp.y, tp.x,tp.y);-end;-$$ language plpgsql volatile;---/*--create a view to hide the details which players shouldn't be able to-see - this is the view that the ui should use:-hide set real, imaginary-hide spell received in tree---*/--select set_module_for_preceding_objects('action_history');--/*-================================================================================--= new game-== wizard starting positions-Wizards start the game in positions set by how many wizards there are in a game:---When there are 'wizard_count' wizards in a game, wizard at place-'place' starts at grid position x, y.--These figures are only valid iff there are 2-8 wizards and the board is-15 x 10. Will have to figure out some other system for more wizards or-different boards.--*/----in a game with wizard_count wizards, wizard at place 'place' starts---the game on square x,y.--select new_module('new_game', 'server');--create table wizard_starting_positions (-  wizard_count int,-  place int,-  x int,-  y int-);-select add_key('wizard_starting_positions', array['wizard_count', 'place']);-select add_key('wizard_starting_positions', array['wizard_count', 'x', 'y']);-select add_constraint('wizard_starting_positions_place_valid',-  'not exists(select 1 from wizard_starting_positions-    where place >= wizard_count)',-  array['wizard_starting_positions']);-select set_relvar_type('wizard_starting_positions', 'readonly');--copy wizard_starting_positions (wizard_count, place, x, y) from stdin;-2	0	1	4-2	1	13	4-3	0	7	1-3	1	1	8-3	2	13	8-4	0	1	1-4	1	13	1-4	2	1	8-4	3	13	8-5	0	7	0-5	1	0	3-5	2	14	3-5	3	3	9-5	4	11	9-6	0	7	0-6	1	0	1-6	2	14	1-6	3	0	8-6	4	14	8-6	5	7	9-7	0	7	0-7	1	1	1-7	2	13	1-7	3	0	6-7	4	14	6-7	5	4	9-7	6	10	9-8	0	0	0-8	1	7	0-8	2	14	0-8	3	0	4-8	4	14	4-8	5	0	9-8	6	7	9-8	7	14	9-\.--/*-== new game action-*/--create table action_new_game_argument (-  place int, -- place 0..cardinality-  wizard_name text,-  computer_controlled boolean-);-select add_key('action_new_game_argument', 'place');-select add_key('action_new_game_argument', 'wizard_name');-select add_constraint('action_new_game_argument_place_valid',-  '(select count(*) from action_new_game_argument-    where place >= (select count(*) from action_new_game_argument)) = 0',-  array['action_new_game_argument']);--select set_relvar_type('action_new_game_argument', 'stack');--/*-new game action - fill in action_new_game_argument first-*/-create function action_new_game() returns void as $$-declare-  r record;-  t int;-begin--  update creating_new_game_table set creating_new_game = true;-  --assert: all tables tagged data are in this delete list-  --(only need base table of entities since these cascade)-  -- tables are in order of dependencies so delete sequence works--  -- clear data tables-  delete from action_history_mr;-  perform setval('action_history_mr_id_seq', 1);--  --turn data-  delete from game_completed_table;-  delete from cast_alignment_table;-  delete from remaining_walk_table;-  delete from selected_piece;-  delete from pieces_to_move;-  delete from spell_parts_to_cast_table;-  delete from wizard_spell_choices_mr;-  delete from current_wizard_table;-  delete from turn_phase_table;-  delete from cast_success_checked_table;-  delete from turn_number_table;-  --piece data-  delete from spell_books;-  delete from imaginary_pieces;-  delete from pieces;-  delete from wizards;-  delete from board_size;-  delete from world_alignment_table;--  if not exists(select 1 from disable_spreading_table) then-    insert into disable_spreading_table values(false);-  else-    update disable_spreading_table-       set disable_spreading = false;-  end if;--  --reset the overrides when starting new game-  delete from test_action_overrides;--  --assert: call init_ for each data table, make sure order is good--  perform init_world_alignment();-  perform init_board_size();--  --create wizards-  --  wizard table-  insert into wizards (wizard_name, computer_controlled, original_place)-    select wizard_name, computer_controlled, place-      from action_new_game_argument;-  --  pieces-  t := (select count(*) from action_new_game_argument);-  insert into pieces (ptype, allegiance, tag, x, y)-    select 'wizard', wizard_name, 0, x,y-      from action_new_game_argument-      natural inner join wizard_starting_positions-       where wizard_count = t;-  --  spell books-  --init spell book-  -- disbelieve plus 19 {random spells not disbelieve or turmoil}-  insert into spell_books (wizard_name, spell_name)-    select wizard_name, 'disbelieve'-      from action_new_game_argument;--  insert into spell_books (wizard_name, spell_name)-    select wizard_name,spell_name-      from action_new_game_argument-      inner join (select line, spell_name-                  from spell_indexes_no_dis_turm-                  inner join makeNRandoms(t * 19, 53)-                    on row_number = num) as a-      on (line/19) = place;-  --sanity check that bad boy-  if exists(select 1 from (select wizard_name, count(spell_name)-                           from spell_books group by wizard_name-                          ) as a where count <> 20) then-    raise exception 'miscount in initial spell books';-  end if;-  --turn stuff-  perform init_turn_stuff();--  /*-  data tables with no init because they are empty at start of game-  piece sub entities-  action_history and sub entities-  wizard spell choices, pieces to move, current moving piece-  */-  --TODO: add new game action history-  perform add_history_new_game();--  update creating_new_game_table set creating_new_game = false;--end-$$ language plpgsql volatile;--/*-================================================================================--= test board support-*/---TODO: make this function dump the current game to unique file for backup-create function action_setup_test_board(flavour text) returns void as $$-declare-  i int;-  rec record;-  vwidth int;-  vname text;-  vx int;-  vy int;-  vallegiance text;-begin-  --assert - new game just created-  --         flavour is one of all_pieces, upgraded_wizards, overlapping-  select into vwidth width from board_size;--  if flavour = 'all_pieces' then-    --create one of each monster-    i:= 0;-    for rec in select ptype from monster_prototypes loop-      perform create_monster(rec.ptype, 'Buddha',-                             i % vwidth, 1 + i / vwidth, false);-      i := i + 1;-    end loop;-    --create one of each corpse-    i := 0;-    for rec in select ptype from monster_prototypes where undead = false loop-      perform create_monster(rec.ptype, 'Buddha',-                             i % vwidth, 5 + i / vwidth, false);-      perform kill_top_piece_at(i % vwidth, 5 + i / vwidth);-      i := i + 1;-    end loop;-    --create one of each (pieces - creatures)-    i := 0;-    for rec in select ptype from object_piece_types loop-      perform create_object(rec.ptype, 'Kong Fuzi', i, 8);-      i := i + 1;-    end loop;-  elseif flavour = 'upgraded_wizards' then-    perform action_cast_wizard_spell(-      (select wizard_name from wizards where original_place = 0),-      'shadow_form');-     --fix history-    update action_history_mr-      set spell_name = 'shadow_form',-      allegiance='Buddha'-      where spell_name is null;-    perform action_cast_wizard_spell(-      (select wizard_name from wizards where original_place = 1),-      'magic_sword');-    update action_history_mr-      set spell_name = 'magic_sword',-      allegiance = 'Kong Fuzi'-      where spell_name is null;-    perform action_cast_wizard_spell(-      (select wizard_name from wizards where original_place = 2),-      'magic_knife');-    update action_history_mr-      set spell_name = 'magic_knife',-      allegiance = 'Laozi'-      where spell_name is null;-    perform action_cast_wizard_spell(-      (select wizard_name from wizards where original_place = 3),-      'magic_shield');-    update action_history_mr-      set spell_name = 'magic_shield',-      allegiance='Moshe'-      where spell_name is null;-    perform action_cast_wizard_spell(-      (select wizard_name from wizards where original_place = 4),-      'magic_wings');-    update action_history_mr-      set spell_name = 'magic_wings',-      allegiance='Muhammad'-      where spell_name is null;-    perform action_cast_wizard_spell(-      (select wizard_name from wizards where original_place = 5),-      'magic_armour');-    update action_history_mr-      set spell_name = 'magic_armour',-      allegiance='Shiva'-      where spell_name is null;-    perform action_cast_wizard_spell(-      (select wizard_name from wizards where original_place = 6),-      'magic_bow');-    update action_history_mr-      set spell_name = 'magic_bow',-      allegiance = 'Yeshua'-      where spell_name is null;-  elseif flavour = 'overlapping' then-    --assert at least 5 wizards-    --wizard, stiff-    select into vx,vy x,y from pieces-      inner join wizards-        on allegiance = wizard_name-      where ptype = 'wizard' and original_place = 0;-    perform create_monster('goblin', 'Buddha', 1, 0, false);-    perform kill_top_piece_at(1, 0);-    --drop in an extra dead gobbo for testing raise dead-    perform create_monster('goblin', 'Yeshua', vx, vy, false);-    perform kill_top_piece_at(vx, vy);---wizard, mountable-    select into vx,vy,vallegiance x,y,allegiance-      from pieces inner join wizards-      on allegiance = wizard_name-      where ptype = 'wizard' and original_place = 1;-    perform create_monster('horse', vallegiance, vx, vy, false);---wizard in magic tree, castle, citadel-    select into vx,vy,vallegiance x,y,allegiance-      from pieces inner join wizards-      on allegiance = wizard_name-      where ptype = 'wizard' and original_place = 2;-    perform create_object('magic_tree', vallegiance, vx, vy);-    select into vx,vy,vallegiance x,y,allegiance-      from pieces inner join wizards-      on allegiance = wizard_name-      where ptype = 'wizard' and original_place = 3;-    perform create_object('magic_castle', vallegiance, vx, vy);-    select into vx,vy,vallegiance x,y,allegiance-      from pieces inner join wizards-      on allegiance = wizard_name-      where ptype = 'wizard' and original_place = 4;-    perform create_object('dark_citadel', vallegiance, vx, vy);---monster, stiff-    perform create_monster('goblin', 'Buddha', 3, 3, false);-    perform kill_top_piece_at(3, 3);-    perform create_monster('giant', 'Buddha', 3, 3, false);---stiff, blob-    perform create_monster('goblin', 'Buddha', 4, 3, false);-    perform kill_top_piece_at(4, 3);-    perform create_object('gooey_blob', 'Buddha', 4, 3);---monster, blob-    perform create_monster('goblin', 'Laozi', 5, 3, false);-    perform create_object('gooey_blob', 'Buddha', 5, 3);---stiff, monster, blob-    perform create_monster('elf', 'Buddha', 6, 3, false);-    perform kill_top_piece_at(6, 3);-    perform create_monster('goblin', 'Laozi', 6, 3, false);-    perform create_object('gooey_blob', 'Buddha', 6, 3);-  else-    raise exception-    'argument must be one of all_pieces, upgraded_wizards, overlapping, got %',-    flavour;-  end if;-end-$$ language plpgsql volatile;---select set_module_for_preceding_objects('new_game');-/*--================================================================================--= ai--For each stage we compile a list of possible actions using the valid_action views. These are then filtered to remove actions we don't want to run. At some places, the possible action list is reduced by keeping only the actions which are deemed vital (e.g. the wizard needs to run away, or a monster has a chance to attact a wizard). The remaining actions are possibly weighted and one is chosen at random.--Choose spells by weighting them according to casting chance, some spells are never cast, and some will be further weighted by the board layout.--When moving army, the general plan is to move the monsters closest to an enemy first.--choose spell-cast spell-move pieces--option 1: upgrade-weight by probability-don't cast one already have or a weaker one in same category-armour - shield-knife - sword-shadow - wings--decree et al: use: wizard with lots of bad guys, being threatened-magic wood: if range of spells is a bit shit-castle, wall, blob, fire, shadowwood - random-disbelieve: cast when threatened by a hard creature, small chance otherwise-subversion - hard creature nearby, when threatened-raise dead - when can-monsters: weight by chances, decide on imag weighted by chances--assess: defensive: wizard under threat-aggressive: choose a target to send everyone against--casting:-raise: hardest corpse in range-decree: if threatened target monster or wizard, else target hardest-wizard/monster on screen-castle -next to, away from danger-disbelieve - closest monster-subvert - closest monster (or if tougher one next to closest monster?)-monster - toward nearest threat-wall - just randomly put about-blob - want to grow safely, unless under threat then use aggresively-fire - use aggressively-shadow wood: use magic wood layout, bias in directions that have-moving enemy pieces--moving:-if defensive move pieces starting with close--The system for running the ai is to make an action available when the-current wizard is an ai to continue the ai's turn. This will do one-action, and move to the next phase if the ai has completed it's-action. This api allows the client to control how and at what speed-the ai's turns are run, we use this to run one ai action every half-second so you can see what the ai is doing by watching the board-change.--TODO:---don't attack friendlies---don't cast, attack corpses---don't choose spells that can't work-cast spells in sensible place-weight choice by chance-sometimes cast imag when unlikely-disbelieve logic and tracking-move phase:-  keep wizards out of danger-  always move into castles,wood-  move towards wood if near-  stay in castles, wood-send monsters towards closest enemy-always attack if can-choose targets: favour wizards and hardest that likely to kill--*/--/*--== main ai action--*/--create function action_ai_continue() returns void as $$-begin-  perform check_can_run_action('ai_continue');-    if get_turn_phase() = 'choose' then-      perform ai_choose_spell();-      perform action_next_phase();-    elseif get_turn_phase() = 'cast' then-      perform ai_cast_spell();-    elseif get_turn_phase() = 'move' then-      perform ai_move_pieces();-    end if;-end;-$$ language plpgsql volatile;--/*--== spell choice--First, eliminate all the useless target spells - those that have no-target and those that can only be cast on a friendly or corpse.--*/--create view current_wizard_target_spells as-  select spell_name,range from spell_books-    inner join current_wizard_table-      on current_wizard = wizard_name-    natural inner join spell_ranges;--create view current_wizard_square as-  select x,y from pieces-  inner join current_wizard_table-    on allegiance =current_wizard-  where ptype= 'wizard';--/*--take all the target spells and create a list of spell names a squares-that they can be cast on using the range and valid square types of-each spell--*/--create view castable_target_spells as-  select spell_name,svs.x,svs.y-    from current_wizard_target_spells cwts-    natural inner join spell_valid_squares svs-    natural inner join spell_valid_square_types svst-    inner join board_ranges br-      on (br.x,br.y) = (select x,y from current_wizard_square)-        and br.range = cwts.range-        and (br.tx, br.ty) = (svs.x, svs.y);--/*--eliminate the rows which have only corpses or friendlies on top--*/--create view ai_useful_spells as-  select spell_name from spell_books-    inner join current_wizard_table-      on wizard_name = current_wizard-    natural inner join activate_spells-  union-    select spell_name from castable_target_spells-    where (x,y) not in (select x,y from corpse_only_squares-                      union-                      select x,y from pieces_on_top-                      inner join current_wizard_table-                      on current_wizard = allegiance);--create function ai_choose_spell() returns void as $$-declare-  vspell_name text;-begin-  select into vspell_name spell_name-    from ai_useful_spells-    order by random() limit 1;-  if vspell_name is null then-    --skip choosing one-    return;-  else-    perform action_choose_spell(vspell_name);-  end if;-end;-$$ language plpgsql volatile;--/*--== spell casting--first filter out all the targets we don't want to cast on:--*/--create view ai_filtered_target_spells as-  select * from valid_target_actions-  where action='cast_target_spell'-  and (x,y) not in-    (select x,y from pieces_on_top-    where allegiance in (get_current_wizard(), 'dead'));--/*-cast spells in a sensible place:-dark power: don't choose a wizard with no creations-            pick enemy monsters that are close or wizards with lots of shit-lightning, magic bolt: enemy wizard then closest monster-raise dead: choose hardest corpse-subversion: choose hardest enemy-shadow wood: use magic tree layout-fire: next to wizard or monster if can, else towards closest enemy-blob: towards closest enemy in some space-castle: next to wizard away from danger-monster: towards closest enemy-*/--create function ai_cast_spell() returns void as $$-declare-  p pos;-begin-  if exists(select 1 from valid_activate_actions-            where action = 'cast_activate_spell') then-     perform action_cast_activate_spell();-  elseif exists(select 1 from ai_filtered_target_spells) then-     select into p x,y from ai_filtered_target_spells-         order by random() limit 1;-     perform action_cast_target_spell(p.x, p.y);-  else-    perform action_next_phase();-  end if;-end;-$$ language plpgsql volatile;--/*--== move phase--*/--create function ai_move_pieces() returns void as $$-declare-  p pos;-begin-  --if no piece selected and none selectable, go to next phase-  if not exists(select 1 from selected_piece)-     and not exists(select 1 from valid_target_actions-            where action = 'select_piece_at_position') then-     perform action_next_phase();-     return;-  end if;-  --if no piece selected try to select one-  if not exists(select 1 from selected_piece)-     and exists(select 1 from valid_target_actions-            where action = 'select_piece_at_position') then-     select into p x,y from valid_target_actions-       where action = 'select_piece_at_position'-       order by random() limit 1;-     perform action_select_piece_at_position(p.x, p.y);-     --check if it has been immediately unselected-     if not exists(select 1 from selected_piece) then-       return;-     end if;-  end if;-  perform ai_move_selected_piece();-end;-$$ language plpgsql volatile;--create view ai_selected_piece_actions as-select a.x,a.y,action-  from valid_target_actions a-  left outer join pieces_on_top p-    using (x,y)-  where action in('walk', 'fly')-  or ((action in('attack', 'ranged_attack')-     and allegiance not in (get_current_wizard(), 'dead')));---/*-rules:-send monsters towards enemy-always attack if can-choose targets: wizards if can, then hardest creature-*/--create view prefered_targets as-select x,y,action,-  case when ptype = 'wizard' then -500-                else 20 - physical_defense-  end as preference-from valid_target_actions-natural inner join pieces_mr-where action in('attack','ranged_attack');--create view closest_enemy_to_selected_piece as-  select a.x,a.y-  from selected_piece_attackable_squares a-  cross join selected_piece s-    inner join pieces s1-    using(ptype,allegiance,tag)-  order by distance(s1.x,s1.y,a.x,a.y) limit 1;--create view select_best_move as-  select a.action,a.x,a.y from ai_selected_piece_actions a-    cross join closest_enemy_to_selected_piece e-    where action in('walk', 'fly')-    order by distance(a.x,a.y,e.x,e.y) limit 1;--create function ai_move_selected_piece() returns void as $$-declare-  r record;-begin-  if exists(select 1 from ai_selected_piece_actions-            where action = 'attack'-            or (action = 'ranged_attack'-                and (select move_phase='ranged_attack'-                from selected_piece))) then-    select into r x,y,action from prefered_targets-      order by preference limit 1;-    if r.action = 'attack' then-      perform action_attack(r.x, r.y);-    elseif r.action = 'ranged_attack' then-      perform action_ranged_attack(r.x, r.y);-    else-      --raise exception 'bad ai attack action: %', r.action;-      perform action_cancel();-    end if;-  else-    if exists(select 1 from ai_selected_piece_actions-              where action in ('walk','fly')) then-      select into r * from select_best_move;-      if r.action = 'walk' then-        perform action_walk(r.x, r.y);-      elseif r.action = 'fly' then-        perform action_fly(r.x, r.y);-      else-        perform action_cancel();-      end if;-    else-      perform action_cancel();-    end if;-  end if;-end;-$$ language plpgsql volatile;--/*----------------------------------------------------------------------------------*/-select set_all_attributes_to_not_null();-select set_notifies_on_all_data_tables();-
− sqltestfiles/system.sql
@@ -1,1310 +0,0 @@-/*--Copyright 2009 Jake Wheat--= Overview--catalog-constraints-modules-utils--= Introduction--This file contains extensions to support some extra relational theory-stuff that pg doesn't support and also add some other things like-modules.--Probably the only interesting bit is the constraint system.--*/-create language plpgsql;-/*-================================================================================--= Catalog--Some new catalog views to use, supposed to be a bit more straight-forward than the sql or pg catalogs.---== system implementation objects--Quite a lot of the code in this file generates extra functions,-triggers and uses extra tables. When you're browsing the catalog,-e.g. as a designer of a schema, or trying to work out the data-structures for a program, you don't usually want to see all this extra-stuff, so tag them.--Also, objects in this table should not be visible to user code, only-to the code in this file (just have to pretend for now).--Implementation objects include objects which are part of the catalog-and extensions themselves as well as objects which are generated when-user code uses the extensions.--Should probably put the catalog in a separate module to the internal-objects.--*/--create table system_implementation_objects (-  object_name text,-  object_type text check (object_type in(-                   'scalar',-                   'base_relvar',-                   'operator',-                   'view',-                   'trigger',-                   'database_constraint'))-);-insert into system_implementation_objects (object_name, object_type)-  values ('system_implementation_objects', 'base_relvar');--create view base_relvars as-  select relname as relvar_name from pg_class where relnamespace =-    (select oid from pg_namespace where nspname = 'public')-    and relkind = 'r';--create view base_relvar_attributes as-  select attname as attribute_name,-         typname as type_name,-         relname as relvar_name-    from pg_attribute inner join pg_class on (attrelid = pg_class.oid)-    inner join pg_type on (atttypid = pg_type.oid)-    inner join base_relvars on (relname = base_relvars.relvar_name)-    where attnum >= 1;--/*-scalars here since we are using the base relvar attributes table-to try to only show scalar types which are used and not the vast-array that pg comes with. This is a bit of a hack job, probably-a bit inaccurate-*/-create view scalars as---   select typname as scalar_name from pg_type---     where typtype in ('b', 'd')---     and typnamespace =---     (select oid from pg_namespace where nspname='public')---   union-  select distinct type_name as scalar_name-    from base_relvar_attributes;--create view base_relvar_keys as-  select conname as constraint_name, relvar_name-    from pg_constraint-  natural inner join-    (select oid as conrelid, relname as relvar_name from pg_class) as b-  where contype in('p', 'u') and connamespace =-    (select oid from pg_namespace where nspname='public');--create view base_relvar_key_attributes as-  select constraint_name, attribute_name from-    (select conname as constraint_name, conrelid,-      conkey[generate_series] as attnum-      from pg_constraint-      cross join generate_series(1,-        (select max(array_upper(conkey, 1)) from pg_constraint))-      where contype in('p', 'u') and connamespace =-        (select oid from pg_namespace where nspname='public')-      and generate_series between-      array_lower(conkey, 1) and-      array_upper(conkey, 1)) as a-  natural inner join-    (select oid as conrelid, relname as relvar_name from pg_class) as b-  natural inner join-    (select attrelid as conrelid, attname as attribute_name,-    attnum from pg_attribute) as c---  order by constraint_name-  ;--create view operators as-  select proname as operator_name from pg_proc-    where pronamespace = (select oid from pg_namespace-                           where nspname = 'public');--create view operator_source as-  select proname as operator_name, prosrc as source from pg_proc-    where pronamespace = (select oid from pg_namespace-                           where nspname = 'public');--create view triggers as-  select relname as relvar_name, tgname as trigger_name,-    proname as operator_name-    from pg_trigger-    inner join pg_class on (tgrelid = pg_class.oid)-    inner join pg_proc on (tgfoid = pg_proc.oid)-    inner join base_relvars on (relname = base_relvars.relvar_name)-    where not tgisconstraint; -- eliminate pg internal triggers--create view views as-  select viewname as view_name, definition-    from pg_views-    where schemaname = 'public';--create view view_attributes as-  select attname as attribute_name,-         typname as type_name,-         relname as relvar_name-    from pg_attribute inner join pg_class on (attrelid = pg_class.oid)-    inner join pg_type on (atttypid = pg_type.oid)-    inner join views on (relname = view_name)-    where attnum >= 1;--/*-== constraints-*/-create table database_constraints (-  constraint_name text,-  expression text-);-/*-== all database objects-*/-create view all_database_objects as-  select 'scalar' as object_type,-    scalar_name as object_name from scalars-  union select 'base_relvar' as object_type,-    relvar_name as object_name from base_relvars-  union select 'operator' as object_type,-    operator_name as object_name from operators-  union select 'view' as object_type,-    view_name as object_name from views-  union select 'trigger' as object_type,-    trigger_name as object_name from triggers-  union select 'database_constraint' as object_type,-    constraint_name as object_name from database_constraints;-insert into system_implementation_objects-  (object_name, object_type) values-  ('all_database_objects', 'view');-create view public_database_objects as-  select object_name,object_type from all_database_objects-  except-  select object_name,object_type from system_implementation_objects;--create view object_orders as-  select 'scalar'::text as object_type, 0 as object_order-  union select 'database_constraint', 1-  union select 'base_relvar', 2-  union select 'operator', 3-  union select 'view', 4-  union select 'trigger', 5-;-/*-================================================================================--= Constraints--Add some extra stuff to the existing pg constraints for the following:--* to support transition constraints directly--* to support constraints which refer to more than one table or row, or-  to views--Both of these are implemented in the usual way using triggers, but-using some shorthands, and the plumbing is hidden to some extent.--There are shortcuts for creating keys and foreign keys which use-postgresql constraints where possible to speed things up.--You have to supply the list of base tables that the triggers will-attach to, so if a constraint involves a view you have to work out the-base tables by hand. This could easily be automated to some extent-with a parser.--The constraints are implemented with--* a table to hold the constraint names and expressions-* a regenerate constraint function which creates:-  * a function which checks all the constraint expressions for a given-    table (excluding ones which are implemented as pg constraints-    directly)-  * a trigger to call that function when the table changes--The regenerate function is called whenever a constraint is added to-the database.--You also get a check_constraint function for each constraint which can-be run at any time. (including keys and sql fks), but unless you want-to sanity check a constraint these are never actually used.--We load candidate key and sql style foreign keys into this constraint-system, but instead of using the constraint check functions to enforce-these, we just load them in as regular pg unique not null and foreign-keys. When a constraint is implemented this way, it's called an-accelerated constraint in the code below--== issues--Since pg has no multiple updates, it may be necessary to have a hack-to disable constraints temporarily. The reenable function will have to-make sure the current data is good. This isn't implemented here yet-but some constraints in the server code use a hack based on this idea.--I'm pretty sure the constraint system works fine as long as-* you never change the columns on a table after adding a constraint-* you only add constraints, never change or remove them-* all database transactions are run one at a time, serialised-  (actually serialised, not just using sql isolation serializable).--If any of these assumptions are broken, you will probably break the-database, load bad data in or just get weird errors for stuff that-should work.--Plan for supporting database updates in the field is to export the-data in the database being upgraded, recreate the new database from-scratch, then load the export back in.--== public interface-*/----this is the public function which you call to add a constraint-create function add_constraint(vname text,-                               vexpression text,-                               vrelvars text[]-                               ) returns void as $$-begin-  perform add_constraint_internal(vname,vexpression,vrelvars, false);-end;-$$ language plpgsql volatile;--/*-=== internal-create this function so that we can add accelerated constraints and-normal ones in the same place.--*/-create function add_constraint_internal(vname text, vexpression text,-       vrelvars text[], is_con_pg boolean) returns void as $$-declare-  r boolean;-  i integer;-  t text;-  constraint_operator text;-  s text;-begin-  --check the constraint is valid, cannot add it if it doesn't currently-  --evaluate to true-  --raise notice '******* adding constraint: %****%', vname, vexpression;-  if not is_con_pg then-    execute 'select ' || vexpression into r;-    if not r then-      raise exception-        'attempt to add constraint % which evaluates to false: %',-        vname, vexpression;-    end if;-  end if;-  --make entry in catalog-  insert into database_constraints (constraint_name, expression)-    values (vname, vexpression);-   constraint_operator := 'check_con_' || vname;-  --create implementation and add to catalog-  --we do this even if we actually implement it using-  --an accelerator--  --this function checks that the constraint currently holds-  execute 'create function ' || constraint_operator ||-    '() returns boolean as $a$-begin-  return ' || vexpression || ';-end;-$a$ language plpgsql stable;';-  --hide the check function from the user catalog-  insert into system_implementation_objects(object_name, object_type)-    values (constraint_operator, 'operator');-  --store the check function in the internal constraint implementation catalog-  execute $a$insert into dbcon_ops-    (constraint_name, operator_name) values ('$a$ || vname || $a$', '$a$-      || constraint_operator || $a$');$a$;-  --add entries into constraint_relvars: so we can get a list of-  --constraint implementation functions for a given table-  if not is_con_pg then-    for i in array_lower(vrelvars, 1)..array_upper(vrelvars, 1) loop-     -- todo: if relvar is a view, then need to trigger on-     -- view definition change and on any relvars which the view-     -- depends on change-     -- for now just skip views?-      insert into dbcon_relvars (constraint_name, relvar_name)-        values (vname, vrelvars[i]);-    end loop;-    --now recreate the actual triggers which enforce the constraint-    perform regenerate_constraint_triggers();-  end if;--  --hack: if the constraint mentions any tables which are-  -- system_implementation_objects then add the constraint as a-  -- system_implementation_object-  -- this is also to hide implementation details from the user catalog--  if exists(select 1 from system_implementation_objects-    where object_type = 'base_relvar' and-      object_name = any (vrelvars)) then-    insert into system_implementation_objects (object_name, object_type)-      values (vname, 'database_constraint');-  end if;-end;-$$ language plpgsql volatile;---/*-== constraint shortcuts--=== keys--*/--create function add_key(vtable text, attr text[]) returns void as $$-declare-  cn text;-begin-  cn := vtable || '_' ||-    array_to_string(attr, '_') || '_key';-  cn := sort_out_constraint_name(cn, '_key');-  perform add_constraint_internal(cn,-$a$(select count(*) from $a$ || vtable || $a$ ) =-(select count(distinct $a$ || array_to_string(attr, ', ') || $a$)-from $a$ || vtable || $a$)$a$,-     array[vtable], true);-  perform set_pg_unique(cn, vtable, attr);-end;-$$ language plpgsql volatile;---- shortcut for a key on one attribute-create function add_key(vtable text, attr text) returns void as $$-begin-  perform add_key(vtable, array[attr]);-end;-$$ language plpgsql volatile;--/*-=== fk/ references--The system generalises foreign keys-to a generic 'the tuples in the select expression must be a subset of-the tuples in this other select expression'. This allows-foreign keys to views, and to non key columns.--*/--- this function is used in the add foreign key function-create function attrs_are_key(text, text[]) returns boolean as $$-  select exists-  (select constraint_name, count(attribute_name)-    from base_relvar_keys-    natural inner join base_relvar_key_attributes-    where relvar_name = $1-    group by constraint_name-  intersect-  select constraint_name, count(attribute_name)-    from base_relvar_keys-    natural inner join base_relvar_key_attributes-    where relvar_name = $1-      and attribute_name = any ($2)-    group by constraint_name);-$$ language sql stable;-insert into system_implementation_objects-  (object_name,object_type) values-  ('attrs_are_key', 'operator');---- foreign key to view/expression shortcut-create function add_foreign_key(vtable text,-                                 src_attr text[],-                                reftable text,-                                ref_attr text[])-  returns void as $$-declare-  i int;-  vcn text;-  bt text[];-  accel boolean;-begin-/*--automatically generate a name for this constraint in the catalog at-some point, you'll have to provide a name for every constraint-manually (plus some other stuff, like error message variants and-documentation to display in end user programs for user friendliness)--*/-  vcn := vtable || '_' || array_to_string(src_attr, '_') || '_fkey';-  vcn := sort_out_constraint_name(vcn, '_fkey');-  -- make sure we get a unique name in case there are multiple foreign keys-  -- on one set of attributes-  --TODO: rewrite this to use max instead of looping-  -- if target is a base relvar and the target attributes are a key then-  -- pg accelerate it-  if exists(select 1 from database_constraints where-        constraint_name = vcn) then-    i := 1;--- I must be going mad cos I can't find the convert--- int to string in base 10 function in pg...-    while exists(select 1 from database_constraints where-      constraint_name = vcn || to_hex(i)) loop-      i := i + 1;-    end loop;-    vcn := vcn || to_hex(i);-  end if;-  --now try to automatically determine the list of base relvars-  --that this constraint depends on-  -- I think this means that references involving views are a bit-  --broken...-  --TODO: get to the bottom of this, and fix it if necessary-  if exists(select 1 from base_relvars-      where relvar_name = reftable) then-    bt := array[vtable, reftable];-  else-    bt := array[vtable];-    raise notice 'fk on % ignoring view %', vtable, reftable;-  end if;--  accel := attrs_are_key(reftable, ref_attr);-  -- add constraint-  perform add_constraint_internal(vcn, 'not exists-(select ' || array_to_string(src_attr, ', ') ||-  ' from ' || vtable || '-  except-select ' || array_to_string(ref_attr, ', ') ||-  ' from ' || reftable || ')',-bt, accel);-  if accel then-    perform set_pg_fk(vcn, vtable, src_attr, reftable, ref_attr);-  end if;--end;-$$ language plpgsql volatile;----- add foreign key shortcuts for special cases:---same attributes-create function add_foreign_key(vtable text, src_attr text[], reftable text)-  returns void as $$-begin-  perform add_foreign_key(vtable, src_attr, reftable, src_attr);-end;-$$ language plpgsql volatile;--- one attribute-create function add_foreign_key(vtable text,-                                 src_attr text,-                                reftable text,-                                ref_attr text)-  returns void as $$-begin-  perform add_foreign_key(vtable, array[src_attr], reftable, array[ref_attr]);-end;-$$ language plpgsql volatile;---- same one attribute-create function add_foreign_key(vtable text, src_attr text, reftable text)-  returns void as $$-begin-  perform add_foreign_key(vtable, array[src_attr], reftable, array[src_attr]);-end;-$$ language plpgsql volatile;--/*-=== upto 1 tuple-table cardinality 0 or 1 constraint-don't know if there is a better way to do this--*/--create function constrain_to_zero_or_one_tuple(table_name text)-  returns void as $$-begin-  execute $a$select add_constraint('$a$ || table_name || $a$_01_tuple',-    '(select count(*) from $a$ || table_name || $a$) <= 1',-    array['$a$ || table_name || $a$']);$a$;-end;-$$ language plpgsql volatile;--/*--cascade: add cascade to a fk relationship from one base relvar to-another base relvar (implemented using pg on update cascade on delete-cascade)--== internals--each expression gets wrapped up as a function:-every check including those that are accelerated are- in this table so they can be sanity checked.- these operators are not used when checking table updates--so this table contains one function per user constraint-the function can be used to check the constraint holds-(without using any acceleration)-*/--create table dbcon_ops (-  constraint_name text,-  operator_name text-);-insert into system_implementation_objects(object_name, object_type)-  values ('dbcon_ops', 'base_relvar');--/*-this is the catalog bit that tells us which tables are referenced-by which constraints. In particular, this is used when generating-the trigger for a table which enforces all the constraints.--*/-create table dbcon_relvars (-  constraint_name text,-  relvar_name text-);-insert into system_implementation_objects(object_name, object_type)-  values ('dbcon_relvars', 'base_relvar');--create function sort_out_constraint_name(cn text,suffix text)-  returns text as $$-begin-  --truncate the name if too long-  --make sure it's unique-  --preserve the suffix-  if length(cn) > 54 then-    --wtf kind of syntax is this?!-    return substring(cn from 0 for (54 - length(suffix))) || suffix;-  else-    return cn;-  end if;-end;-$$ language plpgsql volatile;--/*-=== acceleration ish-==== views for postgresql stuff-track all the pg accelerated constraints-constraint_name, relvar_name, expression-*/-create view check_pg as-  select conname as constraint_name, relname as relvar_name,--- currently displayed as 'CHECK((expression))' for some reason.-    pg_get_constraintdef(pg_constraint.oid) as expression-    from pg_constraint-  inner join pg_class on (conrelid = pg_class.oid)-    where contype = 'c' and connamespace =-      (select oid from pg_namespace where nspname='public');-insert into system_implementation_objects(object_name, object_type)-  values ('check_pg', 'view');--/*-This view shows all the pg accelerated key constraints :-constraint_name, relvar_name, attribute_name-*/-create view key_pg as -- not normalised-  select constraint_name, relvar_name, attribute_name from-    (select conname as constraint_name, conrelid,-      conkey[generate_series] as attnum-      from pg_constraint-      cross join generate_series(1,-        (select max(array_upper(conkey, 1)) from pg_constraint))-      where contype in('p', 'u') and connamespace =-        (select oid from pg_namespace where nspname='public')-      and generate_series between-      array_lower(conkey, 1) and-      array_upper(conkey, 1)) as a-      -- 'a' contains what we want, but with oids for-      -- relvar and attribute names-      -- natural join in these using renames-      -- using natural joins and renames makes-      -- the sql code much clearer-  natural inner join-    (select oid as conrelid, relname as relvar_name from pg_class) as b-  natural inner join-    (select attrelid as conrelid, attname as attribute_name,-    attnum from pg_attribute) as c---  order by constraint_name-  ;-insert into system_implementation_objects(object_name, object_type)-  values ('key_pg', 'view');--/*-pg accelerated foreign keys--constraint_name, relvar_name, attribute_name,-target_relvar_name, target_attribute_name--*/--create view fk_pg as -- not normalised-  select constraint_name, relvar_name, attribute_name,-    target_relvar_name, target_attribute_name from-    (select conname as constraint_name, conrelid, confrelid,-      conkey[generate_series] as attnum,-      confkey[generate_series] as fattnum-      from pg_constraint-      cross join generate_series(1,-        (select max(array_upper(conkey, 1)) from pg_constraint))-      where contype = 'f' and connamespace =-        (select oid from pg_namespace where nspname='public')-      and generate_series between-      array_lower(conkey, 1) and-      array_upper(conkey, 1)) as a-  natural inner join-    (select oid as conrelid,-            relname as relvar_name from pg_class) as b-  natural inner join-    (select oid as confrelid,-            relname as target_relvar_name from pg_class) as c-  natural inner join-    (select attrelid as conrelid, attname as attribute_name,-      attnum from pg_attribute) as d-  natural inner join-    (select attrelid as confrelid, attname as target_attribute_name,-      attnum as fattnum from pg_attribute) as e---  order by constraint_name-  ;-insert into system_implementation_objects(object_name, object_type)-  values ('fk_pg', 'view');-/*-==== functions to activate pg stuff-These add the pg constraint, and insert into the-accelerated constraint catalog relvar-*/-create function check_constraint_name(cn text) returns void as $$-begin-  if length(cn) > 54 then-    raise exception-      'pg constraint names must be 54 chars or less, you have % (%)',-      length(cn), cn;-  end if;-end;-$$ language plpgsql volatile;--create function set_pg_unique-  (vconstraint_name text, vrelvar_name text, vattributes text[])-  returns void as $$-begin-  perform check_constraint_name(vconstraint_name);-  execute 'alter table ' || vrelvar_name ||-    ' add constraint ' || vconstraint_name || ' unique(' ||-   array_to_string(vattributes, ', ') || ');';-  insert into con_pg(constraint_name)-    values(vconstraint_name);-end;-$$ language plpgsql volatile;--insert into system_implementation_objects(object_name, object_type)-  values ('set_pg_unique', 'operator');--create function set_pg_check-  (vconstraint_name text, vrelvar_name text, vexpression text)-  returns void as $$-begin-  perform check_constraint_name(vconstraint_name);-  execute 'alter table ' || vrelvar_name || 'add constraint '-    || vconstraint_name || ' check(' || vexpression || ');';-  insert into con_pg(constraint_name)-    values(vconstraint_name);-end;-$$ language plpgsql volatile;-insert into system_implementation_objects(object_name, object_type)-  values ('set_pg_check', 'operator');--create function set_pg_fk-  (vconstraint_name text, vrelvar_name text, vattributes text[],-   vtarget_relvar_name text, vtarget_attributes text[]) returns void as $$-begin-  perform check_constraint_name(vconstraint_name);-  execute 'alter table ' || vrelvar_name || ' add constraint '-     || vconstraint_name || ' foreign key(' ||-    array_to_string(vattributes, ',') || ') references ' ||-    vtarget_relvar_name || '(' ||-    array_to_string(vtarget_attributes, ',') ||---just uses cascade for now, revisit this decision at some point.-    ') on update cascade on delete cascade;';--  insert into con_pg(constraint_name)-    values(vconstraint_name);-end;-$$ language plpgsql volatile;-insert into system_implementation_objects(object_name, object_type)-  values ('set_pg_fk', 'operator');---/*--===== internal catalog for pg ish-*/--- save which constraints have pg accelerators-create table con_pg (-  constraint_name text-);-insert into system_implementation_objects(object_name, object_type)-  values ('con_pg', 'base_relvar');--/*-==== general constraint implementation--remember trigger functions used to enforce constraints-all trigger functions have same sig so just record name-*/-create table dbcon_trigger_ops (-  operator_name text-);-insert into system_implementation_objects(object_name, object_type)-  values ('dbcon_trigger_ops', 'base_relvar');--- remember triggers used for constraints-  --triggers have to be dropped with name and table so record both-create table dbcon_triggers (-  trigger_name text,-  relvar_name text-);-insert into system_implementation_objects(object_name, object_type)-  values ('dbcon_triggers', 'base_relvar');--/* trigger code-atm it redoes all of them whenever anything changes.-Constraints are not changed much so this should be ok, possibly it-slows down the reset process.--Take all the constraints-exclude ones implemented by pg accelerators-then for each table referenced by the remaining constraints-* generate a function which checks all the-(non pg accel'd) constraints for that table and raises if any aren't true-* generate a trigger to call the function whenever that-table changes--*/-create view non_accelerated_constraints as-select relvar_name,constraint_name,expression-       from dbcon_relvars-       natural inner join database_constraints-    where constraint_name not in-      (select constraint_name from con_pg);--insert into system_implementation_objects(object_name, object_type)-  values ('non_accelerated_constraints', 'view');--create function regenerate_constraint_triggers() returns void as $$-declare-  r record;-  s record;-  f text;-  table_trigger_function text;-  table_trigger text;-begin-  --clean up old triggers and trigger functions-  --store names in table so they can be dropped-  for r in select * from dbcon_triggers loop-    execute 'drop trigger ' || r.trigger_name || ' on '-      || r.relvar_name || ';';-    delete from system_implementation_objects-      where object_name=r.trigger_name-        and object_type='trigger';-  end loop;-  delete from dbcon_triggers;--  for r in select * from dbcon_trigger_ops loop-    execute 'drop function ' || r.operator_name || '();';-    delete from system_implementation_objects-      where object_name=r.operator_name-        and object_type='operator';-  end loop;-  delete from dbcon_trigger_ops;--/*-if constraints are handled by pg constraints, then we-just ignore them here - don't need any operators or triggers-for them.-*/-  for r in select distinct(relvar_name) from non_accelerated_constraints loop-    -- for this table create a trigger function which calls all the relevant-    -- constraint check operators-    table_trigger_function := r.relvar_name || '_constraint_trigger_operator';-    table_trigger := r.relvar_name || '_constraint_trigger';-    --it's a bit tricky following this-    -- start the function definition-    f := $f$create function $f$ || table_trigger_function ||-$f$() returns trigger as $a$-begin---    raise notice 'in constraint op for $f$ || r.relvar_name || $f$';-$f$;-    -- loop through the constraints-    for s in select distinct constraint_name, expression-             from non_accelerated_constraints-             where relvar_name = r.relvar_name loop-      -- and add a line for each one which checks if-      --it is true, otherwise raises-      f := f  ||-$f$  if not $f$ || s.expression  || $f$ then-    raise exception-      'value violates database constraint "$f$ || s.constraint_name || $f$"';-  end if;-$f$;-    end loop;-    f := f ||-$f$---  raise notice 'complete constraint op for $f$ || r.relvar_name || $f$';-  return OLD;-end;-$a$ language plpgsql;$f$;-    --create the function-    execute f;-    insert into system_implementation_objects(object_name, object_type)-      values (table_trigger_function, 'operator');--    --now create the trigger to call the function-    execute-$f$create trigger $f$ || table_trigger ||-$f$ after insert or update or delete on $f$ || r.relvar_name ||-$f$ for each statement execute procedure $f$ || table_trigger_function ||-$f$();$f$;-    insert into system_implementation_objects(object_name, object_type)-      values (table_trigger, 'trigger');-    insert into dbcon_triggers-      (trigger_name, relvar_name)-      values(table_trigger, r.relvar_name);-    insert into dbcon_trigger_ops-      (operator_name)-      values(table_trigger_function);-  end loop;-end;-$$ language plpgsql volatile;-insert into system_implementation_objects(object_name, object_type)-  values ('regenerate_constraint_triggers', 'operator');--/*-todo: static check - if there are constraints that fisher price my first-constraints system doesn't know about then complain, add this as-a sql test i.e. check_blah returns bool-*/--- add constraints to the tables already mentioned---which we can't do in the right place since we have to---wait for the constraint system to be defined--select add_key('system_implementation_objects',-        array['object_name', 'object_type']);----comment this one out since it triples the reset speed---select add_foreign_key('system_implementation_objects',---       array['object_name', 'object_type'],---       'all_database_objects');---run it as a test so at least we keep checking it-create function check_code_slow_si_objects_constraints() returns boolean as $$-begin-  if not exists-     (select object_name, object_type from system_implementation_objects-      except-      select object_name, object_type from all_database_objects) then-    return true;-  else-    return false;-  end if;-end;-$$ language plpgsql volatile;---select add_key('database_constraints', 'constraint_name');--select add_key('dbcon_ops', 'constraint_name');-select add_key('dbcon_ops', 'operator_name');-select add_foreign_key('dbcon_ops', 'constraint_name',-                       'database_constraints');---select add_foreign_key('dbcon_ops', 'operator_name', 'operators');--select add_key('dbcon_relvars', array['constraint_name', 'relvar_name']);-select add_foreign_key('dbcon_relvars', 'constraint_name',-                       'database_constraints');-select add_foreign_key('dbcon_relvars', 'relvar_name', 'base_relvars');--select add_key('con_pg', 'constraint_name');-select add_foreign_key('con_pg', 'constraint_name', 'database_constraints');-select add_foreign_key('con_pg', 'constraint_name',-  '(select constraint_name from check_pg union-   select constraint_name from key_pg union-   select constraint_name from fk_pg) as x');--select add_key('dbcon_trigger_ops', 'operator_name');-select add_foreign_key('dbcon_trigger_ops', 'operator_name', 'operators');--select add_key('dbcon_triggers', 'trigger_name');-select add_foreign_key('dbcon_triggers', array['trigger_name', 'relvar_name'],-  'triggers');--/*-=== ghetto test thing-want to write some tests for this constraint system just as a sanity-check for now:-arbitrary check e.g. cardinality < 5-arbitrary check multiple tables e.g. sum cardinality of two tables-check without acceleration?:-fk-fk to view-unique-x,y in board size range from another table--for each check:-check adding constraint to invalid tables throws-check adding constraint to valid tables OK-insert OK data into constrained tables-insert bad data into constrained tables--accelerated checks-fk to view-x,y in board size range-check acceleration for normal checks & fk without pg?--pg accelerated checks:-just check pg catalog to see if inserted-check-fk-unique--all todo: yes, that means there is no direct testing of any of the-constraint stuff...--=== transition constraints--quickly hacked together. at the moment only supports constraints involving-a single tuple at a time from a single table. Separate functions-to create a constraint for updates, inserts and deletes.-I'm still not sure transition constraints like this are useful.-*/--create function create_x_transition_tuple_constraint(-   relvar_name text, constraint_name text, constraint_expression text,-   statement_type text) returns void as $$-declare-  st text;-begin-  st := $f$-create function check_$f$ || constraint_name || $f$() returns trigger as $a$-begin-  if not ($f$ || constraint_expression || $f$) then-    raise exception '$f$ || statement_type || $f$ on $f$ || relvar_name ||-      $f$ violates transition constraint $f$ || constraint_name || $f$';-  end if;-$f$;-  if statement_type = 'update' or statement_type = 'insert' then-    st := st || '  return OLD;';-  else-    st := st || '  return null;';-  end if;-  st := st || $f$-end;-$a$ language plpgsql volatile;$f$;--  execute st;-  insert into system_implementation_objects(object_name,object_type)-    values ('check_' || constraint_name, 'operator');--  execute $f$-    create trigger $f$ || constraint_name ||-    $f$_transition_trigger after $f$ ||-    statement_type || $f$ on $f$ || relvar_name || $f$-      for each row execute procedure check_$f$-      || constraint_name || $f$();$f$;--  insert into system_implementation_objects(object_name,object_type)-    values (constraint_name || '_transition_trigger', 'trigger');--end;-$$ language plpgsql volatile;-insert into system_implementation_objects-  (object_name, object_type) values-  ('create_x_transition_tuple_constraint', 'operator');----create function create_update_transition_tuple_constraint(-   relvar_name text, constraint_name text, constraint_expression text)-   returns void as $$-begin-  perform create_x_transition_tuple_constraint(relvar_name,-    constraint_name, constraint_expression, 'update');-end;-$$ language plpgsql volatile;--create function create_insert_transition_tuple_constraint(-   relvar_name text, constraint_name text, constraint_expression text)-   returns void as $$-begin-  perform create_x_transition_tuple_constraint(relvar_name,-    constraint_name, constraint_expression, 'insert');-end;-$$ language plpgsql volatile;--create function create_delete_transition_tuple_constraint(-   relvar_name text, constraint_name text, constraint_expression text)-   returns void as $$-begin-  perform create_x_transition_tuple_constraint(relvar_name,-    constraint_name, constraint_expression, 'delete');-end;-$$ language plpgsql volatile;--/*---================================================================================--= modules--The module system is designed to break programs up into-parts. At some point would like to add namespacing-(e.g. import and export lists, for modules with-enforcement by the compiler).-At the moment it's mainly just used by the documentation-generators and e.g. could be used to assist when browsing-the database in gui and to organise documentation--documentation here needs a bit more work--module order is a hack to allow a program to get the modules-out in the order they are created, which should match up to-the order in which they appear in the source.-*/-create table modules (-  module_name text,-  module_parent_name text,-  module_order serial-);-select add_key('modules', 'module_name');----can't add this constraint cos it causes another constraint violation--- haven't worked out why yet---select add_foreign_key('modules', 'module_name',---  'modules', 'module_parent_name');--insert into modules (module_name, module_parent_name)-  values ('root', 'root');--create table all_module_objects (-  object_name text,-  object_type text,-  module_name text-);-insert into system_implementation_objects(object_name, object_type)-  values ('all_module_objects', 'base_relvar');-select add_key('all_module_objects', array['object_name', 'object_type']);-select add_foreign_key('all_module_objects', 'module_name',-  'modules');--/*-todo: when we get recursive with in pg 8.4,-add view to give module paths from the root to a module-*/--create view implementation_module_objects as-  select * from all_module_objects natural inner join-    system_implementation_objects;--insert into system_implementation_objects(object_name, object_type)-  values ('implementation_module_objects', 'view');--create view module_objects as-  select object_name, object_type, module_name-    from all_module_objects-  except-  select object_name, object_type, module_name-    from implementation_module_objects;--/*-hack to only name the module once after all its contents-since everything in my catalog is in a module, can just find-all objects without a module which is the objects which have-just been added, and set their module. This saves having to add-each object to a module individually-*/--create function set_module_for_preceding_objects(vmodule_name text)-  returns void as $$-begin-  insert into all_module_objects(module_name, object_name, object_type)-    select vmodule_name as module_name, object_name, object_type from-      (select object_name, object_type from all_database_objects-        except select object_name, object_type-        from all_module_objects) as a;-end;-$$ language plpgsql volatile;--create function new_module(mname text, mparent text) returns void as $$-begin-  insert into modules (module_name, module_parent_name)-    values(mname, mparent);-end;-$$ language plpgsql volatile;--select new_module('system', 'root');-select new_module('catalog', 'system');--select set_module_for_preceding_objects('catalog');---create function check_code_module_membership() returns boolean as $$-declare-  success boolean := true;-  r record;-begin-  --returns false if any objects with no package-  --also list problems them using raise notice-  for r in select object_name, object_type from all_database_objects-      except select object_name, object_type-      from all_module_objects loop-    success := false;-    raise notice '% % - no module', r.object_type, r.object_name;-  end loop;-  return success;-end;-$$ language plpgsql volatile;----- add in all internal objects already defined-select set_module_for_preceding_objects('catalog');--/*--================================================================================--= utils--needs some work--*/-select new_module('utils', 'system');--/*-== set all columns to not null--saves us putting not null all over almost every table definition--The _mr suffix was left over from an attempt to do some sort of poor-man's multirelation system.  The _mr tables can contain nullable as-well as non-nullable columns, so we leave them alone when setting non-nulls and ignore them when checking for nullable attributes.--*/-create function set_all_attributes_to_not_null() returns void as $$-begin-  update pg_attribute set attnotnull = true-    where attrelid in-      (select oid from pg_class where relnamespace =-        (select oid from pg_namespace-           where nspname = 'public')-           and relkind = 'r'-           --don't touch 'multirelations'-           and not exists(select 1 from regexp_matches(relname, '_mr$')))-    and attnum >= 1;-end;-$$ language plpgsql volatile;--/*-since we can't put triggers on the catalog, at least make sure the above-function has been run in the tests.-verify all attributes in tables are not null. This doesn't affect views-which may have null values.-*/-create function check_code_no_nullable_table_columns() returns boolean as $$-declare-  r record;-  success boolean;-begin-  success := true;-  --check every table is tagged with one of-  --readonly, data, argument, widget_state-  for r in select table_name, column_name-      from information_schema.columns-      inner join base_relvars-        on (table_name = relvar_name)-      where is_nullable='YES'-        --ignore touch multirelations-        and not exists(select 1 from regexp_matches(table_name, '_mr$')) loop-    success := false;-    raise notice '%.% - nullable column', r.table_name, r.column_name;-  end loop;-  return success;-end;-$$ language plpgsql volatile;--/*--== relvars with 0 or 1 values (i.e. 0-1 tuples, one attribute)-only provide a shortcut for select, the rest might as well be in normal sql-rather than wrapped in a function.-*/-create function create_var(vname text, vtype text) returns void as $$-begin---  create table name_table(name type primary key)-  execute $f$create table $f$ || vname || $f$_table ($f$ ||-    vname || $f$ $f$ || vtype || $f$);$f$;-  execute $f$select add_key('$f$ || vname || $f$_table',-                            '$f$ || vname || $f$');$f$;---  adds 0 or 1 tuple constraint to this table-  --execute $f$select notify_on_changed(-  --     '$f$ || vname || $f$_table');$f$;-  execute $f$select constrain_to_zero_or_one_tuple(-    '$f$ || vname || $f$_table');$f$;---  creates (static) functions:---    insert_name inserts value into table---    (will error if table isn't empty)---  execute 'create function insert_' || vname ||-    -- '(' || vtype || ') returns void as $a$\n ' ||---    'insert into ' || vname || '_table values($1);\n' ||---    '$a$ language sql volatile;';---    update_name updates value in table---  (will error if table is empty)---  execute 'create function update_' || vname || '(' || vtype || ')---    returns void as $a$\n ' ||---    'update ' || vname || '_table set ' || vname || ' = $1;\n' ||---    '$a$ language sql volatile;';---    delete_name deletes from table---    (doesn't error if table is already empty)---  execute 'create function delete_' || vname || '()---    returns void as $a$\n ' ||---    'delete from ' || vname || '_table;\n' ||---    '$a$ language sql volatile;';---    get_name returns select * from table_name as a single value-  execute 'create function get_' || vname || '() returns ' ||-    vtype || E' as $a$\n ' ||-    'select * from ' || vname || E'_table;\n' ||-    '$a$ language sql stable;';---    drop_var_name - drop all this ish, cleanup---  execute 'create function dropvar_' || vname || E'()---      returns void as $a$\n ' ||---    'drop function dropvar_' || vname || E'();\n' ||---    'drop function insert_' || vname || '(' || vtype ||');\n' ||---    'drop function update_' || vname || '(' || vtype ||');\n' ||---    'drop function delete_' || vname || '();\n' ||---    'drop function get_' || vname || E'();\n' ||---    'drop table ' || vname || E'_table;\n' ||---    '$a$ language sql volatile;';-end;-$$ language plpgsql volatile;-/*-== table changed notifier macro--notifier: this function is used setup a trigger to notify with table-name when a table changes. It should be applied to all the data-tables.--*/--create function notify_on_changed(table_name text) returns void as $$-begin-  execute 'create function ' || table_name-    || E'_changed() returns trigger as $a$\n'-    || E'begin\n'-    || 'notify ' || table_name || E';\n'-    || E'return null;\n'-    || E'end;\n'-    || '$a$ language plpgsql volatile;';-  --perform add_to_package('utils', 'notify_table_' ||---    table_name || '_changed', 'trigger_function');-  insert into system_implementation_objects-    (object_name, object_type) values-     (table_name || '_changed', 'operator');--  execute 'create trigger ' || table_name || '_changed'-    || ' after insert or update or delete on '-    || table_name || ' execute procedure '-    || table_name || '_changed();';-  insert into system_implementation_objects-    (object_name, object_type) values-     (table_name || '_changed', 'trigger');--end;-$$ language plpgsql volatile;--select set_module_for_preceding_objects('utils');