audreyt / interpolatedstring-perl6

QuasiQuoter for Perl6-style multi-line interpolated strings with q, qq and qc support.
http://hackage.haskell.org/package/interpolatedstring-perl6/
Creative Commons Zero v1.0 Universal
25 stars 8 forks source link

Labels not supported? #14

Open mnn opened 1 year ago

mnn commented 1 year ago

I am using optics library with OverloadedLabels.

  let x = TestRecord {a = "A", b = Nothing}
  let exp = x ^. #a
  assertEqual exp [qq|{x ^. #a}|]
error:
    • 0
SrcLoc "" 1 6
Parse error in expression: x ^.

    • In the quasi-quotation: [qq|{x ^. #a}|]
   |
36 |   assertEqual exp [qq|{x ^. #a}|]
   |

I tried various common forms of escaping, but didn't find anything working (\#, \\#, \\\#, ##, ###).