Skip to content

[#132] Add Data instance to Time#139

Merged
aeqz merged 1 commit intomasterfrom
aeqz/#132-time-data-instance
Jan 23, 2023
Merged

[#132] Add Data instance to Time#139
aeqz merged 1 commit intomasterfrom
aeqz/#132-time-data-instance

Conversation

@aeqz
Copy link
Contributor

@aeqz aeqz commented Jan 23, 2023

Description

Problem: Currently, o-clock does not provide a Data instance for its Time type, which can be useful for using it together with some generics library such as uniplate.

Solution: Derive Data for Time with DeriveDataTypeable.

Related issue(s)

Fixes #132

Related changes (conditional)

  • Tests

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from
      silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
  • Public contracts

    • Any modifications of public contracts comply with the Evolution
      of Public Contracts
      policy.
    • I added an entry to the changelog if my changes are visible to the users
      and
    • provided a migration guide for breaking changes if possible

Stylistic guide (mandatory)

Copy link
Contributor

@treeowl treeowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we expose the constructor and a Generic instance already, there's no strong reason not to.

@aeqz
Copy link
Contributor Author

aeqz commented Jan 23, 2023

Thank you for reviewing @treeowl!

Problem: Currently, o-clock does not provide a Data instance for its
Time type, which can be useful for using it together with some generics
library such as uniplate.

Solution: Derive Data for Time with DeriveDataTypeable.
@aeqz aeqz force-pushed the aeqz/#132-time-data-instance branch from d7c124f to 35e9e83 Compare January 23, 2023 15:26
@aeqz aeqz merged commit 665459f into master Jan 23, 2023
@aeqz aeqz deleted the aeqz/#132-time-data-instance branch January 23, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Data instance to Time type

2 participants