Skip to content

Add voidEncoder/HasInitialObject#1089

Open
alexfmpe wants to merge 1 commit intoobsidiansystems:developfrom
alexfmpe:initial-object
Open

Add voidEncoder/HasInitialObject#1089
alexfmpe wants to merge 1 commit intoobsidiansystems:developfrom
alexfmpe:initial-object

Conversation

@alexfmpe
Copy link
Contributor

I have:

  • Based work on latest develop branch
  • Followed the contribution guide
  • Looked for lint in my changes with hlint . (lint found code you did not write can be left alone)
  • Run the test suite: $(nix-build -A selftest --no-out-link)
  • Updated the changelog
  • (Optional) Run CI tests locally: nix-build release.nix -A build.x86_64-linux --no-out-link (or x86_64-darwin on macOS)

@maralorn
Copy link
Collaborator

maralorn commented Apr 9, 2025

Does this have any use?

@ymeister
Copy link
Collaborator

What's the idea behind this HasInitialObject aside from being a voidEncoder helper?

@alexfmpe
Copy link
Contributor Author

Does this have any use?

Yes.

Given void1Encoder can be decomposed into it, the implementation has at least as much use as void1Encoder. More generally, this is an identity not that much different from mempty.
Void can be used as an neutral element of Either or absorbing element of (,). I've used Void as the obelisk backend route for a frontend-only webapp.

That said, I added the instance itself mostly out of completeness

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.

3 participants