]> Git — Sourcephile - haskell/symantic.git/blob - Language/Symantic/Type/Int.hs
IO, Monoid, Foldable, Text
[haskell/symantic.git] / Language / Symantic / Type / Int.hs
1 {-# LANGUAGE FlexibleContexts #-}
2 {-# LANGUAGE FlexibleInstances #-}
3 {-# LANGUAGE MultiParamTypeClasses #-}
4 {-# LANGUAGE PatternSynonyms #-}
5 {-# LANGUAGE ScopedTypeVariables #-}
6 {-# LANGUAGE TypeFamilies #-}
7 {-# OPTIONS_GHC -fno-warn-orphans #-}
8 module Language.Symantic.Type.Int where
9
10 import Data.Proxy
11 import Language.Symantic.Type.Root
12 import Language.Symantic.Type.Type0
13
14 -- * Type 'Type_Int'
15 -- | The 'Int' type.
16 type Type_Int = Type_Type0 (Proxy Int)
17
18 pattern Type_Int :: Type_Type0 (Proxy Int) root Int
19 pattern Type_Int = Type_Type0 Proxy
20
21 instance -- String_from_Type
22 String_from_Type (Type_Int root) where
23 string_from_type _ = "Int"
24
25 -- | Inject 'Type_Int' within a root type.
26 type_int :: Lift_Type_Root Type_Int root => root Int
27 type_int = type_type0
28
29 instance Constraint_Type Monoid (Type_Int root)