chessai / eigen

Haskell bindings to the Eigen C++ library
Other
16 stars 6 forks source link

Totality #7

Closed chessai closed 5 years ago

chessai commented 6 years ago

Lots of functions in this module are not total. I plan to use refined to make them total.

Another thing, the Matrix types are totally unsafe. Basically, I think Matrix should look like this:

data Matrix :: Nat -> Nat -> Type -> Type where Matrix :: !(Vector (C a)) -> a

C is a closed injective type family that maps Haskell types to their C counterparts. In other words,

a ~ Complex ===> C a ~ CComplex, etc.