[Haskell-beginners] Parse error

Brandon Allbery allbery.b at gmail.com
Wed Apr 15 16:23:28 UTC 2015


On Wed, Apr 15, 2015 at 12:21 PM, Shishir Srivastava <
shishir.srivastava at gmail.com> wrote:

> I am trying to run the following from the GHCi command prompt which
> results in parse error.
>

ghci is not ghc, and requires `let`


>
> --------------
> Prelude> :{
> Prelude| foo :: Maybe String
> Prelude| foo = do
> Prelude|     x <- Just 3
> Prelude|     y <- Just "!"
> Prelude|     Just (show x ++ y)
> Prelude| :}
>
> <interactive>:145:5: parse error on input `='
> ---------------
>
> Any help would be appreciated.
>
> Thanks,
> Shishir
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>


-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150415/edc664c1/attachment-0001.html>


More information about the Beginners mailing list