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

combinators #4

Open
4 of 5 tasks
KiaraGrouwstra opened this issue Jan 21, 2020 · 0 comments
Open
4 of 5 tasks

combinators #4

KiaraGrouwstra opened this issue Jan 21, 2020 · 0 comments
Labels
critical generation features needed for dataset generation

Comments

@KiaraGrouwstra
Copy link
Owner

KiaraGrouwstra commented Jan 21, 2020

my approach needs strong polymorphism, and combinators are a huge part of this. this feature is non-negotiable and I'll need to figure things out. while theoretically type variables can be functions all the way down, in practice I can probably bias things to bound complexity somehow (don't (usually) instantiate unbounded type variables to functions?).

functional programming makes gratuitous use of combinators, or functions manipulating functions. this has two sides:

  • functions returning functions, in our curried language analogous to functions taking multiple parameters. testing these basically requires tuples of multiple arguments as input rather than just one. the tricky part here is that due to type variables, the type of further arguments can be influenced by the type variable instantiations of previous parameters.
  • functions taking functions as parameters -- this is tough because my QuickCheck value instantiation from type fails for function types. I have had my own method for instantiating functions from a type signature, but for now just added programs by type as combinator samples.

notes:

update: I feel like trying the remaining blocks I've just hit all the ugly edge-cases now.

  • isFn checks for type that are a function, while there are also types that contain a function type wrapped inside e.g. a list -- these types similarly could not be instantiated by QuickCheck... this gives many types in type_fn_instantiations that cannot get instantiations. I just added a hasFn check to just ditch the bad stuff from rest for now. cuz honestly, lists of functions is some bs that doesn't happen in the real world, and I don't care.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical generation features needed for dataset generation
Projects
None yet
Development

No branches or pull requests

1 participant