wgN      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPPPQR@shadow: given two alists, return the elements of the first that  are NOT mapped by the second BTests that an alist or environment is well-formed: that its first  | components are all unique. STU/Convert a maybe to a zero-or-one-element list. VWX1zipAlist: given two alists with the same domain, 9 returns an alist mapping each of those domain values to @ the pair of the two corresponding values from the given lists. <mapstrcat: transform a list to one of strings, with a given / | function, and join these together with some glue string. "YZ[Q\]^_`aRbcdSefghijklmnoTpUVWqXrQRSTUVWX sEnable/disable debugging messages tATrace the given string if debugging is on, or do nothing if not. u+Force an arbitrary expression, tracing the String arg if  forcing produces an exception. stvustu wxwxwx yzyzyzz {|}{|}~{||} /Run an ErrorGensym action, raising errors with . ATry running an ErrorGensym action, packaging result in an Either + | with Left as failure, Right as success. propertyDefined x is a property asserting that x can be  | forced without error.  excAsFalse x is a property that acts like x, except that it  | is False when x/ would throw an exception (and never throws an  | exception itself). "Convert an arbitrary value into a Maybe by forcing it, ( | catching errors and treating them as Nothing. =A predicate asserting that forcing a thunk produces an error ; | (useful for tests that want to ensure error is thrown). 9Compare two functions at a particular input, incl. error  behavior. JarbString: Generate a string of some length between 0 and 6, each length  with equal probability  ftvs: free type variables DftvsSubst: the free type variables of a type substitution--that is, H the type variables free in the types in the range of the substitution. Coccurs x ty: does variable x appear in type ty? (Note there are no  type-variable binders). normalizeType: < Renumber all the type variables in a normal way to allow  comparing types. #      -BnumComps: Number of comprehensions in an expression, a measure of  the complexity of the query. =An interface for semanticizing the Narc concrete language as  | desired (as per %Unembedding domain specific languages by Atkey,  | Lindley and Yallop). BTerms whose every subexpression is annotated with a value of some  | particular type. @Terms in the nested relational calculus (represented concretely  | with named variables) ,substTerm x v m: substite v for x in term m G (Actually incorrect because it does not make substitutions in the q.) @lazyDepth: calculate a list (poss. inf.) whose sum is the depth  of the term. (unused) +P BappPrim: apply a primitive function to a list of value arguments. Ceval: Evaluate a typed term in a closing environment. Captures the E effects performed by the term. (NB: type info is not actually used;  should eliminate this.)    Query: the type of SQL queries (select R from Ts where B) C (This is unpleasant; it should probably be organized into various  syntactic classes.)  !"#$%&'()*+,-./0 sizeQuery7 approximates the size of a query by calling giving up G | its node count past a certain limit (currently limit = 100, below). 1 sizeQuery7 approximates the size of a query by calling giving up G | its node count past a certain limit (currently limit = 100, below). 2Ba groundQuery is a *real* SQL query--one without variables or appl'ns. 30a groundQueryExpr is an atomic-type expression. 4& !"#$%&'()*+,-./ 01  234   )/.-,+*#('&%$ !"01234   !" !"#('&%$$%&'()/.-,+**+,-./01234<tyCheck env term infers a type for term in environment env. ' The environment has type [(Var, QType)]; J an entry (x, qty) indicates that variable x has the quantified type qty; % a QType (ys, ty) indicates the type  forall ys, ty.   !2Normalize DB terms in a nearly call-by-value way. &An environment, typing all free vars. The term to normalize. "#$% translateTerm5 homomorphically translates a normal-form Term to an  | SQL Query. &'()))56Run a Narc query directly against an HDBC connection. 555 *+,3Generate a random term, unlikely to be well-typed. -./0123456 *+,-./0123456 *+,-./01234566789;Assertion that well-typed terms evaluate without throwing. :;6789:;6789:;6789:;7878978<6A polymorphic way of embedding constants into a term. =$Lift a constant value into a query. >:?BTranslate a Narc term to an SQL query string--perhaps the central  | function of the interface. @'Translate a Narc term to an SQL query. ;;Turn a HOAS representation of a Narc term into a concrete,  | named-binder representation. A%A dummy value, or zero-width record. B'Apply some primitive function, such as (+) or avg , to a list  of arguments. C!Create a functional abstraction. D(Apply a functional term to an argument. E>A reference to a named database table; second argument is its  schema type. FBA condition between two terms, as determined by the boolean value  of the first term. G$A singleton collection of one item. HAn empty collection. IThe union of two collections JBConstruct a record (name-value pairs) out of other terms; usually > used, with base values for the record elements, as the final ) result of a query, corresponding to the select clause of a SQL A query, but can also be used with nested results internally in a  query. K'Project a field out of a record value. L9For each item in the collection resulting from the first @ argument, give it to the function which is the second argument @ and evaluate--this corresponds to a loop, or two one part of a # cross in traditional SQL queries. M?Filter the current iteration as per the condition in the first  argument. Corresponds to a where clause in a SQL query.  <=>?@ABCDEFGHIJKLM>@?AE<=BCDFGHIJKLM <==>?@ABCDEFGHIJKLM< !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~        TUYZ[\]^_`abcdh     M !"#$%&'()*+,-./0123456789:;<=>?@ABCD narc-0.1.2Database.Narc.TypeDatabase.Narc.SQLDatabase.Narc.HDBCDatabase.Narc.Test Database.NarcDatabase.Narc.ContractDatabase.Narc.VarDatabase.Narc.UtilDatabase.Narc.DebugDatabase.Narc.CommonDatabase.Narc.PrettyGensymDatabase.Narc.FailureQCUtils Database.Narc.Failure.QuickCheckDatabase.Narc.ASTDatabase.Narc.EvalDatabase.Narc.AST.PrettyDatabase.Narc.SQL.PrettyDatabase.Narc.TypeInferDatabase.Narc.CompileDatabase.Narc.TermGenDatabase.Narc.RewriteTyEnvTySubstQTypeTypeTVarTRecordTArrTListTUnitTStringTNumTBoolTyVar emptyTySubst applyTySubst normalizeType instanceOfunifyunifyAllcomposeTySubst disjoinSubstQueryQExistsQIfQUnionQRecordQFieldQOpQNotQBoolQNumSelectrslttabscondUnOpAverageSumCountMaxMinOpDivideTimesMinusPlusLessEqsizeQueryExact sizeQuery groundQuerygroundQueryExpr serializerunmakeNormalizerTests unitTests runUnitTestsprop_eval_safeprop_typedTermGen_tyCheckmain ConstablecnstNarcTermnarcToSQLString narcToSQLunitprimAppabsapptable ifthenelse singletonnilunionrecordprojectforeachhavingcontractassertVar sortAlistonCorrespondingintSqrtdisjointasListisRightisLeft mapstrcatdomrngcollatecrossonRightonLeftshadowvalidEnvmr$>imagemapsunassocnubassocgraphalistmapbagEqsetEqucontainssetMinus\\\allEq disjointAlistzipAlisteqUpTo debugFlagdebugforceAndReport breakFlagFieldTabnamePrettyprettyGgensym runGensym ErrorGensymFailurerunError $fError()baseGHC.ErrerrorfaylisError isSuccessrunErrorGensymtryErrorGensymunderisErrorMSuccesspropertyDefined excAsFalse excAsNothingthrowsarbChar arbLetter arbWordChar arbStringLenvecTorposInt nonNegIntgenEnvtinyArgs verySmallArgs smallArgs mediumArgsbigArgsf_equal arbStringarbStringSizedgenIntLt expIntGenwhenssmallbighuge histogramsubsets chooseSubset arbSubsetfailPropignorefailureToPropertyfailureToPropertyIgnoreFailureisBaseTyisTyVar isDBRecordTy isRecordTy isDBTableTyftvsnumFtvs ftvsSubstoccurs instantiaterunNormalizeTypeprop_composeTySubstprop_unify_apply_substbindConstcnst_NarcSemboolnumstringvar TypedTerm PlainTermTermTerm'CompProjectRecordUnionNil SingletonIfTableAppAbsPrimAppStringNumBoolUnit substTerm lazyDepth entagulate retagulatefvs variablesrenamestrip!unit_primApp_var_abs_app_table_ ifthenelse_ singleton_nil_union_record_project_foreach_ValueVAbsVRecordVListVNumVBoolVUnitEnv fromValue initialEnvappPrimeval concatVLists emptyQuery freevarsQuery isQRecord serializeRow serializeAtom serializeOptyChecktypeAnnomakeInitialTyEnvinferinfer'inferTys inferType inferType' tyCheckTerms unquantTyperunInfer runTyCheck runInferType unitAssert tyCheckTests typingTest1 typingTest etaExpandnormTerminsert insertFurther minFreeFor translateTerm translateF translateZ translateBcompile smallIntGentypeGentermGen closedTermGen oneofMaybe typedTermGenclosedTypedTermGendbTableTypeGenlistGen identCharGenidentGenvarGenpairGenperhapsburwtypeCheckAndCompilerealize