On Fri, Nov 27, 2009 at 11:48 AM, Lev Broido <lev.broido@gmail.com> wrote:
Thanks for reply .
I used braces , since previous error was on indentation and I wasn't sure what was wrong .
The intent of the  curr_bank_state =  head . filter (\y -> y == (wr_bank,_) state was
get first entry (only entry) from list of tuples (Time,BankStateSIngle) matching condition Time == wr_bank .

After removing braces the message is
  DdrController.hs:112:8:
    parse error (possibly incorrect indentation)
Failed, modules loaded: none.

Thanks,
Lev


On Fri, Nov 27, 2009 at 11:15 AM, Stephen Tetley <stephen.tetley@gmail.com> wrote:
Hi Lev

Where clauses don't use braces so that's first problem.

Also this line near the end has a problem:

         curr_bank_state =  head . filter (\y -> y == (wr_bank,_) state

What should it be doing?

Best wishes

Stephen

2009/11/27 Lev Broido <lev.broido@gmail.com>:
> Hi
> I am getting the following message :
> parse error on input `=
> Code in question is attached .
>
> Another general question on haskell :
> I am not sure I understand correctly  the 'where' clause usage , I'll
> happily accept comments on the code
>
> Thanks,
> Lev
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>