Module

Data.Vector.Polymorphic.Class

Package
purescript-polymorphic-vectors
Repository
3ddyy/purescript-polymorphic-vectors

#ToPos Source

class ToPos a pa | pa -> a where

Class describing types which represent a position on a 2D plane and can be turned into a Vector2 a.

Members

Instances

#FromPos Source

class FromPos a pa | pa -> a where

Class describing types which represent a position on a 2D plane and can be constructed from a Vector2 a.

Members

Instances

#AsPosEndo Source

class AsPosEndo a pa | pa -> a where

Class describing types which represent a position on a 2D plane and can be modified by any function of type Vector2 a -> Vector2 a.

Instances must satisfy the following law:

  • Identity: asPosEndo identity = identity

Members

Instances

#AsPos Source

class AsPos a b pa pb | pa -> a, pb -> b where

Class describing types which represent a position on a 2D plane and can be modified by any function of type Vector2 a -> Vector2 b.

Instances must satisfy the following law:

  • Identity: asPos identity = identity

Members

Instances

#ToSize Source

class ToSize a sa | sa -> a where

Class describing types which represent a size on a 2D plane and can be turned into a Vector2 a.

Members

Instances

#FromSize Source

class FromSize a sa | sa -> a where

Class describing types which represent a size on a 2D plane and can be constructed from a Vector2 a.

Members

Instances

#AsSizeEndo Source

class AsSizeEndo a sa | sa -> a where

Class describing types which represent a size on a 2D plane and can be modified by any function of type Vector2 a -> Vector2 a.

Instances must satisfy the following law:

  • Identity: asSizeEndo identity = identity

Members

Instances

#AsSize Source

class AsSize a b sa sb | sa -> a, sb -> b where

Class describing types which represent a size on a 2D plane and can be modified by any function of type Vector2 a -> Vector2 b.

Instances must satisfy the following law:

  • Identity: asSize identity = identity

Members

Instances

#ToRegion Source

class ToRegion a ra | ra -> a where

Class describing types which represent a rectangular region on a 2D plane and can be turned into a Rect a.

Members

Instances

#FromRegion Source

class FromRegion a ra | ra -> a where

Class describing types which represent a rectangular region on a 2D plane and can be constructed from a Rect a.

Members

Instances

#AsRegionEndo Source

class AsRegionEndo a ra | ra -> a where

Class describing types which represent a rectangular region on a 2D plane and can be modified by any function of type Rect a -> Rect a.

Instances must satisfy the following law:

  • Identity: asRegionEndo identity = identity

Members

Instances

#AsRegion Source

class AsRegion a b ra rb | ra -> a, rb -> b where

Class describing types which represent a rectangular region on a 2D plane and can be modified by any function of type Rect a -> Rect b.

Instances must satisfy the following law:

  • Identity: asRegion identity = identity

Members

Instances