From d37c33c9223f6148f4bf1472c52a07ea50f8ff1c Mon Sep 17 00:00:00 2001 From: Vaibhav Sagar Date: Fri, 31 May 2019 10:56:18 -0400 Subject: [PATCH] notebooks/IHaskell.ipynb: get docs for more constrained type --- notebooks/IHaskell.ipynb | 1548 +------------------------------------- 1 file changed, 15 insertions(+), 1533 deletions(-) diff --git a/notebooks/IHaskell.ipynb b/notebooks/IHaskell.ipynb index d3c7e0cc..8954e52f 100644 --- a/notebooks/IHaskell.ipynb +++ b/notebooks/IHaskell.ipynb @@ -1699,1545 +1699,27 @@ ".suggestion-name {\n", "font-weight: bold;\n", "}\n", - "zip ∷ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", + "newSTRef ∷ a → ST s (STRef s a)
Build a new STRef in the current state thread\n", "
\n", - "zip ∷ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", + "newSTRef ∷ a → ST s (STRef s a)
\n", + "newSTRef ∷ () ⇒ a → ST s (STRef s a)
Build a new STRef in the current state thread\n", "
\n", - "zip ∷ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zipExact ∷ Partial ⇒ [a] → [b] → [(a, b)]
\n",
-       "zipExact xs ys =\n",
-       "| length xs == length ys = zip xs ys\n",
-       "| otherwise              = error \"some message\"\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "(+*+) ∷ [a] → [b] → [(a, b)]
\n",
-       "cartesianProduct (,)\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "
\n", - "zip ∷ [a] → [b] → [(a, b)]
\n", - "zip ∷ [a] → [b] → [(a, b)]
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zip ∷ () ⇒ [a] → [b] → [(a, b)]
zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "
\n", - "zipLazy ∷ [a] → [b] → [(a, b)]
zipLazy is a kind of zip that is lazy in the second list\n", - "(observe the ~)\n", - "
\n", - "concurrently ∷ MonadBaseControl IO m ⇒ m a → m b → m (a, b)
Generalized version of concurrently.\n", - "
\n", - "concurrently ∷ ∀ m a b . (MonadBaseControl IO m, Forall (Pure m)) ⇒ m a → m b → m (a, b)
Generalized version of concurrently.\n", - "
\n", - "pairADefault ∷ Applicative f ⇒ f a → f b → f (a, b)
Default '>*< implementation for non-invertible\n", - "Applicatives.\n", - "
\n", - "concurrently ∷ MonadUnliftIO m ⇒ m a → m b → m (a, b)
Unlifted concurrently.\n", - "
\n", - "concurrently ∷ MonadUnliftIO m ⇒ m a → m b → m (a, b)
Unlifted concurrently.\n", - "
\n", - "concurrently ∷ MonadUnliftIO m ⇒ m a → m b → m (a, b)
Unlifted concurrently.\n", - "
\n", - "concurrently ∷ MonadUnliftIO m ⇒ m a → m b → m (a, b)
Unlifted concurrently.\n", - "
\n", - "mzipRep ∷ Representable f ⇒ f a → f b → f (a, b)
\n", - "concurrently ∷ MonadConc m ⇒ m a → m b → m (a, b)
Run two MonadConc actions concurrently, and return both\n", - "results. If either action throws an exception at any time, then the\n", - "other action is cancelled, and the exception is re-thrown by\n", - "concurrently.\n", - "\n", - "
\n",
-       "concurrently left right =\n",
-       "withAsync left $ \\a ->\n",
-       "withAsync right $ \\b ->\n",
-       "waitBoth a b\n",
-       "
\n", - "
\n", - "divided ∷ Divisible f ⇒ f a → f b → f (a, b)
\n",
-       "divided = divide id\n",
-       "
\n", - "
\n", - "(>*<) ∷ Divisible f ⇒ f a → f b → f (a, b)
The RecordInputType divisible (contravariant) functor allows\n", - "you to build an InputType injector for a Dhall record.\n", - "\n", - "For example, let's take the following Haskell data type:\n", - "\n", - "
\n",
-       ">>> :{\n",
-       "data Project = Project\n",
-       "{ projectName :: Text\n",
-       ", projectDescription :: Text\n",
-       ", projectStars :: Natural\n",
-       "}\n",
-       ":}\n",
-       "
\n", - "\n", - "And assume that we have the following Dhall record that we would like\n", - "to parse as a Project:\n", - "\n", - "
\n",
-       "{ name =\n",
-       "\"dhall-haskell\"\n",
-       ", description =\n",
-       "\"A configuration language guaranteed to terminate\"\n",
-       ", stars =\n",
-       "289\n",
-       "}\n",
-       "
\n", - "\n", - "Our injector has type InputType Project, but we can't\n", - "build that out of any smaller injectors, as InputTypes cannot\n", - "be combined (they are only Contravariants). However, we can use\n", - "an InputRecordType to build an InputType for\n", - "Project:\n", - "\n", - "
\n",
-       ">>> :{\n",
-       "injectProject :: InputType Project\n",
-       "injectProject =\n",
-       "inputRecord\n",
-       "( adapt >$< inputFieldWith \"name\" inject\n",
-       ">*< inputFieldWith \"description\" inject\n",
-       ">*< inputFieldWith \"stars\" inject\n",
-       ")\n",
-       "where\n",
-       "adapt (Project{..}) = (projectName, (projectDescription, projectStars))\n",
-       ":}\n",
-       "
\n", - "\n", - "Or, since we are simply using the Inject instance to inject\n", - "each field, we could write\n", - "\n", - "
\n",
-       ">>> :{\n",
-       "injectProject :: InputType Project\n",
-       "injectProject =\n",
-       "inputRecord\n",
-       "( adapt >$< inputField \"name\"\n",
-       ">*< inputField \"description\"\n",
-       ">*< inputField \"stars\"\n",
-       ")\n",
-       "where\n",
-       "adapt (Project{..}) = (projectName, (projectDescription, projectStars))\n",
-       ":}\n",
-       "
\n", - "\n", - "Infix divided\n", - "
\n", - "divided ∷ Divisible f ⇒ f a → f b → f (a, b)
\n",
-       "divided = divide id\n",
-       "
\n", - "
\n", - "(>*<) ∷ Divisible f ⇒ f a → f b → f (a, b)
An alias to divided.\n", - "
\n", - "(>*<) ∷ Divisible f ⇒ f a → f b → f (a, b)
An alias to divided.\n", - "
\n", - "contrazip2 ∷ Divisible f ⇒ f a1 → f a2 → f (a1, a2)
\n", - "contrazip2 ∷ ∀ f a1 a2 . Divisible f ⇒ f a1 → f a2 → f (a1, a2)
\n", - "zip ∷ List l ⇒ l a → l b → l (a, b)
\n", - "pair ∷ Sized f ⇒ f a → f b → f (a, b)
Default: pair a b = (,) $ a * b.\n", - "
\n", - "zip ∷ (Vector v a, Vector v b, Vector v (a, b)) ⇒ v a → v b → v (a, b)
O(min(m,n)) Zip two vectors\n", - "
\n", - "pair ∷ (Vector v a, Vector v b, Vector v (a, b)) ⇒ v a → v b → v (a, b)
Pair two samples. It's like zip but requires that both samples\n", - "have equal size.\n", - "
\n", - "zip ∷ (Vector v a, Vector v b, Vector v (a, b)) ⇒ v a → v b → v (a, b)
O(min(m,n)) Zip two vectors\n", - "
\n", - "zip ∷ Zip f ⇒ f a → f b → f (a, b)
\n", - "zip ∷ Zip f ⇒ f a → f b → f (a, b)
\n", - "zip ∷ Zip f ⇒ f a → f b → f (a, b)
\n", - "zip ∷ Zip f ⇒ f a → f b → f (a, b)
\n", - "(>*<) ∷ Monoidal f ⇒ f a → f b → f (a, b)
A pairing/concatenation operator for builder primitives, both bounded\n", - "and fixed size.\n", - "\n", - "For example,\n", - "\n", - "
\n",
-       "toLazyByteString (primFixed (char7 >*< char7) ('x','y')) = \"xy\"\n",
-       "
\n", - "\n", - "We can combine multiple primitives using >*< multiple\n", - "times.\n", - "\n", - "
\n",
-       "toLazyByteString (primFixed (char7 >*< char7 >*< char7) ('x',('y','z'))) = \"xyz\"\n",
-       "
\n", - "
\n", - "(>*<) ∷ Monoidal f ⇒ f a → f b → f (a, b)
Merge two functors into a tuple, analogous to liftA2\n", - "(,). (Sometimes known as **.)\n", - "
\n", - "mzip ∷ MonadZip m ⇒ m a → m b → m (a, b)
\n", - "projectZip ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Zipping projections.\n", - "
\n", - "(><) ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Binary operator the same as projectZip.\n", - "
\n", - "projectZip ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Zipping projections.\n", - "
\n", - "(><) ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Binary operator the same as projectZip.\n", - "
\n", - "(><) ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Binary operator the same as projectZip.\n", - "
\n", - "(><) ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Binary operator the same as projectZip.\n", - "
\n", - "projectZip ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Zipping projections.\n", - "
\n", - "(><) ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Binary operator the same as projectZip.\n", - "
\n", - "projectZip ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Zipping projections.\n", - "
\n", - "(><) ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Binary operator the same as projectZip.\n", - "
\n", - "projectZip ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Zipping projections.\n", - "
\n", - "(><) ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Binary operator the same as projectZip.\n", - "
\n", - "projectZip ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Zipping projections.\n", - "
\n", - "(><) ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Binary operator the same as projectZip.\n", - "
\n", - "projectZip ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Zipping projections.\n", - "
\n", - "(><) ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Binary operator the same as projectZip.\n", - "
\n", - "projectZip ∷ ProductIsoApplicative p ⇒ p a → p b → p (a, b)
Zipping projections.\n", - "
\n", - "deserializeWith2 ∷ (Serial2 f, MonadGet m) ⇒ m a → m b → m (f a b)
\n", - "mesh ∷ Graph g ⇒ [a] → [b] → g (a, b)
Construct a mesh graph from two lists of vertices. Complexity:\n", - "O(L1 * L2) time, memory and size, where L1 and L2\n", - "are the lengths of the given lists.\n", - "\n", - "
\n",
-       "mesh xs     []   == empty\n",
-       "mesh []     ys   == empty\n",
-       "mesh [x]    [y]  == vertex (x, y)\n",
-       "mesh xs     ys   == box (path xs) (path ys)\n",
-       "mesh [1..3] \"ab\" == edges [ ((1,'a'),(1,'b')), ((1,'a'),(2,'a')), ((1,'b'),(2,'b')), ((2,'a'),(2,'b'))\n",
-       ", ((2,'a'),(3,'a')), ((2,'b'),(3,'b')), ((3,'a'),(3,'b')) ]\n",
-       "
\n", - "
\n", - "torus ∷ Graph g ⇒ [a] → [b] → g (a, b)
Construct a torus graph from two lists of vertices. Complexity:\n", - "O(L1 * L2) time, memory and size, where L1 and L2\n", - "are the lengths of the given lists.\n", - "\n", - "
\n",
-       "torus xs    []   == empty\n",
-       "torus []    ys   == empty\n",
-       "torus [x]   [y]  == edge (x,y) (x,y)\n",
-       "torus xs    ys   == box (circuit xs) (circuit ys)\n",
-       "torus [1,2] \"ab\" == edges [ ((1,'a'),(1,'b')), ((1,'a'),(2,'a')), ((1,'b'),(1,'a')), ((1,'b'),(2,'b'))\n",
-       ", ((2,'a'),(1,'a')), ((2,'a'),(2,'b')), ((2,'b'),(1,'b')), ((2,'b'),(2,'a')) ]\n",
-       "
\n", - "
\n", - "zipExactMay ∷ [a] → [b] → Maybe [(a, b)]
\n" + "newSTRef ∷ a → ST s (STRef s a)
\n" ], "text/plain": [ - "zip :: [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/base/docs/Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", + "newSTRef :: a -> ST s (STRef s a)\n", + "URL: https://hackage.haskell.org/package/base/docs/Data-STRef.html#v:newSTRef\n", + "Build a new STRef in the current state thread\n", "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", + "newSTRef :: a -> ST s (STRef s a)\n", + "URL: https://hackage.haskell.org/package/base/docs/Data-STRef-Lazy.html#v:newSTRef\n", "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", + "newSTRef :: () => a -> ST s (STRef s a)\n", + "URL: https://hackage.haskell.org/package/rebase/docs/Rebase-Prelude.html#v:newSTRef\n", + "Build a new STRef in the current state thread\n", "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/base/docs/Data-List.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/base/docs/GHC-List.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/base/docs/GHC-OldList.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/hspec/docs/Test-Hspec-Discover.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/Cabal/docs/Distribution-Compat-Prelude-Internal.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zipExact :: Partial => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/safe/docs/Safe-Exact.html#v:zipExact\n", - "
\n",
-       "zipExact xs ys =\n",
-       "| length xs == length ys = zip xs ys\n",
-       "| otherwise              = error \"some message\"\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/base-compat/docs/Prelude-Compat.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/protolude/docs/Protolude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/numeric-prelude/docs/NumericPrelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/numeric-prelude/docs/NumericPrelude-Base.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/rio/docs/RIO-List.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/rio/docs/RIO-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "(+*+) :: [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/universe-base/docs/Data-Universe-Helpers.html#v:-43--42--43-\n", - "
\n",
-       "cartesianProduct (,)\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/universum/docs/Universum-List-Reexport.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/rebase/docs/Rebase-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/llvm-hs-pure/docs/LLVM-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/xmonad-contrib/docs/XMonad-Config-Prime.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "\n", - "zip :: [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/prelude-compat/docs/Data-List2010.html#v:zip\n", - "\n", - "zip :: [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/prelude-compat/docs/Prelude2010.html#v:zip\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/haxl/docs/Haxl-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/relude/docs/Relude-List-Reexport.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/stack/docs/Stack-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/LambdaHack/docs/Game-LambdaHack-Core-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/LambdaHack/docs/Game-LambdaHack-Core-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/mixed-types-num/docs/Numeric-MixedTypes-PreludeHiding.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/yesod-paginator/docs/Yesod-Paginator-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/distribution-opensuse/docs/OpenSuse-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded.\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/hledger-web/docs/Hledger-Web-Import.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zip :: () => [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/hsdev/docs/HsDev-Tools-Ghc-Prelude.html#v:zip\n", - "zip takes two lists and returns a list of corresponding pairs.\n", - "\n", - "
\n",
-       "zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]\n",
-       "
\n", - "\n", - "If one input list is short, excess elements of the longer list are\n", - "discarded:\n", - "\n", - "
\n",
-       "zip [1] ['a', 'b'] = [(1, 'a')]\n",
-       "zip [1, 2] ['a'] = [(1, 'a')]\n",
-       "
\n", - "\n", - "zip is right-lazy:\n", - "\n", - "
\n",
-       "zip [] _|_ = []\n",
-       "zip _|_ [] = _|_\n",
-       "
\n", - "\n", - "zipLazy :: [a] -> [b] -> [(a, b)]\n", - "URL: https://hackage.haskell.org/package/ghc/docs/Util.html#v:zipLazy\n", - "zipLazy is a kind of zip that is lazy in the second list\n", - "(observe the ~)\n", - "\n", - "concurrently :: MonadBaseControl IO m => m a -> m b -> m (a, b)\n", - "URL: https://hackage.haskell.org/package/lifted-async/docs/Control-Concurrent-Async-Lifted.html#v:concurrently\n", - "Generalized version of concurrently.\n", - "\n", - "concurrently :: forall m a b . (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m (a, b)\n", - "URL: https://hackage.haskell.org/package/lifted-async/docs/Control-Concurrent-Async-Lifted-Safe.html#v:concurrently\n", - "Generalized version of concurrently.\n", - "\n", - "pairADefault :: Applicative f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/invertible/docs/Control-Invertible-Monoidal.html#v:pairADefault\n", - "Default '>*< implementation for non-invertible\n", - "Applicatives.\n", - "\n", - "concurrently :: MonadUnliftIO m => m a -> m b -> m (a, b)\n", - "URL: https://hackage.haskell.org/package/unliftio/docs/UnliftIO-Async.html#v:concurrently\n", - "Unlifted concurrently.\n", - "\n", - "concurrently :: MonadUnliftIO m => m a -> m b -> m (a, b)\n", - "URL: https://hackage.haskell.org/package/unliftio/docs/UnliftIO-Internals-Async.html#v:concurrently\n", - "Unlifted concurrently.\n", - "\n", - "concurrently :: MonadUnliftIO m => m a -> m b -> m (a, b)\n", - "URL: https://hackage.haskell.org/package/stack/docs/Stack-Prelude.html#v:concurrently\n", - "Unlifted concurrently.\n", - "\n", - "concurrently :: MonadUnliftIO m => m a -> m b -> m (a, b)\n", - "URL: https://hackage.haskell.org/package/yesod-websockets/docs/Yesod-WebSockets.html#v:concurrently\n", - "Unlifted concurrently.\n", - "\n", - "mzipRep :: Representable f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/adjunctions/docs/Data-Functor-Rep.html#v:mzipRep\n", - "\n", - "concurrently :: MonadConc m => m a -> m b -> m (a, b)\n", - "URL: https://hackage.haskell.org/package/concurrency/docs/Control-Concurrent-Classy-Async.html#v:concurrently\n", - "Run two MonadConc actions concurrently, and return both\n", - "results. If either action throws an exception at any time, then the\n", - "other action is cancelled, and the exception is re-thrown by\n", - "concurrently.\n", - "\n", - "
\n",
-       "concurrently left right =\n",
-       "withAsync left $ \\a ->\n",
-       "withAsync right $ \\b ->\n",
-       "waitBoth a b\n",
-       "
\n", - "\n", - "divided :: Divisible f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/contravariant/docs/Data-Functor-Contravariant-Divisible.html#v:divided\n", - "
\n",
-       "divided = divide id\n",
-       "
\n", - "\n", - "(>*<) :: Divisible f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/dhall/docs/Dhall.html#v:-62--42--60-\n", - "The RecordInputType divisible (contravariant) functor allows\n", - "you to build an InputType injector for a Dhall record.\n", - "\n", - "For example, let's take the following Haskell data type:\n", - "\n", - "
\n",
-       ">>> :{\n",
-       "data Project = Project\n",
-       "{ projectName :: Text\n",
-       ", projectDescription :: Text\n",
-       ", projectStars :: Natural\n",
-       "}\n",
-       ":}\n",
-       "
\n", - "\n", - "And assume that we have the following Dhall record that we would like\n", - "to parse as a Project:\n", - "\n", - "
\n",
-       "{ name =\n",
-       "\"dhall-haskell\"\n",
-       ", description =\n",
-       "\"A configuration language guaranteed to terminate\"\n",
-       ", stars =\n",
-       "289\n",
-       "}\n",
-       "
\n", - "\n", - "Our injector has type InputType Project, but we can't\n", - "build that out of any smaller injectors, as InputTypes cannot\n", - "be combined (they are only Contravariants). However, we can use\n", - "an InputRecordType to build an InputType for\n", - "Project:\n", - "\n", - "
\n",
-       ">>> :{\n",
-       "injectProject :: InputType Project\n",
-       "injectProject =\n",
-       "inputRecord\n",
-       "( adapt >$< inputFieldWith \"name\" inject\n",
-       ">*< inputFieldWith \"description\" inject\n",
-       ">*< inputFieldWith \"stars\" inject\n",
-       ")\n",
-       "where\n",
-       "adapt (Project{..}) = (projectName, (projectDescription, projectStars))\n",
-       ":}\n",
-       "
\n", - "\n", - "Or, since we are simply using the Inject instance to inject\n", - "each field, we could write\n", - "\n", - "
\n",
-       ">>> :{\n",
-       "injectProject :: InputType Project\n",
-       "injectProject =\n",
-       "inputRecord\n",
-       "( adapt >$< inputField \"name\"\n",
-       ">*< inputField \"description\"\n",
-       ">*< inputField \"stars\"\n",
-       ")\n",
-       "where\n",
-       "adapt (Project{..}) = (projectName, (projectDescription, projectStars))\n",
-       ":}\n",
-       "
\n", - "\n", - "Infix divided\n", - "\n", - "divided :: Divisible f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/rebase/docs/Rebase-Prelude.html#v:divided\n", - "
\n",
-       "divided = divide id\n",
-       "
\n", - "\n", - "(>*<) :: Divisible f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/rebase/docs/Rebase-Prelude.html#v:-62--42--60-\n", - "An alias to divided.\n", - "\n", - "(>*<) :: Divisible f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/contravariant-extras/docs/Contravariant-Extras.html#v:-62--42--60-\n", - "An alias to divided.\n", - "\n", - "contrazip2 :: Divisible f => f a1 -> f a2 -> f (a1, a2)\n", - "URL: https://hackage.haskell.org/package/rebase/docs/Rebase-Prelude.html#v:contrazip2\n", - "\n", - "contrazip2 :: forall f a1 a2 . Divisible f => f a1 -> f a2 -> f (a1, a2)\n", - "URL: https://hackage.haskell.org/package/contravariant-extras/docs/Contravariant-Extras-Contrazip.html#v:contrazip2\n", - "\n", - "zip :: List l => l a -> l b -> l (a, b)\n", - "URL: https://hackage.haskell.org/package/List/docs/Data-List-Class.html#v:zip\n", - "\n", - "pair :: Sized f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/size-based/docs/Control-Sized.html#v:pair\n", - "Default: pair a b = (,) $ a * b.\n", - "\n", - "zip :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)\n", - "URL: https://hackage.haskell.org/package/vector/docs/Data-Vector-Generic.html#v:zip\n", - "O(min(m,n)) Zip two vectors\n", - "\n", - "pair :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)\n", - "URL: https://hackage.haskell.org/package/statistics/docs/Statistics-Sample.html#v:pair\n", - "Pair two samples. It's like zip but requires that both samples\n", - "have equal size.\n", - "\n", - "zip :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)\n", - "URL: https://hackage.haskell.org/package/rio/docs/RIO-Vector.html#v:zip\n", - "O(min(m,n)) Zip two vectors\n", - "\n", - "zip :: Zip f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/classy-prelude/docs/ClassyPrelude.html#v:zip\n", - "\n", - "zip :: Zip f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/non-empty/docs/Data-NonEmpty-Class.html#v:zip\n", - "\n", - "zip :: Zip f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/keys/docs/Data-Key.html#v:zip\n", - "\n", - "zip :: Zip f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/chunked-data/docs/Data-ChunkedZip.html#v:zip\n", - "\n", - "(>*<) :: Monoidal f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/bytestring/docs/Data-ByteString-Builder-Prim.html#v:-62--42--60-\n", - "A pairing/concatenation operator for builder primitives, both bounded\n", - "and fixed size.\n", - "\n", - "For example,\n", - "\n", - "
\n",
-       "toLazyByteString (primFixed (char7 >*< char7) ('x','y')) = \"xy\"\n",
-       "
\n", - "\n", - "We can combine multiple primitives using >*< multiple\n", - "times.\n", - "\n", - "
\n",
-       "toLazyByteString (primFixed (char7 >*< char7 >*< char7) ('x',('y','z'))) = \"xyz\"\n",
-       "
\n", - "\n", - "(>*<) :: Monoidal f => f a -> f b -> f (a, b)\n", - "URL: https://hackage.haskell.org/package/invertible/docs/Control-Invertible-Monoidal.html#v:-62--42--60-\n", - "Merge two functors into a tuple, analogous to liftA2\n", - "(,). (Sometimes known as **.)\n", - "\n", - "mzip :: MonadZip m => m a -> m b -> m (a, b)\n", - "URL: https://hackage.haskell.org/package/base/docs/Control-Monad-Zip.html#v:mzip\n", - "\n", - "projectZip :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n", - "URL: https://hackage.haskell.org/package/relational-query/docs/Database-Relational-Arrow.html#v:projectZip\n", - "Zipping projections.\n", - "\n", - "(><) :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n", - "URL: https://hackage.haskell.org/package/relational-query/docs/Database-Relational-Arrow.html#v:-62--60-\n", - "Binary operator the same as projectZip.\n", - "\n", - "projectZip :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n", - "URL: https://hackage.haskell.org/package/relational-query/docs/Database-Relational-Projectable.html#v:projectZip\n", - "Zipping projections.\n", - "\n", - "(><) :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n", - "URL: https://hackage.haskell.org/package/relational-query/docs/Database-Relational-Projectable.html#v:-62--60-\n", - "Binary operator the same as projectZip.\n", - "\n", - "(><) :: ProductIsoApplicative p => p a -> p b -> p (a, b)\n", - "URL: https://hackage.haskell.org/package/relational-record/docs/Database-Relational-Documentation.html#v:-62--60-\n", - "Binary operator the same as projectZip.\n", - "\n", - "(><) :: 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 projectZip.\n", - "\n", - "projectZip :: 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", - "(><) :: 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 projectZip.\n", - "\n", - "projectZip :: 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", - "(><) :: 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 projectZip.\n", - "\n", - "projectZip :: 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", - "(><) :: 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 projectZip.\n", - "\n", - "projectZip :: 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", - "(><) :: 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 projectZip.\n", - "\n", - "projectZip :: 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", - "(><) :: 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 projectZip.\n", - "\n", - "projectZip :: 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", - "deserializeWith2 :: (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", - "mesh :: Graph g => [a] -> [b] -> g (a, b)\n", - "URL: https://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-HigherKinded-Class.html#v:mesh\n", - "Construct a mesh graph from two lists of vertices. Complexity:\n", - "O(L1 * L2) time, memory and size, where L1 and L2\n", - "are the lengths of the given lists.\n", - "\n", - "
\n",
-       "mesh xs     []   == empty\n",
-       "mesh []     ys   == empty\n",
-       "mesh [x]    [y]  == vertex (x, y)\n",
-       "mesh xs     ys   == box (path xs) (path ys)\n",
-       "mesh [1..3] \"ab\" == edges [ ((1,'a'),(1,'b')), ((1,'a'),(2,'a')), ((1,'b'),(2,'b')), ((2,'a'),(2,'b'))\n",
-       ", ((2,'a'),(3,'a')), ((2,'b'),(3,'b')), ((3,'a'),(3,'b')) ]\n",
-       "
\n", - "\n", - "torus :: Graph g => [a] -> [b] -> g (a, b)\n", - "URL: https://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-HigherKinded-Class.html#v:torus\n", - "Construct a torus graph from two lists of vertices. Complexity:\n", - "O(L1 * L2) time, memory and size, where L1 and L2\n", - "are the lengths of the given lists.\n", - "\n", - "
\n",
-       "torus xs    []   == empty\n",
-       "torus []    ys   == empty\n",
-       "torus [x]   [y]  == edge (x,y) (x,y)\n",
-       "torus xs    ys   == box (circuit xs) (circuit ys)\n",
-       "torus [1,2] \"ab\" == edges [ ((1,'a'),(1,'b')), ((1,'a'),(2,'a')), ((1,'b'),(1,'a')), ((1,'b'),(2,'b'))\n",
-       ", ((2,'a'),(1,'a')), ((2,'a'),(2,'b')), ((2,'b'),(1,'b')), ((2,'b'),(2,'a')) ]\n",
-       "
\n", - "\n", - "zipExactMay :: [a] -> [b] -> Maybe [(a, b)]\n", - "URL: https://hackage.haskell.org/package/safe/docs/Safe-Exact.html#v:zipExactMay" + "newSTRef :: a -> ST s (STRef s a)\n", + "URL: https://hackage.haskell.org/package/open-witness/docs/Data-OpenWitness-ST.html#v:newSTRef" ] }, "metadata": {}, @@ -3245,7 +1727,7 @@ } ], "source": [ - ":hoogle :: [a] -> [b] -> [(a, b)]" + ":hoogle :: a -> ST s (STRef s a)" ] }, {