Atomable for types without access to constructors
- Lingua principale
- Haskell
- Stelle
- 952
- Fork
- 50
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I am trying to store the [`UUID`](https://hackage.haskell.org/package/uuid-1.3.13/docs/Data-UUID.html) type, but I can't work out a principled way to write an Atomable instance for it.
I can convert it to a Bytestring in Atomable, and then store that, but, aside from this being somewhat inefficient, there is no pure way to convert a Bytestring back to a UUID, as it may fail to parse, and the fromAtom function does not allow for failure of any kind. Of course I can simply use `error` but I don't like the idea that my data can then get into a completely failing state, if somehow a bad UUID bytestring gets persisted.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.