on master help sign in
Made conversion to CInt param explicit
39042f3gmorpheme
libyaml/src/Text/Libyaml.hs+7−3
@@ -559,13 +559,13 @@ toEventRaw opts e f = allocaBytes eventSize $ \er -> do
559 implicitColl (EventSequenceStart NoTag _ _) = 1
559 implicitColl (EventSequenceStart NoTag _ _) = 1
560 implicitColl (EventMappingStart (UriTag "") _ _) = 1
560 implicitColl (EventMappingStart (UriTag "") _ _) = 1
561 implicitColl (EventSequenceStart (UriTag "") _ _) = 1
561 implicitColl (EventSequenceStart (UriTag "") _ _) = 1
562− implicitColl evt = toEnum $ fromEnum $ formatOptionsRenderCollectionTags opts evt
562+ implicitColl evt = toImplicitParam $ formatOptionsRenderCollectionTags opts evt
563 implicitPlain (EventScalar _ NoTag _ _) = 1
563 implicitPlain (EventScalar _ NoTag _ _) = 1
564 implicitPlain (EventScalar _ (UriTag "") _ _) = 1
564 implicitPlain (EventScalar _ (UriTag "") _ _) = 1
565− implicitPlain evt = toEnum $ fromEnum $ formatOptionsRenderPlainScalarTags opts evt
565+ implicitPlain evt = toImplicitParam $ formatOptionsRenderPlainScalarTags opts evt
566 implicitQuoted (EventScalar _ NoTag _ _) = 1
566 implicitQuoted (EventScalar _ NoTag _ _) = 1
567 implicitQuoted (EventScalar _ (UriTag "") _ _) = 1
567 implicitQuoted (EventScalar _ (UriTag "") _ _) = 1
568− implicitQuoted evt = toEnum $ fromEnum $ formatOptionsRenderQuotedScalarTags opts evt
568+ implicitQuoted evt = toImplicitParam $ formatOptionsRenderQuotedScalarTags opts evt
569
569
570newtype ToEventRawException = ToEventRawException CInt
570newtype ToEventRawException = ToEventRawException CInt
571 deriving (Show, Typeable)
571 deriving (Show, Typeable)
@@ -689,6 +689,10 @@ parserParseOne' parser = allocaBytes eventSize $ \er -> do
689data TagRender = Explicit | Implicit
689data TagRender = Explicit | Implicit
690 deriving (Enum)
690 deriving (Enum)
691
691
692+toImplicitParam :: TagRender -> CInt
693+toImplicitParam Explicit = 0
694+toImplicitParam _ = 1
695+
692-- | A value for 'formatOptionsRenderCollectionTags' that renders no
696-- | A value for 'formatOptionsRenderCollectionTags' that renders no
693-- tags.
697-- tags.
694--
698--