klarkc / pure-vue

It's Vue, it's PureScript. Simple as that.
MIT License
18 stars 0 forks source link

Improve DX on UnwrapRef usage #6

Open klarkc opened 2 years ago

klarkc commented 2 years ago

Today we're setting template names using the UnwrapRef constructors, but I believe we can remove them by moving this responsability to the SFC compiler using purescript AST (complicated solution) or just compiled JavaScript function name (easier).

klarkc commented 2 years ago

I was browsing pursuit docs, and found this type: https://pursuit.purescript.org/packages/purescript-prelude/6.0.0/docs/Type.Proxy#t:Proxy

More info about proxies here: https://jordanmartinez.github.io/purescript-jordans-reference-site/content/11-Syntax/03-Type-Level-Programming-Syntax/src/02-Basic-Syntax/04-Proxy-ps.html

I bet it can be useful for this problem

klarkc commented 1 year ago

New finding: https://pursuit.purescript.org/packages/purescript-literals

klarkc commented 1 year ago

I know that babel has a parser (plugin-vue is using it) . I would use the same solution for the purescript produced javascript, but I don't know if is granted that purs will ever preserve names