[Haskell-cafe] Question of defining Type Class

Shinichi Higashino shin1aok at gmail.com
Tue May 22 15:58:21 UTC 2018


Sorry, I found it.


> On May 23, 2018, at 0:50, Shinichi Higashino <shin1aok at gmail.com> wrote:
> 
> I am confusing since I am trying to define 
> Abstract sense of Matrix;
> 
> class Mat 
> 
> - is a more abstract concept since 1x1 Matrix is isomorphic to Num 
> - is a more abstract concept since 1xn Matrix is isomorphic to Vector 
> 
> So,
> 
> class Mat a => Num a where …
> class Mat a => Vec a where …
> 
> should be .
> 
> However, I know that the Initial object of Ring Category is Integer .
> So, I should start with Z and then I should define 
> 
> class ( Module R on Z ) 
> 
> But I could not find that kind of definition in Haskell.
> Is it Data.Ring ?
> 
> I am so confusing now…
> Please help me if you are drinking some tea just now!



More information about the Haskell-Cafe mailing list