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

Support eliminating a variant with a record of functions with non-fixed codomain #12

Open
mrkgnao opened this issue Oct 22, 2017 · 2 comments

Comments

@mrkgnao
Copy link

mrkgnao commented Oct 22, 2017

I'm not sure if there's something fundamental preventing the inclusion of a function of type

vmap 
  :: Short (NumCols p - 1) 
  => R (f :->: g) p -> V f p -> V g p

in sculls.

One might then use a record of functions like

funcs :: R (I :->: I) (Row0 .& "int" .= Int .& "string" .= String)
funcs = mkR 
  .* (A (\(I x) -> I (2 * x)) :: (I :->: I) "int" Int)
  .* (A (\(I x) -> I (reverse x)) :: (I :->: I) "string" String)

to eliminate a variant like V I (Row0 .& "int" .= Int .& "string" .= String).

@mrkgnao mrkgnao changed the title Records of functions with non-fixed codomain don't seem to be legal Support eliminating a variant with a record of functions with non-fixed codomain Oct 22, 2017
@nfrisby
Copy link
Owner

nfrisby commented Oct 22, 2017 via email

@mrkgnao
Copy link
Author

mrkgnao commented Oct 22, 2017

@nfrisby: apologies for the older version of the issue report. I was actually using (.=) from lens, which had magically polymorph-ed itself into a confusingly sensible-looking type. :)

I've updated the issue with what I was really trying to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants