agentm / agentm/project-m36

Atomable for types without access to constructors

オープン
#207 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Haskell
スター
952
フォーク
50
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。