{-# OPTIONS_GHC -fno-warn-orphans #-} module Tuple where import GHC.Records (HasField (..)) instance HasField "_1" (a, b) a where getField (a, _) = a instance HasField "_2" (a, b) b where getField (_, b) = b instance HasField "_1" (a, b, c) a where getField (a, _, _) = a instance HasField "_2" (a, b, c) b where getField (_, b, _) = b instance HasField "_3" (a, b, c) c where getField (_, _, c) = c