Skip to content

Commit

Permalink
fix generic impl
Browse files Browse the repository at this point in the history
  • Loading branch information
martyall committed Oct 6, 2023
1 parent 7672974 commit f3635f7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Network/Ethereum/Web3/Solidity/Event.purs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,17 @@ else instance ABIDecode a => GArrayParser (Argument a) where
res <- lmap (ParserError <<< show) <<< abiDecode $ head
pure $ Tuple (Argument res) tail

else instance (ArrayParser as, ArrayParser bs) => GArrayParser (Product as bs) where
else instance (GArrayParser as, GArrayParser bs) => GArrayParser (Product as bs) where
gArrayParser hxs = do
Tuple a rest <- arrayParser hxs
Tuple b rest' <- arrayParser rest
Tuple a rest <- gArrayParser hxs
Tuple b rest' <- gArrayParser rest
pure $ Tuple (Product a b) rest'

else instance GArrayParser as => GArrayParser (Constructor name as) where
gArrayParser hxs = do
Tuple a rest <- gArrayParser hxs
pure $ Tuple (Constructor a) rest

else instance ArrayParser as => GArrayParser (Constructor name as) where
gArrayParser hxs = do
Tuple a rest <- arrayParser hxs
Expand Down

0 comments on commit f3635f7

Please sign in to comment.