{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Symantic.Type.Text where import Data.Proxy import Data.Text (Text) import Language.Symantic.Type.Root import Language.Symantic.Type.Type0 -- * Type 'Type_Text' -- | The 'Text' type. type Type_Text = Type_Type0 (Proxy Text) pattern Type_Text :: Type_Type0 (Proxy Text) root Text pattern Type_Text = Type_Type0 Proxy instance Constraint_Type Eq (Type_Text root) where constraint_type _c Type_Type0{} = Just Dict instance Constraint_Type Ord (Type_Text root) where constraint_type _c Type_Type0{} = Just Dict instance Constraint_Type Monoid (Type_Text root) where constraint_type _c Type_Type0{} = Just Dict instance Constraint_Type Num (Type_Text root) instance Constraint_Type Integral (Type_Text root) instance -- String_from_Type String_from_Type (Type_Text root) where string_from_type _ = "Text" -- | Inject 'Type_Text' within a root type. type_text :: Lift_Type_Root Type_Text root => root Text type_text = type_type0