Permalink
Browse files

Made the type of elementBy more general.

  • Loading branch information...
1 parent a203689 commit 260fc3a24d84dc86acb4f0c55a15f611c3b9cb9a @MedeaMelana committed Aug 14, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 Language/JsonGrammar.hs
View
@@ -90,8 +90,7 @@ array els = inverse aeArray -- Vector Value :- t1
>>> inverse nil -- t2
-- | Describe a single array element with the given grammar.
-elementBy :: Iso (Value :- t) (a :- t) ->
- Iso ([Value] :- t) ([Value] :- a :- t)
+elementBy :: Iso (Value :- t1) t2 -> Iso ([Value] :- t1) ([Value] :- t2)
elementBy g = inverse cons -- Value :- [Value] :- t
>>> swap -- [Value] :- Value :- t
>>> duck g -- [Value] :- a :- t

0 comments on commit 260fc3a

Please sign in to comment.