Skip to content

Commit

Permalink
Update unison-cli/src/Unison/CommandLine/InputPatterns.hs
Browse files Browse the repository at this point in the history
Co-authored-by: Greg Pfeil <[email protected]>
  • Loading branch information
aryairani and sellout authored Jul 9, 2024
1 parent b14931f commit 22d4b26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unison-cli/src/Unison/CommandLine/InputPatterns.hs
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@ wrongStructuredArgument expected actual =
wrongArgsLength :: Text -> [a] -> Either (P.Pretty CT.ColorText) b
wrongArgsLength expected args =
let foundCount =
if null args
then "none"
else fromMaybe (tShow $ length args) $ Numeral.us_cardinal defaultInflection (length args)
case length args of
0 -> "none"
n -> fromMaybe (tShow n) $ Numeral.us_cardinal defaultInflection n
in Left . P.text $ "I expected " <> expected <> ", but received " <> foundCount <> "."

patternName :: InputPattern -> P.Pretty P.ColorText
Expand Down

0 comments on commit 22d4b26

Please sign in to comment.