Did any of you tried to do a Haskell implementation of the ICFPC 2007 problem?

        I was thinking of using it as a learning exercise, but I am afraid of the stack. My approach is:

1) use Data.ByteString.Lazy.Char8 to read the contents of the DNA file
2) create a recursive function process::ByteString -> a that will call itself.

       I have a few problems:

a) the DNA is 8MB long. How can I ensure the stack will hold a recursive call?
b) there is an "abnormal ending" function called finish that is called anywhere in the code. Is it a good approach to return Empty to end processing?
c) should I go "monadic", keeping the dna on a state monad?


    Thanks


--
Rafael Gustavo da Cunha Pereira Pinto
Electronic Engineer, MSc.