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.)
--