]> Git — Sourcephile - haskell/symantic.git/blob - Language/Symantic/Type/Unit.hs
IO, Monoid, Foldable, Text
[haskell/symantic.git] / Language / Symantic / Type / Unit.hs
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.Unit where
8
9 import Data.Proxy
10 import Language.Symantic.Type.Root
11 import Language.Symantic.Type.Type0
12
13
14 -- * Type 'Type_Unit'
15 -- | The @()@ type.
16 type Type_Unit = Type_Type0 (Proxy ())
17
18 pattern Type_Unit :: Type_Unit root ()
19 pattern Type_Unit = Type_Type0 Proxy
20
21 instance -- String_from_Type
22 String_from_Type (Type_Unit root) where
23 string_from_type _ = "()"
24
25 -- | Inject 'Type_Unit' within a root type.
26 type_unit :: Lift_Type_Root Type_Unit root => root ()
27 type_unit = type_type0