<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 15 Feb 2012, at 00:23, Tristan Sloughter wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Hmm, yeah. And I should have mentioned I modified Ulf's exprecs to have slightly different syntax but the main thing was to also use types in records to add calls to convert (which I may change to check...) for setting each attribute of a record.</span></blockquote></div><div><br></div><div>Interesting.</div><div><br></div><div>Exprecs now also generates type signatures for the accessor functions, and does have some added support for controlling the naming of the accessors. I'd be interested in hearing if this support is insufficient for you. This was in response to Joel Reymont wanting full type signatures, and thinking that the exprecs naming convetion was hideous. :)</div><div><br></div><div>Two reasons: (1) I'm of course curious to see how exprecs can be improved, and (2) I assume it would be better for you if you didn't have to maintain your own hacked version.</div><div><br></div><div>I could also imagine running vanilla exprecs first and then another transform which e.g. does function renaming (hmm… there's an idea for a new transform :)</div><div><br></div><div>BR,</div><div>Ulf W</div><div><br></div><div>From <a href="https://github.com/esl/parse_trans/blob/master/doc/exprecs.md">https://github.com/esl/parse_trans/blob/master/doc/exprecs.md</a> :</div><div><br></div><div><p style="margin-top: 15px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 26px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); position: static; z-index: auto; ">It is possible to modify the naming rules of exprecs, through the use<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">of the following attributes (example reflecting the current rules):</p><pre style="margin-top: 15px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 6px; padding-right: 10px; padding-bottom: 6px; padding-left: 10px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: 19px; background-color: rgb(255, 255, 255); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-image: initial; overflow-x: auto; overflow-y: auto; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; color: rgb(51, 51, 51); letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "> -exprecs_prefix(["#", operation, "-"]).
-exprecs_fname([prefix, record]).
-exprecs_vfname([fname, "__", version]).
</pre><p style="margin-top: 15px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 26px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); ">The lists must contain strings or any of the following control atoms:</p><ul style="margin-top: 15px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 30px; color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 26px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); "><li style="margin-top: 15px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">in <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">exprecs_prefix</code>: <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">operation</code></div></li><li style="margin-top: 15px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">in <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">exprecs_fname</code>: <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">operation</code>, <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">record</code>, <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">prefix</code></div></li><li style="margin-top: 15px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">in <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">exprecs_vfname</code>: <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">operation</code>, <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">record</code>, <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">prefix</code>, <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">fname</code>, <code style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: nowrap; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(234, 234, 234); border-right-color: rgb(234, 234, 234); border-bottom-color: rgb(234, 234, 234); border-left-color: rgb(234, 234, 234); border-image: initial; background-color: rgb(248, 248, 248); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">version</code></div></li></ul><div><br></div></div></body></html>