[GHC] #9913: Discrepancy in type synonym definition and usage
GHC
ghc-devs at haskell.org
Sat Dec 20 14:47:10 UTC 2014
#9913: Discrepancy in type synonym definition and usage
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: new
Priority: lowest | Milestone:
Component: Compiler (Parser) | Version: 7.8.3
Keywords: | Operating System:
Architecture: x86 | Unknown/Multiple
Difficulty: Unknown | Type of failure: GHC
Blocked By: | rejects valid program
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Minor consistency issue, the following compiles fine (note parentheses):
{{{#!hs
type Alg f a = f a -> a
initial :: Alg(f) a
initial = undefined
}}}
But changing the definition to mirror its use:
{{{#!hs
type Alg(f) a = f a -> a
initial :: Alg(f) a
initial = undefined
}}}
and it fails with:
{{{#!hs
Unexpected type ‘f’
In the type declaration for ‘Alg’
A type declaration should have form
type Alg a b c = ...
Failed, modules loaded: none.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9913>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list