haskell-hvr / regex-tdfa

Pure Haskell Tagged DFA Backend for "Text.Regex" (regex-base)
http://hackage.haskell.org/package/regex-tdfa
Other
36 stars 9 forks source link

Type the unsafeCoerce# #53

Closed phadej closed 1 year ago

phadej commented 1 year ago

I noticed unsafeCoerce# in https://github.com/haskell-hvr/regex-tdfa/pull/52 and it look scary.

With this small change we see what the target type of coercion, which makes it slightly less scary.

Especially as we use unsafeCoerce (without the hash), so we don't (accidentally) coerce between difference runtime reps.