adapt SessionManager to tls-2.0
[diohsc.git] / MetaString.hs
blob2f18261bcb7d6b30ea3b03e4ad084cf7e9e8509d
1 -- This file is part of Diohsc
2 -- Copyright (C) 2020 Martin Bays <mbays@sdf.org>
3 --
4 -- This program is free software: you can redistribute it and/or modify
5 -- it under the terms of version 3 of the GNU General Public License as
6 -- published by the Free Software Foundation, or any later version.
7 --
8 -- You should have received a copy of the GNU General Public License
9 -- along with this program. If not, see http://www.gnu.org/licenses/.
11 {-# LANGUAGE FlexibleInstances #-}
12 {-# LANGUAGE Safe #-}
14 -- | Wrap Monoid and IsString into a single typeclass, for convenient
15 -- polymorphism between Text and String
16 module MetaString (MetaString, fromString) where
18 import Data.String (IsString, fromString)
19 import qualified Data.Text.Lazy as T
21 class (Monoid a, IsString a) => MetaString a
23 instance MetaString String
24 instance MetaString T.Text