Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- An interface for vector-like data which is orientated to the edges of the board.
Synopsis
- class Orientated a where
- isVertical :: a -> Bool
- isHorizontal :: a -> Bool
- isParallel :: a -> Bool
- isDiagonal :: a -> Bool
- isStraight :: a -> Bool
Type-classes
class Orientated a where Source #
- An interface for vector-like data.
- CAVEAT: the default implementations are mutually dependent, & could result in infinite recursion.
Nothing
:: a | |
-> Bool | Whether the datum is aligned with a file of the board. |
:: a | |
-> Bool | Whether the datum is aligned with a rank of the board. |
:: a | |
-> Bool | Whether it is parallel to an edge of the board. |
:: a | |
-> Bool | Whether it is diagonal (45 degrees) wrt the edges of the board. |
isStraight :: a -> Bool Source #