Docile works on whole packages rather than individual files. You just need 
to put the file "docthis.jl" in the correct load path [1] so that ``using 
DocThis`` works or else do ``require("docthis.jl")`` rather than 
``include("docthis.jl")``. I'll add a mention of this to the documentation 
shortly.

[1] http://docs.julialang.org/en/latest/manual/modules/#module-file-paths

-- Mike

On Friday, 5 June 2015 16:25:39 UTC+2, Andrew Gibb wrote:
>
> Hi,
>
> Please help me get started with this. Here' a simple Julia module, with an 
> attempt at documention:
>
> module DocThis
>
> using Docile
> @docstrings
>
> export AThing, addfive
>
> @doc """
> This type defines a thing, which is a thing. Here's some code, declared by 
> indenting:
>
> ay = AThing(5)
> bee = AThing(3.14)
>
> So that's that. 
> """ ->
> type AThing
> bee
> end
>
> @doc """
> Adds five. Just like that.
> """ ->
> function addfive(x::Number)
> return x + 5.
> end
>
>
> end #module
>
> To using this at the REPL, I do 
> using Docile, Lexicon
> include("docthis.jl")
> using DocThis
>
> which I imagine should be all the initialisation I need to do. But when I 
> do 
>
> ? AThing
>
> I just get 
> DataType   : AThing (constructor with 1 method)
>   supertype: Any
>   fields   : (:bee,)
>
> I have tried various permutations of the documentation syntax: No macros 
> (or arrows), Only @doc macros with arrows, or the version you see above. 
> All of these produce the same results. What am I doing wrong?
>
> Thanks
>
> Adny
>
>
>

Reply via email to