{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Symantic.Type.Text where import qualified Data.MonoTraversable as MT import Data.Proxy import Data.Text (Text) import Language.Symantic.Type.Root import Language.Symantic.Type.Type0 import Language.Symantic.Type.Constraint import Language.Symantic.Type.Family -- * Type 'Type_Text' -- | The 'Text' type. type Type_Text = Type0 (Proxy Text) pattern Type_Text :: Type0 (Proxy Text) root Text pattern Type_Text = Type0 Proxy instance Type0_Constraint Eq (Type_Text root) where type0_constraint _c Type0{} = Just Dict instance Type0_Constraint Ord (Type_Text root) where type0_constraint _c Type0{} = Just Dict instance Type0_Constraint Monoid (Type_Text root) where type0_constraint _c Type0{} = Just Dict instance Type0_Constraint Num (Type_Text root) instance Type0_Constraint Integral (Type_Text root) instance Type_Root_Lift (Type0 (Proxy (MT.Element Text))) root => Type0_Family Type_Family_MonoElement (Type_Text root) where type0_family _at Type0{} = Just type0 instance Type0_Constraint MT.MonoFunctor (Type_Text root) where type0_constraint _c Type0{} = Just Dict instance -- String_from_Type String_from_Type (Type_Text root) where string_from_type _ = "Text" -- | Inject 'Type_Text' within a root type. type_text :: Type_Root_Lift Type_Text root => root Text type_text = type0