[Haskell-beginners] Parse error: naked expression at top level
Brandon Allbery
allbery.b at gmail.com
Wed Jul 20 17:47:51 CEST 2011
On Wed, Jul 20, 2011 at 11:30, Roelof Wobben <rwobben at hotmail.com> wrote:
> replicate :: Int -> a -> [a]
> replicate a xs = [xs | x' <= a <--xs]
>
> replicate 3 True
>
That last line is fine at a GHCi prompt but not in a program. (Files loaded
by ghci are not scripts! They are treated the same way as program files fed
to ghc or runhaskell.)
--
brandon s allbery allbery.b at gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110720/86a1a2cc/attachment.htm>
More information about the Beginners
mailing list