Closed PierreR closed 6 years ago
I have a little lens question. How would you actually use the _PStringprism in here:
_PString
https://github.com/bartavelle/language-puppet/blob/master/Puppet/Interpreter/Resolve.hs#L100
I believe we can actually use _PString now that they are in the Puppet.Interpreter.Types module.
I think:
toStr (k,v) = fmap (k,) (preview _PString v)
If you want to obfuscate it:
toStr = traverse (preview _PString)
Thanks for your quick reply ;-)
I have a little lens question. How would you actually use the
_PString
prism in here:https://github.com/bartavelle/language-puppet/blob/master/Puppet/Interpreter/Resolve.hs#L100
I believe we can actually use
_PString
now that they are in the Puppet.Interpreter.Types module.