Skip to content

Commit 93da8ad

Browse files
committed
Value.hs: remove useless usage of ViewPatterns
1 parent 3c40f4d commit 93da8ad

File tree

1 file changed

+3
-2
lines changed
  • cardano-api/internal/Cardano/Api

1 file changed

+3
-2
lines changed

cardano-api/internal/Cardano/Api/Value.hs

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
{-# LANGUAGE OverloadedStrings #-}
66
{-# LANGUAGE ScopedTypeVariables #-}
77
{-# LANGUAGE TypeFamilies #-}
8-
{-# LANGUAGE ViewPatterns #-}
98

109
-- | Currency values
1110
module Cardano.Api.Value
@@ -387,13 +386,15 @@ instance FromJSON ValueNestedRep where
387386
where
388387
parsePid :: (Aeson.Key, Aeson.Value) -> Parser ValueNestedBundle
389388
parsePid ("lovelace", q) = ValueNestedBundleAda <$> parseJSON q
390-
parsePid (Aeson.toText -> pid, quantityBundleJson) = do
389+
parsePid (key, quantityBundleJson) = do
391390
sHash <-
392391
failEitherWith
393392
(\e -> "Failure when deserialising PolicyId: " ++ displayError e)
394393
$ deserialiseFromRawBytesHex AsScriptHash
395394
$ Text.encodeUtf8 pid
396395
ValueNestedBundle (PolicyId sHash) <$> parseJSON quantityBundleJson
396+
where
397+
pid = Aeson.toText key
397398

398399
-- ----------------------------------------------------------------------------
399400
-- Printing and pretty-printing

0 commit comments

Comments
 (0)