
Hi there, I've written the following program putchr = putChar ?d main = do { c <- getChar ; putchr with ?d = c} which I try to compile with ghc --make -fimplicit-params myprogram However I keep getting the following error: myprogram.hs:5:17: parse error on input `=' What's wrong? E.

try sticking a semicolon in there for good measure, sometimes ghc gets
confused
On 5/15/07, Eric
Hi there,
I've written the following program
putchr = putChar ?d
main = do { c <- getChar ; putchr with ?d = c}
which I try to compile with
ghc --make -fimplicit-params myprogram
However I keep getting the following error:
myprogram.hs:5:17: parse error on input `='
What's wrong?
E.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Eric
Hi there,
I've written the following program
putchr = putChar ?d
main = do { c <- getChar ; putchr with ?d = c}
I think you're supposed to use a let binding, like this: putchr :: (?d::Char) => IO () putchr = putChar ?d main = do c <- getChar let ?d = c putchr Best, -- Grzegorz
participants (3)
-
Dan Mead
-
Eric
-
Grzegorz