uuid icon indicating copy to clipboard operation
uuid copied to clipboard

Provide a QuasiQuoter for UUID literals

Open jessekempf opened this issue 7 years ago • 6 comments

jessekempf avatar Jun 01 '18 18:06 jessekempf

@hvr: Can this be merged?

jessekempf avatar Aug 17 '18 21:08 jessekempf

@jessekempf To be honest I'm not a fan of supporting string-literals which cannot be statically validated at compile time and would thus be runtime landmines. I'm rather considering offering a QuasiQuoter instead.

hvr avatar Aug 18 '18 14:08 hvr

@hvr: By your command.

jessekempf avatar Aug 22 '18 10:08 jessekempf

Not sure how relevant this is, but there is a quasi-quoter over in https://hackage.haskell.org/package/uuid-quasi-0.1.0.1/docs/Data-UUID-Quasi.html

It is also relying on view patterns, however, which might be a down-side.

aslatter avatar Aug 23 '18 16:08 aslatter

@aslatter where do you see ViewPatterns used? And why would that be undesirable?

hvr avatar Aug 23 '18 16:08 hvr

Sorry, I mis-remembered - the uuid-quasi package doesn't itself use ViewPatterns, but relies on ViewPatterns being enabled by the consumer if they want to use the pattern-match. If the quasi-quoter were in the uuid package itself that probably wouldn't be needed?

aslatter avatar Aug 26 '18 12:08 aslatter