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

Language.Fortran.Repr.Value.Scalar.Common

Description

Common definitions for Fortran scalar representations.

Synopsis

Documentation

data SomeFKinded k ft Source #

Convenience wrapper which multiple Fortran tag-kinded intrinsic types fit.

A type ft takes some type fk of kind k, and we are permitted to move the type between the term and type levels using the included singleton instances.

For example, integers are kinded with type level FTInts. So we can define an integer with an existential ("unknown") kind with the type SomeFKinded FTInt FInt. By pattern matching on it, we recover the hidden kind tag (as well as obtaining the value).

Constructors

forall (fk :: k).(SingKind k, SingI fk) => SomeFKinded (ft fk) 

Instances

Instances details
Show SomeFComplex Source # 
Instance details

Defined in Language.Fortran.Repr.Value.Scalar.Complex

Show SomeFIntI Source # 
Instance details

Defined in Language.Fortran.Repr.Value.Scalar.Int.Idealized

Show SomeFInt Source # 
Instance details

Defined in Language.Fortran.Repr.Value.Scalar.Int.Machine

Show SomeFReal Source # 
Instance details

Defined in Language.Fortran.Repr.Value.Scalar.Real

Eq SomeFComplex Source # 
Instance details

Defined in Language.Fortran.Repr.Value.Scalar.Complex

Eq SomeFIntI Source # 
Instance details

Defined in Language.Fortran.Repr.Value.Scalar.Int.Idealized

Eq SomeFInt Source # 
Instance details

Defined in Language.Fortran.Repr.Value.Scalar.Int.Machine

Eq SomeFReal Source # 
Instance details

Defined in Language.Fortran.Repr.Value.Scalar.Real

Ord SomeFReal Source # 
Instance details

Defined in Language.Fortran.Repr.Value.Scalar.Real

someFKindedKind :: SomeFKinded k ft -> Demote k Source #

Recover some TYPE(x)'s kind (the x).