vinyl-utils-0.1.0.0: Utilities for vinyl

Copyright(c) Marcin Mrotek, 2014
LicenseBSD3
Maintainermarcin.jan.mrotek@gmail.com
Safe HaskellNone
LanguageHaskell2010
Extensions
  • MonoLocalBinds
  • TypeFamilies
  • PolyKinds
  • DataKinds
  • KindSignatures
  • TypeOperators
  • ExplicitNamespaces

Data.Vinyl.Utils.Const

Description

 

Synopsis

Documentation

class ConstApplicative rs where Source

Extension of pure to constant type records.

Methods

cpure :: a -> Rec (Const a) rs Source

Instances

ConstApplicative k ([] k) 
ConstApplicative k rs => ConstApplicative k ((:) k r rs) 

rconst :: (Applicative f, RecApplicative rs) => f a -> f (Rec (Const a) rs) Source

constCommute :: Functor f => Const (f a) b -> Compose f (Const a) b Source

Commute a constant functor with another functor.

rtraverseconst :: Applicative f => Rec (Const (f a)) rs -> f (Rec (Const a) rs) Source

Distribute a functor over a constant type record.