Skip to content

Commit

Permalink
Format with fourmolu
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 9, 2024
1 parent 33b5165 commit 55bb534
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions library/Booster/Syntax/Json/Internalise.hs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ internaliseTermRaw qq allowAlias checkSubsorts sortVars definition@KoreDefinitio
forM_ (zip args $ zip (map (substituteInSort sub) symbol.argSorts) $ map sortOfTerm args') $ \(t, (expected, got)) ->
unless (expected == got) $
throwE $
PatternSortError t $ IncorrectSort expected got
PatternSortError t $
IncorrectSort expected got
pure $ Internal.SymbolApplication symbol appSorts' args'
Syntax.KJString{value} ->
pure $ Internal.DomainValue (Internal.SortApp "SortString" []) $ textToBS value
Expand Down Expand Up @@ -667,7 +668,15 @@ instance ToJSON PatternError where
wrap ("Symbol '" <> Syntax.getId sym <> "' is a macro/alias") p
SubstitutionNotAllowed -> "Substitution predicates are not allowed here"
IncorrectSymbolArity p s expected got ->
wrap ("Inconsistent pattern. Symbol '" <> Syntax.getId s <> "' expected " <> (pack $ show expected) <> " arguments but got " <> (pack $ show got)) p
wrap
( "Inconsistent pattern. Symbol '"
<> Syntax.getId s
<> "' expected "
<> (pack $ show expected)
<> " arguments but got "
<> (pack $ show got)
)
p
where
wrap :: Text -> Syntax.KorePattern -> Value
wrap msg p = object ["error" .= msg, "context" .= toJSON [p]]
Expand Down

0 comments on commit 55bb534

Please sign in to comment.