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