Send Beginners mailing list submissions to beginners@haskell.org 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 beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org 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 " <jiangzhe...@qq.com> Subject: [Haskell-beginners] a parse error....i can't fix it To: " Beginners " <beginners@haskell.org> Message-ID: <tencent_17d4279076a8b8c1720b5...@qq.com> 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 <daniel.is.fisc...@googlemail.com> Subject: Re: [Haskell-beginners] a parse error....i can't fix it To: beginners@haskell.org Message-ID: <201109091706.56010.daniel.is.fisc...@googlemail.com> 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 " <jiangzhe...@qq.com> Subject: [Haskell-beginners] ??? a parse error....i can't fix it To: " Daniel Fischer " <daniel.is.fisc...@googlemail.com>, " beginners " <beginners@haskell.org> Message-ID: <tencent_79b8336114fe6c04014b2...@qq.com> 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 <luca_cicirie...@hotmail.com> Subject: Re: [Haskell-beginners] a parse error....i can't fix it To: anyzhen <jiangzhe...@qq.com> Cc: Beginners <beginners@haskell.org> Message-ID: <blu0-smtp170200b2cd4e389081aedb79a...@phx.gbl> 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 > Beginners@haskell.org > 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 " <jiangzhe...@qq.com> Subject: Re: [Haskell-beginners] a parse error....i can't fix it To: " Luca Ciciriello " <luca_cicirie...@hotmail.com> Cc: Beginners <beginners@haskell.org> Message-ID: <tencent_415be0474f418a833d7fb...@qq.com> 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 Beginners@haskell.org 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 Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 39, Issue 10 *****************************************