THRIFT-901. hs: Allow the bindings to compile without -fglasgow-exts and with -Wall -Werror

This patch makes the bindings compile with pedantic warning levels, and individually declares each required language extension.

Patch: Christian Lavoie

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@998955 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/hs/src/Thrift/Server.hs b/lib/hs/src/Thrift/Server.hs
index 770965f..4634a6b 100644
--- a/lib/hs/src/Thrift/Server.hs
+++ b/lib/hs/src/Thrift/Server.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE ScopedTypeVariables #-}
 --
 -- Licensed to the Apache Software Foundation (ASF) under one
 -- or more contributor license agreements. See the NOTICE file
@@ -31,7 +32,7 @@
 import System.IO
 
 import Thrift
-import Thrift.Transport.Handle
+import Thrift.Transport.Handle()
 import Thrift.Protocol.Binary
 
 
@@ -60,6 +61,6 @@
 acceptLoop :: IO t -> (t -> IO Bool) -> IO a
 acceptLoop accepter proc = forever $
     do ps <- accepter
-       forkIO $ handle (\(e :: SomeException) -> return ())
+       forkIO $ handle (\(_ :: SomeException) -> return ())
                   (loop $ proc ps)
   where loop m = do { continue <- m; when continue (loop m) }