úÎçÝd˜      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–— 2013 Kei HibinoBSD3ex8k.hibino@gmail.com experimentalunknownSafe;<=>?&¬ Interface of inference rule for  proof object.Infer   proof object.Specialized primary constraint.Specialized unique constraint.BProof object to specify table constraint for table record type r and constraint c.. Constraint is specified by composite key. Interface of inference rule for   proof object.Infer   proof object.Specialized primary constraint. Specialized not-null constraint. Specialized unique constraint. Constraint type. Primary key. Constraint type. Not-null key. Constraint type. Unique key. BProof object to specify table constraint for table record type r and constraint c! specified by a single column..Index of key which specifies table constraint.Unsafely generate  ( proof object using specified key index.Derivation rule for  . Derive Unique from Primary.Derivation rule for . Derive NotNull from Primary.Derivation rule of     for tuple (,) type. Inferred   proof object. Record type r! has unique key which is derived r has primary key. Inferred  proof object. Record type r# has not-null key which is derived r has primary key.Unsafely generate % proof object of single column value..Index of key which specifies table constraint.Unsafely generate * proof object using specified key indexes.Derivation rule for . Derive from  .Derivation rule for .˜ Inferred  proof object. Record type r$ has composite key which is derived r has single column key. Inferred  proof object. Record type r, has composite primary key which is derived r has single column primary key. Inferred  proof object. Record type r! has unique key which is derived r has primary key.Inference rule of     for tuple (,) type.'Key index which specify this constraintResult constraint proof object'Key index which specify this constraintResult constraint proof object    ™ š2013-2017 Kei HibinoBSD3ex8k.hibino@gmail.com experimentalunknownSafe7;<=>?STBq*Generic width value list of record fields. a is implicit rule to derive " a width proposition for type a.Generic programming ( ehttps://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#generic-programming*) with default signature is available for , class, so you can make instance like below:  {-# LANGUAGE DeriveGeneric #-} import GHC.Generics (Generic) -- data Foo = Foo { ... } deriving Generic instance PersistableWidth Foo !Interface of derivation rule for $."-Proposition to specify width of Haskell type aU. The width is length of database value list which is converted from Haskell type a.#/Restricted in product isomorphism record type b$Proposition to specify type q, is database value type, contains null value%"Null value of database value type q.&Unsafely specify $8 axiom from specified database null value which type is q.'extract constant value of #.( Get width › value of record type a.)Unsafely specify ", axiom from specified width of Haskell type a.*Unsafely specify " axiom for Haskell type a which is single column type.+Derivation rule of " for tuple (,) type.,Derivation rule of " from from Haskell type a into for Haskell type œ a.-5Implicitly derived null value of database value type..&Generic offset array of record fields./-Pass type parameter and inferred width value.4Inference rule of "- for Haskell unit () type. Derive from axiom.5Inference rule of " proof object for œ type.&"null value of database value type qResult proof object)Specify width of Haskell type aResult proof object !"#$%&'()*+,-./$%&"()*+, !-/#'. !#žŸ$ 2013-2017 Kei HibinoBSD3ex8k.hibino@gmail.com experimentalunknownSafe7;<=>?STmê77 q a is implicit rule to derive 9 q a% record parser function against type a.Generic programming ( ehttps://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#generic-programming*) with default signature is available for 7, class, so you can make instance like below: ² {-# LANGUAGE DeriveGeneric #-} import GHC.Generics (Generic) import Database.HDBC (SqlValue) -- data Foo = Foo { ... } deriving Generic instance FromSql SqlValue Foo 89 q a record parser function.99 q ah is data-type wrapping function to convert from list of database value type (to receive from database) [q] into Haskell type a3This structure is similar to parser. While running 9W behavior is the same as non-fail-able parser which parse list of database value type [q ] stream.So, 9 q is ¡ and ¢T instance like parser monad. When, you have data constructor and objects like below. ' data MyRecord = MyRecord Foo Bar Baz   foo :: 9$ SqlValue Foo foo = ... bar :: 9$ SqlValue Bar bar = ... baz :: 9 SqlValue Baz baz = ... You can get composed 9 like below. ] myRecord :: RecordFromSql SqlValue MyRecord myRecord = MyRecord <$> foo <*> bar <*> baz :Run 9F parser function object. Convert from list of database value type [q] into Haskell type a and rest of list [q].; Axiom of 9 for database value type q and Haskell type a<Run 9C parser function object. Convert from list of database value type [q] into Haskell type a.=Derivation rule of 93 parser function object for Haskell tuple (,) type.>Derivation rule of 9$ parser function object for Haskell œ type.? Run implicit 9F parser function object. Convert from list of database value type [q] into haskell type a and rest of list [q].@ Run implicit 9F parser function object. Convert from list of database value type [q] into haskell type a.ADerivation rule of 93 parser function object for value convert function.BDerived ¢ instance from ¡ instanceCDerived £ instance from ¡ instanceD¡ instance like parser ¡.HImplicit derivation rule of 92 parser function object which can convert from empty list of database value type [q] into Haskell unit () type.IImplicit derivation rule of 9O parser function object which can convert from list of database value type [q] into Haskell œ type.:6parser function object which has capability to convertlist of database value typeHaskell type and rest of list;Convert function bodyResult parser function object<6parser function object which has capability to convertlist of database value type Haskell type 789:;<=>?@A 9:<;=>788?@A¤¥7889¦=42013-2017 Kei HibinoBSD3ex8k.hibino@gmail.com experimentalunknownSafe7;<=>?ST¦ëKK q a is implicit rule to derive M q a" record printer function for type a.Generic programming ( ehttps://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#generic-programming*) with default signature is available for K, class, so you can make instance like below: ° {-# LANGUAGE DeriveGeneric #-} import GHC.Generics (Generic) import Database.HDBC (SqlValue) -- data Foo = Foo { ... } deriving Generic instance ToSql SqlValue Foo To make instances of K manually, K q a and M 'q a] are composable with monadic context. When, you have data constructor and objects like below. ' data MyRecord = MyRecord Foo Bar Baz  „ instance ToSql SqlValue Foo where ... instance ToSql SqlValue Bar where ... instance ToSql SqlValue Baz where ... You can get composed K implicit rule like below. ¨ instance ToSql SqlValue MyRecord where recordToSql = recordToSql = wrapToSql $ \ (MyRecord x y z) -> do putRecord x putRecord y putRecord z LDerived M printer function object.MM q a= is data-type wrapping function to convert from Haskell type a9 into list of database value type (to send to database) [q].4This structure is similar to printer. While running MR behavior is the same as list printer. which appends list of database value type [q ] stream.N1Context type to convert into database value list.O Finalize M record printer.PRun M4 printer function object. Convert from Haskell type a# into list of database value type [q].Q Axiom of M for database value type q and Haksell type a.RDerivation rule of M4 printer function object for Haskell tuple (,) type.§Derivation rule of M% printer function object for Haskell œ type.S Run implicit MD printer function object. Context to convert haskell record type a" into lib of database value type [q].TRun M empty printer.U Run implicit M7 printer function object. Convert from haskell type a# into list of database value type [q].VDerivation rule of M4 printer function object for value convert function.WhMake untyped indexes to update column from key indexes and record width. Expected by update form like  UPDATE table SET c0 = ?, c1 = ?, c2 = ? ... WHERE key0 = ? AND key1 = ? AND key2 = ? ... X:Unsafely specify key indexes to convert from Haskell type ra into database value q" list expected by update form like  UPDATE table SET c0 = ?, c1 = ?, c2 = ? ... WHERE key0 = ? AND key1 = ? AND key2 = ? ... using M printer function object.YConvert from Haskell type ra into database value q" list expected by update form like  UPDATE table SET c0 = ?, c1 = ?, c2 = ? ... WHERE key0 = ? AND key1 = ? AND key2 = ? ... using M printer function object.Z Convert like Y using implicit M printer function object.[ Convert like Y using implicit M and ColumnConstraint._Implicit derivation rule of MM printer function object which can convert from Haskell unit () type into empty list of database value type [q].`Implicit derivation rule of M; printer function object which can convert from Haskell œ( type into list of database value type [q].P7printer function object which has capability to convert Haskell typelist of database valueQConvert function bodyResult printer function objectW Key indexes Record width Indexes to update other than keyY4Unique key table constraint printer function object.Z4Unique key table constraint printer function object.KLMNOPQRSTUVWXYZ[NMPQRKLLSTUOVZ[YWX¨©KLLMªR4None+©bATemplate to define tuple instances of persistable-record classes.b«None;=>?©v 2013 Kei HibinoBSD3ex8k.hibino@gmail.com experimentalunknownNoneªŸ2  !"$-/789:<?@AKLMNOPSTUVZ[2013-2017 Kei HibinoBSD3ex8k.hibino@gmail.com experimentalunknownNone;=>?ÛTuu6 type to customize names of expanded record templates.vžMake record type name generated from the table's definition. The first argument is the schema name of the table, and the second argument is the table name.w¤Make each field label of the record type generated from the table's definition. The first argument is the table name, and the second argument is the column name.xDefault implementation of ui type. To change how the generated record type and its columns are named, use record update syntax: ÿ=defaultNameConfig { recordTypeName = \schema table -> varCamelcaseName $ schema ++ "_" ++ table ^ append the table name after the schema name. e.g. "schemaTable" , columnName = \table column -> varCamelcaseName $ table ++ "_" ++ column ^ append the column name after the table name. e.g. "tableColumn" }y1Record constructor templates from SQL table name ¬.z2Variable expression of record column offset array.{ Template of  instance.| Template of  instance.} Template of    instance.~ Template of    instance.&Record type width expression template.€Column offset array and  instance declaration.!Record type declaration template.‚7Record type declaration template with configured names.­ADefault name of record construction function from SQL table name.®BDefault name of record decomposition function from SQL table name.ƒ/Low-level reify interface for record type name.¯pRecord parser and printer instance templates for converting between list of SQL type and Haskell record type.„All templates for record type.…4All templates for record type with configured names.†'Templates for single column value type.‡?Dummy show instance. Handy to define show instance recursively. yname rule configSchema name string in SQLTable name string in SQL Record type and data constructorzTable type nameResult expression variable name{$Type which represent constraint typeType constructor of record)Key index which specifies this constraintResult declaration template|Type constructor of recordResult declaration template}Type constructor of record)Key index which specifies this constraint.Declaration of primary key constraint instance~Type constructor of record)Key index which specifies this constraint/Declaration of not null key constraint instanceRecord type constructor.Expression to get record width.€Record type constructor.Types of record columns.Declaration of  instance.+Name of the data type of table record type.KList of columns in the table. Must be legal, properly cased record columns.Deriving type class names.!The data type record declaration.¯SQL value type.Record type constructor.Instance declarations.„SQL value typeRecord type name Column schemaRecord derivingsResult declarations…SQL value typename rule config Schema name Table nameColumn names and typesRecord derivingsResult declarationsbuwvxyz{|}~€‚ƒ„…†„…{|}~‚€ƒuvwxvwyz†bu°vw2013 Kei HibinoBSD3ex8k.hibino@gmail.com experimentalunknownNone;=>?Ý^±     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEF5GHIJKLMNOPQRSTUVWXYZ5[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§-¨.¤¥©¤¥ª¤¥«¬­CG®¯V°¤¥±²³´}µ1persistable-record-0.5.2.2-1JYDBprCRS1GLTpjI3colHDatabase.Record.KeyConstraintDatabase.Record.PersistableDatabase.Record.FromSqlDatabase.Record.ToSqlDatabase.Record.THDatabase.Record.TupleInstancesDatabase.Record.InstancesDatabase.Record.InternalTHDatabase.RecordHasKeyConstraint keyConstraintPrimaryConstraintUniqueConstraint KeyConstraintHasColumnConstraintcolumnConstraintPrimaryColumnConstraintNotNullColumnConstraintUniqueColumnConstraintPrimaryNotNullUniqueColumnConstraintindexunsafeSpecifyColumnConstraint uniqueColumn notNullColumnleftColumnConstraintderivedUniqueColumnConstraintderivedNotNullColumnConstraintunsafeSpecifyNotNullValueindexesunsafeSpecifyKeyConstraintderiveCompositeuniquederivedCompositePrimaryderivedUniqueConstraint$fHasColumnConstraintNotNull(,)GFieldWidthListPersistableWidthpersistableWidthPersistableTypepersistableTypePersistableRecordWidth ProductConstPersistableSqlTyperunPersistableNullValue unsafePersistableSqlTypeFromNullgetProductConstrunPersistableRecordWidthunsafePersistableRecordWidthunsafeValueWidth<&> maybeWidth sqlNullValuegenericFieldOffsets derivedWidth$fShowProductConst$fGFieldWidthListM1$fGFieldWidthList:*:$fGFieldWidthListU1$fPersistableWidth()$fPersistableWidthMaybe$fGFieldWidthListK1FromSql recordFromSql RecordFromSql runTakeRecordcreateRecordFromSql runToRecord maybeRecord takeRecordtoRecordvalueRecordFromSql$fApplicativeRecordFromSql$fFunctorRecordFromSql$fMonadRecordFromSql $fGFromSqlqM1$fGFromSqlq:*: $fGFromSqlqU1 $fFromSqlq()$fFromSqlqMaybe $fGFromSqlqK1ToSql recordToSql RecordToSqlToSqlM wrapToSql runFromRecordcreateRecordToSql putRecordputEmpty fromRecordvalueRecordToSqluntypedUpdateValuesIndexunsafeUpdateValuesWithIndexesupdateValuesByUnique'updateValuesByUniqueupdateValuesByPrimary $fGToSqlqM1 $fGToSqlq:*: $fGToSqlqU1 $fToSqlq() $fToSqlqMaybe $fGToSqlqK1defineTupleInstances$fToSqlq(,,,,,,)$fFromSqlq(,,,,,,)$fPersistableWidth(,,,,,,)$fToSqlq(,,,,,)$fFromSqlq(,,,,,)$fPersistableWidth(,,,,,)$fToSqlq(,,,,)$fFromSqlq(,,,,)$fPersistableWidth(,,,,) $fToSqlq(,,,)$fFromSqlq(,,,)$fPersistableWidth(,,,) $fToSqlq(,,)$fFromSqlq(,,)$fPersistableWidth(,,) $fToSqlq(,) $fFromSqlq(,)$fPersistableWidth(,) NameConfigrecordTypeName columnNamedefaultNameConfigrecordTemplatecolumnOffsetsVarNameDefault!defineHasColumnConstraintInstance)defineHasPrimaryConstraintInstanceDeriveddefineHasPrimaryKeyInstancedefineHasNotNullKeyInstancerecordWidthTemplatedefineColumnOffsetsdefineRecordTypedefineRecordTypeWithConfigreifyRecordType defineRecorddefineRecordWithConfigderiveNotNullType$fShowNameConfig$fHasColumnConstraintNotNullInt$fPersistableWidthInt!$fHasColumnConstraintNotNullInt64$fPersistableWidthInt64!$fHasColumnConstraintNotNullInt32$fPersistableWidthInt32!$fHasColumnConstraintNotNullInt16$fPersistableWidthInt16 $fHasColumnConstraintNotNullInt8$fPersistableWidthInt8$fHasColumnConstraintNotNull[]$fPersistableWidth[] $fHasColumnConstraintNotNullChar$fPersistableWidthChar $fHasColumnConstraintNotNullBool$fPersistableWidthBoolderivedCompositeConstraintghc-prim GHC.TypesIntbaseGHC.BaseMaybegFieldWidthListunPCMonad ApplicativeFunctorGFromSqlgFromSqlGToSqlgToSqlknownWidthIntTypeStringfromSqlNameDefaulttoSqlNameDefaultdefinePersistableInstance