hscuid-1.0.0: Collision-resistant IDs

Portabilityportable
Stabilitystable
Safe HaskellNone

Web.Cuid

Description

You can generate a new CUID inside any IO-enabled monad using this module's one exported function:

>>> cuid <- newCuid
>>> print cuid
"ciaafthr00000qhpm0jp81gry"

Synopsis

Documentation

type Cuid = TextSource

Convenience type so that you don't have to import Text downstream. Note that this is strict Text.

newCuid :: MonadIO m => m CuidSource

Generate a new random CUID.