sized-grid-0.1.1.0: Multidimensional grids with sized specified at compile time

Safe HaskellNone
LanguageHaskell2010

SizedGrid.Coord.HardWrap

Synopsis

Documentation

newtype HardWrap (n :: Nat) Source #

A coordinate that clamps its numbers

Constructors

HardWrap 

Fields

Instances

(KnownNat n, (<=) 1 n) => Bounded (HardWrap n) Source # 
(KnownNat n, (<=) 1 n) => Enum (HardWrap n) Source # 
Eq (HardWrap n) Source # 

Methods

(==) :: HardWrap n -> HardWrap n -> Bool #

(/=) :: HardWrap n -> HardWrap n -> Bool #

Ord (HardWrap n) Source # 

Methods

compare :: HardWrap n -> HardWrap n -> Ordering #

(<) :: HardWrap n -> HardWrap n -> Bool #

(<=) :: HardWrap n -> HardWrap n -> Bool #

(>) :: HardWrap n -> HardWrap n -> Bool #

(>=) :: HardWrap n -> HardWrap n -> Bool #

max :: HardWrap n -> HardWrap n -> HardWrap n #

min :: HardWrap n -> HardWrap n -> HardWrap n #

Show (HardWrap n) Source # 

Methods

showsPrec :: Int -> HardWrap n -> ShowS #

show :: HardWrap n -> String #

showList :: [HardWrap n] -> ShowS #

((<=) 1 n, KnownNat n) => Semigroup (HardWrap n) Source # 

Methods

(<>) :: HardWrap n -> HardWrap n -> HardWrap n #

sconcat :: NonEmpty (HardWrap n) -> HardWrap n #

stimes :: Integral b => b -> HardWrap n -> HardWrap n #

(KnownNat n, (<=) 1 n) => Monoid (HardWrap n) Source # 

Methods

mempty :: HardWrap n #

mappend :: HardWrap n -> HardWrap n -> HardWrap n #

mconcat :: [HardWrap n] -> HardWrap n #

KnownNat n => ToJSON (HardWrap n) Source # 
KnownNat n => ToJSONKey (HardWrap n) Source # 
KnownNat n => FromJSON (HardWrap n) Source # 
KnownNat n => FromJSONKey (HardWrap n) Source # 
(KnownNat n, (<=) 1 n) => Random (HardWrap n) Source # 

Methods

randomR :: RandomGen g => (HardWrap n, HardWrap n) -> g -> (HardWrap n, g) #

random :: RandomGen g => g -> (HardWrap n, g) #

randomRs :: RandomGen g => (HardWrap n, HardWrap n) -> g -> [HardWrap n] #

randoms :: RandomGen g => g -> [HardWrap n] #

randomRIO :: (HardWrap n, HardWrap n) -> IO (HardWrap n) #

randomIO :: IO (HardWrap n) #

((<=) 1 n, KnownNat n) => AffineSpace (HardWrap n) Source # 

Associated Types

type Diff (HardWrap n) :: * #

Methods

(.-.) :: HardWrap n -> HardWrap n -> Diff (HardWrap n) #

(.+^) :: HardWrap n -> Diff (HardWrap n) -> HardWrap n #

((<=) 1 n, KnownNat n) => IsCoord (HardWrap n) Source # 
type Diff (HardWrap n) Source # 
type Diff (HardWrap n) = Integer
type CoordSized (HardWrap n) Source # 
type CoordSized (HardWrap n) = n