1

everything is in the title, but here is some context information:

I am working on a domain specific language to express commonly-found safety design patterns in cyberphysical systems which involve component replication and cross-checking/voting.

At the moment the language is an external DSL, in the family of dataflow languages. Components can have multiple inputs and outputs, subcomponents, a little bit like in chisel, except that base types are not restricted to scala's builtin value types, and can be any user defined type.

I'd like to leverage Scala's type system and shapeless so that patterns can be expressed once and instanciated and typechecked on components with varying number and types of inputs and outputs, the patterns essentially replicate components N times (that N being lifted to type level) and then consolidate the multiple redundant outputs using various voting algorithms.

However I'm having a hard time figuring out the design rationale behind shapeless, there seems to be a systematic use of "Aux" type constructors which I don't grasp at the moment,

Any help on shapeless would be greatly appreciated,

Regards,

/Rémi

remi
  • 566
  • 3
  • 13
  • This blogpost sheds some light on why "Aux" is needed. http://typelevel.org/blog/2015/07/19/forget-refinement-aux.html – Jasper-M Jan 11 '16 at 14:23
  • You can also take a look at [this question](http://stackoverflow.com/questions/34544660/why-is-the-aux-technique-required-for-type-level-computations) about the `Aux` alias. – Peter Neyens Jan 11 '16 at 18:28

0 Answers0