Compiling specialized functions for large set of user-passed options

Quick update:
It seems like I can pass arbitrary data into a type like so:

data = ((*, -, /), (cos, exp), [-1, -1, -1], [-1, -1], 10)
T = Val{Symbol(data)}

data2 = eval(Meta.parse(string(T.parameters[1])))
data == data2 #true

This syntax is probably a Julia sin, but since these are constants in the view of the compiler, maybe this would work? Then I can just have the entire options array in the type, and have the compiler unpack it.

Here’s a full function:

function g(::Val{T}) where {T}
    data = eval(Meta.parse(string(T)))
end

then I can call it like:

julia> g(Val((exp, cos)))
(exp, cos)

Edit: this seems to be very slow, so is probably not the way to go about this.