1 {-# LANGUAGE FlexibleContexts #-}
2 {-# LANGUAGE FlexibleInstances #-}
3 {-# LANGUAGE TypeFamilies #-}
4 {-# OPTIONS_GHC -fno-warn-orphans #-}
5 module Language.Symantic.Type.Maybe where
9 import Language.Symantic.Type.Common
11 -- * Type 'Type_Maybe'
12 -- | The 'Maybe' type.
13 type Type_Maybe = Type_Type1 Maybe
15 instance -- String_from_Type
16 String_from_Type root =>
17 String_from_Type (Type_Maybe root) where
18 string_from_type (Type_Type1 _f a) =
19 "Maybe" ++ " (" ++ string_from_type a ++ ")"
21 -- | Inject a 'Type_Maybe' within a root type.
23 :: Lift_Type_Root Type_Maybe root
26 type_maybe = lift_type_root . Type_Type1 (Proxy::Proxy Maybe)