~3k      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij  klmnopqrstkpqrstkpqrstuuu6vwxyz{|}~x      x      x            Generate all $ instances for tuples within range.  Generate all $ instances for tuples within range.   Generate all $ instances for tuples within range. ! Derive the # instance for a record definition. "Add A instance to a record without adding the actual data definition.  Usefull in combination with " # Derive the ' instance for a record definition. See  ! for an example. $Add A instance to a record without adding the actual data definition.  Usefull in combination with " %Derive  instances &'Create lifted record selectors (HLookup a database table, create corresponding Haskell record data types $ and generate QA and View instances Example usage:  > $(generateRecords myConnection "users" "User" [''Show,''Eq]) >Note that the da is created at compile time, not at run time! Database connection  Table name )Data type name for each row of the table Default deriving instances 4Derive QA and View instances for record definitions Example usage:   $(generateInstances [d|   data User = User  { userId :: Int  , userName :: String  }   |]) MThis generates the following record type, which can be used in view patterns   data UserV = UserV  { userIdV :: Q Int  , userNameV :: Q String  }   instance View (Q User) UserV !and the liftet record selectors: ! userIdQ :: Q User -> Q Int $ userNameQ :: Q User -> Q String  !"#$%& !"#$%& )`Type of the environment under which we reconstruct ordinary haskell data from the query result. a The first component of the reader monad contains a mapping from (queryNumber, columnNumber) to e the number of a nested query. The second component is a tuple consisting of query number associated ` with a pair of the raw result data partitioned by iter, and a description of this result data. *UDescription of result data of a query. The field iterR contains the column number of ^ the iter column. resCols contains a for all items columns their column number in the result. +,-.MDescription of a table. The field iterN contains the name of the iter column \ the items field contains a list of item column names and their position within the result. /012HType representing a query bundle, the type variable represents the type S of the result of the query bundle. A bundle consists of pair of numbered queries. I Each query consists of the query itself, a schema explaining its types. V If the query is a nested value in the result of another query the optional attribute ] represents (queryID, columnID). The queryId refers to the number of the query in the bundle  the columnID refers 34,Wrapper type with phantom type for SQL plan A The type variable represents the type of the result of the plan 562Wrapper type with phantom type for algebraic plan A The type variable represents the type of the result of the plan 78LTranslate the algebraic plan to SQL and then execute it using the provided J DB connection. If debug is switchd on the SQL code is written to a file  named query.sql 9:;Translate an algebraic plan into SQL code using Pathfinder ;GExtract the SQL queries from the XML structure generated by pathfinder <JExecute the given SQL queries and assemble the results into one structure =*Retrieve the data asociated with query i. >&Get the position of item i of query q ??Get the id of the query that is nested in column c of query q. @IReconstruct the haskell value out of the result of query i with type ty. ATReconstruct the values for column c of query q out of the rawData vals with type t. BPartition by iter column 8 The first argument is the position of the iter column. " The second argument the raw data < It returns a list of pairs (iterVal, rawdata within iter) CCExecute the given query plan bundle, over the provided connection. X It returns the raw data for each query along with a description on how to reconstruct  ordinary haskell data DE5Transform algebraic plan scheme info into resultinfo F)*+,-./0123456789:;<=>?@ABCDEF)*+,-+,-./01/0123345567789:;<=>?@ABCDEF GThe HDBC connection HIJKRead SQL values into  values "Table name, used to generate more  informative error messages L Check if a M matches a  NO3Provide a fresh identifier name during compilation PBGet from the state the connection to the database QBLookup information that describes a table. If the information is F not present in the state then the connection is used to retrieve the & table information from the Database. R;Turn a given integer into a variable beginning with prefix __fv_ S/Execute the transformation computation. During 5 compilation table information can be retrieved from 8 the database, therefor the result is wrapped in the IO  Monad. "Execute the query on the database 2Convert the query into unoptimised algebraic plan 0Convert the query into optimised algebraic plan Convert the query into SQL TXevaluate compiles the given Q query into an executable plan, executes this and returns \ the result as norm. For execution it uses the given connection. If the boolean flag is set = to true it outputs the intermediate algebraic plan to disk. U=Transform a query into an algebraic plan. V/Transform the Query into a ferry core program. WTransform a function argument X2Construct a flat-FerryCore type out of a DSH type D A flat type consists out of two tuples, a record is translated as: ? {r1 :: t1, r2 :: t2, r3 :: t3, r4 :: t4} (t1, (t2, (t3, t4))) YZ8Transform an arbitrary DSH-type into a ferry core type [,Transform a ferry-core type into a DSH-type \3Translate the DSH operator to Ferry Core operators ]STransform a DSH-primitive-function (f) with an instantiated typed into a FerryCore  expression ^/Retrieve all DB-table names from a DSH program _cRetrieve through the given database connection information on the table (columns with their types) 5 which name is given as the second argument.  S !"#$%&'()*+, Boolean fold  | It'.s first argument is used in the case of False  | It'.s second argument is used in the case of True % | The third argument is the boolean -./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijS !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijS !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij`abcdefghijklmnopqrstuvwxyz{|}~     M !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghije !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij       !" # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t uvwxyz{|}~#      !"#$%&'()*+,-./0 1 2 2 3 4 5 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K LMINOPQRSTUVWMXYZ[\]^_`abcdecfgcdhijkclmcdncdocpqcprcstcuvcuwcuxcuycpzcd{cd|cd}cd~cucucccscscdcdcpcccsccsciiiiiicsiccdiicccccclccRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR R R R R RRRRRRRRRRRRRRRSRSRSRSRS RS!RS"RS#RS$RS%RS&RS'RS(RS)RS*RS+RS,RS-RS.RS/RS0RS1RS2RS3RS4RS5RS6RS7c89cl:cl;cl<cl=cl>cl?cl@clAclBclCclDcEFcGHcIcJcKLcKMcKNcKOcKPcKQcRcScTcUcVcWcXcYcZc[c\c]c^c_c`cacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucGvcGwcsxcsycszcs{cs|cs}cs~cscscscscscscscscscscscscscscscscfccccccpcpcpcpcpccccccccccccccccccccccccucucucucucucccdcdcdcdcdcdcdciii DSH-0.5.3 Database.DSHDatabase.DSH.InterpreterDatabase.DSH.Compiler Paths_DSHDatabase.DSH.ImpossibleDatabase.DSH.QQDatabase.DSH.DataDatabase.DSH.THDatabase.DSH.CompileDatabase.DSH.CSVDatabase.DSH.CombinatorsqcViewviewfromViewTA BasicTypeQAQtabletableDB tableWithKeystableCSVtuplerecordgenerateRecordsgenerateInstances csvExport csvImportfromQ debugPlan debugPlanOpt debugCoredebugSQLunitfalsetruenot&&||eq==neq/=lt<lte<=gte>=gt>minmaxboolcond? listToMaybe maybeToListnothingjust isNothingisJustfromJustmaybe fromMaybe catMaybesmapMaybenilemptycons<|snoc|> singletonheadtailtakedropmapappend><filter groupWithsortWiththelastinitnulllengthindex!!reverseandoranyallsumconcat concatMapmaximumminimumsplitAt takeWhile dropWhilespanbreakelemnotElemzipzipWithunzipnubfstsndintegerToDoubletoQversionbindirlibdirdatadir libexecdir getBinDir getLibDir getDataDir getLibexecDirgetDataFileName impossibleN combinatorModdataModunwrapNfreshVarrunNquoteListCompr transform parseComprferryParseMode exprParserexpand ferryHaskellfprwtranslateListComprnormParallelComprnormaliseQualsnormaliseQuals' normaliseQualcombineunzipBviewNpatVvarVvariablesFromLstsvariablesFromLst variablesFrom makeLambda mkViewPatviewTupviewVpatToExpfstVsndVmapVmapFconsFnilFnilVconsV fromViewV fromViewFconcatFconcatVboolF groupWithFzipVzipFtoNameG globalQualstablePersistencereifytoNormfromNormTableTableCSVTableDBTypeArrowTListTTupleTTextTDoubleTIntegerTCharTBoolTUnitTNormListNTupleNTextNDoubleNIntegerNCharNBoolNUnitNFun3ZipWithCondFun2MinMaxGtGteLteLtDisjConjEquSplitAt TakeWhile DropWhileSpanBreakZip GroupWithFilterAppendMapDropTakeSnocConsSortWithIndexAnyAllDivSubMulAddFun1NubTheLastInitNullLengthReverseOrAndSumConcatMaximumMinimumUnzipTailHeadIntegerToDoubleNotSndFstExpVarETableEAppE3AppE2AppE1LamEListETupleETextEDoubleEIntegerECharEBoolEUnitEtypeExptypeArrowResult typeTupleFst typeTupleSndtypeNormforgettoLam1toLam2 unfoldType arrowChainT applyChainT applyChainEapplyChainTuplePapplyChainTupleE deriveTupleQAgenerateDeriveTupleQARange deriveTupleTAgenerateDeriveTupleTARangederiveTupleViewgenerateDeriveTupleViewRangederiveQAForRecordderiveQAForRecord'deriveViewForRecordderiveViewForRecord'deriveTAForRecordderiveTAForRecord'recordQSelectorsrecordQSelectors'QueryR ResultInfoiterRresCols SchemaInfoiterNitems QueryBundleBundleSQLXMLSQL AlgebraXMLAlgebra executePlanalgToAlgalgToSQL extractSQLrunSQL getResults getColResPos findQueryprocessResultsprocessResults' partByIterrunQuerydshFetchAllRowsStrictschemeToResult buildRefMapevaluateescapeevalLamsqlToNormWithType typeMatch HDBC-2.2.6.1Database.HDBC.SqlValueSqlValue getConnection tableInfo prefixVar doCompile transformE transformArgflatFTysizeOfTy transformTy transformTy' transformOp transformF getTableNames getTableInfobaseGHC.Base++GHC.Errerrorfoldrghc-primGHC.Primseq System.IOprint otherwise$GHC.Num fromInteger-GHC.Real fromRationalGHC.EnumenumFrom enumFromThen enumFromToenumFromThenTonegatefail>>=>>returnBoundedEnum GHC.ClassesEq GHC.FloatFloating FractionalIntegralMonadFunctorNumOrdGHC.ReadReadReal RealFloatRealFracGHC.ShowShowGHC.BoolBool GHC.TypesCharDoubleFloatInt integer-gmpGHC.Integer.TypeInteger GHC.OrderingOrderingRationalIO Data.EitherEitherStringFalseTrueLeftRightGHC.IOFilePath Data.MaybeMaybeNothingreadFile Text.ReadreadText.ParserCombinators.ReadPReadSDatabase.HDBC.Utils throwSqlError quickQuery' quickQueryfetchAllRowsMap'fetchAllRowsMapfetchAllRowsAL'fetchAllRowsAL fetchRowMap fetchRowALsFetchAllRows' sFetchAllRows fetchAllRows' fetchAllRowswithTransaction sFetchRow sExecuteManysExecutesRunhandleSqlError sqlExceptions handleSqlcatchSqlDatabase.HDBC.Types withWConn describeTable getTablesdbTransactionSupport dbServerVerproxiedClientVerproxiedClientName hdbcClientVerhdbcDriverNameclonepreparerunrunRawrollbackcommit disconnect IConnection ConnWrapperDatabase.HDBC.StatementdescribeResult originalQuerygetColumnNamesfetchRowfinish executeMany executeRawexecute Statement seErrorMsg seNativeErrorseStateSqlErrorDatabase.HDBC.ColTypes colNullable colDecDigitscolOctetLengthcolSizecolType SqlColDescSqlCharT SqlVarCharTSqlLongVarCharT SqlWCharT SqlWVarCharTSqlWLongVarCharT SqlDecimalT SqlNumericT SqlSmallIntT SqlIntegerTSqlRealT SqlFloatT SqlDoubleTSqlBitT SqlTinyIntT SqlBigIntT SqlBinaryT SqlVarBinaryTSqlLongVarBinaryTSqlDateTSqlTimeTSqlTimeWithZoneT SqlTimestampTSqlTimestampWithZoneTSqlUTCDateTimeT SqlUTCTimeT SqlIntervalTSqlGUIDT SqlUnknownT SqlTypeIdSqlIntervalMonthTSqlIntervalYearTSqlIntervalYearToMonthTSqlIntervalDayTSqlIntervalHourTSqlIntervalMinuteTSqlIntervalSecondTSqlIntervalDayToHourTSqlIntervalDayToMinuteTSqlIntervalDayToSecondTSqlIntervalHourToMinuteTSqlIntervalHourToSecondTSqlIntervalMinuteToSecondT SqlInterval posixToSqliToSqlnToSqlfromSql safeFromSqltoSql SqlString SqlByteString SqlWord32 SqlWord64SqlInt32SqlInt64 SqlIntegerSqlCharSqlBool SqlDouble SqlRational SqlLocalDateSqlLocalTimeOfDaySqlZonedLocalTimeOfDay SqlLocalTime SqlZonedTime SqlUTCTime SqlDiffTime SqlPOSIXTime SqlEpochTime SqlTimeDiffSqlNullPrelude$!readIOreadLn appendFile writeFileinteract getContentsgetLinegetCharputStrLnputStrputCharSystem.IO.ErrorcatchGHC.IO.ExceptionioErrorreadseither Data.Listunwordswordsunlineslinesproductfoldl1lex readParenreadList readsPrecacoshatanhasinhcoshtanhsinhacosatanasincostansinlogBase**logsqrtexppiatan2isIEEEisNegativeZeroisDenormalized isInfiniteisNaN scaleFloat significandexponent encodeFloat decodeFloat floatRange floatDigits floatRadixIOError userErrorlcmgcd^^^oddeven realToFrac fromIntegral toRational toIntegerdivModquotRemmoddivremquotrecip/floorceilingroundtruncateproperFraction undefined Control.MonadmapM_mapM sequence_sequence=<<subtractsignumabs*+ showParen showStringshowCharshowsShowSshowListshow showsPrecGHC.Listunzip3zipWith3zip3lookupcycle replicaterepeatiteratescanr1scanrfoldr1scanl1scanlfoldlJustmaxBoundminBoundfromEnumtoEnumpredsucc Data.TupleuncurrycurryasTypeOfuntilflip.constidfmapcompareGTEQLT text-0.11.0.5Data.Text.InternalText