Skip to content

Commit

Permalink
get building
Browse files Browse the repository at this point in the history
  • Loading branch information
sirlensalot committed Jan 20, 2024
1 parent ee456e4 commit 571f280
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
4 changes: 2 additions & 2 deletions fadno-xml.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: fadno-xml
version: 1.2
version: 1.2.1
synopsis: XML/XSD combinators/schemas/codegen
description:
Library for generating code from XML schema files, with
Expand Down Expand Up @@ -40,7 +40,7 @@ library
-- other-modules:
-- other-extensions:
build-depends: Decimal >= 0.4
, base >= 4.9 && < 4.15
, base >= 4.9 && < 4.20
, containers >= 0.5
, lens >= 4.15
, mtl >= 2.2
Expand Down
1 change: 1 addition & 0 deletions src/Fadno/Xml/Codegen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module Fadno.Xml.Codegen
import Fadno.Xml.EmitTypes
import Fadno.Xml.ParseXsd
import Control.Lens hiding (Choice,element,elements)
import Control.Monad
import Control.Monad.State.Strict
import Control.Monad.Reader
import qualified Data.Map.Strict as M
Expand Down
10 changes: 6 additions & 4 deletions src/Fadno/Xml/ParseXsd.hs
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,12 @@ instance Resolvable Element where


instance Resolvable (Ref (Either ComplexType SimpleType)) where
resolve sch (Unresolved f) = Resolved f $ either error id
((Left <$> searchRefTarget "Either-ComplexType" complexTypes f sch)
<|>
(Right <$> searchRefTarget "Either-SimpleType" simpleTypes f sch))
resolve sch (Unresolved f) = Resolved f $
case searchRefTarget "Either-ComplexType" complexTypes f sch of
Right r -> Left r
Left {} -> case searchRefTarget "Either-SimpleType" simpleTypes f sch of
Right r -> Right r
Left e -> error e
resolve _ r = r


Expand Down
1 change: 1 addition & 0 deletions src/Fadno/Xml/XParse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import qualified Text.XML.Light as X
import qualified Text.XML.Light.Cursor as C

import Control.Exception
import Control.Monad
import Control.Monad.State.Strict hiding (sequence)
import Control.Monad.Except hiding (sequence)
import Data.Either
Expand Down
1 change: 1 addition & 0 deletions src/Fadno/Xml/XParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module Fadno.Xml.XParser {-# DEPRECATED "in favor of XParse" #-}
import qualified Text.XML.Light as X

import Control.Exception
import Control.Monad
import Control.Monad.State.Strict hiding (sequence)
import Control.Monad.Except hiding (sequence)
import Data.Either
Expand Down
10 changes: 0 additions & 10 deletions stack.yaml

This file was deleted.

0 comments on commit 571f280

Please sign in to comment.