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

2010-05-09 Thread Jacques Carette

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.html

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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-05-07 Thread Neil Mitchell
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 leone...@gmail.com wrote:
 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

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-05-07 Thread Ivan Lazar Miljenovic
Neil Mitchell ndmitch...@gmail.com 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

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-05-07 Thread Mike Dillon
begin Ivan Lazar Miljenovic quotation:
 Neil Mitchell ndmitch...@gmail.com 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.html

The other link I found redirected to a page that didn't mention Derive™
at all.

-md
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-05-06 Thread Ben Millwood
On Thu, May 6, 2010 at 4:05 AM, Ivan Miljenovic
ivan.miljeno...@gmail.com wrote:
 Re-CC'ing -cafe:

 On 6 May 2010 12:54, Leonel Fonseca leone...@gmail.com 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 :)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-05-05 Thread Leonel Fonseca
Hi everybody,

Is it reasonable to add deriving Typeable to newtype Q?

In case you wonder why I want to do that, it is because I've constructed a Q
[Dec] inside a monad, I want to extract  it from the monad (via runIO) and
the monad has constraint Typeable over this parameter.

I've also tried to write the Typeable instance in my own module (not
Language.Haskell.TH.Syntax). But I've got no luck since the Q type
constructor is exported but the data constructor is not.

Thanks.
--
Leonel Fonseca.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-05-05 Thread Ivan Miljenovic
On 6 May 2010 02:17, Leonel Fonseca leone...@gmail.com wrote:
 Is it reasonable to add deriving Typeable to newtype Q?

With GeneralizedNewtypeDeriving you mean?  If so, then I don't see why
it would be a problem.

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2010-05-05 Thread Ivan Miljenovic
Re-CC'ing -cafe:

On 6 May 2010 12:54, Leonel Fonseca leone...@gmail.com 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) .

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.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe