logo       

RE: :t (#) gives parse error: msg#00071

lang.haskell.glasgow.bugs

Subject: RE: :t (#) gives parse error


> In GHC 6.0.1, using GHCi:
>
> Prelude> let x # f = f x
> Prelude> :t (#)
> <interactive>:1: parse error on input `)'
> Prelude> :t ( #)
> <interactive>:1: parse error on input `#)'
> Prelude> :t (# )
> <interactive>:1: parse error on input `)'
> Prelude> :t ( # )
> ( # ) :: forall t t1. t1 -> (t1 -> t) -> t
> Prelude> zipWith (#) [1] [(+1)]
> <interactive>:1: parse error on input `)'
> Prelude> zipWith ( # ) [1] [(+1)]
> [2]
> Prelude>

This is because '(#' and '#)' have special meanings when -fglasgow-exts
is on: they are the brackets of an unboxed tuple, eg. (# x, y #).

Either add spaces, or turn off -fglasgow-exts.

Cheers,
Simon


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise