haskPos p = haskHelp p 1 where
  haskHelp XH p2 = p2
  haskHelp (XO r) p2 = haskHelp r (2 P.* p2)
  haskHelp (XI r) p2 = p2 P.+ haskHelp r (2 P.* p2)
haskPos p = haskHelp p 1 where
  haskHelp XH p2 = p2
  haskHelp (XO r) p2 = haskHelp r (2 P.* p2)
  haskHelp (XI r) p2 = p2 P.+ haskHelp r (2 P.* p2)
haskPos p = haskHelp p 1 where
  haskHelp XH p2 = p2
  haskHelp (XO r) p2 = haskHelp r (2 P.* p2)
  haskHelp (XI r) p2 = p2 P.+ haskHelp r (2 P.* p2)