Re: ghc search paths (like CPATH for gcc)
Simon Marlow wrote: > On 19/10/2009 05:17, Misha Aizatulin wrote: >> Hello, >> >>is there a mechanism for ghc similar to setting the CPATH variable for >> gcc? I'd like ghc to look in the given list of paths every time it >> compiles something, without me having to retype the flags. >> >>For ghci there is .ghci, but it gets ignored when I run ghc. > > We don't have anything like that right now. Please submit a feature > request: Done: http://hackage.haskell.org/trac/ghc/ticket/3619 Misha ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
ghc search paths (like CPATH for gcc)
Hello, is there a mechanism for ghc similar to setting the CPATH variable for gcc? I'd like ghc to look in the given list of paths every time it compiles something, without me having to retype the flags. For ghci there is .ghci, but it gets ignored when I run ghc. Best, Misha ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Dumping context reduction steps
hi, is there some command line switch in GHC that would allow me to see context reduction steps during the compilation? Thanks, Misha ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: [Haskell] Deferred instance declarations (serialization of existential boxes)
Simon Peyton-Jones wrote: > Concerning your application > > | I am having a box like > | > data Box = forall a. Cxt a => Box a > | and want to write a Read instances for it. > > I don’t see how it helps to defer the Read instance. I would defer the instance declaration till the point where I know all types that will ever go into the box (for instance in my Main module). The Show instance of Box would write the representation of a together with it's type (this means Cxt should contain at least Show and Typeable). The Read instance will then contain something like String aType<- lexP result <- case aType of "[Int]" -> (readPrec :: ReadPrec [Int]) >>= (return . Box) "SomeOtherType" -> (readPrec :: ReadPrec SomeOtherType) >>= (return . Box) -- _ -> error (aType ++ " cannot be read inside of Box") Not very elegant of course, but it seems to be the only way to Read existentials. > But I think the case is stronger for top-level constraints, and I will bear > it in mind. > If you would like to open a Trac feature request, please do so. Ok, I will. Cheers, Misha ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users