Extending the system
Katherine Ye edited this page Oct 23, 2018
·
4 revisions
Note: this page needs to be updated
Let's say the datatype name is Shape
(e.g. Circ
). Here's how you add a new shape to the system.
To be updated.
- In Functions, write your function as a Haskell function of type
ObjFn
. - Register it in either
objFuncDict
(if an objective) orconstrFuncDict
(if a constraint).
- In Computation, write a wrapper function as a Haskell function of type
CompFn a
. Inside the wrapper function, annotate your real function with its expected input argument number, types, and order, and its expected output type. (There is a limited number of allowable types.) - Call your real computation from the wrapper function.
- Register your wrapper function in
computationDict
.
- Add a getter and setter in
Shapes
, or look up the result in the object's configuration ininit{SHAPETYPE}
in Runtime. - More standard interface coming soon.
Coming soon.
Coming soon.
Coming soon.
Found a problem or got a suggestion? Please open a GitHub issue and tag it with documentation
!