1 {-# OPTIONS_GHC -fno-warn-orphans #-}
2 module Hcompta.Name where
4 import Control.Applicative (Applicative(..))
5 import Control.Arrow (second)
6 import Control.DeepSeq (NFData(..))
9 import Data.Function (($), (.), flip)
10 import Data.Functor (Functor(..))
12 import Data.Map.Strict (Map)
13 import qualified Data.Map.Strict as Map
14 import Data.Maybe (Maybe(..))
15 import Data.Monoid (Monoid(..))
16 import Data.NonNull (NonNull)
17 import Data.Text (Text)
18 import qualified Data.Text as Text
19 import Data.Typeable ()
20 import Text.Show (Show)
21 import qualified Data.Sequences as Seqs
22 import qualified Data.MonoTraversable as MT
24 import Hcompta.Lib.Consable
25 -- import Language.Symantic as Sym
28 newtype Name = Name (NonNull Text)
29 deriving (Eq, Ord, Show
30 , MT.MonoFunctor, MT.MonoFoldable
31 , Seqs.SemiSequence, Seqs.IsSequence)
32 type instance MT.Element Name = MT.Element (NonNull Text)
34 class Sym_Name term where
35 name :: term Text -> term (Maybe Name)