Skip to content

Get spurious ambiguous import error from hdevtools with the following code #74

Description

@JonnyRa

This is a small sample that should show the problem. from a frankly horrific nearly 1000 line test utils file in our repository.

running hdevtools check should show the behaviour.

debug shows it picking up the relevant stack and cabal files.

I think the dependencies needed in your cabal are:

              , hspec-webdriver
              , webdriver
  import           Test.Hspec.WebDriver                                    as Reexported
  import           Test.WebDriver

  waitForPageLoadAfter :: WD a -> WD a
  waitForPageLoadAfter action = do
    waitForCompleteReadyState
    waitForSetLoadedFlag
    clearLoadedFlag
    result <- action
    waitForPageLoad (0 :: Int)
    return result

I get an error reported from hdevtools about WD being ambiguous as it could be from either import... however stack builds this fine presumably as they both refer to the same thing. Unfortunately for me, I can't just import either of them qualified to work around the issue - there's a mess whereby some of each's functions are being used in this file.

Having a perceived problem like this stops me using any type or info queries in the file and it basically gets used in all of our selenium tests so it's basically disabling type information for me in an entire project!

Also sorry I haven't come back with any more information on the template haskell thing - I'll try and get a decent sample back at some point, just I'm busy + it's not causing me pain right now!

Cheers

Jonny

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions