[GHC] #12782: Type inference shows (Num (a -> a), Num a)
GHC
ghc-devs at haskell.org
Sat Oct 29 18:45:33 UTC 2016
#12782: Type inference shows (Num (a -> a), Num a)
-------------------------------------+-------------------------------------
Reporter: ciupakabra | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
(Type checker) |
Keywords: | Operating System: Linux
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Defining f and g as:
> f x = x + 1
> g x y = x + y
Entering
:t f . g
gives:
f . g :: (Num (a -> a), Num a) => a -> a -> a
Formally, it is correct, since Num (a -> a) is never going to be a number.
Though me and my tutor thought it might be a bug, and f . g shouldn't be
recognised as a well-formed expression.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12782>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list