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

Safe HaskellNone
LanguageHaskell2010

SizedGrid.Coord.HardWrap

Synopsis

Documentation

newtype HardWrap n 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, (<=) 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) #

KnownNat n => ToJSONKey (HardWrap n) Source # 

Methods

toJSONKey :: ToJSONKeyFunction (HardWrap n)

toJSONKeyList :: ToJSONKeyFunction [HardWrap n]

KnownNat n => ToJSON (HardWrap n) Source # 

Methods

toJSON :: HardWrap n -> Value

toEncoding :: HardWrap n -> Encoding

toJSONList :: [HardWrap n] -> Value

toEncodingList :: [HardWrap n] -> Encoding

KnownNat n => FromJSONKey (HardWrap n) Source # 

Methods

fromJSONKey :: FromJSONKeyFunction (HardWrap n)

fromJSONKeyList :: FromJSONKeyFunction [HardWrap n]

KnownNat n => FromJSON (HardWrap n) Source # 

Methods

parseJSON :: Value -> Parser (HardWrap n)

parseJSONList :: Value -> Parser [HardWrap n]

((<=) 1 n, KnownNat n) => IsCoord (HardWrap n) Source # 
((<=) 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

type CoordSized (HardWrap n) Source # 
type CoordSized (HardWrap n) = n
type Diff (HardWrap n) Source # 
type Diff (HardWrap n) = Integer