]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/bin/xhtbl/attr.ml
update in lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / bin / xhtbl / attr.ml
1 module L = List
2
3 module T = Table
4
5 (* true for a row specification *)
6 type 'a atom = 'a * bool * int option * int option
7
8 type 'a atoms = 'a atom list
9
10 let get_attr concat null a y x =
11    let map y x (c, b, x1, x2) = match b, x1, x2 with
12       | _    , None, None       -> c
13       | false, None, Some c2    -> if x <= c2 then c else null
14       | false, Some c1, None    -> if x >= c1 then c else null
15       | false, Some c1, Some c2 -> if x >= c1 && x <= c2 then c else null
16       | true , None, Some r2    -> if y <= r2 then c else null
17       | true , Some r1, None    -> if y >= r1 then c else null
18       | true , Some r1, Some r2 -> if y >= r1 && y <= r2 then c else null
19    in
20    concat (L.map (map y x) a)