1 -- This file is part of Diohsc
2 -- Copyright (C) 2020 Martin Bays <mbays@sdf.org>
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.
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 #-}
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