Module Var.Gprod

Generalize Prod.

This could be useful for group by on multiple variables.

type ('o, 'p) var = ('o, 'p) t

The type for variables.

type ('c, 'o, 'p) t =
  1. | Unit : 'p -> ('c, 'o, 'p) t
  2. | Prod : ('c, 'o, 'a -> 'b) t * ('o, 'a) var -> ('c, 'o, 'b) t

The type for contructing a cartesian product 'c with function 'p by projecting values from 'o.

val unit : 'a -> ('c, 'o, 'a) t

unit f is a (virtual) unit variable with contructor f to be saturated by prod.

val prod : ('c, 'o, 'a -> 'b) t -> ('o, 'a) var -> ('c, 'o, 'b) t
val (*) : ('c, 'o, 'a -> 'b) t -> ('o, 'a) var -> ('c, 'o, 'b) t
val proj : ('c, 'o, 'c) t -> 'o -> 'c