From fc6cf6169868e60c189e4b243330c3717ff159f3 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 26 May 2022 13:58:07 +0200 Subject: ... --- overlays/spm/lib/Data/UUID/Instances.hs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 overlays/spm/lib/Data/UUID/Instances.hs (limited to 'overlays/spm/lib/Data/UUID') diff --git a/overlays/spm/lib/Data/UUID/Instances.hs b/overlays/spm/lib/Data/UUID/Instances.hs new file mode 100644 index 00000000..335937d8 --- /dev/null +++ b/overlays/spm/lib/Data/UUID/Instances.hs @@ -0,0 +1,18 @@ +{-# 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 -- cgit v1.2.3