Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. a parse error....i can't fix it ( anyzhen )
2. Re: a parse error....i can't fix it (Daniel Fischer)
3. ??? a parse error....i can't fix it ( anyzhen )
4. Re: a parse error....i can't fix it (Luca Ciciriello)
5. Re: a parse error....i can't fix it ( anyzhen )
----------------------------------------------------------------------
Message: 1
Date: Fri, 9 Sep 2011 22:53:06 +0800
From: " anyzhen " <[email protected]>
Subject: [Haskell-beginners] a parse error....i can't fix it
To: " Beginners " <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
sorry and please forget the name and what it is meaning for.
just look at in syntax aspect
the error : "parse error on input `|'
Failed, modules loaded: none."
linerFind :: [Int] -> Int -> MaxSA -> MaxSA --MaxSA is MaximumSubarray
linerFind xs len ms1@(MaxSA l h m) -- (MaxSA leftPosition
rightPosition maxsum)
| h<len = keepFind ms1
where keepFind ms'@(MaxSA l' h' m')=
let ms2@(MaxSA l2 h2 m2)= find' xs l' (h'+1) in
if m < m2 then linerFind xs len ms2
else keepFind ms2
|otherwise = ms1 --compiler say error is
in this line
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110909/b5f7dfe5/attachment-0001.htm>
------------------------------
Message: 2
Date: Fri, 9 Sep 2011 17:06:55 +0200
From: Daniel Fischer <[email protected]>
Subject: Re: [Haskell-beginners] a parse error....i can't fix it
To: [email protected]
Message-ID: <[email protected]>
Content-Type: Text/Plain; charset="utf-8"
On Friday 09 September 2011, 16:53:06, anyzhen wrote:
> sorry and please forget the name and what it is meaning for.
> just look at in syntax aspect
>
>
> the error : "parse error on input `|'
> Failed, modules loaded: none."
>
>
>
> linerFind :: [Int] -> Int -> MaxSA -> MaxSA --MaxSA is
> MaximumSubarray linerFind xs len ms1@(MaxSA l h m) --
> (MaxSA leftPosition rightPosition maxsum)
>
> | h<len = keepFind ms1
>
> where keepFind ms'@(MaxSA l' h' m')=
> let ms2@(MaxSA l2 h2 m2)= find' xs l' (h'+1) in
> if m < m2 then linerFind xs len ms2
> else keepFind ms2
>
> |otherwise = ms1 --compiler say
> |error is in this line
You must have the where clause after the guards,
linerFind ...
| h < len = keepFind ms1
| otherwise = ms1
where
...
------------------------------
Message: 3
Date: Fri, 9 Sep 2011 23:12:11 +0800
From: " anyzhen " <[email protected]>
Subject: [Haskell-beginners] ??? a parse error....i can't fix it
To: " Daniel Fischer " <[email protected]>, " beginners
" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="gbk"
a ha ...
thanks Daniel
------------------ ???? ------------------
???: "Daniel Fischer";
????: 2011?9?9?(???) ??11:06
???: "beginners";
??: "anyzhen";
??: Re: [Haskell-beginners] a parse error....i can't fix it
On Friday 09 September 2011, 16:53:06, anyzhen wrote:
> sorry and please forget the name and what it is meaning for.
> just look at in syntax aspect
>
>
> the error : "parse error on input `|'
> Failed, modules loaded: none."
>
>
>
> linerFind :: [Int] -> Int -> MaxSA -> MaxSA --MaxSA is
> MaximumSubarray linerFind xs len ms1@(MaxSA l h m) --
> (MaxSA leftPosition rightPosition maxsum)
>
> | h<len = keepFind ms1
>
> where keepFind ms'@(MaxSA l' h' m')=
> let ms2@(MaxSA l2 h2 m2)= find' xs l' (h'+1) in
> if m < m2 then linerFind xs len ms2
> else keepFind ms2
>
> |otherwise = ms1 --compiler say
> |error is in this line
You must have the where clause after the guards,
linerFind ...
| h < len = keepFind ms1
| otherwise = ms1
where
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110909/552d2c8f/attachment-0001.htm>
------------------------------
Message: 4
Date: Fri, 9 Sep 2011 17:12:39 +0200
From: Luca Ciciriello <[email protected]>
Subject: Re: [Haskell-beginners] a parse error....i can't fix it
To: anyzhen <[email protected]>
Cc: Beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Formatted in this way should be compile:
linerFind :: [Int] -> Int -> MaxSA -> MaxSA --MaxSA is MaximumSubarray
linerFind xs len ms1@(MaxSA l h m) -- (MaxSA leftPosition
rightPosition maxsum)
| h<len = keepFind ms1
| otherwise = ms1
where keepFind ms'@(MaxSA l' h' m') = let ms2@(MaxSA l2 h2 m2)= find' xs l'
(h'+1)
in if
m < m2
then linerFind xs len ms2
else keepFind ms2
Bye
Luca.
On Sep 9, 2011, at 4:53 PM, anyzhen wrote:
> sorry and please forget the name and what it is meaning for.
> just look at in syntax aspect
>
> the error : "parse error on input `|'
> Failed, modules loaded: none."
>
> linerFind :: [Int] -> Int -> MaxSA -> MaxSA --MaxSA is MaximumSubarray
> linerFind xs len ms1@(MaxSA l h m) -- (MaxSA leftPosition
> rightPosition maxsum)
> | h<len = keepFind ms1
> where keepFind ms'@(MaxSA l' h' m')=
> let ms2@(MaxSA l2 h2 m2)= find' xs l' (h'+1) in
> if m < m2 then linerFind xs len ms2
> else keepFind ms2
> |otherwise = ms1 --compiler say error
> is in this line
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110909/4af0c14f/attachment-0001.htm>
------------------------------
Message: 5
Date: Fri, 9 Sep 2011 23:13:13 +0800
From: " anyzhen " <[email protected]>
Subject: Re: [Haskell-beginners] a parse error....i can't fix it
To: " Luca Ciciriello " <[email protected]>
Cc: Beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="gbk"
thank you
------------------ Original ------------------
From: "Luca Ciciriello";
Date: 2011?9?9?(???) ??11:12
To: "anyzhen";
Cc: "Beginners";
Subject: Re: [Haskell-beginners] a parse error....i can't fix it
Formatted in this way should be compile:
linerFind :: [Int] -> Int -> MaxSA -> MaxSA --MaxSA is MaximumSubarray
linerFind xs len ms1@(MaxSA l h m) -- (MaxSA leftPosition
rightPosition maxsum)
| h<len = keepFind ms1
| otherwise = ms1
where keepFind ms'@(MaxSA l' h' m') = let ms2@(MaxSA l2 h2 m2)= find' xs l'
(h'+1)
in if
m < m2
then linerFind xs len ms2
else keepFind ms2
Bye
Luca.
On Sep 9, 2011, at 4:53 PM, anyzhen wrote:
sorry and please forget the name and what it is meaning for.
just look at in syntax aspect
the error : "parse error on input `|'
Failed, modules loaded: none."
linerFind :: [Int] -> Int -> MaxSA -> MaxSA --MaxSA is MaximumSubarray
linerFind xs len ms1@(MaxSA l h m) -- (MaxSA leftPosition
rightPosition maxsum)
| h<len = keepFind ms1
where keepFind ms'@(MaxSA l' h' m')=
let ms2@(MaxSA l2 h2 m2)= find' xs l' (h'+1) in
if m < m2 then linerFind xs len ms2
else keepFind ms2
|otherwise = ms1 --compiler say error is
in this line
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110909/f821d147/attachment.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 39, Issue 10
*****************************************