git.iko.soy/typeable/dom-parser
on master help sign in
Remove open-union
commitb6797780daae339da52dfe9b528724963519713f authorDmitry Bushev <bushevdv@gmail.com> dateThu 14 Sep 2017, 13:49 (9 years ago) parentab892b6
5 files changed+7−26
dom-parser.cabal−2 ghc-802.yaml+3 ghc-821.yaml+3 src/Text/XML/DOM/Parser/FromDom.hs−20 stack.yaml+1−4
dom-parser.cabal−2
@@ -48,12 +48,10 @@ library
4848 , containers
4949 , lens
5050 , mtl
51− , open-union >= 0.2
5251 , scientific
5352 , semigroups
5453 , text
5554 , transformers
56− , type-fun
5755 , xml-conduit
5856 , xml-lens
5957 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
44 , proxyFromDom
55 -- * Explicit methods for convenience
66 , elementFromDom
7− , unionFromDom
87 , textFromDom
98 , stringFromDom
109 , charFromDom
@@ -21,7 +20,6 @@ module Text.XML.DOM.Parser.FromDom
2120import Control.Applicative
2221import Control.Lens
2322import Data.Fixed
24−import Data.OpenUnion
2523import Data.Scientific
2624import Data.Text as T hiding (empty)
2725import Data.Typeable
@@ -29,7 +27,6 @@ import Data.Void
2927import Text.XML
3028import Text.XML.DOM.Parser.Content
3129import Text.XML.DOM.Parser.Types
32−import TypeFun.Data.List hiding (Union)
3330
3431proxyFromDom
3532 :: forall proxy m a
@@ -116,23 +113,6 @@ instance FromDom Bool where
116113boolFromDom :: (Monad m) => DomParserT Identity m Bool
117114boolFromDom = parseContent readBool
118115
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−
136116instance FromDom Element where
137117 fromDom = elementFromDom
138118
stack.yaml+1−4
@@ -1,6 +1,3 @@
1+resolver: lts-6.35
12packages:
23 - .
3−extra-deps:
4− - open-union-0.2.0.0
5− - type-fun-0.1.1
6−resolver: lts-6.25