{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Symantic.Type.List where import Data.Proxy import Language.Symantic.Type.Common -- * Type 'Type_List' -- | The list type. type Type_List = Type_Type1 [] instance -- String_from_Type String_from_Type root => String_from_Type (Type_List root) where string_from_type (Type_Type1 _f a) = "[" ++ string_from_type a ++ "]" -- | Inject a 'Type_List' within a root type. type_list :: Type_Root_Lift Type_List root => root h_a -> root ([] h_a) type_list = type_root_lift . Type_Type1 (Proxy::Proxy [])