{-# OPTIONS_GHC -fno-warn-orphans #-}

module Data.UUID.Instances () where

import Prelude
import Data.UUID (UUID)
import qualified Data.UUID as UUID
import Servant.API.ContentTypes


instance MimeRender PlainText UUID where
  mimeRender p = mimeRender p . UUID.toText

instance MimeRender JSON UUID where
  mimeRender p = mimeRender p . UUID.toText

instance MimeRender OctetStream UUID where
  mimeRender p = mimeRender p . UUID.toByteString