Re: [Haskell-cafe] Would it be evil to add "deriving Typeable" to newtype Q?

Re-CC'ing -cafe:
On 6 May 2010 12:54, Leonel Fonseca
I wasn't aware of GeneralizedNewtypeDeriving. I just edited the source file Language.Haskell.TH.Syntax and left:
newtype Q a = Q { unQ :: forall m. Quasi m => m a } deriving Typeable
Hang on, is Q something actually in the template-haskell library? In that case, you can't just do "deriving (Typeable)" . However, you might be able to generate the Typeable instance using DrIFT (see http://hackage.haskell.org/package/DrIFT-cabalized for a cabal-install-able package). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Thu, May 6, 2010 at 4:05 AM, Ivan Miljenovic
Re-CC'ing -cafe:
On 6 May 2010 12:54, Leonel Fonseca
wrote: I wasn't aware of GeneralizedNewtypeDeriving. I just edited the source file Language.Haskell.TH.Syntax and left:
newtype Q a = Q { unQ :: forall m. Quasi m => m a } deriving Typeable
Hang on, is Q something actually in the template-haskell library? In that case, you can't just do "deriving (Typeable)" .
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} import Data.Typeable import Language.Haskell.TH deriving instance Typeable1 Q -- Sorted :)

Hey, the hint provided by Ben worked like a charm. I've also tried Ivan suggestions both on my windows and linux installations. DrIFT-cabalized couldn't install at all at windows since I don't use MinGW. So, I ghc'ed --make DrIFT. Both, windows and linux, refused to complete work with this error: drift: can't find module Control/Monad Thank you.
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
import Data.Typeable import Language.Haskell.TH
deriving instance Typeable1 Q
-- Leonel Fonseca.

Hi Leonel,
You might want to try Derive
(http://community.haskell.org/~ndm/derive) if DrIFT doesn't work for
you. They do roughly the same jobs, but Derive has more output formats
(it can be spliced in as Template Haskell, generate #include files,
output text etc) more derivations (but not quite overlapping -
although both have Typeable), and is fully cabal-friendly on all
platforms.
Thanks, Neil
On Thu, May 6, 2010 at 3:42 PM, Leonel Fonseca
Hey, the hint provided by Ben worked like a charm.
I've also tried Ivan suggestions both on my windows and linux installations. DrIFT-cabalized couldn't install at all at windows since I don't use MinGW. So, I ghc'ed --make DrIFT.
Both, windows and linux, refused to complete work with this error: drift: can't find module Control/Monad
Thank you.
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
import Data.Typeable import Language.Haskell.TH
deriving instance Typeable1 Q
--
Leonel Fonseca. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Neil Mitchell
You might want to try Derive (http://community.haskell.org/~ndm/derive) if DrIFT doesn't work for you. They do roughly the same jobs, but Derive has more output formats (it can be spliced in as Template Haskell, generate #include files, output text etc) more derivations (but not quite overlapping - although both have Typeable), and is fully cabal-friendly on all platforms.
I take it you haven't had the legal problems that DrIFT had when it used to be called Derive? http://www.dcs.gla.ac.uk/~nww/Derive/History.html -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

begin Ivan Lazar Miljenovic quotation:
Neil Mitchell
writes: You might want to try Derive (http://community.haskell.org/~ndm/derive) if DrIFT doesn't work for you. They do roughly the same jobs, but Derive has more output formats (it can be spliced in as Template Haskell, generate #include files, output text etc) more derivations (but not quite overlapping - although both have Typeable), and is fully cabal-friendly on all platforms.
I take it you haven't had the legal problems that DrIFT had when it used to be called Derive? http://www.dcs.gla.ac.uk/~nww/Derive/History.html
Looks like derive.com is redirecting to a Texas Instruments site under ti.com, so they likely don't care about this particular trademark anymore since it is no longer maintained as an independent brand. Looks like they stopped selling it in June 2007, at least in the UK: http://education.ti.com/educationportal/sites/UK/productDetail/uk_derive6.ht... The other link I found redirected to a page that didn't mention Derive™ at all. -md

Mike Dillon wrote:
begin Ivan Lazar Miljenovic quotation:
I take it you haven't had the legal problems that DrIFT had when it used to be called Derive? http://www.dcs.gla.ac.uk/~nww/Derive/History.html
Looks like they stopped selling it in June 2007, at least in the UK:
http://education.ti.com/educationportal/sites/UK/productDetail/uk_derive6.ht...
The other link I found redirected to a page that didn't mention Derive™ at all.
I can confirm that Derive, as a commercial product, no longer exists. [This comes from discussions with one of the original developers of Derive, as well as a developer at TI who worked on Derive until TI changed their computer algebra strategy]. Jacques
participants (7)
-
Ben Millwood
-
Ivan Lazar Miljenovic
-
Ivan Miljenovic
-
Jacques Carette
-
Leonel Fonseca
-
Mike Dillon
-
Neil Mitchell