Skip to content

Commit fcde7e3

Browse files
committed
Pretty print Static (#96)
1 parent 57b03b3 commit fcde7e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/static.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ end
1010
const Zero = StaticInt{0}
1111
const One = StaticInt{1}
1212

13+
Base.show(io::IO, ::StaticInt{N}) where {N} = print(io, "Static($N)")
14+
1315
Base.@pure StaticInt(N::Int) = StaticInt{N}()
1416
StaticInt(N::Integer) = StaticInt(convert(Int, N))
1517
StaticInt(::StaticInt{N}) where {N} = StaticInt{N}()

0 commit comments

Comments
 (0)