[Haskell-beginners] Ambigous Types with Haskell Functional Graph Library

Joe Schafer joesmoe10 at gmail.com
Sun Aug 16 21:16:54 EDT 2009


Hey all,

New to Haskell and I'm trying to use the FGL but I keep running into the
same error.

If I load Data.Graph.Inductive.Example and use one of the example
functions such as ucycle I get:

    Ambiguous type variable `gr' in the constraint:
      `Graph gr' arising from a use of `ucycle' at <interactive>:1:0-7
    Probable fix: add a type signature that fixes these type variable(s)

Here's the type of ucycle for reference.

ucycle :: Graph gr => Int -> gr () ()

I'm using GHC 6.10.1 and FGL 5.4.2.2

Thanks,
Joe



More information about the Beginners mailing list