camfort-1.0.1: CamFort - Cambridge Fortran infrastructure
Safe HaskellNone
LanguageHaskell2010

Language.Fortran.Model.Types.Match

Synopsis

Documentation

data MatchPrim p k a where Source #

Constructors

MatchPrim :: Sing p -> Sing k -> MatchPrim p k a 

matchPrim :: Prim p k a -> MatchPrim p k a Source #

data MatchPrimD a where Source #

Constructors

MatchPrimD :: MatchPrim p k a -> Prim p k a -> MatchPrimD (PrimS a) 

matchPrimD :: D a -> Maybe (MatchPrimD a) Source #

Checks if the given type is primitive, and if so returns a proof of that fact.

data MakePrim p k where Source #

Constructors

MakePrim :: Prim p k a -> MakePrim p k 

makePrim :: Sing p -> Sing k -> Maybe (MakePrim p k) Source #

Tries to make a primitive type with the given precision and kind. Fails if there is no primitive with the given combination.

eqSymbol :: forall n1 n2. SSymbol n1 -> SSymbol n2 -> Maybe (n1 :~: n2) Source #

eqPrim :: Prim p1 k1 a -> Prim p2 k2 b -> Maybe ('(p1, k1, a) :~: '(p2, k2, b)) Source #

eqField :: (forall x y. f x -> g y -> Maybe (x :~: y)) -> Field f p1 -> Field g p2 -> Maybe (p1 :~: p2) Source #

eqRec :: (forall a b. t a -> t b -> Maybe (a :~: b)) -> Rec (Field t) fs -> Rec (Field t) gs -> Maybe (fs :~: gs) Source #

eqD :: D a -> D b -> Maybe (a :~: b) Source #

dcast :: D a -> D b -> f a -> Maybe (f b) Source #