hgeometry-combinatorial
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2021

HGeometry.Measured.Class

Description

 
Synopsis

Documentation

class Measured (f :: Type -> Type) a where Source #

Things that can be measured.

Methods

measure :: a -> f a Source #

Given a single a, measure it into someting of type 'f a'.

Instances

Instances details
Measured Report a Source # 
Instance details

Defined in HGeometry.Measured.Report

Methods

measure :: a -> Report a Source #

Measured Report1 a Source # 
Instance details

Defined in HGeometry.Measured.Report

Methods

measure :: a -> Report1 a Source #

Measured ReportList a Source # 
Instance details

Defined in HGeometry.Measured.Report

Methods

measure :: a -> ReportList a Source #

Measured (Count :: Type -> Type) a Source # 
Instance details

Defined in HGeometry.Measured.Size

Methods

measure :: a -> Count a Source #

class Measured f a => CanInsert (f :: Type -> Type) a where Source #

Things that can be inserted.

Minimal complete definition

Nothing

Methods

insertMeasure :: a -> f a -> f a Source #

Delete an element form the associated structure

default insertMeasure :: Semigroup (f a) => a -> f a -> f a Source #

Instances

Instances details
CanInsert Report a Source # 
Instance details

Defined in HGeometry.Measured.Report

Methods

insertMeasure :: a -> Report a -> Report a Source #

CanInsert Report1 a Source # 
Instance details

Defined in HGeometry.Measured.Report

Methods

insertMeasure :: a -> Report1 a -> Report1 a Source #

CanInsert ReportList a Source # 
Instance details

Defined in HGeometry.Measured.Report

CanInsert (Count :: Type -> Type) a Source # 
Instance details

Defined in HGeometry.Measured.Size

Methods

insertMeasure :: a -> Count a -> Count a Source #

class Measured f a => CanDelete (f :: Type -> Type) a where Source #

Things that can be deleted.

Methods

deleteMeasure :: a -> f a -> Maybe (f a) Source #

Delete the element from the structure. Returns a Maybe since the structure may be empty after deletion (and that may not be representable by f).

Instances

Instances details
Eq a => CanDelete ReportList a Source # 
Instance details

Defined in HGeometry.Measured.Report

CanDelete (Count :: Type -> Type) a Source # 
Instance details

Defined in HGeometry.Measured.Size

Methods

deleteMeasure :: a -> Count a -> Maybe (Count a) Source #