[GHC] #7727: Nonsense evaluation: sequence [] = []

#7727: Nonsense evaluation: sequence [] = [] -----------------------------+---------------------------------------------- Reporter: drb226 | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.2 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- {{{ $ ghci-7.6.2 GHCi, version 7.6.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done.
sequence [] [] :t it it :: [()] sequence [] :: [()]
<interactive>:4:1: Couldn't match type `[a0]' with `()' Expected type: [()] Actual type: [[a0]] In the return type of a call of `sequence' In the expression: sequence [] :: [()] In an equation for `it': it = sequence [] :: [()] }}} Wat. Where on earth did ghci get the idea that {{{ sequence [] = [] }}}? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7727 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7727: Nonsense evaluation: sequence [] = [] ---------------------------------+------------------------------------------ Reporter: drb226 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by igloo): * difficulty: => Unknown * component: Compiler => GHCi Comment: It's doing this: {{{ Prelude> sequence [] :: IO [()] [] }}} We do document this (http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/interactive- evaluation.html) but perhaps we should be clearer about precisely how statements are typechecked and executed at the GHCi prompt. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7727#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7727: Nonsense evaluation: sequence [] = [] ---------------------------------+------------------------------------------ Reporter: drb226 | Owner: igloo Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: GHCi | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by igloo): * owner: => igloo * milestone: => 7.8.1 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7727#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC