Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing with dateTime' #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Text/XML/XSD/DateTime.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module Text.XML.XSD.DateTime
) where

import Prelude(Show(..), Read(..), Eq(..), Ord(..), Num(..), Int, Integer, String, (&&), (||), read, fromIntegral, realToFrac)
import Control.Applicative (pure, (<$>), (*>), (<|>))
import Control.Applicative (pure, (<$>), (*>), (<*), (<|>))
import Control.Monad (Monad(..), when)
import Control.Lens(Iso', Prism', _Left, _Right, iso, prism', from, isn't, (#), (^?))
import Data.Attoparsec.Text(Parser, char, digit, parseOnly, endOfInput, takeWhile)
Expand Down Expand Up @@ -269,7 +269,7 @@ dateTime' ::
Text
-> Either String DateTime
dateTime' =
parseOnly (parseDateTime <|> fail "bad date time")
parseOnly (parseDateTime <* endOfInput <|> fail "bad date time")

buildSeconds ::
Pico
Expand Down
1 change: 1 addition & 0 deletions xsd.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ library
, text >= 1.0
, time >= 1.2.0.3
, lens >= 4
, filepath >= 1.3

ghc-options:
-Wall
Expand Down