[Haskell-cafe] Unused import warnings.

Lyndon Maydwell maydwell at gmail.com
Tue Aug 10 16:49:24 EDT 2010


Is there a way to just ignore the warnings for QuickCheck?

On Wed, Aug 11, 2010 at 4:32 AM, Christopher Done
<chrisdone at googlemail.com> wrote:
> On 10 August 2010 22:25, Lyndon Maydwell <maydwell at gmail.com> wrote:
>> On Wed, Aug 11, 2010 at 4:23 AM, Christopher Done
>> <chrisdone at googlemail.com> wrote:
>>> On 10 August 2010 22:22, Lyndon Maydwell <maydwell at gmail.com> wrote:
>>>> Hi Cafe.
>>>>
>>>> I have written some QuickCheck properties in my source and am using
>>>> these for testing, however, when I compile my program I get warned
>>>> about unused imports:
>>>>
>>>>> Warning: Module `Test.QuickCheck' is imported, but nothing from it is used
>>>>
>>>> Is there a way to suppress these warnings for a particular module by
>>>> using a pragma directive or something similar?
>>>
>>> You can do:
>>>
>>> import Test.QuickCheck ()
>>>
>> I'm using qualified properties with (import Test.QuickCheck ((==>)))
>> so that may not be possible.
>
> Ah, ok. In that case you can use -fno-warn-unused-imports. You can
> pass that to GHC, or put it in as an OPTIONS pragma:
>
> {-# OPTIONS -fno-warn-unused-imports #-}
>


More information about the Haskell-Cafe mailing list