Write functionality

modified:   src/HReg/Read.hs
modified:   src/HReg/Types.hs
modified:   src/HReg/Util.hs
new file:   src/HReg/Write.hs