Skip to content

Commit

Permalink
Satisfy hlint
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoutts committed Nov 30, 2020
1 parent cae4cf5 commit f669c6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions cardano-cli/src/Cardano/CLI/Mary/TxOutParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ parseTxOutAnyEra = do
-- Accept the old style of separating the address and value in a
-- transaction output:
option () (char '+' >> spaces)
v <- parseValue
return (TxOutAnyEra addr v)
TxOutAnyEra addr <$> parseValue

parseAddressAny :: Parser AddressAny
parseAddressAny = do
Expand Down
8 changes: 4 additions & 4 deletions cardano-cli/src/Cardano/CLI/Mary/ValueParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ valueExprTerm = do
------------------------------------------------------------------------------

plusOp :: Parser (ValueExpr -> ValueExpr-> ValueExpr)
plusOp = char '+' *> spaces *> pure ValueExprAdd
plusOp = (char '+' *> spaces) $> pure ValueExprAdd

negateOp :: Parser (ValueExpr -> ValueExpr)
negateOp = char '-' *> spaces *> pure ValueExprNegate
negateOp = (char '-' *> spaces) $> pure ValueExprNegate

-- | Period (\".\") parser.
period :: Parser ()
period = char '.' >> return ()
period = char '.'

-- | Word64 parser.
word64 :: Parser Integer
Expand Down Expand Up @@ -153,7 +153,7 @@ assetId =
-- name.
fullAssetId :: PolicyId -> Parser AssetId
fullAssetId polId = do
period
_ <- period
aName <- assetName <?> "alphanumeric asset name"
pure (AssetId polId aName)

Expand Down

0 comments on commit f669c6a

Please sign in to comment.