Well, I guess you might be interested in geometric algebra then
http://dl.acm.org/citation.cfm?id=1173728
because Geometric Algebra is a quite more principled way of doing
component-free calculations. See also the web page of the author
http://staff.science.uva.nl/~fontijne/
Thanks Oleg,
I have discovered geometric algebra some months ago. There is a textbook on
the topic:
http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470941634.html
It seems very interesting, but I have not currently the time to make a
detailed comparison with vector/tensor algebra. Moreover
o...@okmij.org wrote:
I'm late to this discussion and must have missed the motivation for
it. Specifically, how is your goal, vector/tensor operations that are
statically assured well-dimensioned differs from general
well-dimensioned linear algebra, for which several solutions have been
I'm late to this discussion and must have missed the motivation for
it. Specifically, how is your goal, vector/tensor operations that are
statically assured well-dimensioned differs from general
well-dimensioned linear algebra, for which several solutions have been
already offered. For example,
Richard Eisenberg wrote:
without ScopedTypeVariables, the n that you would put on your annotation
is totally unrelated to the n in the instance header, but this is benign
becau
se GHC can infer the type anyway. With ScopedTypeVariables, the `n`s are
the same, which luckily agrees with
Hi all,
Following a discussion on Haskell-Cafe, Richard E. made the following
proposition of a Singleton to make a correspondance between type-level
integers and value-level integers:
data SNat :: Nat - * where
SZero :: SNat 'Zero
SSucc :: SNat n - SNat ('Succ n)
(found at [1], and
Hi TP,
Here is slightly edited code that works:
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- type level integers
data Nat = Zero | Succ Nat
deriving ( Show, Eq, Ord )
I'm hoping that gets you moving again and seeing this helps you piece it
all together.
Thanks a lot Richard,
It helped me a lot to move forward. No doubt your answer will be very useful
for people looking for information on internet.
- I changed the syntax of creating proxies. Instead of
More good questions.
On Jun 9, 2013, at 10:20 PM, TP wrote:
In fact the extension ScopedTypeVariables is not needed to make your version
work. However, if I extend a bit your version like that:
snip
So I don't understand why ScopedTypeVariables is needed in one case and not
in the