1 {-# LANGUAGE OverloadedStrings #-}
3 import Data.Bool (Bool)
5 import Data.Monoid (Monoid(..))
6 import Data.Ratio (Rational)
7 import qualified Data.Text.Lazy as TL
8 import qualified Language.Symantic.RNC as RNC
9 import qualified Language.Symantic.RNC.Write as RNC
11 import Hdoc.Utils (Nat, Nat1)
13 -- * Class 'Sym_RNC_Extra'
14 class RNC.Sym_RNC repr => Sym_RNC_Extra repr where
15 comment :: repr TL.Text
21 rational :: repr Rational
22 rationalPositive :: repr Rational
23 instance Sym_RNC_Extra RNC.NS where
31 rationalPositive = mempty
32 instance Sym_RNC_Extra RNC.Writer where
33 comment = RNC.writeText "comment"
34 none = RNC.writeText "empty"
35 bool = RNC.writeText "bool"
36 int = RNC.writeText "xsd:int" -- FIXME: is it useful to use the xsd: namespace?
37 nat = RNC.writeText "nat"
38 nat1 = RNC.writeText "nat1"
39 rational = RNC.writeText "rational"
40 rationalPositive = RNC.writeText "rationalPositive"