Subject: Quickly look them up

From: Are They A Danger <[email-masked]>
Date: Thu, 22 May 2014 09:12:15 -0700

Hello --

Think of that person you would like to know more about.

Put their name in and see an instant anonymous report containing EVERYTHING:

Enter Any Name: http://www.transportmud.com/name-lookup/3456734/DB/all/file-5435345324.info

[What do you think it says about you? You may want to know.]

ADF Database Records•10 Hale Lane•Coram•NJ•~mailS_ettings~ Or you may write to the addr.

In a shallow bowl, mix the mustard, honey, mayonnaise, and steak sauce. Set aside a small amount of the honey mustard sauce for basting, and dip the chicken into the remaining sauce to coat.

Lightly oil the grill grate. Grill chicken over indirect heat for 18 to 20 minutes, turning occasionally, or until juices run clear. Baste occasionally with the reserved sauce during the last 10 minutes. Watch carefully to prevent burning

Now what happens if I want to change the type from String to ByteString to improve performance; I'll have to import the ByteString package and use a qualified version of some functions. No other changes are necessary. If I have the type signature then I also have to change this and yet the Haskell compiler would notice this change and correctly infer the new types.

So what am I missing? Why is it considered a good idea to explicitly put type signatures on functions in the general case? i.e. I understand that there might be exceptions where it is a good idea, but why is it considered good in general?

-- matchStr :: String -> String -> Maybe (String) matchStr str s | isPrefixOf str s = Just(drop (length str) s) | otherwise = Nothing