<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE type=text/css>
<!--
body { color: #000000; background-color: #FFFFFF; }
.mygeneral1-comment { color: #008000; font-style: italic; }
.mygeneral1-currentline { color: #000000; }
.mygeneral1-identifier { color: #000000; }
.mygeneral1-keywords1 { color: #000080; font-weight: bold; }
.mygeneral1-keywords2 { color: #000000; }
.mygeneral1-keywords3 { color: #808000; font-weight: bold; }
.mygeneral1-keywords4 { color: #000000; }
.mygeneral1-keywords5 { color: #000000; }
.mygeneral1-matchedbraces { color: #000000; }
.mygeneral1-number { color: #FF0000; }
.mygeneral1-preprocessor { color: #0000FF; }
.mygeneral1-rightedge { color: #C0C0C0; }
.mygeneral1-selection { color: #FFFFFF; }
.mygeneral1-space { color: #000000; }
.mygeneral1-string { color: #800000; }
.mygeneral1-symbol { color: #000000; }
-->
</STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>Hi,</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>I'm trying to make three haskell classes 
and an instance this way:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV><PRE><CODE><SPAN style="FONT: 10pt Courier New"><SPAN class=mygeneral1-comment>------------------------------------------------------------------------------
</SPAN><SPAN class=mygeneral1-keywords1>class</SPAN><SPAN class=mygeneral1-space> (Eq a) =&gt; Graph a </SPAN><SPAN class=mygeneral1-keywords1>where
</SPAN><SPAN class=mygeneral1-space>    vert :: [a]
    ady  :: a -&gt; [a]
    
</SPAN><SPAN class=mygeneral1-keywords1>class</SPAN><SPAN class=mygeneral1-space> (Graph a) =&gt; Paths a </SPAN><SPAN class=mygeneral1-keywords1>where
</SPAN><SPAN class=mygeneral1-space>    gps    :: a -&gt; a -&gt; [[a]]
    
</SPAN><SPAN class=mygeneral1-keywords1>class</SPAN><SPAN class=mygeneral1-space> (Paths a) =&gt; Minimum a </SPAN><SPAN class=mygeneral1-keywords1>where
</SPAN><SPAN class=mygeneral1-space>    mgps   :: a -&gt; a -&gt; [a]
    
</SPAN><SPAN class=mygeneral1-keywords1>instance</SPAN><SPAN class=mygeneral1-space> Minimum Char </SPAN><SPAN class=mygeneral1-keywords1>where
</SPAN><SPAN class=mygeneral1-space>    vert = ['a' .. 'f'] </SPAN><SPAN class=mygeneral1-comment>-- This is the line of the error message.
</SPAN><SPAN class=mygeneral1-space>    ady 'a' = ['b', 'c']
    ady 'b' = ['d', 'c', 'e']
    ady 'd' = ['f']
    gps = bepgr </SPAN><SPAN class=mygeneral1-comment>-- bepgr is defined and implemented in other code's part
</SPAN><SPAN class=mygeneral1-space>    mgps = head gps
</SPAN><SPAN class=mygeneral1-comment>------------------------------------------------------------------------------
</SPAN></SPAN>
</CODE></PRE>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>When I try to run this I get: "ERROR: 
filepath:line -No member vert in class "Minimum"" I don't know why does this 
happen, am I doing something wrong?</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>Thank you.</FONT></DIV></BODY></HTML>

<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/classes-inheritance-seems-not-to-work.-t1148006.html#a3010358">classes inheritance seems not to work.</a><br>
Sent from the <a href="http://www.nabble.com/Haskell---Haskell-Cafe-f13132.html">Haskell - Haskell-Cafe</a> forum at Nabble.com.<br>