Skip to content

PLATFORM_PATH_FORMAT promotes platform dependent code #12

@brendanhay

Description

@brendanhay

The conditionally set PLATFORM_PATH_FORMAT is exposed in a fairly poor way to the user making it easy to run into builds that are ironically platform dependent.

If you unknowingly use a function that returns PLATFORM_PATH_FORMAT such as encode :: FilePath -> PLATFORM_PATH_FORMAT, rather than encodeString or fromText, when you compile the same code on a different platform you invariably end up with a broken build, due to an error like: Couldn't match expected type ByteString with Text (or vice versa).

Perhaps hiding the PLATFORM_PATH_FORMAT from the user entirely, or make use of some other abstraction which is independent of the compilation platform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions