2012-08-19から1日間の記事一覧
RecordWildCards を使って、同じようなフィールドを持つレコードを簡単に変換できる。 RecordA.hs module RecordA where data A = A { a :: Int, b :: String, c :: Int } deriving Show RecordB.hs module RecordB where data B = B { a :: Int, b :: Strin…
RecordWildCards を使って、同じようなフィールドを持つレコードを簡単に変換できる。 RecordA.hs module RecordA where data A = A { a :: Int, b :: String, c :: Int } deriving Show RecordB.hs module RecordB where data B = B { a :: Int, b :: Strin…