Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve high level bindings to allow easier specification of integrality or bounds #3

Open
stefaj opened this issue Sep 15, 2016 · 0 comments

Comments

@stefaj
Copy link
Owner

stefaj commented Sep 15, 2016

It's very rare for a single variable type to have integer and non-integer instances.

Define a class which a Variable must be an instance of.

data Type = Continuous | Binary | Integer

data Bound = Fin Int | Infinite

newtype Bounded = Bounded (Bound, Bound) 

class isVar a where
  hasType :: a -> Type
  hasBound :: a -> Bounded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant