Skip to content

add path key to "lib found at unexpected path" error #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/Share/NamespaceDiffs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ instance ToJSON NamespaceDiffResult where
let f :: Text -> IncoherentDeclReason -> Aeson.Value
f which reason =
Aeson.object
( "oldOrNewBranch" .= which
( "oldOrNewBranch"
.= which
: case reason of
IncoherentDeclReason'ConstructorAlias typeName constructorName1 constructorName2 ->
[ "tag" .= ("constructorAlias" :: Text),
Expand All @@ -290,9 +291,10 @@ instance ToJSON NamespaceDiffResult where
in case reason of
EitherWay.Alice reason -> f "old" reason
EitherWay.Bob reason -> f "new" reason
LibFoundAtUnexpectedPath _ ->
LibFoundAtUnexpectedPath path ->
Aeson.object
[ "tag" .= ("libFoundAtUnexpectedPath" :: Text)
[ "tag" .= ("libFoundAtUnexpectedPath" :: Text),
"path" .= path
]
MissingEntityError _ ->
Aeson.object
Expand Down Expand Up @@ -408,8 +410,7 @@ instance ToJSON NamespaceDiffResult where
type NamespaceAndLibdepsDiff referent reference renderedTerm renderedType termDiff typeDiff libdep =
GNamespaceAndLibdepsDiff Path referent reference renderedTerm renderedType termDiff typeDiff libdep

data GNamespaceAndLibdepsDiff k referent reference renderedTerm renderedType termDiff typeDiff libdep
= NamespaceAndLibdepsDiff
data GNamespaceAndLibdepsDiff k referent reference renderedTerm renderedType termDiff typeDiff libdep = NamespaceAndLibdepsDiff
{ defns :: GNamespaceTreeDiff k referent reference renderedTerm renderedType termDiff typeDiff,
libdeps :: Map NameSegment (DiffOp libdep)
}
Expand Down