camfort-1.2.0: CamFort - Cambridge Fortran infrastructure
Safe HaskellSafe-Inferred
LanguageHaskell2010

Camfort.Helpers.TypeLevel

Synopsis

Documentation

data Some f where Source #

An existential type containing f a for some type a.

Constructors

Some :: f a -> Some f 

Instances

Instances details
Pretty1 f => Show (Some f) Source # 
Instance details

Defined in Camfort.Helpers.TypeLevel

Methods

showsPrec :: Int -> Some f -> ShowS #

show :: Some f -> String #

showList :: [Some f] -> ShowS #

Pretty1 f => Pretty (Some f) Source # 
Instance details

Defined in Camfort.Helpers.TypeLevel

Methods

pretty :: Some f -> String #

prettysPrec :: Int -> Some f -> ShowS #

data PairOf f g a Source #

A pair of functorial values over the same ground type, where the first value is meant to add constraints rather than real semantic information. The Pretty1 instance ignores the first value.

Constructors

PairOf (f a) (g a) 

Instances

Instances details
Pretty1 g => Pretty1 (PairOf f g :: k -> Type) Source # 
Instance details

Defined in Camfort.Helpers.TypeLevel

Methods

pretty1 :: forall (a :: k0). PairOf f g a -> String #

prettys1Prec :: forall (a :: k0). Int -> PairOf f g a -> ShowS #

(Foldable f, Foldable g) => Foldable (PairOf f g) Source # 
Instance details

Defined in Camfort.Helpers.TypeLevel

Methods

fold :: Monoid m => PairOf f g m -> m #

foldMap :: Monoid m => (a -> m) -> PairOf f g a -> m #

foldMap' :: Monoid m => (a -> m) -> PairOf f g a -> m #

foldr :: (a -> b -> b) -> b -> PairOf f g a -> b #

foldr' :: (a -> b -> b) -> b -> PairOf f g a -> b #

foldl :: (b -> a -> b) -> b -> PairOf f g a -> b #

foldl' :: (b -> a -> b) -> b -> PairOf f g a -> b #

foldr1 :: (a -> a -> a) -> PairOf f g a -> a #

foldl1 :: (a -> a -> a) -> PairOf f g a -> a #

toList :: PairOf f g a -> [a] #

null :: PairOf f g a -> Bool #

length :: PairOf f g a -> Int #

elem :: Eq a => a -> PairOf f g a -> Bool #

maximum :: Ord a => PairOf f g a -> a #

minimum :: Ord a => PairOf f g a -> a #

sum :: Num a => PairOf f g a -> a #

product :: Num a => PairOf f g a -> a #

(Traversable f, Traversable g) => Traversable (PairOf f g) Source # 
Instance details

Defined in Camfort.Helpers.TypeLevel

Methods

traverse :: Applicative f0 => (a -> f0 b) -> PairOf f g a -> f0 (PairOf f g b) #

sequenceA :: Applicative f0 => PairOf f g (f0 a) -> f0 (PairOf f g a) #

mapM :: Monad m => (a -> m b) -> PairOf f g a -> m (PairOf f g b) #

sequence :: Monad m => PairOf f g (m a) -> m (PairOf f g a) #

(Functor f, Functor g) => Functor (PairOf f g) Source # 
Instance details

Defined in Camfort.Helpers.TypeLevel

Methods

fmap :: (a -> b) -> PairOf f g a -> PairOf f g b #

(<$) :: a -> PairOf f g b -> PairOf f g a #

(Show (f a), Show (g a)) => Show (PairOf f g a) Source # 
Instance details

Defined in Camfort.Helpers.TypeLevel

Methods

showsPrec :: Int -> PairOf f g a -> ShowS #

show :: PairOf f g a -> String #

showList :: [PairOf f g a] -> ShowS #

(Eq (f a), Eq (g a)) => Eq (PairOf f g a) Source # 
Instance details

Defined in Camfort.Helpers.TypeLevel

Methods

(==) :: PairOf f g a -> PairOf f g a -> Bool #

(/=) :: PairOf f g a -> PairOf f g a -> Bool #

(Ord (f a), Ord (g a)) => Ord (PairOf f g a) Source # 
Instance details

Defined in Camfort.Helpers.TypeLevel

Methods

compare :: PairOf f g a -> PairOf f g a -> Ordering #

(<) :: PairOf f g a -> PairOf f g a -> Bool #

(<=) :: PairOf f g a -> PairOf f g a -> Bool #

(>) :: PairOf f g a -> PairOf f g a -> Bool #

(>=) :: PairOf f g a -> PairOf f g a -> Bool #

max :: PairOf f g a -> PairOf f g a -> PairOf f g a #

min :: PairOf f g a -> PairOf f g a -> PairOf f g a #

type SomePair f g = Some (PairOf f g) Source #

pattern SomePair :: f a -> g a -> Some (PairOf f g) Source #

traverseSome :: Functor m => (forall a. f a -> m (g a)) -> Some f -> m (Some g) Source #

traversePairOf :: Functor m => (f a -> g a -> m (f' b, g' b)) -> PairOf f g a -> m (PairOf f' g' b) Source #

mapSome :: (forall a. f a -> g a) -> Some f -> Some g Source #