Skip to content

Commit 01f7053

Browse files
authored
Improve error message for replicating (#859)
1 parent 3c8e7cc commit 01f7053

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/interpreter/abstract_interpretation.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ function Base.show(io::IO, mime::MIME"text/plain", mc::MooncakeInterpreter)
7272
end
7373
Base.show(io::IO, mc::MooncakeInterpreter) = _show_interp(io, MIME"text/plain"(), mc)
7474

75-
function _show_interp(io::IO, ::MIME"text/plain", ::MooncakeInterpreter)
76-
return print(io, "MooncakeInterpreter()")
75+
function _show_interp(io::IO, ::MIME"text/plain", ::MooncakeInterpreter{C,M}) where {C,M}
76+
return print(io, "MooncakeInterpreter($M)")
7777
end
7878

7979
MooncakeInterpreter(M::Type{<:Mode}) = MooncakeInterpreter(DefaultCtx, M)

src/interpreter/reverse_mode.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ end
10411041

10421042
function Base.showerror(io::IO, err::MooncakeRuleCompilationError)
10431043
msg =
1044-
"MooncakeRuleCompilationError: an error occured while Mooncake was compiling a " *
1044+
"MooncakeRuleCompilationError: an error occurred while Mooncake was compiling a " *
10451045
"rule to differentiate something. If the `caused by` error " *
10461046
"message below does not make it clear to you how the problem can be fixed, " *
10471047
"please open an issue at github.com/chalk-lab/Mooncake.jl describing your " *

0 commit comments

Comments
 (0)