Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe 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. Re: Noob List Woes (Bob Ippolito)
   2. Re: Noob List Woes (Duke Normandin)


----------------------------------------------------------------------

Message: 1
Date: Wed, 17 Dec 2025 23:13:39 -0800
From: Bob Ippolito <[email protected]>
Subject: [Haskell-beginners]Re: Noob List Woes
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID:
        <CACwMPm-pK1pGEUn-c8xC_XO_KSMHtwqCV+V7qkA=rntslgq...@mail.gmail.com>
Content-Type: multipart/alternative;
        boundary="000000000000e755f3064634b3bb"

It looks like the problem is the indentation, I would expect the let and
the print statements to have the same level of indentation (since there’s
no “in” with the “let”)

On Wed, Dec 17, 2025 at 20:44 Duke Normandin <[email protected]>
wrote:

> Just started learning Haskell!
> Currently watching this particular video:
> https://youtu.be/vhsONvQc-Dc?list=PLmTgnNwroyn8TnF26YRvW-hvQF1ypztzg
>
> in the seies. I copied his code verbatim, but keep getting errors
> running the code on my antiX-23.2 Linux box using a fresh Haskell
> install.
>
> [quote]
> main = do
>   let testScores = [79,85,92,56]
>     print (testScores !! 0)  -- !! means index-of
>     print (testScores !! 3)  -- last item
>     print (head testScores)  -- returns first item in a list
> [/quote]
>
> [quote]
> runghc "hello.hs" (in
> directory: /home/dnormandin/Programming/haskell/code) hello.hs:1:8:
> error: [GHC-52095] Unexpected do block in function application:
>         do let testScores = ...
>     Suggested fixes:
>       • Use parentheses.
>       • Perhaps you intended to use BlockArguments
>         You may enable this language extension in GHCi with:
>           :set -XBlockArguments
>   |
> 1 | main = do
>   |        ^^...
> Compilation failed.
> [/quote]
>
> I can't figure out what's wrong with the code. I _think_ that the
> indenting is ok - which BTW is a bloody PITA!!
> I have some cl/scheme experience, but mostly with procedural langs.
> Maybe the tutorial is too dated to be useful? If it is, is there a
> similar video tutorial for beginners? TIA ...
> --
> Duke
> _______________________________________________
> Beginners mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
-------------- next part --------------
A message part incompatible with plain text digests has been removed ...
Name: not available
Type: text/html
Size: 2501 bytes
Desc: not available

------------------------------

Message: 2
Date: Thu, 18 Dec 2025 00:41:48 -0700
From: Duke Normandin <[email protected]>
Subject: [Haskell-beginners]Re: Noob List Woes
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID: <[email protected]>
Content-Type: multipart/alternative;
        boundary=Apple-Mail-EB57872D-BF0E-474A-A9C2-9AF56C3CA6EE

Thx! I believe that indenting bs just killed my exploration of haskell. Much 
obliged….

—
Duke
Sent from my iPhone

> On Dec 18, 2025, at 12:14 AM, Bob Ippolito <[email protected]> wrote:
> 
> 
> It looks like the problem is the indentation, I would expect the let and the 
> print statements to have the same level of indentation (since there’s no “in” 
> with the “let”)
> 
>> On Wed, Dec 17, 2025 at 20:44 Duke Normandin <[email protected]> 
>> wrote:
>> Just started learning Haskell!
>> Currently watching this particular video:
>> https://youtu.be/vhsONvQc-Dc?list=PLmTgnNwroyn8TnF26YRvW-hvQF1ypztzg
>> 
>> in the seies. I copied his code verbatim, but keep getting errors
>> running the code on my antiX-23.2 Linux box using a fresh Haskell
>> install.
>> 
>> [quote]
>> main = do
>>   let testScores = [79,85,92,56]
>>     print (testScores !! 0)  -- !! means index-of
>>     print (testScores !! 3)  -- last item
>>     print (head testScores)  -- returns first item in a list
>> [/quote]
>> 
>> [quote]
>> runghc "hello.hs" (in
>> directory: /home/dnormandin/Programming/haskell/code) hello.hs:1:8:
>> error: [GHC-52095] Unexpected do block in function application:
>>         do let testScores = ...
>>     Suggested fixes:
>>       • Use parentheses.
>>       • Perhaps you intended to use BlockArguments
>>         You may enable this language extension in GHCi with:
>>           :set -XBlockArguments
>>   |
>> 1 | main = do
>>   |        ^^...
>> Compilation failed.
>> [/quote]
>> 
>> I can't figure out what's wrong with the code. I _think_ that the
>> indenting is ok - which BTW is a bloody PITA!!
>> I have some cl/scheme experience, but mostly with procedural langs.
>> Maybe the tutorial is too dated to be useful? If it is, is there a
>> similar video tutorial for beginners? TIA ...
>> -- 
>> Duke
>> _______________________________________________
>> Beginners mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
> _______________________________________________
> Beginners mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
-------------- next part --------------
A message part incompatible with plain text digests has been removed ...
Name: not available
Type: text/html
Size: 3320 bytes
Desc: not available

------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list -- [email protected]
To unsubscribe send an email to [email protected]


------------------------------

End of Beginners Digest, Vol 179, Issue 1
*****************************************

Reply via email to