Closed lawbel closed 7 months ago
I think filepath
should define just
osp :: QuasiQuoter
osp = OS.osstr
pstr :: QuasiQuoter
pstr = OS.osstr
while the actual quasiquoter to be improved in https://github.com/haskell/os-string.
I think
filepath
should define justosp :: QuasiQuoter osp = OS.osstr pstr :: QuasiQuoter pstr = OS.osstr
while the actual quasiquoter to be improved in https://github.com/haskell/os-string.
We run isValid
at compile time here, which we don't in the osstr quasiquoters.
@lawbel we probably want this patch for os-string as well
@hasufell sorry I wasn't able to look at this over the weekend. I see you've done a PR for os-string as well, so I guess this is all done then? I appreciate the help in getting this over the line :smile:
Resolves issue #205
Notes:
Alternative to the quote
[p|...|]
is something likeAlthough this may then need CPP to adjust for
conP
gaining an extra argument intemplate-haskell
v2.18.0.0. Not sure which GHC version this changed in, but it's due to the ability to bind a type parameter with a constructor likeGiven that, I thought the quote would be clearer. I'm assuming it should be easier to maintain as well, as it should avoid the need to update with any TH changes?
TemplateHaskellQuotes
andViewPatterns
extensions both go back to GHC v6.x which should be plenty for back-compat?Any other changes that should be made? Add some suitable tests?
Should we change the other QuasiQuoters as well? Make similar changes to
osstr
andpstr
?