Use OPTIONS rather than OPTIONS_GHC for pragmas
[ghc-hetmet.git] / compiler / typecheck / TcArrows.lhs
index 57cb48c..efd01c9 100644 (file)
@@ -5,6 +5,13 @@
 Typecheck arrow notation
 
 \begin{code}
+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+--     http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings
+-- for details
+
 module TcArrows ( tcProc ) where
 
 #include "HsVersions.h"
@@ -238,7 +245,7 @@ tc_cmd env cmd@(HsArrForm expr fixity cmd_args) (cmd_stk, res_ty)
   = addErrCtxt (cmdCtxt cmd)   $
     do { cmds_w_tys <- zipWithM new_cmd_ty cmd_args [1..]
        ; span       <- getSrcSpanM
-       ; [w_tv]     <- tcInstSkolTyVars (ArrowSkol span) [alphaTyVar]
+       ; [w_tv]     <- tcInstSkolTyVars ArrowSkol [alphaTyVar]
        ; let w_ty = mkTyVarTy w_tv     -- Just a convenient starting point
 
                --  a ((w,t1) .. tn) t
@@ -251,7 +258,8 @@ tc_cmd env cmd@(HsArrForm expr fixity cmd_args) (cmd_stk, res_ty)
 
                -- Check expr
        ; (expr', lie) <- escapeArrowScope (getLIE (tcMonoExpr expr e_ty))
-       ; inst_binds <- tcSimplifyCheck sig_msg [w_tv] [] lie
+       ; loc <- getInstLoc (SigOrigin ArrowSkol)
+       ; inst_binds <- tcSimplifyCheck loc [w_tv] [] lie
 
                -- Check that the polymorphic variable hasn't been unified with anything
                -- and is not free in res_ty or the cmd_stk  (i.e.  t, t1..tn)
@@ -303,8 +311,6 @@ tc_cmd env cmd@(HsArrForm expr fixity cmd_args) (cmd_stk, res_ty)
                                    
            other -> (ty, [])
 
-    sig_msg  = ptext SLIT("expected type of a command form")
-
 -----------------------------------------------------------------
 --             Base case for illegal commands
 -- This is where expressions that aren't commands get rejected