[GHC] #10772: Type operator variable in prefix notation fails
GHC
ghc-devs at haskell.org
Thu Aug 13 07:29:34 UTC 2015
#10772: Type operator variable in prefix notation fails
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
(Parser) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Description changed by nomeata:
Old description:
> Hi,
>
> I’m not sure if this is me misreading the documentation at
> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/data-
> type-extensions.html#infix-tycons (in which case maybe the wording can be
> improved) or an actual bug. But I would have expected this code
>
> {{{
> foo :: [(*)] -> Maybe (*)
> foo _ = Nothing
> }}}
>
> to be equivalent to
>
> {{{
> foo :: [(*)] -> Maybe (*)
> foo _ = Nothing
> }}}
>
> at least with `-XNoTypeOperators`. But independent of that flag, with GHC
> HEAD and 7.8, I get
> {{{
> /tmp/foo.hs:1:9: error: Not in scope: type constructor or class ‘*’
> }}}
New description:
Hi,
I’m not sure if this is me misreading the documentation at
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/data-type-
extensions.html#infix-tycons (in which case maybe the wording can be
improved) or an actual bug. But I would have expected this code
{{{
foo :: [(*)] -> Maybe (*)
foo _ = Nothing
}}}
to be equivalent to
{{{
foo :: [a] -> Maybe a
foo _ = Nothing
}}}
at least with `-XNoTypeOperators`. But independent of that flag, with GHC
HEAD and 7.8, I get
{{{
/tmp/foo.hs:1:9: error: Not in scope: type constructor or class ‘*’
}}}
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10772#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list