Haskell Create a UUID from String or Text

Viewed 163

In Java (and other variants) I can create a UUID from a string like so

import java.util.UUID

val uuid = UUID.fromString("3ec3a7c7-0563-4de5-8424-c2aedd5aaf32")

If the UUID is not valid then this will throw an exception. Checking out the Haskell UUID library I don't see an equivalent function (https://hackage.haskell.org/package/uuid-1.3.13/docs/Data-UUID-Util.html). Is there a way to do this in Haskell?

1 Answers
Related