<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">We could potentially have this. It reminds me of Agda's <a href="https://agda.readthedocs.io/en/v2.6.2.1/language/record-types.html#constructing-record-values" class="">record</a> syntax, where you can construct any record (which is like your tuple) with the keyword `record`.<div class=""><br class=""></div><div class="">Is it worth having yet another feature in the language? I'm not sure, myself.</div><div class=""><br class=""></div><div class="">Richard<br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 13, 2022, at 5:12 PM, Daneel Yaitskov <<a href="mailto:dyaitskov@gmail.com" class="">dyaitskov@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Cafe,</div><div class=""><br class=""></div><div class="">There is a group of GHC extensions and complementary classes</div><div class="">to make writing Haskell code a bit sweeter such as:</div><div class=""> - {} - Num (fromIntegral)<br class=""></div><div class=""> - OverloadedStrings - IsString</div><div class=""> - OverloadedLists - IsList</div><div class=""><br class=""></div><div class="">So I have an inductive question - why there is no OverloadedTuples?</div><div class="">I haven't found a discussion thread about this topic.</div><div class=""><br class=""></div><div class="">I could imagine following tuple syntax interpretation:</div><div class=""><br class=""></div><div class="">{-# LANGUAGE OverloadedTuples #-}</div><div class=""><br class=""></div><div class="">data Foo = FooA Int String | FooB String Foo deriving (Show, Eq, IsTuple)</div><div class=""><br class=""></div><div class="">mkFoo :: Foo</div><div class="">mkFoo = (1, "hello")</div><div class=""><br class=""></div><div class="">mkFoo2 :: Foo</div><div class="">mkFoo = ("abc", (1, "hello"))</div><div class=""><br class=""></div><div class="">Sometimes expected type name is known without data constructor.</div><div class="">So such expression is more concise.<br class=""></div><div class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class="">-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br class="">Best regards,<br class="">Daniil Iaitskov<br class=""> <br class=""><br class=""><br class=""></div></div></div>
_______________________________________________<br class="">Haskell-Cafe mailing list<br class="">To (un)subscribe, modify options or view archives go to:<br class=""><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br class="">Only members subscribed via the mailman list are allowed to post.</div></blockquote></div><br class=""></div></div></body></html>