Hello,<br><br>      I am trying to model multigraphs ....but getting errors with ghci and can&#39;t figure out why.... I have a serious blind spot ....<br><br><br>{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}<br>
<br>module Bonzo where<br><br><br>class Graph arrow node where<br><br>     source             :: arrow -&gt; node<br><br>     target             :: arrow -&gt; node<br><br><br>data Arrow = Arrow (Int, Int)<br><br><br>instance Graph Arrow Int where<br>
<br>     source Arrow = fst Arrow<br><br>     target Arrow = snd Arrow <br><br>~                                                                                                                     <br>~ <br>{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}<br>
<br>module Bonzo where<br><br><br>class Graph arrow node where<br><br>     source             :: arrow -&gt; node<br><br>     target             :: arrow -&gt; node<br><br><br>data Arrow = Arrow (Int, Int)<br><br><br>instance Graph Arrow Int where<br>
<br>     source Arrow = fst Arrow<br><br>     target Arrow = snd Arrow <br><br>~                                                                                                                     <br>~ <br><br><br>ghci&gt; :load junk1.hs<br>
[1 of 1] Compiling Bonzo            ( junk1.hs, interpreted )<br><br>junk1.hs:19:12:<br>    Constructor `Arrow&#39; should have 1 argument, but has been given 0<br>    In the pattern: Arrow<br>    In the definition of `source&#39;: source Arrow = fst Arrow<br>
    In the instance declaration for `Graph Arrow Int&#39;<br><br>junk1.hs:21:12:<br>    Constructor `Arrow&#39; should have 1 argument, but has been given 0<br>    In the pattern: Arrow<br>    In the definition of `target&#39;: target Arrow = snd Arrow<br>
    In the instance declaration for `Graph Arrow Int&#39;<br><br><br><br>Regards,<br><br>Vasili<br><br><br><br><br><br>