1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
--- HaXml-1.23.2-orig/src/Text/XML/HaXml/Schema/HaskellTypeModel.hs 2012-06-18 23:17:57.000000000 +1000
+++ HaXml-1.23.2/src/Text/XML/HaXml/Schema/HaskellTypeModel.hs 2012-06-18 23:37:04.279978702 +1000
@@ -77,8 +77,8 @@
-- rests with the input doc, not with the caller of the parser.
| ElementsAttrsAbstract {-typename-}XName
{-subtypes-}[(XName,Maybe XName)]
- -- ^ [(type name, module where declared later)]
Comment
+ -- ^ [(type name, module where declared later)]
-- becomes function
-- elementE :: Parser T
--- HaXml-1.23.2-orig/src/Text/XML/HaXml/Schema/PrettyHaskell.hs 2012-06-18 23:17:57.000000000 +1000
+++ HaXml-1.23.2/src/Text/XML/HaXml/Schema/PrettyHaskell.hs 2012-06-18 23:34:50.954660444 +1000
@@ -403,9 +403,6 @@
$$ text "data" <+> ppUnqConId nx t
$$ nest 8 (ppvList "=" "|" "" ppAbstrCons insts
$$ text "deriving (Eq,Show)")
--- $$ text "-- instance SchemaType" <+> ppUnqConId nx t
--- <+> text "(declared in Instance module)"
--- *** Declare instance here
$$ text "instance SchemaType" <+> ppUnqConId nx t <+> text "where"
$$ nest 4 (text "parseSchemaType s = do"
$$ nest 4 (vcat (intersperse (text "`onFail`")
@@ -417,12 +414,6 @@
where
ppAbstrCons (name,Nothing) = con name <+> ppConId nx name
ppAbstrCons (name,Just mod) = con name <+> ppConId nx name
--- *** Declare FwdDecl type here (proxy for type declared in later module)
--- ppAbstrCons (name,Just mod) = text "forall q . (FwdDecl" <+>
--- fwd name <+> text "q," <+>
--- text "SchemaType q) =>" <+>
--- con name <+>
--- text "("<>fwd name<>text"->q)" <+> fwd name
ppParse (name,Nothing) = text "(fmap" <+> con name <+>
text "$ parseSchemaType s)"
ppParse (name,Just _) = ppParse (name,Nothing)
|