[GHC] #13118: let binding tuple of lenses error not an expression

#13118: let binding tuple of lenses error not an expression -------------------------------------+------------------------------------- Reporter: codygman | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This error seems to be fixed in GHC Head +/- 10 commits, but exists in GHC 8.0.1. I was told it might be a useful test case. {{{ λ> :t userId userId :: (RElem UserId rs (RIndex UserId rs), Functor f) => (Int -> f Int) -> Record rs -> f (Record rs) λ> let recLenses = userId &: Nil λ> :t recLenses recLenses :: (Functor f, RElem UserId rs (RIndex UserId rs)) => Record '[s :-> ((Int -> f Int) -> Record rs -> f (Record rs))] λ> :t recUncons recUncons :: Record (s :-> a : rs) -> (a, Record rs) λ> :t recUncons recLenses recUncons recLenses :: (Functor f, RElem UserId rs (RIndex UserId rs)) => ((Int -> f Int) -> Record rs -> f (Record rs), Record '[]) λ> let (l, ls) = recUncons recLenses <no location info>: error: not an expression: ‘let (l, ls) = recUncons recLenses’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13118 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13118: let binding tuple of lenses error not an expression -------------------------------------+------------------------------------- Reporter: codygman | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Maybe. But what is `userId`? `Nil`? `recUncons`? Without the source of the program you're using, we can't reproduce this! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13118#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13118: let binding tuple of lenses error not an expression -------------------------------------+------------------------------------- Reporter: codygman | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * status: new => infoneeded -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13118#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13118: let binding tuple of lenses error not an expression -------------------------------------+------------------------------------- Reporter: codygman | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: worksforme | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: infoneeded => closed * resolution: => worksforme Comment: Unfortunately, there's not much we can do here, since the original reporter never followed up with the code they were using. Moreover, they claim that this was fixed in GHC HEAD a while back, so I'll optimistically close this. (Do reopen if this still occurs.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13118#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC