Safe Haskell | None |
---|---|
Language | Haskell98 |
The store polymorphism for the functions to get the values of
NetCDF variables relies on a simple NcStore
typeclass for
converting between store values and ForeignPtr
s.
Synopsis
- class NcStore s where
- type NcStoreExtraCon s a :: Constraint
- toForeignPtr :: (Storable e, NcStoreExtraCon s e) => s e -> ForeignPtr e
- fromForeignPtr :: (Storable e, NcStoreExtraCon s e) => ForeignPtr e -> [Int] -> s e
- smap :: (Storable a, Storable b, NcStoreExtraCon s a, NcStoreExtraCon s b) => (a -> b) -> s a -> s b
Documentation
class NcStore s where Source #
Class representing containers suitable for storing values read from NetCDF variables. Just has methods to convert back and forth between the store and a foreign pointer, and to perform simple mapping over the store. The NcStoreExtraCon associated constraint-kinded type is used to track extra class constraints on elements needed for some store types.
type NcStoreExtraCon s a :: Constraint Source #
toForeignPtr :: (Storable e, NcStoreExtraCon s e) => s e -> ForeignPtr e Source #
fromForeignPtr :: (Storable e, NcStoreExtraCon s e) => ForeignPtr e -> [Int] -> s e Source #
smap :: (Storable a, Storable b, NcStoreExtraCon s a, NcStoreExtraCon s b) => (a -> b) -> s a -> s b Source #
Instances
NcStore Vector Source # | |
Defined in Data.NetCDF.Vector type NcStoreExtraCon Vector a :: Constraint Source # toForeignPtr :: (Storable e, NcStoreExtraCon Vector e) => Vector e -> ForeignPtr e Source # fromForeignPtr :: (Storable e, NcStoreExtraCon Vector e) => ForeignPtr e -> [Int] -> Vector e Source # smap :: (Storable a, Storable b, NcStoreExtraCon Vector a, NcStoreExtraCon Vector b) => (a -> b) -> Vector a -> Vector b Source # | |
Shape sh => NcStore (Array F sh) Source # | |
Defined in Data.NetCDF.Repa type NcStoreExtraCon (Array F sh) a :: Constraint Source # toForeignPtr :: (Storable e, NcStoreExtraCon (Array F sh) e) => Array F sh e -> ForeignPtr e Source # fromForeignPtr :: (Storable e, NcStoreExtraCon (Array F sh) e) => ForeignPtr e -> [Int] -> Array F sh e Source # smap :: (Storable a, Storable b, NcStoreExtraCon (Array F sh) a, NcStoreExtraCon (Array F sh) b) => (a -> b) -> Array F sh a -> Array F sh b Source # |