parameterized-utils-2.1.4.0: Classes and data structures for working with data-kind indexed types
Copyright(c) Galois Inc 2014-2019
MaintainerLangston Barrett <langston@galois.com>
Safe HaskellSafe
LanguageHaskell2010

Data.Parameterized.ClassesC

Description

This module declares classes for working with types with the kind (k -> *) -> * for any kind k.

These classes generally require type-level evidence for operations on their subterms, but don't actually provide it themselves (because their types are not themselves parameterized, unlike those in Data.Parameterized.TraverableFC).

Note that there is still some ambiguity around naming conventions, see issue 23.

Documentation

class TestEqualityC (t :: (k -> Type) -> Type) where Source #

Methods

testEqualityC :: (forall x y. f x -> f y -> Maybe (x :~: y)) -> t f -> t f -> Bool Source #

Instances

Instances details
TestEqualityC (Some :: (k -> Type) -> Type) Source #

This instance demonstrates where the above class is useful: namely, in types with existential quantification.

Instance details

Defined in Data.Parameterized.ClassesC

Methods

testEqualityC :: (forall (x :: k0) (y :: k0). f x -> f y -> Maybe (x :~: y)) -> Some f -> Some f -> Bool Source #

class TestEqualityC t => OrdC (t :: (k -> Type) -> Type) where Source #

Methods

compareC :: (forall x y. f x -> g y -> OrderingF x y) -> t f -> t g -> Ordering Source #

Instances

Instances details
OrdC (Some :: (k -> Type) -> Type) Source # 
Instance details

Defined in Data.Parameterized.ClassesC

Methods

compareC :: (forall (x :: k0) (y :: k0). f x -> g y -> OrderingF x y) -> Some f -> Some g -> Ordering Source #