Skip to content

Type operator variable in prefix notation fails

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 ‘*’
Edited by Joachim Breitner
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information