mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-17 20:06:07 +00:00
notebooks/IHaskell.ipynb: update
This commit is contained in:
parent
44f2ef3c39
commit
d587ce1381
@ -2221,11 +2221,13 @@
|
||||
"For example, let's take the following Haskell data type:\n",
|
||||
"\n",
|
||||
"<pre>\n",
|
||||
">>> :{\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",
|
||||
">>> :{\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",
|
||||
">>> :{\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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ ProductIsoApplicative p ⇒ p a → p b → 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> ∷ (Serial2 f, MonadGet m) ⇒ m a → m b → 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> ∷ Graph g ⇒ [a] → [b] → 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",
|
||||
">>> :{\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",
|
||||
">>> :{\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",
|
||||
">>> :{\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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user