{-# LANGUAGE
      DataKinds
    , PolyKinds
    #-}

{-# OPTIONS_HADDOCK show-extensions #-}

{-|
Module      : Data.Vinyl.Utils.Compose
Description : Operations on records parametrized with composition of functors.
Copyright   : (c) Marcin Mrotek, 2014
License     : BSD3
Maintainer  : marcin.jan.mrotek@gmail.com
-}

module Data.Vinyl.Utils.Compose (
    rtraverse1
) where
import Control.Applicative
import Data.Functor.Compose
import Data.Vinyl

rtraverse1 :: Applicative f => Rec el (Compose f g) rs -> f (Rec el g rs)
-- ^Traverse a record parametrized with a composition of functors, leaving the inner functor.
rtraverse1 = rtraverse getCompose