This repository has been archived on 2026-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
fradrive-old/src/Utils/Print/SomeLetter.hs

21 lines
818 B
Haskell

-- SPDX-FileCopyrightText: 2023 Steffen Jost <s.jost@fraport.de>
--
-- SPDX-License-Identifier: AGPL-3.0-or-later
{-# LANGUAGE ExistentialQuantification #-}
module Utils.Print.SomeLetter where
import Utils.Print.Letters
data SomeLetter = forall l . (MDLetter l) => SomeLetter l -- a record selector would be useless here due to the escaped type variable
instance MDLetter SomeLetter where
letterMeta (SomeLetter l) = letterMeta l
getPJId (SomeLetter l) = getPJId l
getLetterEnvelope (SomeLetter l) = getLetterEnvelope l
getLetterKind (SomeLetter l) = getLetterKind l
getTemplate (SomeLetter l) = getTemplate l
getMailSubject (SomeLetter l) = getMailSubject l
getMailBody (SomeLetter l) = getMailBody l
encryptPDFfor (SomeLetter l) = encryptPDFfor l