notebooks/IHaskell.ipynb: update

This commit is contained in:
Vaibhav Sagar 2019-05-20 15:20:09 -04:00
parent 44f2ef3c39
commit d587ce1381

View File

@ -2221,11 +2221,13 @@
"For example, let's take the following Haskell data type:\n",
"\n",
"<pre>\n",
"&gt;&gt;&gt; :{\n",
"data Project = Project\n",
"{ projectName :: Text\n",
", projectDescription :: Text\n",
", projectStars :: Natural\n",
"}\n",
":}\n",
"</pre>\n",
"\n",
"And assume that we have the following Dhall record that we would like\n",
@ -2248,6 +2250,7 @@
"<tt>Project</tt>:\n",
"\n",
"<pre>\n",
"&gt;&gt;&gt; :{\n",
"injectProject :: InputType Project\n",
"injectProject =\n",
"inputRecord\n",
@ -2257,12 +2260,14 @@
")\n",
"where\n",
"adapt (Project{..}) = (projectName, (projectDescription, projectStars))\n",
":}\n",
"</pre>\n",
"\n",
"Or, since we are simply using the <a>Inject</a> instance to inject\n",
"each field, we could write\n",
"\n",
"<pre>\n",
"&gt;&gt;&gt; :{\n",
"injectProject :: InputType Project\n",
"injectProject =\n",
"inputRecord\n",
@ -2272,6 +2277,7 @@
")\n",
"where\n",
"adapt (Project{..}) = (projectName, (projectDescription, projectStars))\n",
":}\n",
"</pre>\n",
"\n",
"Infix <a>divided</a>\n",
@ -2330,6 +2336,30 @@
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-record/docs/Database-Relational-Documentation.html#v:-62--60-'>(<s0>><</s0>)</a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Binary operator the same as <a>projectZip</a>.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-IBMDB2.html#v:-62--60-'>(<s0>><</s0>)</a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Binary operator the same as <a>projectZip</a>.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-IBMDB2.html#v:projectZip'><s0>projectZip</s0></a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Zipping projections.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-MySQL.html#v:-62--60-'>(<s0>><</s0>)</a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Binary operator the same as <a>projectZip</a>.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-MySQL.html#v:projectZip'><s0>projectZip</s0></a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Zipping projections.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-Oracle.html#v:-62--60-'>(<s0>><</s0>)</a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Binary operator the same as <a>projectZip</a>.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-Oracle.html#v:projectZip'><s0>projectZip</s0></a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Zipping projections.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-PostgreSQL.html#v:-62--60-'>(<s0>><</s0>)</a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Binary operator the same as <a>projectZip</a>.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-PostgreSQL.html#v:projectZip'><s0>projectZip</s0></a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Zipping projections.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-SQLServer.html#v:-62--60-'>(<s0>><</s0>)</a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Binary operator the same as <a>projectZip</a>.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-SQLServer.html#v:projectZip'><s0>projectZip</s0></a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Zipping projections.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-SQLite3.html#v:-62--60-'>(<s0>><</s0>)</a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Binary operator the same as <a>projectZip</a>.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-SQLite3.html#v:projectZip'><s0>projectZip</s0></a> &#x2237; ProductIsoApplicative p &#x21D2; p a &#x2192; p b &#x2192; p (a, b)</span><div class='hoogle-doc'>Zipping projections.\n",
"</div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/bytes/docs/Data-Bytes-Serial.html#v:deserializeWith2'><s0>deserializeWith2</s0></a> &#x2237; (Serial2 f, MonadGet m) &#x21D2; m a &#x2192; m b &#x2192; m (f a b)</span><div class='hoogle-doc'></div>\n",
"<span class='hoogle-name'><a target='_blank' href='https://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-HigherKinded-Class.html#v:mesh'><s0>mesh</s0></a> &#x2237; Graph g &#x21D2; [a] &#x2192; [b] &#x2192; g (a, b)</span><div class='hoogle-doc'>Construct a <i>mesh graph</i> from two lists of vertices. Complexity:\n",
"<i>O(L1 * L2)</i> time, memory and size, where <i>L1</i> and <i>L2</i>\n",
@ -2966,11 +2996,13 @@
"For example, let's take the following Haskell data type:\n",
"\n",
"<pre>\n",
"&gt;&gt;&gt; :{\n",
"data Project = Project\n",
"{ projectName :: Text\n",
", projectDescription :: Text\n",
", projectStars :: Natural\n",
"}\n",
":}\n",
"</pre>\n",
"\n",
"And assume that we have the following Dhall record that we would like\n",
@ -2993,6 +3025,7 @@
"<tt>Project</tt>:\n",
"\n",
"<pre>\n",
"&gt;&gt;&gt; :{\n",
"injectProject :: InputType Project\n",
"injectProject =\n",
"inputRecord\n",
@ -3002,12 +3035,14 @@
")\n",
"where\n",
"adapt (Project{..}) = (projectName, (projectDescription, projectStars))\n",
":}\n",
"</pre>\n",
"\n",
"Or, since we are simply using the <a>Inject</a> instance to inject\n",
"each field, we could write\n",
"\n",
"<pre>\n",
"&gt;&gt;&gt; :{\n",
"injectProject :: InputType Project\n",
"injectProject =\n",
"inputRecord\n",
@ -3017,6 +3052,7 @@
")\n",
"where\n",
"adapt (Project{..}) = (projectName, (projectDescription, projectStars))\n",
":}\n",
"</pre>\n",
"\n",
"Infix <a>divided</a>\n",
@ -3119,6 +3155,54 @@
"URL: https://hackage.haskell.org/package/relational-record/docs/Database-Relational-Documentation.html#v:-62--60-\n",
"Binary operator the same as <a>projectZip</a>.\n",
"\n",
"(<s0>><</s0>) :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-IBMDB2.html#v:-62--60-\n",
"Binary operator the same as <a>projectZip</a>.\n",
"\n",
"<s0>projectZip</s0> :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-IBMDB2.html#v:projectZip\n",
"Zipping projections.\n",
"\n",
"(<s0>><</s0>) :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-MySQL.html#v:-62--60-\n",
"Binary operator the same as <a>projectZip</a>.\n",
"\n",
"<s0>projectZip</s0> :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-MySQL.html#v:projectZip\n",
"Zipping projections.\n",
"\n",
"(<s0>><</s0>) :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-Oracle.html#v:-62--60-\n",
"Binary operator the same as <a>projectZip</a>.\n",
"\n",
"<s0>projectZip</s0> :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-Oracle.html#v:projectZip\n",
"Zipping projections.\n",
"\n",
"(<s0>><</s0>) :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-PostgreSQL.html#v:-62--60-\n",
"Binary operator the same as <a>projectZip</a>.\n",
"\n",
"<s0>projectZip</s0> :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-PostgreSQL.html#v:projectZip\n",
"Zipping projections.\n",
"\n",
"(<s0>><</s0>) :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-SQLServer.html#v:-62--60-\n",
"Binary operator the same as <a>projectZip</a>.\n",
"\n",
"<s0>projectZip</s0> :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-SQLServer.html#v:projectZip\n",
"Zipping projections.\n",
"\n",
"(<s0>><</s0>) :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-SQLite3.html#v:-62--60-\n",
"Binary operator the same as <a>projectZip</a>.\n",
"\n",
"<s0>projectZip</s0> :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n",
"URL: https://hackage.haskell.org/package/relational-schemas/docs/Database-Custom-SQLite3.html#v:projectZip\n",
"Zipping projections.\n",
"\n",
"<s0>deserializeWith2</s0> :: (Serial2 f, MonadGet m) => m a -> m b -> m (f a b)\n",
"URL: https://hackage.haskell.org/package/bytes/docs/Data-Bytes-Serial.html#v:deserializeWith2\n",
"\n",