Rattus-0.4: A modal FRP language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Rattus.Strict

Description

This module contains strict versions of some standard data structures.

Synopsis

Documentation

data List a Source #

Strict list type.

Constructors

Nil 
!a :! !(List a) infixr 8 

Instances

Instances details
Functor List Source # 
Instance details

Defined in Rattus.Strict

Methods

fmap :: (a -> b) -> List a -> List b #

(<$) :: a -> List b -> List a #

Foldable List Source # 
Instance details

Defined in Rattus.Strict

Methods

fold :: Monoid m => List m -> m #

foldMap :: Monoid m => (a -> m) -> List a -> m #

foldMap' :: Monoid m => (a -> m) -> List a -> m #

foldr :: (a -> b -> b) -> b -> List a -> b #

foldr' :: (a -> b -> b) -> b -> List a -> b #

foldl :: (b -> a -> b) -> b -> List a -> b #

foldl' :: (b -> a -> b) -> b -> List a -> b #

foldr1 :: (a -> a -> a) -> List a -> a #

foldl1 :: (a -> a -> a) -> List a -> a #

toList :: List a -> [a] #

null :: List a -> Bool #

length :: List a -> Int #

elem :: Eq a => a -> List a -> Bool #

maximum :: Ord a => List a -> a #

minimum :: Ord a => List a -> a #

sum :: Num a => List a -> a #

product :: Num a => List a -> a #

reverse' :: List a -> List a Source #

Reverse a list.

(+++) :: List a -> List a -> List a Source #

Append two lists.

listToMaybe' :: List a -> Maybe' a Source #

Returns Nothing' on an empty list or Just' a where a is the first element of the list.

mapMaybe' :: (a -> Maybe' b) -> List a -> List b Source #

A version of map which can throw out elements. In particular, the function argument returns something of type Maybe' b. If this is Nothing', no element is added on to the result list. If it is Just' b, then b is included in the result list.

data a :* b infixr 2 Source #

Strict pair type.

Constructors

!a :* !b infixr 2 

Instances

Instances details
Functor ((:*) a) Source # 
Instance details

Defined in Rattus.Strict

Methods

fmap :: (a0 -> b) -> (a :* a0) -> a :* b #

(<$) :: a0 -> (a :* b) -> a :* a0 #

(Show a, Show b) => Show (a :* b) Source # 
Instance details

Defined in Rattus.Strict

Methods

showsPrec :: Int -> (a :* b) -> ShowS #

show :: (a :* b) -> String #

showList :: [a :* b] -> ShowS #

RealFloat a => VectorSpace (a :* a) a Source # 
Instance details

Defined in Rattus.Strict

Methods

zeroVector :: a :* a #

(*^) :: a -> (a :* a) -> a :* a #

(^/) :: (a :* a) -> a -> a :* a #

(^+^) :: (a :* a) -> (a :* a) -> a :* a #

(^-^) :: (a :* a) -> (a :* a) -> a :* a #

negateVector :: (a :* a) -> a :* a #

dot :: (a :* a) -> (a :* a) -> a #

norm :: (a :* a) -> a #

normalize :: (a :* a) -> a :* a #

data Maybe' a Source #

Strict variant of Maybe.

Constructors

Just' !a 
Nothing' 

maybe' :: b -> (a -> b) -> Maybe' a -> b Source #

takes a default value, a function, and a Maybe' value. If the Maybe' value is Nothing', the function returns the default value. Otherwise, it applies the function to the value inside the Just' and returns the result.

fst' :: (a :* b) -> a Source #

First projection function.

snd' :: (a :* b) -> b Source #

Second projection function.