Custom Query (7482 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (1 - 3 of 7482)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#8360 duplicate panic! (the 'impossible' happened): ... kindFunResult 2piix
Description

I got an 'impossible' error on GHCi 7.6.3 after trying to evaluate a type for a Yesod value:

*Yesod.Import> :t handlerToWidget
handlerToWidget :: Monad m => HandlerT site m a -> WidgetT site m a
*Yesod.Import> :t generateFormPost
generateFormPost
  :: (RenderMessage (HandlerSite m) FormMessage, MonadHandler m) =>
     (blaze-markup-0.5.1.5:Text.Blaze.Internal.Markup
      -> MForm m (FormResult a, xml))
     -> m (xml, Enctype)
*Yesod.Import> :t lift
lift :: (Monad m, MonadTrans t) => m a -> t m a
*Yesod.Import> :t handlerToWidget . generateFormPost . lift

<interactive>:1:38:ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.3 for x86_64-unknown-linux):
	kindFunResult
<<details unavailable>>

Reporting since GHC asked so nicely. :)

#8470 fixed "Fix" spurious Unused do-bind warnings 2piix
Description

I've been writing a lot of monadic code with side effects, and I'm getting a lot of unused do-bind warnings.

In particular, consider the contrived example:

performSideEffect :: IO ()
preformSideEffect = return ()

someComplicatedIOAction :: a -> IO ()
someComplicatedIOAction a = do
   a <- getA
   performSideEffect
   putStrLn . show $ a

The call to performSideEffect triggers the unused do-bind warning.

I can appreciate that we're not binding result of performSideEffect, but we know, by virtue of the type () being a singleton, that there is nothing we can do with the the result. So it "really" doesn't make sense to pull anything out of the action. Fixing the warning with _ <- performSideEffect just adds noise.

Would it be possible to turn off the warning in the case that the monad action returns (), or maybe even other singleton types? I'm guessing the latter is harder, and I'd be happy to settle for just (). I don't know enough about GHC's internals to evaluate how hard either would be, though.

I know about -fno-warn-unused-do-bind, but it is inconvenient to use in a project that uses -Wall in the Cabal file, which a fairly popular web application framework uses. Even still, catching the legitimate unused do-binds while eliminating these spurious ones would be a nice, noise-lowering addition.

#9656 invalid Process and thread init/deinit hooks for C libraries 3noch
Description

Haskell's FFI for C seems geared toward C as an optimization. But in many cases, we use the C FFI merely hook into a 3rd-party library. In this case, the FFI seems a bit lacking. In my specific case, I want to link against libmysqlclient_r to perform MySQL queries. However, the library requires global init and deinit. Worse, it requires init/deinit for *each* thread that wishes to interact with its API. This type of thing is not entirely uncommon among C libraries. Of course, we can bend over backward to inter-operate with such libraries (e.g. wrap the C API with our own versions that ensure proper initialization), but the process is painstaking and often requires decent performance overhead.

I would like to request some sort of hook registration where the FFI can be used to accomplish these common tasks. Perhaps it's too difficult, but it doesn't hurt to ask!

1 2 3 4 5 6 7 8 9 10 11
Note: See TracQuery for help on using queries.