[Haskell-cafe] why OverloadedTuples extension is missing?

Daneel Yaitskov dyaitskov at gmail.com
Thu Jan 13 22:12:24 UTC 2022


Cafe,

There is a group of GHC extensions and complementary classes
to make writing Haskell code a bit sweeter such as:
 - {} - Num (fromIntegral)
 - OverloadedStrings - IsString
 - OverloadedLists - IsList

So I have an inductive question - why there is no OverloadedTuples?
I haven't found a discussion thread about this topic.

I could imagine following tuple syntax interpretation:

{-# LANGUAGE OverloadedTuples #-}

data Foo = FooA Int String | FooB String Foo deriving (Show, Eq, IsTuple)

mkFoo :: Foo
mkFoo = (1, "hello")

mkFoo2 :: Foo
mkFoo = ("abc", (1, "hello"))

Sometimes expected type name is known without data constructor.
So such expression is more concise.



-- 

Best regards,
Daniil Iaitskov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20220113/574ed4a4/attachment.html>


More information about the Haskell-Cafe mailing list