vinyl-gl-0.1.2: Utilities for working with OpenGL's GLSL shading language and vinyl records.

Safe HaskellNone

Data.Vinyl.Reflect

Description

Reflection utilities for vinyl records.

Synopsis

Documentation

class HasFieldNames a whereSource

List all field names in a record.

Methods

fieldNames :: a -> [String]Source

Instances

(SingI Symbol sy, HasFieldNames (Rec ts Identity)) => HasFieldNames (Rec (: * (::: sy t) ts) Identity) 
HasFieldNames (Rec ([] *) f) 

class HasFieldSizes a whereSource

Compute the size in bytes of of each field in a record.

Methods

fieldSizes :: a -> [Int]Source

Instances

(HasFieldSizes (Rec ts Identity), Storable t) => HasFieldSizes (Rec (: * (::: sy t) ts) Identity) 
HasFieldSizes (Rec ([] *) f) 

class HasFieldDims a whereSource

Compute the dimensionality of each field in a record. This is primarily useful for things like the small finite vector types provided by Linear.

Methods

fieldDims :: a -> [Int]Source

Instances

(HasFieldDims (PlainRec ts), Foldable v, Num (v a)) => HasFieldDims (PlainRec (: * (::: sy (v a)) ts)) 
HasFieldDims (Rec ([] *) f)