fortran-src-0.12.0: Parsers and analyses for Fortran standards 66, 77, 90, 95 and 2003 (partial).
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Fortran.Repr.Type.Scalar.Common

Synopsis

Documentation

type FKindTerm = Natural Source #

Fortran kinds are represented by natural numbers. We use them on both type and term levels.

reifyKinded :: forall k (a :: k) n. (n ~ FKindOf a, KnownNat n) => Sing a -> FKindTerm Source #

Reify a kind tag to its Natural equivalent.

class FKinded (a :: Type) where Source #

Fortran types which use simple integer kinds.

Associated Types

type FKindOf (x :: a) :: FKindType Source #

type FKindDefault :: a Source #

Methods

printFKind :: a -> FKindTerm Source #

This we get via the type family, but require singletons.

parseFKind :: FKindTerm -> Maybe a Source #

This we *should* get via the type family, but again require singletons.

data SingCmp (l :: k) (r :: k) Source #

Constructors

SingEq (l :~: r) 
SingLt 
SingGt 

singCompare :: forall k (a :: k) (b :: k). SOrd k => Sing a -> Sing b -> SingCmp a b Source #

Upgrade an SOrdering to include a proof of type equality for the equal case.

We have no choice but to fake the Refl with unsafeCoerce. But assuming SEQ is used correctly, it should be safe.