Open GoogleCodeExporter opened 9 years ago
a. Could be easily solved of course, but it would effectively negate the
purpose of having both `NumTypeI` and `NumType`.
b. I don't see a solution to this problem either. Neither for the TF, nor for
the FD versions. It isn't really clear to me that it is possible.
I don't follow all the context for the `cmap` type signature, so I can't really
help you attach that problem directly (rather than indirectly via reifyNT).
On the topic of matrices with units, you could take a look at
https://github.com/bjornbm/dimensional-vectors to see if it can help you. I
described it briefly at http://stackoverflow.com/a/5856996/298138. It is a work
in progress and the documentation is far from great, so feel free to ask (on
Github or via email) if you have questions about it.
Sorry for not getting back to you sooner. I was hoping to get back to you
during the weekend but life interfered.
Original comment by bjorn.bu...@gmail.com
on 28 Jan 2014 at 1:41
http://lpaste.net/99176 is an example that does work. It's pretty much
repeating
http://hackage.haskell.org/package/reflection-1.3.2/docs/Data-Reflection.html.
https://github.com/aavogt/DimMat is pretty close to implementing a proper cmap.
I'm not sure I need a reifyNT for that anymore, but it is still a useful
function to have.
Original comment by vogt.a...@gmail.com
on 28 Jan 2014 at 6:20
Regarding http://lpaste.net/99176 type(/kind) level naturals are much easier to
work with. When you add the negative you lose the ability to guarantee
well-formedness of a number through the type alone and need to resort to type
classes. This make a whole lot of things difficult, including your reifyNT
problem.
Thanks for the link to your DimMat. I'll have to take a very close look and try
to understand what you're doing there as it overlaps a lot with what I am
trying (and wanting) to do. Or, rather, would prefer not to have to do myself
to get type safe linear algebra. ;)
In case you didn't poke around e.g.
https://github.com/bjornbm/dimensional-experimental/blob/master/Numeric/Units/Di
mensional/AD.hs and
https://github.com/bjornbm/dimensional-experimental/blob/master/Numeric/Units/Di
mensional/LinearAlgebra/VectorAD.hs might also be mildly interesting since you
are doing things with AD.
I suspect we would be better served taking any further discussion to github,
unless specific to this issue.
Original comment by bjorn.bu...@gmail.com
on 29 Jan 2014 at 11:42
Original issue reported on code.google.com by
vogt.a...@gmail.com
on 23 Jan 2014 at 9:35