# Is there a way to minify Julia files?

**URL:** <https://discourse.julialang.org/t/is-there-a-way-to-minify-julia-files/7702>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 12, 2017, 9:16am UTC](https://discourse.julialang.org/t/is-there-a-way-to-minify-julia-files/7702 "2017-12-12T09:16:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [December 12, 2017, 9:16am UTC](https://discourse.julialang.org/t/is-there-a-way-to-minify-julia-files/7702/1 "2017-12-12T09:16:22Z")

</div>

Let’s say you have a file like:

```julia
# Common methods for all `Values` objects

const ScalarValues{ dim,T,shape} = Union{

  CellScalarValues{dim,T,shape},FaceScalarValues{dim,T,shape}
  }

const VectorValues{ dim, T,shape} = 
  Union{ CellVectorValues{dim,T,shape },FaceVectorValues{dim,T,shape}}

```

is there an existing way to (in-memory) transform it to:

```julia
const ScalarValues{dim,T,shape}=Union{CellScalarValues{dim,T,shape},FaceScalarValues{dim,T,shape}}
const VectorValues{dim,T,shape}=Union{CellVectorValues{dim,T,shape},FaceVectorValues{dim,T,shape}}

```

?

// can you leverage the internal julia compiler?

* * *

**edit:** this is assuming the file **could** compile successfully

---

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [December 16, 2017, 9:23pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-minify-julia-files/7702/2 "2017-12-16T21:23:44Z")

</div>

this is basically just a rephrasing of:

> [@Way to get string representation of an Expression?](https://discourse.julialang.org/t/way-to-get-string-representation-of-an-expression/7778):
>
> Let’s say you have a deeply nested Expr node. How do you turn that into a string that could (manually) be copied and pasted into the REPL? edit: related github [issue#25121](https://github.com/JuliaLang/julia/issues/25121)
