Trying to define `zeroMatrix` - General

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Bolt

How can I define something like this?

zeroMatrix :: forall e n m . (KnownDimensions n m, ValidDimensions n m, Zero e) => Matrix e n m
Bolt
zeroMatrix :: forall e n m . (KnownDimensions n m, ValidDimensions n m, Zero e) => Matrix e n m
zeroMatrix = let c = natVal (Proxy :: Proxy n)
                 r = natVal (Proxy :: Proxy m)
                 in go c r
  where
      go 1 1 = One zero
      go _ _ = _

I'm trying with this.. but without success

Bolt

this sucks, I messed up and cannot delete the messages :frown: