Skip to content

List of characters, array of bytes? #3

@kindaro

Description

@kindaro

At this time, we are wielding Cabal's parser. It is a weird thing: taking ByteString as input, but working in String terms. We end up jumping back and forth between these two types. The perfect solution is to work with Text — the type of arrays of characters.

  • The underlying parser — parsec — treats ByteString as a stream of characters. This is not ideal.

    However, parsec also supports Text and this is what we need. It should be easy to rewrite Cabal's parser to work with Text.

  • The underlying printer — pretty — has String hard wired into it. This is not ideal.

    Maybe we can generalize it to IsString, since it is in base since forever?

Were these dependencies appropriately generalized, Cabal's parser could be patched to wield Text on the cheap.

I am unwilling to talk to the maintainers of the packages above — my expectation is that they will not be forthcoming. The local maximum is to patch the dependencies myself and depend on forks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions