[GHC] #12648: Stack overflow when using monad-unlift
GHC
ghc-devs at haskell.org
Fri Sep 30 20:09:17 UTC 2016
#12648: Stack overflow when using monad-unlift
-------------------------------------+-------------------------------------
Reporter: nh2 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
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:
-------------------------------------+-------------------------------------
I found that with the following simple program I could make runghc/ghci
crash with `*** Exception: stack overflow`:
{{{
#!/usr/bin/env stack
-- stack --resolver lts-7.1 --install-ghc runghc --package monad-
unlift-0.2.0
{-# LANGUAGE FlexibleContexts #-}
import Control.Monad.Trans.Unlift
f :: (MonadBaseUnlift m IO) => m a
f = do
_ <- askUnliftBase
return ()
}}}
I'm not super sure if that's OK. Probably not; even if it does trigger an
undecideable case, shouldn't ghc tell me about it instead of just
crashing?
The `monad-unlift` code used is here: https://github.com/fpco/monad-
unlift/blob/adb7869adccc66247cbb1a6175277802e9c098e1/monad-
unlift/Control/Monad/Trans/Unlift.hs
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12648>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list