compdata-param-0.9.2: Parametric Compositional Data Types

Copyright(c) 2011 Patrick Bahr Tom Hvitved
LicenseBSD3
MaintainerTom Hvitved <hvitved@diku.dk>
Stabilityexperimental
Portabilitynon-portable (GHC Extensions)
Safe HaskellNone
LanguageHaskell98

Data.Comp.Param.Multi.Equality

Contents

Description

This module defines equality for signatures, which lifts to equality for terms.

Synopsis
  • class PEq a where
    • class EqHD f where

      Documentation

      class PEq a where Source #

      Equality on parametric values. The equality test is performed inside the FreshM monad for generating fresh identifiers.

      Minimal complete definition

      peq

      Methods

      peq :: a i -> a j -> FreshM Bool Source #

      Instances
      PEq Name Source # 
      Instance details

      Defined in Data.Comp.Param.Multi.Equality

      Methods

      peq :: Name i -> Name j -> FreshM Bool Source #

      Eq a => PEq (K a) Source # 
      Instance details

      Defined in Data.Comp.Param.Multi.Equality

      Methods

      peq :: K a i -> K a j -> FreshM Bool Source #

      (EqHD f, PEq a) => PEq (Cxt h f Name a) Source # 
      Instance details

      Defined in Data.Comp.Param.Multi.Equality

      Methods

      peq :: Cxt h f Name a i -> Cxt h f Name a j -> FreshM Bool Source #

      class EqHD f where Source #

      Signature equality. An instance EqHD f gives rise to an instance Eq (Term f i). The equality test is performed inside the FreshM monad for generating fresh identifiers.

      Minimal complete definition

      eqHD

      Methods

      eqHD :: PEq a => f Name a i -> f Name a j -> FreshM Bool Source #

      Instances
      (EqHD f, EqHD g) => EqHD (f :+: g) Source #

      EqHD is propagated through sums.

      Instance details

      Defined in Data.Comp.Param.Multi.Equality

      Methods

      eqHD :: PEq a => (f :+: g) Name a i -> (f :+: g) Name a j -> FreshM Bool Source #

      EqHD f => EqHD (Cxt h f) Source #

      From an EqHD difunctor an Eq instance of the corresponding term type can be derived.

      Instance details

      Defined in Data.Comp.Param.Multi.Equality

      Methods

      eqHD :: PEq a => Cxt h f Name a i -> Cxt h f Name a j -> FreshM Bool Source #

      Orphan instances

      (HDifunctor f, EqHD f) => Eq (Term f i) Source #

      Equality on terms.

      Instance details

      Methods

      (==) :: Term f i -> Term f i -> Bool #

      (/=) :: Term f i -> Term f i -> Bool #