1 {-# LANGUAGE FlexibleContexts #-}
2 {-# LANGUAGE FlexibleInstances #-}
3 {-# LANGUAGE PatternSynonyms #-}
4 {-# LANGUAGE ScopedTypeVariables #-}
5 {-# LANGUAGE TypeFamilies #-}
6 {-# OPTIONS_GHC -fno-warn-orphans #-}
7 module Language.Symantic.Type.Tuple where
11 import Language.Symantic.Type.Common
13 -- * Type 'Type_Tuple2'
16 = Type_Type2 Constraint2_Empty (,)
17 pattern Type_Tuple2 arg res
18 = Type_Type2 Proxy Proxy arg res
20 instance -- String_from_Type
21 String_from_Type root =>
22 String_from_Type (Type_Tuple2 root) where
23 string_from_type (Type_Type2 _ _ a b) =
24 "(" ++ string_from_type a ++
25 ", " ++ string_from_type b ++ ")"
27 -- | Convenient alias to include a 'Type_Tuple2' within a type.
29 :: forall root h_a h_b.
30 Lift_Type_Root Type_Tuple2 root
34 type_tuple2 a b = lift_type_root (Type_Tuple2 a b
35 ::Type_Tuple2 root (h_a, h_b))