[GHC] #14084: Strange behavior of GHC by writing the types in GHCi
GHC
ghc-devs at haskell.org
Thu Aug 3 12:33:58 UTC 2017
#14084: Strange behavior of GHC by writing the types in GHCi
-------------------------------------+-------------------------------------
Reporter: vanto | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 8.0.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect result
Unknown/Multiple | at runtime
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
* A: you type {{{:set +t}}} then you write {{{1:2}}}, the answer is:\\
{{{
Prelude> :set +t
}}}
{{{
Prelude> 1:2
<interactive>:8:1: error:
* Non type-variable argument in the constraint: Num [a]
(Use FlexibleContexts to permit this)
* When checking the inferred type
it :: forall a. (Num [a], Num a) => [a]
}}}
\\
* B: you type {{{:t 1:2}}}, the answer is:\\
{{{
Prelude> :t 1:2
1:2 :: (Num [a], Num a) => [a]
}}}
\\
There is an obvious bug. Don't answer me that this behavior is correct,
please!
The two answers should be the same.
Either answer A or answer B.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14084>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list