Skip to content

First class byte array support #378

@Riateche

Description

@Riateche

For example, if I want to prove that a function returns a well-typed output on any file. What should the input type be? Data.Buffer has IO interface and can't be pattern matched on. String can't handle arbitrary bytes and doesn't allow to pattern match on individual bytes. I could use List, but it seems that there is no type for a byte either. If I use List (Fin 256), will the performance be reasonable?

Without a good way to work with bytes, I struggle to find any practical application for Idris. Almost any program has to work with bytes because a program would be useless without interacting with files or network. Working with compressed data (images, video), any binary file formats (like protobuf) is impossible.

Are there any workarounds I'm not aware of? I found the following:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions