port of twitter's snowflake to haskell