Multiprecision hexadecimal arithmetic
In hexadecimal (base 16), the digits are conventionally represented using the numerals 0,1,...,9 and the letters A,B,..,F, where A represents 10, B represents 11, ... , F.
A hexadecimal number of arbitrary length can be represented in Haskell as a list of type [Char] where each entry is one of '0',..,'9','A',..,'F','-'. If the character '-' is used, it must be at the head of the list, and it indicates that the number is negative. To make the representation unique, leading '0's should be eliminated.
Write the following functions
to perform hexadecimal arithmetic operations on this list representation of hexadecimal numbers. You may assume that each input to the function is a proper hexadecimal number --- that is, the list of Char has no spurious characters, no leading '0's, and the '-' sign, if any, is only at the head of the list.
The output of your function should again be a proper hexadecimal number, with the same properties.
Submit all your functions in a single Haskell file.