Ticket #1221 (closed bug: wontfix)
Types don't match expressions in type error
| Reported by: | igloo | Owned by: | simonpj |
|---|---|---|---|
| Priority: | low | Milestone: | _|_ |
| Component: | Compiler (Type checker) | Version: | 6.6 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | tcfail178 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
Frederik Eaton points out in the thread starting http://www.haskell.org/pipermail/glasgow-haskell-bugs/2007-March/008748.html that with this program:
a x = x True ++ [1] -- ok b = a (const [2]) -- uninformative error message c = a y -- more informative d = a () y = const ()
in the type error, for b the type doesn't match the expression: y has type a -> () but it claims to have infered () for it:
v.hs:8:6:
Couldn't match expected type `[a]' against inferred type `()'
In the first argument of `a', namely `y'
In the expression: a y
In the definition of `c': c = a y
(this example should be made into a testcase once we know what the error will look like).
Change History
Note: See
TracTickets for help on using
tickets.
