{"id":16450941,"url":"https://github.com/mrvplusone/simpletypeprint","last_synced_at":"2025-08-30T18:25:19.343Z","repository":{"id":61799532,"uuid":"312443561","full_name":"MrVPlusOne/SimpleTypePrint","owner":"MrVPlusOne","description":"Display Julia types in a more human-friendly way.","archived":false,"fork":false,"pushed_at":"2020-12-18T19:29:53.000Z","size":663,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T19:36:32.771Z","etag":null,"topics":["julia","user-experience","utilities"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrVPlusOne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-13T01:45:51.000Z","updated_at":"2024-12-11T15:20:36.000Z","dependencies_parsed_at":"2022-10-21T11:30:41.305Z","dependency_job_id":null,"html_url":"https://github.com/MrVPlusOne/SimpleTypePrint","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrVPlusOne%2FSimpleTypePrint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrVPlusOne%2FSimpleTypePrint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrVPlusOne%2FSimpleTypePrint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrVPlusOne%2FSimpleTypePrint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrVPlusOne","download_url":"https://codeload.github.com/MrVPlusOne/SimpleTypePrint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245078067,"owners_count":20557274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["julia","user-experience","utilities"],"created_at":"2024-10-11T10:06:31.267Z","updated_at":"2025-03-23T08:32:29.173Z","avatar_url":"https://github.com/MrVPlusOne.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleTypePrint.jl\n\n[![Build Status](https://travis-ci.com/MrVPlusOne/SimpleTypePrint.svg?branch=master)](https://travis-ci.com/MrVPlusOne/SimpleTypePrint)\n[![Coverage](https://codecov.io/gh/MrVPlusOne/SimpleTypePrint/branch/master/graph/badge.svg)](https://codecov.io/gh/MrVPlusOne/SimpleTypePrint)\n\n**Display Julia types in a more human-friendly way.**\n\n## Motivation\n\nThis package provides alternative type printing functions to make it easier to read Julia types. So instead of having to read messy outputs like this:\n![Before.png](images/Before.png)\n\nUsing this package, we can overwrite `Base.show(::IO, ::Type)` to achieve a much cleaner result:\n![After.png](images/After.png)\n\n## Usages\nFirst, install the package with\n```julia\nUsing Pkg; Pkg.add(\"SimpleTypePrint\")\n```\n\nYou can then override the default type printing behavior by calling\n```julia\nconfig_type_display(max_depth=3, short_type_name=true)\n```\n\nIf you prefer not to override the Julia default, you can instead use the provided `show_type(io, type; kwargs...)` and `repr_type(type; kwargs...)` function to manually print selected types.\n\n## Changes compared to `Base.show`\n\n### Merging nested where clauses\nBy default, Julia display multiple where clauses separately, whereas in SimpleTypePrint, where clauses are correctly merged, just like how you would write them.\n\n|                 |                                        |\n|-----------------|----------------------------------------|\n| Input           | `Tuple{A,B,C} where {A, B, C}`         |\n| Base.show       | `Tuple{A,B,C} where C where B where A` |\n| SimpleTypePrint | `Tuple{A,B,C} where {A,B,C}`           |\n\n### Displaying deeply nested parts as ellipsis\nThe default max display depth is 3, but you can change this value using the `max_depth` keyword argument. \n\n|                 |                                        |\n|-----------------|----------------------------------------|\n| Input           | `Tuple{Tuple{Tuple{A,B},C},D} where {A,B,C,D}` |\n| Base.show       | `Tuple{Tuple{Tuple{A,B},C},D} where D where C where B where A` |\n| SimpleTypePrint(max_depth=3) | `Tuple{Tuple{Tuple{...},C},D} where {A,B,C,D}`           |\n\n### Displaying type names without module prefixes\nBy default, Julia displays module prefixes unless the type is directly visible from the current scope. SimpleTypePrint allows you to opt-out from this behavior.\n\n```julia\njulia\u003e module A\n           module B\n               struct Foo{A} end\n           end\n       end  # Foo is nested inside A and B.\nMain.A\n```\n\n|                 |                                        |\n|-----------------|----------------------------------------|\n| Input           | `A.B.Foo` |\n| Base.show       | `Main.A.B.Foo` |\n| SimpleTypePrint(short_type_name=true) | `Foo{A} where A`           |\n\n\n### Renaming type variables with conflicting names\n\n|                 |                                        |\n|-----------------|----------------------------------------|\n| Input           | `Tuple{(Tuple{A} where A), A} where A` |\n| Base.show       | `Tuple{Tuple{A} where A,A} where A` |\n| SimpleTypePrint | `Tuple{Tuple{A1} where A1,A} where A`           |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrvplusone%2Fsimpletypeprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrvplusone%2Fsimpletypeprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrvplusone%2Fsimpletypeprint/lists"}