nikita-volkov / refined

Refinement types with static checking
http://hackage.haskell.org/package/refined
MIT License
182 stars 31 forks source link

Expose a really unsafe refine #13

Closed treeowl closed 6 years ago

treeowl commented 6 years ago

The advice to use unsafeCoerce strikes me as a bit harsh. It's also a bit dangerous, because someone could accidentally coerce the value to an unrelated type. I'd much rather see a Refined.Unsafe or Refined.Internal module exporting the actual constructor, and perhaps also a reallyUnsafeRefine function to get the point across.

chessai commented 6 years ago

I agree with this.