Add documentation to unsafe section

This commit is contained in:
Taylor Fausak 2021-05-01 19:04:27 +00:00 committed by GitHub
parent c1c69ef332
commit 6f1c2e671a

View File

@ -26,6 +26,13 @@ module Witch
, Witch.Utility.tryVia
-- ** Unsafe
-- | These functions should only be used in two circumstances: When you know
-- a conversion is safe even though you can't prove it to the compiler, and
-- when you're alright with your program crashing if the conversion fails.
-- In all other cases you should prefer the normal conversion functions like
-- 'Witch.Cast.cast'. And if you're converting a literal value, consider
-- using the Template Haskell conversion functions like
-- 'Witch.Lift.liftedCast'.
, Witch.Utility.unsafeCast
, Witch.Utility.unsafeFrom
, Witch.Utility.unsafeInto