diff --git a/src/Text/XML/XSD/DateTime.hs b/src/Text/XML/XSD/DateTime.hs index fa4ea7a..6f41d09 100644 --- a/src/Text/XML/XSD/DateTime.hs +++ b/src/Text/XML/XSD/DateTime.hs @@ -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) @@ -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 diff --git a/xsd.cabal b/xsd.cabal index 8f9ef92..d0b028c 100644 --- a/xsd.cabal +++ b/xsd.cabal @@ -30,6 +30,7 @@ library , text >= 1.0 , time >= 1.2.0.3 , lens >= 4 + , filepath >= 1.3 ghc-options: -Wall