id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
1426	warning about `import Control.Monad.Fix` being unused when mdo is used	Isaac Dupree		"and the use is exported.  This should not be warned about since Control.Monad.Fix is supposed to be imported in modules that use mdo, to be portable or something. ""You should import Control.Monad.Fix. (Note: Strictly speaking, this import is required only when you need to refer to the name MonadFix in your program, but the import is always safe, and the programmers are encouraged to always import this module when using the mdo-notation.)""

{{{
{-# OPTIONS_GHC -fglasgow-exts -fwarn-unused-imports #-}

module Test where

import Control.Monad.Fix

isEven :: Int -> Maybe Int
isEven n = if even n then Just n else Nothing

puzzle :: [Int]
puzzle = mdo (x, z) <- [(y, 1), (y^2, 2), (y^3, 3)]
             Just y <- map isEven [z+1 .. 2*z]
             return (x + y)
}}}

produces

{{{
Test.hs:5:0:
    Warning: Module `Control.Monad.Fix' is imported, but nothing from it is used,
               except perhaps instances visible in `Control.Monad.Fix'
             To suppress this warning, use: import Control.Monad.Fix()
}}}

Just doing `import Control.Monad.Fix()` wouldn't fulfill the purpose of importing that module!

I wonder if there are any other special syntaxes (arrows maybe?) with this effect."	bug	closed	normal		Compiler	6.6.1	fixed			Unknown/Multiple	Unknown/Multiple		Unknown				
