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