Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
input.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
open Image type ('a, 'b, 'c) t = ('a, 'b, 'c) Image.t array let get inputs i = if i < Array.length inputs then inputs.(i) else Error.exc (`Invalid_input i) let make_output ?width ?height inputs = let a = get inputs 0 in let width = match width with | None -> a.width | Some w -> w in let height = match height with | None -> a.height | Some h -> h in create (kind a) a.color width height