Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> require "diagtex"
> test = function (A) 
>>     storearrow(DxyArrow(A))
>>     print(arrow_to_TeX(arrows[#arrows]))
>>   end
> 
> storenode {TeX="a", tag="a", x=100, y=100}
> storenode {TeX="b", tag="b", x=140, y=100}
> test {from="a", to="b", shape="|->"}
\morphism(0,0)/|->/<600,0>[{a}`{b};]
> test {from="a", to="b", shape="|->", label="up", placement="a"}
\morphism(0,0)|a|/|->/<600,0>[{a}`{b};{up}]
> test {from="a", to="b", shape="|->", label="up", placement="a", slide="5pt"}
\morphism(0,0)|a|/{@{|->}@<5pt>}/<600,0>[{a}`{b};{up}]
> test {from="a", to="b", shape="|->", label="up", lplacement="_(0.42)"}  -- err?
./diagtex.lua:69: attempt to concatenate global 'label' (a nil value)
stack traceback:
	./diagtex.lua:69: in function 'arrow_to_TeX'
	stdin:3: in function 'test'
	stdin:1: in main chunk
	[C]: ?
> 
>