[GHC] #11753: Type hole(?) causes compiler failure
GHC
ghc-devs at haskell.org
Fri Mar 25 11:34:28 UTC 2016
#11753: Type hole(?) causes compiler failure
-------------------------------------+-------------------------------------
Reporter: akfp | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: duplicate | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: Compile-time | (amd64)
crash | Test Case:
Blocked By: | Blocking:
Related Tickets: #11059 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by mpickering):
I have managed to test it now and it is indeed fixed.
{{{
[1 of 1] Compiling Servant.Files ( test.hs, test.o )
test.hs:62:20: error:
• Found type wildcard ‘_’
standing for ‘Network.Wai.Internal.Request
-> IO
(RouteResult ((([Param], [File (Storage b)]) ->
IO r) -> IO r))’
Where: ‘r’ is a rigid type variable bound by
the inferred type of
bodyCheck :: Network.Wai.Internal.Request
-> IO
(RouteResult ((([Param], [File (Storage
b)]) -> IO r) -> IO r))
at test.hs:63:7
‘b’ is a rigid type variable bound by
the instance declaration at test.hs:54:10
To use the inferred type, enable PartialTypeSignatures
• In the type signature:
bodyCheck :: _
In an equation for ‘route’:
route Proxy config subserver
= WithRequest
$ \ request
-> route
(Proxy :: Proxy sublayout)
config
(addBodyCheck subserver (bodyCheck request))
where
bodyCheck :: _
bodyCheck request
= return
$ Route (\ f -> withBackend (Proxy :: Proxy b) $ \ pb
-> ...)
In the instance declaration for
‘HasServer (Files b :> sublayout) config’
• Relevant bindings include
bodyCheck :: Network.Wai.Internal.Request
-> IO
(RouteResult ((([Param], [File (Storage b)]) ->
IO r) -> IO r))
(bound at test.hs:63:7)
subserver :: Delayed (Server (Files b :> sublayout))
(bound at test.hs:59:22)
config :: Config config (bound at test.hs:59:15)
route :: Proxy (Files b :> sublayout)
-> Config config
-> Delayed (Server (Files b :> sublayout))
-> Router
(bound at test.hs:59:3)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11753#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list