agentm / agentm/project-m36

Atomable for types without access to constructors

Abierto
#207 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Haskell
Estrellas
952
Forks
50
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.