]> Git — Sourcephile - doclang.git/blob - Language/DTC/Write/RNC.hs
Add DTC HTML5 writing draft.
[doclang.git] / Language / DTC / Write / RNC.hs
1 {-# LANGUAGE BangPatterns #-}
2 {-# LANGUAGE FlexibleContexts #-}
3 {-# LANGUAGE FlexibleInstances #-}
4 {-# LANGUAGE OverloadedStrings #-}
5 {-# LANGUAGE RecordWildCards #-}
6 {-# LANGUAGE ScopedTypeVariables #-}
7 {-# LANGUAGE TypeFamilies #-}
8 {-# LANGUAGE ViewPatterns #-}
9 {-# OPTIONS_GHC -fno-warn-orphans #-}
10 -- | Write RNC for DTC
11 module Language.DTC.Write.RNC where
12
13 import Control.Applicative (Applicative(..))
14 import Control.Monad (Monad(..))
15 import Data.Bool
16 import Data.Either (Either(..))
17 import Data.Eq (Eq(..))
18 import Data.Foldable (null, foldl')
19 import Data.Function (($), (.), const, id)
20 import Data.Functor ((<$>), (<$))
21 import Data.Int (Int)
22 import Data.List.NonEmpty (NonEmpty(..))
23 import Data.Maybe (Maybe(..), fromMaybe)
24 import Data.Monoid (Monoid(..))
25 import Data.Ord (Ord(..))
26 import Data.Proxy (Proxy(..))
27 import Data.Semigroup (Semigroup(..))
28 import Data.Sequence (ViewL(..))
29 import Data.String (String)
30 import Data.Text (Text)
31 import Data.Tuple (snd)
32 import GHC.Exts (toList)
33 import Text.Read (readMaybe)
34 import Text.Show (Show(..))
35 import qualified Data.List as List
36 import qualified Data.Sequence as Seq
37 import qualified Data.Set as Set
38 import qualified Data.Text as Text
39 import qualified Text.Megaparsec as P
40 import qualified Text.Megaparsec.Perm as P
41
42 import Language.TCT hiding (Parser)
43 import Language.TCT.Write.XML (XML,XMLs,XmlLeaf(..))
44 import Language.DTC.Document (Nat(..), Nat1(..))
45 import qualified Language.DTC.Document as DTC
46 import qualified Language.DTC.Sym as DTC
47 import qualified Language.RNC.Write as RNC
48 import qualified Language.TCT.Write.XML as XML
49
50 instance DTC.Sym_DTC RNC.Writer