Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Expose Parser constructor #95

Closed
wants to merge 2 commits into from

2 participants

@basvandijk
Collaborator

I'm not sure but doesn't this give people the opportunity to construct parsers which violate some laws (like the Monad laws).

Are the exposed combinators insufficient? Why do you need this?

@techtangents

I was just trying to construct a parser, where some conditions pass and others fail. I couldn't figure out how to do this without calling the constructors.

It looks like 'fail' and 'return' from Monad are what I need.

Sorry to trouble you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 28, 2012
  1. @techtangents
  2. @techtangents
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −1  Data/Aeson/Types.hs
  2. +1 −1  Data/Aeson/Types/Internal.hs
View
2  Data/Aeson/Types.hs
@@ -24,7 +24,7 @@ module Data.Aeson.Types
, DotNetTime(..)
, typeMismatch
-- * Type conversion
- , Parser
+ , Parser(..)
, Result(..)
, FromJSON(..)
, fromJSON
View
2  Data/Aeson/Types/Internal.hs
@@ -21,7 +21,7 @@ module Data.Aeson.Types.Internal
, Object
, emptyObject
-- * Type conversion
- , Parser
+ , Parser(..)
, Result(..)
, parse
, parseEither
Something went wrong with that request. Please try again.