Custom Query (6599 matches)
Results (1 - 3 of 6599)
|#8360||duplicate||panic! (the 'impossible' happened): ... kindFunResult||2piix|
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|
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.
|#3124||fixed||warning -F: directory name (/Users/me/Library/Frameworks) does not exist||7stud|
mac osx 10.4.11(intel), ghc 6.8.2 installed from ghc-6.8.2-i386-apple-darwin.tar.bz2
When I try to compile programs, I get this warning:
$ ghc -o simple Main.hs PutJSON.hs SimpleJSON.hs compilation IS NOT required /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning -F: directory name (/Users/autie/Library/Frameworks) does not exist
This is how I installed ghc:
1) I downloaded GMP.framework and GNUreadline.framework, which my mac automatically unzipped and placed on my desktop. I then dragged the resulting two folders into /Library/Frameworks? as per the instructions at:
2) I downloaded ghc-6.8.2-i386-apple-darwin.tar.bz2
3) I unzipped an untared into /Users/me/my_tar_extractions
4) I cd'ed into the newly created ghc-6.8.2 folder.
5) I read the INSTALL document in the ghc-6.8.2 folder.
6) I ran the command:
7) Then I ran the command:
$ sudo make install
8) At the end of the install output, I got a message that said:
------------- Installation of ghc-6.8.2 was successful. To use, add /usr/local/bin to your PATH. Warning: this binary distribution does NOT contain documentation! --------------
9) I appended /usr/local/bin onto the PATH in ~/.bash_profile.
This is what INSTALL from step 5 says:
This is the INSTALL instructions for a binary distribution of GHC. For more details on what on earth this package is up to, please consult the README and ANNOUNCE. This distribution can be installed in a location of your choosing. To set the ball rolling, run the configure script (as usual, run the script with --help to see what options it supports). eg. to set up the package for installing in directory <my-dir>, use ./configure --prefix=<my-dir> The default installation directory is /usr/local. The configure script will figure out what platform you're running on, and a couple of other interesting pieces of trivia, which it will then fill in the Makefile.in template to give you a real Makefile. If you're of a paranoid persuasion, you might want to take a look at this Makefile to see if the information is correct. Now run: make install (`make show-install-setup' prints the details of where the different pieces of the bundle are heading when -- possibly helpful). For more information, full GHC documentation is available from the main GHC site: http://www.haskell.org/ghc Bug reports/suggestions for improvement to the installation procedure/setup (as well as other GHC related troubles you're experiencing, of course), gratefully received. Bug reporting instructions are here: http://www.haskell.org/ghc/reportabug Enjoy, -- The GHC Team.