Haskellタプルは実質15個まで
タプルでshow
やeq
が定義されているのは15個まで
タプル15個
> type Foo = (Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool) > (True, False, True, True, True, True, True, True, True, True, True, True, True, True, True) :: Foo (True,False,True,True,True,True,True,True,True,True,True,True,True,True,True)
タプル16個
> type Foo = (Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool) > (True, False, True, True, True, True, True, True, True, True, True, True, True, True, True, True) :: Foo <interactive>:65:1: error: ? No instance for (Show Foo) arising from a use of ‘print’ ? In a stmt of an interactive GHCi command: print it >