Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions src/Cornelis/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ prettyGoals (InferredType ty) =
prettyGoals (WhyInScope msg) = pretty msg
prettyGoals (NormalForm expr) = pretty expr
prettyGoals (DisplayError err) = annotate CornelisError $ pretty err
prettyGoals (IntroConstructorUnknown constructors) = vsep
[ annotate CornelisErrorWarning "Don't know which constructor to introduce."
, mempty
, section "Constructors available" constructors prettyName
]
prettyGoals (UnknownDisplayInfo v) = annotate CornelisError $ pretty $ show v

prettyInterval :: AgdaInterval -> Doc HighlightGroup
Expand Down
2 changes: 2 additions & 0 deletions src/Cornelis/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ data DisplayInfo
| HelperFunction Text
| InferredType Type
| DisplayError Text
| IntroConstructorUnknown [Text]
| WhyInScope Text
| NormalForm Text
| UnknownDisplayInfo Value
Expand All @@ -339,6 +340,7 @@ instance FromJSON DisplayInfo where
"Error" ->
obj .: "error" >>= \err ->
DisplayError <$> err .: "message"
"IntroConstructorUnknown" -> IntroConstructorUnknown <$> obj .: "constructors"
"InferredType" ->
InferredType <$> obj .: "expr"
"WhyInScope" ->
Expand Down
Loading