Copyright | (c) Chris Reade 2021 |
---|---|
License | BSD-style |
Maintainer | chrisreade@mac.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data HalfTile rep
- tileRep :: HalfTile rep -> rep
- isLD :: HalfTile rep -> Bool
- isRD :: HalfTile rep -> Bool
- isLK :: HalfTile rep -> Bool
- isRK :: HalfTile rep -> Bool
- isDart :: HalfTile rep -> Bool
- isKite :: HalfTile rep -> Bool
- type HalfTileLabel = HalfTile ()
- tileLabel :: HalfTile a -> HalfTileLabel
- isMatched :: HalfTile rep1 -> HalfTile rep2 -> Bool
Documentation
Representing Half Tile Pieces Polymorphicly. Common code for both graphs and vector representations of tilings. For Pieces - rep is V2 Double For TileFaces (in Tgraphs) rep is (Vertex,Vertex,Vertex)
Instances
Drawable Patch Source # | Patches are drawable |
Functor HalfTile Source # | Make Halftile a Functor |
Show rep => Show (HalfTile rep) Source # | |
Transformable a => Transformable (HalfTile a) Source # | HalfTile inherits Transformable - Requires FlexibleInstances |
Eq rep => Eq (HalfTile rep) Source # | |
Ord rep => Ord (HalfTile rep) Source # | Note this ignores the tileLabels when comparing. However we should never have 2 different HalfTiles with the same rep |
Defined in HalfTile | |
type N (HalfTile a) Source # | Needed for Transformable instance of HalfTile - requires TypeFamilies |
type V (HalfTile a) Source # | Needed for Transformable instance of HalfTile - requires TypeFamilies |
type HalfTileLabel = HalfTile () Source #
By having () as the half tile representation we treat the constructors as just labels
tileLabel :: HalfTile a -> HalfTileLabel Source #
convert a half tile to its label (HalfTileLabel can be compared for equality)