diff --git a/src/TypeCheck.jl b/src/TypeCheck.jl index 238076b..7b74e74 100644 --- a/src/TypeCheck.jl +++ b/src/TypeCheck.jl @@ -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 @@ -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) @@ -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)) @@ -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) @@ -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 @@ -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") @@ -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)