[GHC] #11220: Stack overflow instead of type check failure in Servant route

GHC ghc-devs at haskell.org
Mon Dec 14 14:59:26 UTC 2015


#11220: Stack overflow instead of type check failure in Servant route
-------------------------------------+-------------------------------------
        Reporter:  sopvop            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.0.1
       Component:  Compiler (Type    |              Version:  7.10.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 On GHC 8.0 this fails with,
 {{{
 $ ghc Hi.hs
 [1 of 1] Compiling SmAssetMan.Routes ( Hi.hs, Hi.o )

 Hi.hs:40:22: error:
     • Reduction stack overflow; size = 201
       When simplifying the following type:
         Servant.Utils.Links.And
           (Servant.Utils.Links.IsSubList '[HALJSON] '[])
           (Servant.Utils.Links.IsSubList '[] '[])
       Use -freduction-depth=0 to disable this check
       (any upper bound you could choose might fail unpredictably with
        minor updates to GHC, so disabling the check is recommended if
        you're sure that type checking should terminate)
     • In the expression:
         safeLink
           apiP
           (Proxy ::
              Proxy ("projects"
                     :>
                     (Capture "project_id" ProjectId :> ("variants" :> Get
 Mimes ()))))
       In an equation for ‘variantsByProjectL’:
           variantsByProjectL
             = safeLink
                 apiP
                 (Proxy ::
                    Proxy ("projects"
                           :>
                           (Capture "project_id" ProjectId :> ("variants"
 :> Get Mimes ()))))
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11220#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list