| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Fortran.Repr.Value.Scalar.Common
Description
Common definitions for Fortran scalar representations.
Synopsis
- data SomeFKinded k ft = forall (fk :: k).(SingKind k, SingI fk) => SomeFKinded (ft fk)
- someFKindedKind :: SomeFKinded k ft -> Demote k
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 . By pattern matching on it, we recover the hidden kind tag (as well as
obtaining the value).SomeFKinded FTInt
FInt
Constructors
| forall (fk :: k).(SingKind k, SingI fk) => SomeFKinded (ft fk) |
Instances
| Show SomeFComplex Source # | |
Defined in Language.Fortran.Repr.Value.Scalar.Complex Methods showsPrec :: Int -> SomeFComplex -> ShowS # show :: SomeFComplex -> String # showList :: [SomeFComplex] -> ShowS # | |
| Show SomeFIntI Source # | |
| Show SomeFInt Source # | |
| Show SomeFReal Source # | |
| Eq SomeFComplex Source # | |
Defined in Language.Fortran.Repr.Value.Scalar.Complex | |
| Eq SomeFIntI Source # | |
| Eq SomeFInt Source # | |
| Eq SomeFReal Source # | |
| Ord SomeFReal Source # | |
Defined in Language.Fortran.Repr.Value.Scalar.Real | |
someFKindedKind :: SomeFKinded k ft -> Demote k Source #
Recover some TYPE(x)'s kind (the x).