{-# LANGUAGE DuplicateRecordFields #-} module Dup where data X = X {X -> Int x :: Int} data Y = Y {Y -> Int x :: Int} s :: X -> Int s :: X -> Int s X{Int x :: Int $sel:x:X :: X -> Int x} = Int x