unsafeEncodeUtf only throws a (pure) exception on invalid input. This is not unsafe in the same way as e.g. unsafePerformIO, which can cause undefined behaviour. Other functions that also throw pure exceptions (like head) are documented as partial (which is more correct in my opinion).
unsafeFromChar only truncates its input. In what way is this unsafe? Can it cause undefined behaviour?
I think the documentation for these functions should be clarified.
unsafeEncodeUtfonly throws a (pure) exception on invalid input. This is not unsafe in the same way as e.g.unsafePerformIO, which can cause undefined behaviour. Other functions that also throw pure exceptions (likehead) are documented as partial (which is more correct in my opinion).unsafeFromCharonly truncates its input. In what way is this unsafe? Can it cause undefined behaviour?I think the documentation for these functions should be clarified.