<html><head></head><body>`(,) :: forall a b c. (IsPair c, Fst c ~ a, Snd c ~ b)=> a → b → c`<br><br>Might be nice syntax for `data StrictPair a b = StrictPair !a !b`.<div style='white-space: pre-wrap'>—<br>Sent from my phone with K-9 Mail.</div><br><br><div class="gmail_quote">On 13 January 2022 23:19:29 UTC, Brandon Allbery <allbery.b@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre dir="auto" class="k9mail">I'm not sure I like the idea of Haskell trying to guess a constructor<br>to use from a tuple. What happens if multiple constructors could<br>match, for one?<br><br>On Thu, Jan 13, 2022 at 6:17 PM Richard Eisenberg <lists@richarde.dev> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><br>We could potentially have this. It reminds me of Agda's record syntax, where you can construct any record (which is like your tuple) with the keyword `record`.<br><br>Is it worth having yet another feature in the language? I'm not sure, myself.<br><br>Richard<br><br>On Jan 13, 2022, at 5:12 PM, Daneel Yaitskov <dyaitskov@gmail.com> wrote:<br><br>Cafe,<br><br>There is a group of GHC extensions and complementary classes<br>to make writing Haskell code a bit sweeter such as:<br> - {} - Num (fromIntegral)<br> - OverloadedStrings - IsString<br> - OverloadedLists - IsList<br><br>So I have an inductive question - why there is no OverloadedTuples?<br>I haven't found a discussion thread about this topic.<br><br>I could imagine following tuple syntax interpretation:<br><br>{-# LANGUAGE OverloadedTuples #-}<br><br>data Foo = FooA Int String | FooB String Foo deriving (Show, Eq, IsTuple)<br><br>mkFoo :: Foo<br>mkFoo = (1, "hello")<br><br>mkFoo2 :: Foo<br>mkFoo = ("abc", (1, "hello"))<br><br>Sometimes expected type name is known without data constructor.<br>So such expression is more concise.<br><br><br><br>--<br><br>Best regards,<br>Daniil Iaitskov<hr>Haskell-Cafe mailing list<br>To (un)subscribe, modify options or view archives go to:<br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>Only members subscribed via the mailman list are allowed to post.<hr>Haskell-Cafe mailing list<br>To (un)subscribe, modify options or view archives go to:<br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>Only members subscribed via the mailman list are allowed to post.<br></blockquote><br><br><br><div class="k9mail-signature">-- <br>brandon s allbery kf8nh<br>allbery.b@gmail.com<hr>Haskell-Cafe mailing list<br>To (un)subscribe, modify options or view archives go to:<br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>Only members subscribed via the mailman list are allowed to post.</div></pre></blockquote></div></body></html>