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