Skip to content

Instantly share code, notes, and snippets.

@i-am-the-slime
Created March 19, 2020 21:50
Show Gist options
  • Save i-am-the-slime/1947812d497020b7e2948014bc4d7ba0 to your computer and use it in GitHub Desktop.
Save i-am-the-slime/1947812d497020b7e2948014bc4d7ba0 to your computer and use it in GitHub Desktop.
module Abomination where
jsx ∷
∀ to thru from.
Lacks "kids" from =>
Justifiable { | Kids from } { | Kids thru } =>
Fillable { | Kids thru } { | Kids to } =>
-- arguments
ReactComponent (Record (Kids to)) ->
Record from ->
Array JSX ->
JSX
jsx x partialProps kids = element x props
where
props ∷ Record (Kids to)
props = justifill partialPropsWithKids
partialPropsWithKids ∷ Record (Kids from)
partialPropsWithKids = insert _kids kids partialProps
_kids = SProxy ∷ SProxy "kids"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment