Haskell 2010 ã§ã¯ãåããã¡ã¤ã«ã«éè¤ãããã£ã¼ã«ãã©ãã«ãå®ç¾©ã§ããªãããã¨ãã°ã以ä¸ã¯ã¨ã©ã¼ã«ãªãã data Foo = Foo { same :: Int } data Bar = Bar { same :: Float } -- ããã¯ãã¡ ãã®åé¡ã解決ããæ¡ã¯ãOverloadedRecordFields ã¨å¼ã°ããè¦é£ã®æ´å²ãæã¤ãå®è£ ãããã«ããããããã å®è£ ãä¸æ岩 ã³ã¼ãã®è¤éã«ãªãå²ã«å©çãå°ãªã ãªã©ã®çç±ã«ãããGHC ã¸ã¯ãã¼ã¸ãããã«ãããç¾å¨ã§ã¯ãOverloadedRecordFieldsã¯ãä¸ã¤ã®æ¡å¼µã¸ã¨åå²ãããï¼ DuplicateRecordFields OverloadedLabels Magic type classes ãã®ä¸ã1. 㨠2. ã GHC 8.0 ã«å ¥ãã DuplicateRecordFields Dupli
{{#tags}}- {{label}}
{{/tags}}