[Haskell-cafe] FGL instance constraint
Sebastian Fischer
sebf at informatik.uni-kiel.de
Sat May 1 04:01:47 EDT 2010
On May 1, 2010, at 8:08 AM, Ivan Lazar Miljenovic wrote:
>> * I can't redefine the Graph methods to introduce the (Cls a)
>> constraint [reasonable]
>
> Not sure if you can.
I think Kevin means that he cannot change the signature of the methods
in the Graph class because those are defined in the FGL package.
> You're putting the constraint in the wrong places: put the "(Cls a)
> => "
> in the actual functions where you need it.
Those seem to be the methods of the Graph class, where he can't place
the constraints. Kevin may have a version of makeGraph with
additional constraints but cannot use it to to define a Graph
instance.
Sebastian
--
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)
More information about the Haskell-Cafe
mailing list