
#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