on master help sign in
src/Data/THGen/XML/Internal.hs+4−3
since splitsnapshots
unifiedsplit
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
1{-# LANGUAGE UndecidableInstances #-}
2{-# LANGUAGE UndecidableInstances #-}
2{-# LANGUAGE FunctionalDependencies #-}
3{-# LANGUAGE FunctionalDependencies #-}
3
4
@@ -379,11 +380,11 @@ isoXmlGenerateDatatype genType (PrefixName strName' strPrefix') descRecordParts
379 toXmlParentAttributesExpr
380 toXmlParentAttributesExpr
380 = TH.lamE [if null exprAttributes then TH.wildP else TH.varP objName]
381 = TH.lamE [if null exprAttributes then TH.wildP else TH.varP objName]
381 $ [e|mapMaybe distribPair $(TH.listE exprAttributes)|]
382 $ [e|mapMaybe distribPair $(TH.listE exprAttributes)|]
382− #if __GLASGOW_HASKELL__ < 800
383+#if __GLASGOW_HASKELL__ < 800
383 TH.instanceD
384 TH.instanceD
384− #else
385+#else
385 TH.instanceWithOverlapD (Just TH.Overlapping)
386 TH.instanceWithOverlapD (Just TH.Overlapping)
386− #endif
387+#endif
387 (return [])
388 (return [])
388 [t|ToXmlParentAttributes $(TH.conT name)|]
389 [t|ToXmlParentAttributes $(TH.conT name)|]
389 [funSimple 'toXmlParentAttributes toXmlParentAttributesExpr]
390 [funSimple 'toXmlParentAttributes toXmlParentAttributesExpr]
test/TestDefs.hs+4−4
@@ -9,11 +9,11 @@ import Data.THGen.XML
9import Test.QuickCheck.Arbitrary.Generic
9import Test.QuickCheck.Arbitrary.Generic
10import Test.QuickCheck.Instances ()
10import Test.QuickCheck.Instances ()
11
11
12−"Bar" =:= enum
12+"Bar" =:= enum Both
13 & "baroque"
13 & "baroque"
14 & "bartender"
14 & "bartender"
15
15
16−"Quux" Exhaustive =:= enum
16+"Quux" Exhaustive =:= enum Both
17 & "ALL"
17 & "ALL"
18 & "YOUR"
18 & "YOUR"
19 & "BASE"
19 & "BASE"
@@ -22,14 +22,14 @@ import Test.QuickCheck.Instances ()
22 & "TO"
22 & "TO"
23 & "US"
23 & "US"
24
24
25−"Foo" =:= record
25+"Foo" =:= record Both
26 ^ "Shmuux" [t|XmlQuux|]
26 ^ "Shmuux" [t|XmlQuux|]
27 + "Bar"
27 + "Bar"
28 ? "Baz" [t|Text|]
28 ? "Baz" [t|Text|]
29 !% "Quux"
29 !% "Quux"
30 ?% "Muux" [t|XmlQuux|]
30 ?% "Muux" [t|XmlQuux|]
31
31
32−"Root" =:= record
32+"Root" =:= record Both
33 ! "{http://example.com/ns/my-namespace}Foo"
33 ! "{http://example.com/ns/my-namespace}Foo"
34
34
35instance Arbitrary XmlRoot where
35instance Arbitrary XmlRoot where