<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>For coSplit to pass the checker, the recursive invocation must
appear guarded by a constructor.<br>
This is clearly the case in coSplit', but not necessarily in
coSplit'' (e.g. when toString ">>" returns the empty
costring).<br>
</p>
<br>
<div class="moz-cite-prefix">On 07/30/2018 04:55 PM, Serge Leblanc
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:0961b22f-b45b-5827-1c60-9910534d45c1@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<span id="result_box" class="" lang="en"><span class="">Dear all,<br>
Why the checking termination rejects the coSplit" function
although the coSplit' function is accepted ?</span></span><br>
<span id="result_box" class="" lang="en"><span class=""><span
id="result_box" class="short_text" lang="en"><span class=""><span
id="result_box" class="" lang="en"><span class="">Why
the checking termination so suspicious?</span></span><br>
</span></span>Sincerely<br>
</span></span><br>
Estimataj ĉiuj,<br>
Kial la finiĝa kontrolo malakceptas la funkcion coSplit″ kvankam
la funkcio coSplit′ trafas ?<br>
Kial la finiĝa kontrolo estas tiel malakceptanda ?<br>
Sincere<br>
<br>
<font color="#3333ff"> coSplit′ : Costring → Costring<br>
coSplit′ [] = []<br>
coSplit′ (x ∷ xs) with x ≐ '!'<br>
... | false = x ∷ ♯ coSplit′ (♭ xs)<br>
... | true = '>' ∷ ♯ ('>' ∷ ♯ coSplit′ (♭ xs))<br>
<br>
coSplit″ : Costring → Costring<br>
coSplit″ [] = []<br>
coSplit″ (x ∷ xs) with x ≐ '!'<br>
... | false = x ∷ ♯ coSplit″ (♭ xs)<br>
... | true = (toCostring ">>") ++ coSplit″ (♭ xs)<br>
<br>
main = run $ ♯ getContents >>= λ s → ♯ (putStrLn∞ ∘
coSplit′) s<br>
<span id="result_box" class="" lang="en"><span class=""></span></span></font>
<div class="moz-signature"><font color="#3333ff"><br>
</font>-- <br>
Serge Leblanc
<hr> gpg --search-keys 0x67B17A3F <br>
Fingerprint = 2B2D AC93 8620 43D3 D2C2 C2D3 B67C F631 67B1 7A3F</div>
<!--'"--><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Agda mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a>
<a class="moz-txt-link-freetext" href="https://lists.chalmers.se/mailman/listinfo/agda">https://lists.chalmers.se/mailman/listinfo/agda</a>
</pre>
</blockquote>
<br>
</body>
</html>