git.iko.soy/typeable/dom-parser
on master help sign in
Remove open-union
b679778Dmitry Bushev
dom-parser.cabal−2
@@ -48,12 +48,10 @@ library
48 , containers
48 , containers
49 , lens
49 , lens
50 , mtl
50 , mtl
51− , open-union >= 0.2
52 , scientific
51 , scientific
53 , semigroups
52 , semigroups
54 , text
53 , text
55 , transformers
54 , transformers
56− , type-fun
57 , xml-conduit
55 , xml-conduit
58 , xml-lens
56 , xml-lens
59 exposed-modules: Text.XML.DOM.Parser
57 exposed-modules: Text.XML.DOM.Parser
ghc-802.yamlnew file+3
@@ -0,0 +1,3 @@
1+resolver: lts-9.0
2+packages:
3+ - .
ghc-821.yamlnew file+3
@@ -0,0 +1,3 @@
1+resolver: nightly-2017-09-14
2+packages:
3+ - .
src/Text/XML/DOM/Parser/FromDom.hs−20
@@ -4,7 +4,6 @@ module Text.XML.DOM.Parser.FromDom
4 , proxyFromDom
4 , proxyFromDom
5 -- * Explicit methods for convenience
5 -- * Explicit methods for convenience
6 , elementFromDom
6 , elementFromDom
7− , unionFromDom
8 , textFromDom
7 , textFromDom
9 , stringFromDom
8 , stringFromDom
10 , charFromDom
9 , charFromDom
@@ -21,7 +20,6 @@ module Text.XML.DOM.Parser.FromDom
21import Control.Applicative
20import Control.Applicative
22import Control.Lens
21import Control.Lens
23import Data.Fixed
22import Data.Fixed
24−import Data.OpenUnion
25import Data.Scientific
23import Data.Scientific
26import Data.Text as T hiding (empty)
24import Data.Text as T hiding (empty)
27import Data.Typeable
25import Data.Typeable
@@ -29,7 +27,6 @@ import Data.Void
29import Text.XML
27import Text.XML
30import Text.XML.DOM.Parser.Content
28import Text.XML.DOM.Parser.Content
31import Text.XML.DOM.Parser.Types
29import Text.XML.DOM.Parser.Types
32−import TypeFun.Data.List hiding (Union)
33
30
34proxyFromDom
31proxyFromDom
35 :: forall proxy m a
32 :: forall proxy m a
@@ -116,23 +113,6 @@ instance FromDom Bool where
116boolFromDom :: (Monad m) => DomParserT Identity m Bool
113boolFromDom :: (Monad m) => DomParserT Identity m Bool
117boolFromDom = parseContent readBool
114boolFromDom = parseContent readBool
118
115
119−instance FromDom (Union '[]) where
120− fromDom = empty
121−
122−instance
123− ( Typeable a, FromDom a, FromDom (Union as)
124− , SubList as (a ': as) )
125− => FromDom (Union (a ': as)) where
126− -- fromDom :: forall m. (DomParserMonad m) => m a
127− fromDom = (liftUnion <$> (proxyFromDom (Proxy :: Proxy a)))
128− <|> (reUnion <$> (proxyFromDom (Proxy :: Proxy (Union as))))
129−
130−unionFromDom
131− :: (Monad m, FromDom (Union as))
132− => proxy as
133− -> DomParserT Identity m (Union as)
134−unionFromDom _ = fromDom
135−
136instance FromDom Element where
116instance FromDom Element where
137 fromDom = elementFromDom
117 fromDom = elementFromDom
138
118
stack.yaml+1−4
@@ -1,6 +1,3 @@
1+resolver: lts-6.35
1packages:
2packages:
2 - .
3 - .
3−extra-deps:
4− - open-union-0.2.0.0
5− - type-fun-0.1.1
6−resolver: lts-6.25