Simple GADTs Question
David Menendez
zednenem at psualum.com
Fri Oct 7 02:01:16 EDT 2005
J. Garrett Morris writes:
> Hello,
>
> I'm attempting to use GADTs for the first time, and I'm running into
> an (I think) odd error. My file includes:
>
> data DFExpr :: * -> *
> where Deriv :: (Num t) => t -> Deriv Int (DFExpr t) (DFExpr t)
I think you want something like this:
Deriv :: Int -> DFExpr t -> DFExpr t -> DFExpr t
Ignorning the other clauses, it's equivalent to
data DFExpr t = Deriv Int (DFExpr t) (DFExpr t)
--
David Menendez <zednenem at psualum.com> | "In this house, we obey the laws
<http://www.eyrie.org/~zednenem> | of thermodynamics!"
More information about the Glasgow-haskell-users
mailing list