[GHC] #13547: Lint error in arrows program
GHC
ghc-devs at haskell.org
Tue Apr 11 02:34:54 UTC 2017
#13547: Lint error in arrows program
-------------------------------------+-------------------------------------
Reporter: cipher1024 | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
(CodeGen) |
Resolution: | Keywords: Arrows
Operating System: Unknown/Multiple | Architecture: x86_64
Type of failure: Compile-time | (amd64)
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: 10158 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
cipher1024, is my understanding of arrows correct in that the arrow
notation you use in `step` would desugar down to something like this?
{{{#!hs
step :: LatexParserA Cell1 r
step = arr (\prxy -> prxy) >>> id >>> arr (\(Cell prxy') -> prxy') >>>
stepList
}}}
If so, the Core Lint error is somewhat understandable, as trying to
typecheck that code simply won't work:
{{{
Bug.hs:25:61: error:
• Couldn't match type ‘rule0’ with ‘a’
because type variable ‘a’ would escape its scope
This (rigid, skolem) type variable is bound by
a pattern with constructor: Cell :: forall a. Proxy a -> Cell1,
in a lambda abstraction
at Bug.hs:25:46-55
Expected type: Proxy rule0
Actual type: Proxy a
• In the expression: prxy'
In the first argument of ‘arr’, namely ‘(\ (Cell prxy') -> prxy')’
In the first argument of ‘(>>>)’, namely
‘arr (\ (Cell prxy') -> prxy')’
• Relevant bindings include
prxy' :: Proxy a (bound at Bug.hs:25:51)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13547#comment:31>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list