currently, i do stuff like
class Array marr rank el | marr -> rank where
read :: Shape rank Int -> marr (PrimState m) el -> m el
...
to pun naming, but fundeps have a less systematic theory/support in core ghc, and I'm told that compile (well type checking particularly) times can be dramatically improved by a moving to type families.
Should consider migrating to
class Array marr el where
type Ix marr :: Nat
-- might define Ix type family out of band of the class
-- so i can pun it between arrays and formats
read :: (rnk ~ Ix marr) => Shape rank Int -> marr (PrimState m) el -> m el
need to see how more complex algorithms wind up looking wrt types, and balancing usability/complexity
currently, i do stuff like
to pun naming, but fundeps have a less systematic theory/support in core ghc, and I'm told that compile (well type checking particularly) times can be dramatically improved by a moving to type families.
Should consider migrating to
need to see how more complex algorithms wind up looking wrt types, and balancing usability/complexity