
I don't know whether this is a bug in fgl, in ghc, or I'm just confused. Any ideas? This is on debian/sid. GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude> import Data.Graph.Inductive.Example Prelude Data.Graph.Inductive.Example> star 6 <interactive>:1:0: Ambiguous type variable `gr' in the constraint: `Data.Graph.Inductive.Graph.Graph gr' arising from a use of `star' at <interactive>:1:0-5 Probable fix: add a type signature that fixes these type variable(s) Prelude Data.Graph.Inductive.Example>

On Sun, Jul 13, 2008 at 8:07 PM, David Bremner
I don't know whether this is a bug in fgl, in ghc, or I'm just confused. Any ideas? This is on debian/sid.
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude> import Data.Graph.Inductive.Example Prelude Data.Graph.Inductive.Example> star 6
The type of star is polymorphic:
:t star star :: (Graph gr) => Int -> gr () ()
Haskell does not know what type to pick for gr; there is no context from which it can infer this information. So you need to specify explicitly:
star 6 :: Gr () () -- works
Luke
participants (2)
-
David Bremner
-
Luke Palmer