Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/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.  1=2 (M Douglas McIlroy)
   2. Re:  1=2 (amin...@mailbox.org)
   3. Re:  1=2 (Francesco Ariis)


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

Message: 1
Date: Mon, 14 Dec 2020 12:14:53 -0500
From: M Douglas McIlroy <m.douglas.mcil...@dartmouth.edu>
To: beginners@haskell.org
Subject: [Haskell-beginners] 1=2
Message-ID:
        <cakh6pixu8dmtmalq4ttzw+scfpjdu7tbyjwwt_m95p5nzne...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

ghc and ghci 8.6.5 accept 1=2 at top level. It seems to have no effect.
What does it mean?


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

Message: 2
Date: Mon, 14 Dec 2020 20:05:05 -0500
From: "amin...@mailbox.org" <amin...@mailbox.org>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] 1=2
Message-ID: <20201215010505.GA18292@painter.painter>
Content-Type: text/plain; charset=us-ascii

It's the same in do-blocks:

main :: IO ()
main = do
   let 3 = 2 + 2
   putStrLn "Oh fiddlesticks"

On Mon, Dec 14, 2020 at 12:14:53PM -0500, M Douglas McIlroy wrote:
> ghc and ghci 8.6.5 accept 1=2 at top level. It seems to have no effect.
> What does it mean?
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


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

Message: 3
Date: Tue, 15 Dec 2020 02:29:12 +0100
From: Francesco Ariis <fa...@ariis.it>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] 1=2
Message-ID: <20201215012912.GA24885@extensa>
Content-Type: text/plain; charset=utf-8

Il 14 dicembre 2020 alle 20:05 amin...@mailbox.org ha scritto:
> It's the same in do-blocks:
> 
> main :: IO ()
> main = do
>    let 3 = 2 + 2
>    putStrLn "Oh fiddlesticks"

What happens exactly when I type this?

    λ> "prova" = "foo"
    λ> 'c' = 'd'
    λ> 'c'
    'c'

>From the Report I read:

    lexp  → let decls in exp
    decls → { decl1 ; … ; decln }       (n ≥ 0)
    ⁝
    decl  → (funlhs | pat) rhs
    ⁝

Am I correct in saying `pat rhs` is the rule being used here? I do not
understand how/when it comes useful in a let
—F




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

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


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

End of Beginners Digest, Vol 149, Issue 8
*****************************************

Reply via email to