Symmath contains some tries to implement a bit math in Haskell, especially working with terms.