Skip to content

Change the definition of Df to use Maybe instead of Data.  #87

Closed
@t-wallet

Description

@t-wallet

Currently, Df uses its own type Data, which is isomorphic to Maybe. This is very inconvenient, because we need convert between these types via Df.dataToMaybe and Df.maybeToData every time we need a function that specifically works on Maybe.

The original motivation for this design choice was that Maybe is lazy, but that does not seem to be a problem anymore. Moreover, other protocols such as Axi4Stream and PacketStream also use Maybe to indicate validity.

We can also use https://hackage.haskell.org/package/strict-0.5.1/docs/Data-Strict-Maybe.html, but that does require an extra dependency.

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