Ticket #2534 (closed bug: fixed)
Odd probable cause given by type checker
| Reported by: | heatsink | Owned by: | simonpj |
|---|---|---|---|
| Priority: | lowest | Milestone: | 7.6.1 |
| Component: | Compiler (Type checker) | Version: | 6.8.2 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | typecheck/should_fail/T2534 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
In the following code, a function has been applied to zero arguments, which the type checker suggests is too many.
Prelude> foldr (>>=) [] []
<interactive>:1:6:
Occurs check: cannot construct the infinite type: b = a -> b
Probable cause: `>>=' is applied to too many arguments
In the first argument of `foldr', namely `(>>=)'
In the expression: foldr (>>=) [] []
Change History
Note: See
TracTickets for help on using
tickets.
