packages feed

odbc 0.0.1 → 0.0.2

raw patch · 8 files changed

+799/−16 lines, 8 filesdep +semigroupsdep +transformersdep ~base

Dependencies added: semigroups, transformers

Dependency ranges changed: base

Files

+ doc/highlight.pack.js view
@@ -0,0 +1,2 @@+/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */+!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value).replace('"',"&quot;")+'"'}s+="<"+t(e)+E.map.call(e.attributes,r).join("")+">"}function u(e){s+="</"+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='<span class="'+a,o=t?"":C;return i+=e+'">',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"<unnamed>")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"<br>":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="</span>",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("haskell",function(e){var i={v:[e.C("--","$"),e.C("{-","-}",{c:["self"]})]},a={cN:"meta",b:"{-#",e:"#-}"},l={cN:"meta",b:"^#",e:"$"},c={cN:"type",b:"\\b[A-Z][\\w']*",r:0},n={b:"\\(",e:"\\)",i:'"',c:[a,l,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TM,{b:"[_a-z][\\w']*"}),i]},s={b:"{",e:"}",c:n.c};return{aliases:["hs"],k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{bK:"module",e:"where",k:"module where",c:[n,i],i:"\\W\\.|;"},{b:"\\bimport\\b",e:"$",k:"import qualified as hiding",c:[n,i],i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[c,n,i]},{cN:"class",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[a,c,n,s,i]},{bK:"default",e:"$",c:[c,n,i]},{bK:"infix infixl infixr",e:"$",c:[e.CNM,i]},{b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[c,e.QSM,i]},{cN:"meta",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},a,l,e.QSM,e.CNM,c,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),i,{b:"->|<-"}]}});
+ doc/init.js view
@@ -0,0 +1,6 @@+$(document).ready(function() {+  $('pre,code').each(function(i, block) {+    hljs.highlightBlock(block);+  });+  $('.show').removeClass('show').addClass('hide');+});
+ doc/patch.sh view
@@ -0,0 +1,1 @@+for i in $(ls .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/doc/html/odbc/*.html); do sed -i.bak 's/<head>/<head><script src="highlight.pack.js"><\/script><script src="https:\/\/code.jquery.com\/jquery-3.3.1.slim.min.js" integrity="sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E=" crossorigin="anonymous"><\/script><script src="init.js"><\/script>/' $i; done
+ doc/style.css view
@@ -0,0 +1,767 @@+/* @group Fundamentals */++* { margin: 0; padding: 0 }++/* Is this portable? */+html {+  background-color: white;+  width: 100%;+  height: 100%;+}++body {+  background: white;+  color: black;+  text-align: left;+  min-height: 100%;+  position: relative;+}++p {+  margin: 0.8em 0;+  line-height: 1.8;+}++ul, ol {+  margin: 0.8em 0 0.8em 2em;+}++dl {+  margin: 0.8em 0;+}++dt {+  font-weight: bold;+}+dd {+  margin-left: 2em;+}++a { text-decoration: none; }+a[href]:link { color: rgb(196,69,29); }+a[href]:visited { color: rgb(171,105,84); }+a[href]:hover { text-decoration:underline; }++/* @end */++/* @group Fonts & Sizes */++/* Basic technique & IE workarounds from YUI 3+   For reasons, see:+      http://yui.yahooapis.com/3.1.1/build/cssfonts/fonts.css+*/++body {+  font:13px/1.4 sans-serif;+  *font-size:small; /* for IE */+  *font:x-small; /* for IE in quirks mode */+}++h1 { font-size: 146.5%; /* 19pt */ }+h2 { font-size: 131%;   /* 17pt */ }+h3 { font-size: 116%;   /* 15pt */ }+h4 { font-size: 100%;   /* 13pt */ }+h5 { font-size: 100%;   /* 13pt */ }++select, input, button, textarea {+  font:99% sans-serif;+}++table {+  font-size:inherit;+  font:100%;+}++pre, code, kbd, samp, tt, .src {+  font-family:monospace;+  *font-size:108%;+  line-height: 124%;+  border: 1px solid #eee;+  padding: 0.1em 0.3em;+  border-radius: 0.3em;+}+#table-of-contents {+  border: 1px solid #eee;+  padding: 0.1em 0.3em;+  border-radius: 0.3em;+  line-height: 1.7em+}++.links, .link {+  font-size: 85%; /* 11pt */+}++#module-header .caption {+  font-size: 182%; /* 24pt */+}++.info  {+  font-size: 85%; /* 11pt */+}++#table-of-contents, #synopsis  {+  /* font-size: 85%; /* 11pt */+}+++/* @end */++/* @group Common */++.caption, h1, h2, h3, h4, h5, h6 {+  font-weight: bold;+  color: rgb(78,98,114);+  margin: 0.8em 0 0.4em;+}++* + h1, * + h2, * + h3, * + h4, * + h5, * + h6 {+  margin-top: 1em;+}++h1 + h2, h2 + h3, h3 + h4, h4 + h5, h5 + h6 {+  margin-top: inherit;+}++ul.links {+  list-style: none;+  text-align: left;+  float: right;+  display: inline-table;+  margin: 0 0 0 1em;+}++ul.links li {+  display: inline;+  border-left: 1px solid #d5d5d5;+  white-space: nowrap;+  padding: 0;+}++ul.links li a {+  padding: 0.2em 0.5em;+}++.hide { display: none; }+.show { display: inherit; }+.clear { clear: both; }++.collapser {+  background-image: url(minus.gif);+  background-repeat: no-repeat;+}+.expander {+  background-image: url(plus.gif);+  background-repeat: no-repeat;+}+p.caption.collapser,+p.caption.expander {+  background-position: 0 0.4em;+}+.collapser, .expander {+  padding-left: 14px;+  margin-left: -14px;+  cursor: pointer;+}++pre {+  padding: 0.25em;+  margin: 0.8em 0;+  background: rgb(229,237,244);+  overflow: auto;+}++.src {+  background: #f0f0f0;+  padding: 0.2em 0.5em;+}++.keyword { font-weight: normal; }+.def { font-weight: bold; }+++/* @end */++/* @group Page Structure */++#content {+  margin: 0 auto;+  padding: 0 2em 6em;+}++#package-header {+  background: rgb(41,56,69);+  border-top: 5px solid rgb(78,98,114);+  color: #ddd;+  padding: 0.2em;+  position: relative;+  text-align: left;+}++#package-header .caption {+  background: url(hslogo-16.png) no-repeat 0em;+  color: white;+  margin: 0 2em;+  font-weight: normal;+  font-style: normal;+  padding-left: 2em;+}++#package-header a:link, #package-header a:visited { color: white; }+#package-header a:hover { background: rgb(78,98,114); }++#module-header .caption {+  color: rgb(78,98,114);+  font-weight: bold;+  border-bottom: 1px solid #ddd;+}++table.info {+  float: right;+  padding: 0.5em 1em;+  border: 1px solid #ddd;+  color: rgb(78,98,114);+  background-color: #fff;+  max-width: 40%;+  border-spacing: 0;+  position: relative;+  top: -0.5em;+  margin: 0 0 0 2em;+}++.info th {+  padding: 0 1em 0 0;+}++div#style-menu-holder {+  position: relative;+  z-index: 2;+  display: inline;+}++#style-menu {+  position: absolute;+  z-index: 1;+  overflow: visible;+  background: #374c5e;+  margin: 0;+  text-align: center;+  right: 0;+  padding: 0;+  top: 1.25em;+}++#style-menu li {+  display: list-item;+  border-style: none;+  margin: 0;+  padding: 0;+  color: #000;+  list-style-type: none;+}++#style-menu li + li {+  border-top: 1px solid #919191;+}++#style-menu a {+  width: 6em;+  padding: 3px;+  display: block;+}++#footer {+  background: #ddd;+  border-top: 1px solid #aaa;+  padding: 0.5em 0;+  color: #666;+  text-align: center;+  position: absolute;+  bottom: 0;+  width: 100%;+  height: 3em;+}++/* @end */++/* @group Front Matter */++#table-of-contents {+  float: right;+  clear: right;+  background: #faf9dc;+  border: 1px solid #d8d7ad;+  padding: 0.5em 1em;+  max-width: 20em;+  margin: 0.5em 0 1em 1em;+}++#table-of-contents .caption {+  text-align: center;+  margin: 0;+}++#table-of-contents ul {+  list-style: none;+  margin: 0;+}++#table-of-contents ul ul {+  margin-left: 2em;+}++#description .caption {+  display: none;+}++/* Fixes: https://github.com/fpco/stackage-server/issues/222 */+/* #synopsis { */+/*   display: none; */+/* } */++.no-frame #synopsis {+  display: block;+  position: fixed;+  right: 0;+  height: 80%;+  top: 10%;+  padding: 0;+}++#synopsis .caption {+  float: left;+  width: 29px;+  color: rgba(255,255,255,0);+  height: 110px;+  margin: 0;+  font-size: 1px;+  padding: 0;+}++#synopsis p.caption.collapser {+  background: url(synopsis.png) no-repeat -64px -8px;+}++#synopsis p.caption.expander {+  background: url(synopsis.png) no-repeat 0px -8px;+}++#synopsis ul {+  height: 100%;+  overflow: auto;+  padding: 0.5em;+  margin: 0;+}++#synopsis ul ul {+  overflow: hidden;+}++#synopsis ul,+#synopsis ul li.src {+  background-color: #faf9dc;+  white-space: nowrap;+  list-style: none;+  margin-left: 0;+}++/* @end */++/* @group Main Content */++#interface div.top { margin: 2em 0; }+#interface h1 + div.top,+#interface h2 + div.top,+#interface h3 + div.top,+#interface h4 + div.top,+#interface h5 + div.top {+  margin-top: 1em;+}+#interface p.src .link {+  float: right;+  color: #919191;+  border-left: 1px solid #919191;+  background: #f0f0f0;+  padding: 0 0.5em 0.2em;+  margin: 0 -0.5em 0 0.5em;+}++#interface span.fixity {+  color: #919191;+  border-left: 1px solid #919191;+  padding: 0.2em 0.5em 0.2em 0.5em;+  margin: 0 -1em 0 1em;+}++#interface span.rightedge {+  border-left: 1px solid #919191;+  padding: 0.2em 0 0.2em 0;+  margin: 0 0 0 1em;+}++#interface table { border-spacing: 2px; }+#interface td {+  vertical-align: top;+  padding-left: 0.5em;+}+#interface td.src {+  white-space: nowrap;+}+#interface td.doc p {+  margin: 0;+}+#interface td.doc p + p {+  margin-top: 0.8em;+}++.subs dl {+  margin: 0;+}++.subs dt {+  float: left;+  clear: left;+  display: block;+  margin: 1px 0;+}++.subs dd {+  float: right;+  width: 90%;+  display: block;+  padding-left: 0.5em;+  margin-bottom: 0.5em;+}++.subs dd.empty {+  display: none;+}++.subs dd p {+  margin: 0;+}++/* Render short-style data instances */+.inst ul {+  height: 100%;+  padding: 0.5em;+  margin: 0;+}++.inst, .inst li {+  list-style: none;+  margin-left: 1em;+}++.top p.src {+  border-top: 3px solid #ccc;+}++.subs, .doc {+  /* use this selector for one level of indent */+  padding-left: 1em;+}+.fields li { list-style-type: none }++.warning {+  color: red;+}++.arguments {+  margin-top: -0.4em;+}+.arguments .caption {+  display: none;+}++.fields { padding-left: 1em; }++.fields .caption { display: none; }++.fields p { margin: 0 0; }++/* this seems bulky to me+.methods, .constructors {+  background: #f8f8f8;+  border: 1px solid #eee;+}+*/++/* @end */++/* @group Auxillary Pages */+++.extension-list {+  list-style-type: none;+  margin-left: 0;+}++#mini {+  margin: 0 auto;+  padding: 0 1em 1em;+}++#mini > * {+  font-size: 93%; /* 12pt */+}++#mini #module-list .caption,+#mini #module-header .caption {+  font-size: 125%; /* 15pt */+}++#mini #interface h1,+#mini #interface h2,+#mini #interface h3,+#mini #interface h4 {+  font-size: 109%; /* 13pt */+  margin: 1em 0 0;+}++#mini #interface .top,+#mini #interface .src {+  margin: 0;+}++#mini #module-list ul {+  list-style: none;+  margin: 0;+}++#alphabet ul {+  list-style: none;+  padding: 0;+  margin: 0.5em 0 0;+  text-align: center;+}++#alphabet li {+  display: inline;+  margin: 0 0.25em;+}++#alphabet a {+  font-weight: bold;+}++#index .caption,+#module-list .caption { font-size: 131%; /* 17pt */ }++#index table {+  margin-left: 2em;+}++#index .src {+  font-weight: bold;+}+#index .alt {+  font-size: 77%; /* 10pt */+  font-style: italic;+  padding-left: 2em;+}++#index td + td {+  padding-left: 1em;+}++#module-list ul {+  list-style: none;+  margin: 0 0 0 2em;+}++#module-list li {+  clear: right;+}++#module-list span.collapser,+#module-list span.expander {+  background-position: 0 0.3em;+}++#module-list .package {+  float: right;+}++/* @end */+body { font-family: "Open Sans", ubuntu, sans-serif; font-size: 14px }+++#synopsis > .show > *,#synopsis > .show {+  /*background: inherit;*/+}+#synopsis ul, #synopsis ul li.src {+  /*background: inherit;*/+}++#package-header {+  background: #352f44;+  border:0;+  color: #fff !important;+  line-height: 30px+}+#package-header .caption {+  color: #fff  !important;+  background: url(/static/img/haskell-logo.png) ;+  background-image: url(/static/img/haskell-logo.png);+  background-size: 21px auto;+  background-repeat: no-repeat;+  background-position: left;+  padding: 5px 5px 5px 30px;+}+a[href] {+  color: #0085c9 !important;+  font-weight: bold;+}++#package-header > ul > li > a {+  color: #fff !important+}+#package-header > ul > li > a:hover {+  color: #fff !important;+  background: inherit;+}+#package-header .links li {+  border: 0;+}+.caption { color: #6e618d!important }+pre{ background: #f8f8f8; padding: 1em; }+pre, pre * {  font-family: "ubuntu mono", "Monaco", "Consolas", monospace !important; font-size: 13px !important; }+#table-of-contents {+  background: #f8f8f8;+  border: 1px solid #eee;+}+.doc > .warning {+  color: #c09853;+  padding: 0px 35px 0px 14px;+  margin-bottom: 20px;+  text-shadow: 0 1px 0 rgba(255,255,255,0.5);+  background-color: #fcf8e3;+  border: 1px solid #fbeed5;+  -webkit-border-radius: 2px;+  -moz-border-radius: 2px;+  border-radius: 2px;+}++#synopsis {+  display: none+}++#package-header {+  padding: 0.5em+}++#package-header+.caption {+  margin-left: 0;+  padding-left: 1.5em;+}++#module-header .info {+  display: none+}++#description > .doc, #interface > .doc {+  padding-left: 0+}++#footer {+  border-top: 0;+  background: #efefef;+}++#module-list .module {+  font-size: 15px;+  line-height: 1.7em+}++++/*++Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>++*/++.hljs {+  display: block;+  overflow-x: auto;+  padding: 1em;+  background: #f8f8f8;+  color: #657b83;+}++.hljs-comment,+.hljs-quote {+  color: #93a1a1;+}++/* Solarized Green */+.hljs-keyword,+.hljs-selector-tag,+.hljs-addition {+  color: #859900;+}++/* Solarized Cyan */+.hljs-number,+.hljs-string,+.hljs-meta .hljs-meta-string,+.hljs-literal,+.hljs-doctag,+.hljs-regexp {+  color: #2aa198;+}++/* Solarized Blue */+.hljs-title,+.hljs-section,+.hljs-name,+.hljs-selector-id,+.hljs-selector-class {+  color: #268bd2;+}++/* Solarized Yellow */+.hljs-attribute,+.hljs-attr,+.hljs-variable,+.hljs-template-variable,+.hljs-class .hljs-title,+.hljs-type {+  color: #b58900;+}++/* Solarized Orange */+.hljs-symbol,+.hljs-bullet,+.hljs-subst,+.hljs-meta,+.hljs-meta .hljs-keyword,+.hljs-selector-attr,+.hljs-selector-pseudo,+.hljs-link {+  color: #cb4b16;+}++/* Solarized Red */+.hljs-built_in,+.hljs-deletion {+  color: #dc322f;+}++.hljs-formula {+  background: #eee8d5;+}++.hljs-emphasis {+  font-style: italic;+}++.hljs-strong {+  font-weight: bold;+}++code.hljs {+  display: inline;+  padding: 0.125em;+}
odbc.cabal view
@@ -5,12 +5,13 @@              suite runs on OS X, Windows and Linux. copyright: FP Complete 2018 maintainer: chrisdone@fpcomplete.com-version:             0.0.1+version:             0.0.2 license:             BSD3 license-file:        LICENSE build-type:          Simple-extra-source-files:  README.md+extra-source-files:  README.md doc/style.css doc/patch.sh doc/init.js doc/highlight.pack.js cabal-version:       >=1.10+homepage:            https://github.com/fpco/odbc  library   hs-source-dirs:    src@@ -28,7 +29,7 @@   c-sources:         cbits/odbc.c   include-dirs:      cbits   build-depends:-    base >= 4.7 && < 5,+    base >= 4.9.0.0 && < 5,     deepseq,     async,     bytestring,@@ -36,7 +37,9 @@     unliftio-core,     formatting >= 6.3.1,     containers,-    time+    time,+    semigroups,+    transformers  executable odbc   hs-source-dirs:    app
src/Database/ODBC/Conversion.hs view
@@ -29,7 +29,7 @@  -- | Expect a value to be non-null. withNonNull ::-     FromValue a => (Value -> Either String a) -> Maybe Value -> Either String a+     (Value -> Either String a) -> Maybe Value -> Either String a withNonNull f =   \case     Nothing -> Left "Unexpected NULL for value"
src/Database/ODBC/SQLServer.hs view
@@ -57,7 +57,8 @@ import           Data.Fixed import           Data.Foldable import           Data.Int-import           Data.Monoid+import           Data.Monoid (Monoid, (<>))+import           Data.Semigroup (Semigroup) import           Data.Sequence (Seq) import qualified Data.Sequence as Seq import           Data.String@@ -78,11 +79,7 @@ -- $building -- -- You have to compile your projects using the @-threaded@ flag to--- GHC. In your .cabal file, this would look like:------ @--- ghc-options: -threaded--- @+-- GHC. In your .cabal file, this would look like: @ghc-options: -threaded@  -- $usage --@@ -208,7 +205,7 @@ -- This is meant as a bare-minimum of safety and convenience. newtype Query =   Query (Seq Part)-  deriving (Monoid, Eq, Show, Typeable, Ord, Generic, Data)+  deriving (Monoid, Eq, Show, Typeable, Ord, Generic, Data, Semigroup)  instance NFData Query @@ -248,11 +245,15 @@ instance ToSql Value where   toSql = Query . Seq.fromList . pure . ValuePart --- | Corresponds to NTEXT (Unicode) of SQL Server.+-- | Corresponds to NTEXT (Unicode) of SQL Server. Note that if your+-- character exceeds the range supported by a wide-char (16-bit), that+-- cannot be sent to the server. instance ToSql Text where   toSql = toSql . TextValue --- | Corresponds to NTEXT (Unicode) of SQL Server.+-- | Corresponds to NTEXT (Unicode) of SQL Server. Note that if your+-- character exceeds the range supported by a wide-char (16-bit), that+-- cannot be sent to the server. instance ToSql LT.Text where   toSql = toSql . TextValue . LT.toStrict @@ -343,7 +344,7 @@  -- | Stream results like a fold with the option to stop at any time. stream ::-     (MonadIO m, MonadUnliftIO m, FromRow row)+     (MonadUnliftIO m, FromRow row)   => Connection -- ^ A connection to the database.   -> Query -- ^ SQL query.   -> (state -> row -> m (Internal.Step state))
test/Main.hs view
@@ -437,7 +437,10 @@ showText t = "N'" <> t <> "'"  validTextChar :: Char -> Bool-validTextChar = \c -> c /= '\'' && c /= '\n' && c /= '\r'+validTextChar =+  \c -> c /= '\'' && c /= '\n' && c /= '\r' && doesNotExceedWideChar c+  where+    doesNotExceedWideChar c = c < toEnum (fromIntegral (maxBound :: Word16))  -------------------------------------------------------------------------------- -- Constants