hsqml-datamodel-0.2.0.2: HsQML (Qt5) data model.

Copyright(c) Marcin Mrotek, 2015
LicenseBSD3
Maintainermarcin.jan.mrotek@gmail.com
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010
Extensions
  • MonoLocalBinds
  • ScopedTypeVariables
  • TypeFamilies
  • PolyKinds
  • DeriveDataTypeable
  • DefaultSignatures
  • FlexibleContexts
  • KindSignatures
  • TypeOperators
  • ExplicitNamespaces
  • ExplicitForAll

Graphics.QML.DataModel.Internal.Generic.Count

Description

Count the number of columns in a data type.

Synopsis

Documentation

data ColumnIndexException Source

Exception thrown when QML tries to acces a column that is not available. Shouldn't really happen.

Constructors

ColumnIndexNegative Int

QML called for a negative column index.

ColumnIndexOutOfBounds Int Int

QML called for a column index that is too high.

class CountFields t where Source

A class of types that have a specific number of fields. Generic implementation is provided for all purely product types.

Minimal complete definition

Nothing

Methods

countFields :: proxy t -> Int Source

class GCountFields f where Source

Generic implementation of the CountFields class.

Methods

gCountFields :: proxy f -> Int Source

Instances

GCountFields (* -> *) (K1 i c) Source

A container type has a proxyle column.

(GCountFields (* -> *) a, GCountFields (* -> *) b) => GCountFields (* -> *) ((:*:) a b) Source

A product type's number of columns is a sum of the terms' column numbers.

GCountFields (* -> *) f => GCountFields (* -> *) (M1 i t f) Source

Meta information is skipped, and the recursion proceeds further down.