implement clock for haskell

/cc @soapie @qnikst @pminten @sjakobi