Use type tuple() instead of record()

Dialyzer doesn't recognize the type record(), so let's use tuple()
instead.