]> Git — Sourcephile - haskell/symantic.git/blob - Language/Symantic/Type/Bool.hs
polish names
[haskell/symantic.git] / Language / Symantic / Type / Bool.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.Bool where
9
10 import Data.Proxy
11 import Language.Symantic.Type.Root
12 import Language.Symantic.Type.Type0
13 import Language.Symantic.Type.Constraint
14 import Language.Symantic.Type.Family
15 import qualified Data.MonoTraversable as MT
16
17 -- * Type 'Type_Bool'
18 -- | The 'Bool' type.
19 type Type_Bool = Type0 (Proxy Bool)
20
21 pattern Type_Bool :: Type_Bool root Bool
22 pattern Type_Bool = Type0 Proxy
23
24 instance Type0_Constraint Eq (Type_Bool root) where
25 type0_constraint _c Type0{} = Just Dict
26 instance Type0_Constraint Ord (Type_Bool root) where
27 type0_constraint _c Type0{} = Just Dict
28 instance Type0_Constraint Monoid (Type_Bool root)
29 instance Type0_Constraint Num (Type_Bool root)
30 instance Type0_Constraint Integral (Type_Bool root)
31 instance Type0_Constraint MT.MonoFunctor (Type_Bool root)
32 instance Type0_Family Type_Family_MonoElement (Type_Bool root)
33 instance String_from_Type (Type_Bool root) where
34 string_from_type _ = "Bool"
35
36 -- | Inject 'Type_Bool' within a root type.
37 type_bool :: Type_Root_Lift Type_Bool root => root Bool
38 type_bool = type0