blanks-0.4.0: Fill-in-the-blanks - A library factoring out substitution from ASTs

Safe HaskellNone
LanguageHaskell2010

Blanks.NatNewtype

Synopsis

Documentation

class (forall a. Coercible (m a) (g a), forall a. Coercible (g a) (m a)) => NatNewtype (m :: Type -> Type) (g :: Type -> Type) | g -> m Source #

A "natural isomorphism" between two functors, like exists derivably between newtyped functors and their wrapped types. The functional dependency requires that g be the newtype and m the wrapped type.

Instances
NatNewtype (ScopeW Identity n f (Scope n f)) (Scope n f) Source # 
Instance details

Defined in Blanks.Scope

NatNewtype (ScopeW (Located l) n f (LocScope l n f)) (LocScope l n f) Source # 
Instance details

Defined in Blanks.LocScope

natNewtypeFrom :: NatNewtype m g => g a -> m a Source #

Coerce from the newtype to the wrapped type.

natNewtypeTo :: NatNewtype m g => m a -> g a Source #

Coerce from the wrapped type to the newtype.