Skip to content
Open
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
14 changes: 7 additions & 7 deletions src/TypeCheck.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ type MethodSignature
returntype::Union(Type,TypeVar) # v0.2 has TypeVars as returntypes; v0.3 does not
end
MethodSignature(e::Expr) = MethodSignature(argumenttypes(e),returntype(e))
function Base.writemime(io, ::MIME"text/plain", x::MethodSignature)
function Base.writemime(io::IO, ::MIME"text/plain", x::MethodSignature)
println(io,"(",join([string(t) for t in x.typs],","),")::",x.returntype)
end

Expand All @@ -234,7 +234,7 @@ type FunctionSignature
name::Symbol
end

function Base.writemime(io, ::MIME"text/plain", x::FunctionSignature)
function Base.writemime(io::IO, ::MIME"text/plain", x::FunctionSignature)
for m in x.methods
print(io,string(x.name))
display(m)
Expand Down Expand Up @@ -291,7 +291,7 @@ type LoopResult
LoopResult(ms::MethodSignature,ls::Vector{(Symbol,Type)}) = new(ms,unique(ls))
end

function Base.writemime(io, ::MIME"text/plain", x::LoopResult)
function Base.writemime(io::IO, ::MIME"text/plain", x::LoopResult)
display(x.msig)
for (s,t) in x.lines
println(io,"\t",string(s),"::",string(t))
Expand All @@ -303,7 +303,7 @@ type LoopResults
methods::Vector{LoopResult}
end

function Base.writemime(io, ::MIME"text/plain", x::LoopResults)
function Base.writemime(io::IO, ::MIME"text/plain", x::LoopResults)
for lr in x.methods
print(io,string(x.name))
display(lr)
Expand Down Expand Up @@ -383,7 +383,7 @@ type CallSignature
name::Symbol
argumenttypes::Vector{AType}
end
function Base.writemime(io, ::MIME"text/plain", x::CallSignature)
function Base.writemime(io::IO, ::MIME"text/plain", x::CallSignature)
println(io,string(x.name),"(",join([string(t) for t in x.argumenttypes],","),")")
end

Expand All @@ -392,7 +392,7 @@ type MethodCalls
calls::Vector{CallSignature}
end

function Base.writemime(io, ::MIME"text/plain", x::MethodCalls)
function Base.writemime(io::IO, ::MIME"text/plain", x::MethodCalls)
display(x.m)
for c in x.calls
print(io,"\t")
Expand All @@ -405,7 +405,7 @@ type FunctionCalls
methods::Vector{MethodCalls}
end

function Base.writemime(io, ::MIME"text/plain", x::FunctionCalls)
function Base.writemime(io::IO, ::MIME"text/plain", x::FunctionCalls)
for mc in x.methods
print(io,string(x.name))
display(mc)
Expand Down