Not quite understand...<div>You might like to parse full code to somewhere like <a href="http://hpaste.org/">http://hpaste.org/</a> and provide url..<br clear="all">-Haisheng<br>
<br><br><div class="gmail_quote">On Wed, Jun 22, 2011 at 4:54 PM, Zhi-Qiang Lei <span dir="ltr">&lt;<a href="mailto:zhiqiang.lei@gmail.com">zhiqiang.lei@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi,<br>
<br>
My attempt which compiles some files with stub failed. Can you tell me how to compile them? Thanks.<br>
<br>
PrettyJSON.hs:<br>
<br>
renderJValue :: JValue -&gt; Doc<br>
renderJValue (JBool True)  = text &quot;true&quot;<br>
renderJValue (JBool False) = text &quot;false&quot;<br>
renderJValue JNull         = text &quot;null&quot;<br>
renderJValue (JNumber num) = double num<br>
renderJValue (JString str) = string str<br>
<br>
PrettyStub.hs:<br>
<br>
import SimpleJSON<br>
<br>
data Doc = ToBeDefined<br>
         deriving (Show)<br>
<br>
string :: String -&gt; Doc<br>
string str = undefined<br>
<br>
text :: String -&gt; Doc<br>
text str = undefined<br>
<br>
double :: Double -&gt; Doc<br>
double num = undefined<br>
<br>
<br>
Result:<br>
<br>
bogon% ghc -c PrettyJSON.hs PrettyStub.hs SimpleJSON.o<br>
Warning: the following files would be used as linker inputs, but linking is not being done: SimpleJSON.o<br>
<br>
PrettyJSON.hs:1:16:<br>
    Not in scope: type constructor or class `JValue&#39;<br>
<br>
PrettyJSON.hs:1:26: Not in scope: type constructor or class `Doc&#39;<br>
<br>
PrettyJSON.hs:2:14: Not in scope: data constructor `JBool&#39;<br>
<br>
PrettyJSON.hs:2:29: Not in scope: `text&#39;<br>
<br>
PrettyJSON.hs:3:14: Not in scope: data constructor `JBool&#39;<br>
<br>
PrettyJSON.hs:3:29: Not in scope: `text&#39;<br>
<br>
PrettyJSON.hs:4:13: Not in scope: data constructor `JNull&#39;<br>
<br>
PrettyJSON.hs:4:29: Not in scope: `text&#39;<br>
<br>
PrettyJSON.hs:5:14: Not in scope: data constructor `JNumber&#39;<br>
<br>
PrettyJSON.hs:5:29: Not in scope: `double&#39;<br>
<br>
PrettyJSON.hs:6:14: Not in scope: data constructor `JString&#39;<br>
<br>
PrettyJSON.hs:6:29: Not in scope: `string&#39;<br>
<br>
Best regards,<br>
Zhi-Qiang Lei<br>
<a href="mailto:zhiqiang.lei@gmail.com">zhiqiang.lei@gmail.com</a><br>
<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br></div>