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

Safe HaskellNone
LanguageHaskell2010

SizedGrid.Coord.Periodic

Synopsis

Documentation

newtype Periodic (n :: Nat) Source #

A coordinate with periodic boundaries, as if on a taurus

Constructors

Periodic 

Fields

Instances

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

Methods

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

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

Ord (Periodic n) Source # 

Methods

compare :: Periodic n -> Periodic n -> Ordering #

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

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

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

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

max :: Periodic n -> Periodic n -> Periodic n #

min :: Periodic n -> Periodic n -> Periodic n #

Show (Periodic n) Source # 

Methods

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

show :: Periodic n -> String #

showList :: [Periodic n] -> ShowS #

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

Methods

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

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

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

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

Methods

mempty :: Periodic n #

mappend :: Periodic n -> Periodic n -> Periodic n #

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

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

Methods

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

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

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

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

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

randomIO :: IO (Periodic n) #

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

Associated Types

type Diff (Periodic n) :: * #

Methods

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

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

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