Ticket #4008 (closed bug: invalid)
type error trying to specialize polymorphic function
| Reported by: | nr | Owned by: | simonpj |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0.1 |
| Component: | Compiler (Type checker) | Version: | 6.12.1 |
| Keywords: | Cc: | dias@… | |
| Operating System: | Linux | Architecture: | x86 |
| Type of failure: | GHC rejects valid program | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
The attached module won't compile---definition of 'wrap' is rejected. The error message is
[ 1 of 13] Compiling Pain ( Pain.hs, Pain.o )
Pain.hs:18:7:
Couldn't match expected type `n C O' against inferred type `C'
Expected type: ExTriple (Counter n)
Inferred type: ExTriple (->)
In the expression: scalar
In the definition of `wrap': wrap = scalar
The inferred type is alarming, and in any case the type of wrap is a straightforward specialization of the type of scalar.
Could the problem be with liberal type synonyms? I don't think we're doing anything unreasonable...
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

