Skip to content

Clarify unsafety #38

@konsumlamm

Description

@konsumlamm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions