Dear Admin
Now it's getting harder and harder to get accepted in Haskell because of GHC compiler version. GHC-6.10.4 is very old and it does not contain lot of import library. At least kindly update it to GHC-7.4.1. I will be highly thankful to you.

prog.hs:2:7:
Could not find module `Text.Regex.Posix':
Use -v to see a list of the files searched for.

However this code works perfectly with GHC-7.6.1.
Mukeshs-MacBook-Pro:SPOJ mukeshtiwari$ ghc Spoj_11105.hs
Mukeshs-MacBook-Pro:SPOJ mukeshtiwari$ which ghc
/Users/mukeshtiwari/Programming/GHC/ghc-7.6.1/bin/ghc

import Data.List
import Text.Regex.Posix
import qualified Data.ByteString.Char8 as BS
pat :: BS.ByteString
pat = BS.pack "[^~!@#$%^&*()<>?,.]*[a-zA-Z0-9][a-zA-Z0-9._][a-zA-Z0-9._][a-zA-Z0-9._][a-zA-Z0-9._][a-zA-Z0-9._]*@[a-zA-Z0-9]+.(com|edu|co.in)[^~!@#$%^&*()<>?,.a-zA-Z0-9]*"
collectEmail :: BS.ByteString -> BS.ByteString
collectEmail email = ( =~ ) email pat 
process :: ( Int , [ BS.ByteString ] ) -> BS.ByteString
process ( k , xs ) = ( BS.pack "Case " ) `BS.append` ( BS.pack . show $ k ) 
          `BS.append` ( BS.pack ": " ) `BS.append` ( BS.pack . show $ k ) 
          `BS.append` ( BS.pack "\n" ) `BS.append` ( BS.unlines xs )
main = BS.interact $ BS.concat .  map process . zip [ 1 .. ] . 
       map ( filter ( not . BS.null ) . map collectEmail . BS.words ) . 
       tail . BS.lines