- we know that the addition (+) operator is defined for that type.
- \CLaSH's built-in numerical types are also instances of the \hs{Num}
- class, so we can use the addition operator (and thus the \hs{sum}
- function) with \hs{Signed} as well as with \hs{Unsigned}.
-
- In \CLaSH, parametric polymorphism is completely supported. Any function
- defined can have any number of unconstrained type parameters. The \CLaSH\
- compiler will infer the type of every such argument depending on how the
- function is applied. There is however one constraint: the top level
- function that is being translated can not have any polymorphic arguments.
- The arguments can not be polymorphic as the function is never applied and
- consequently there is no way to determine the actual types for the type
- parameters.
-
- \CLaSH\ does \emph{currently} not support\emph{ user-defined} type
- classes, but does use some of the standard Haskell type classes for its
- built-in function, such as: \hs{Num} for numerical operations, \hs{Eq} for
- the equality operators, and \hs{Ord} for the comparison/order operators.
+ the compiler knows that the addition (+) operator is defined for that
+ type.
+ % \CLaSH's built-in numerical types are also instances of the \hs{Num}
+ % class.
+ % so we can use the addition operator (and thus the \hs{sum}
+ % function) with \hs{Signed} as well as with \hs{Unsigned}.
+
+ \CLaSH\ supports both parametric polymorphism and ad-hoc polymorphism. Any
+ function defined can have any number of unconstrained type parameters. A
+ developer can also specify his own type classes and corresponding
+ instances. The \CLaSH\ compiler will infer the type of every polymorphic
+ argument depending on how the function is applied. There is however one
+ constraint: the top level function that is being translated can not have
+ any polymorphic arguments. The arguments of the top-level can not be
+ polymorphic as the function is never applied and consequently there is no
+ way to determine the actual types for the type parameters.
+
+ With regard to the built-in types, it should be noted that members of
+ some of the standard Haskell type classes are supported as built-in
+ functions. These include: the numerial operators of \hs{Num}, the equality
+ operators of \hs{Eq}, and the comparison/order operators of \hs{Ord}.