hnetcdf-0.5.0.0: Haskell NetCDF library

Safe HaskellNone
LanguageHaskell98

Data.NetCDF.Store

Description

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 ForeignPtrs.

Synopsis

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.

Associated Types

type NcStoreExtraCon s a :: Constraint Source #

Methods

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 # 
Instance details

Defined in Data.NetCDF.Vector

Associated Types

type NcStoreExtraCon Vector a :: Constraint Source #

Shape sh => NcStore (Array F sh) Source # 
Instance details

Defined in Data.NetCDF.Repa

Associated Types

type NcStoreExtraCon (Array F sh) a :: Constraint Source #

Methods

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 #