type Constructor =(Name,[(Maybe Name, Type)])-- the list of constructorstype Cons_vars =[ExpQ]-- A list of variables that bind in the constructortype Function_body = ExpQ
type Gen_func = Constructor -> Cons_vars -> Function_body
type Func_name = Name -- The name of the instance function we will be creating-- For each function in the instance we provide a generator function-- to generate the function body (the body is generated for each constructor)type Funcs =[(Func_name, Gen_func)]

The main reusable function. We pass it the list of functions to
generate the functions of the instance