{-# LANGUAGE DataKinds #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} -- | 'hMap' 'FN' drops the inner LVPair, which was -- just used to keep track of the variable name on the -- R side. -- -- it could be replaced by unsafeCoerce with the -- right type signature module RlangQQ.FN where import Data.HList.CommonMain import GHC.TypeLits data FN = FN instance (a ~ (LVPair (t :: k) (LVPair (t2::k) x)), b ~LVPair t x) => ApplyAB FN a b where applyAB _ (LVPair (LVPair x)) = LVPair x data NoLabel = NoLabel instance (la ~ LVPair "" a) => ApplyAB NoLabel a la where applyAB _ x = LVPair x