Climbing grades representation and conversion
Conversions are based in two tables
Generic Boulder grade. Sum type of all supported grades
Generic Route grade. Sum type of all supported grades
American V-grades system
Fontainebleau system
French system for grading routes
American Decimal system for grading routes
Brazilian system for grading routes
Required as the first argument of may functions in order to specify the desired grading system.
Render Bouldering grade in destT format.
The boolean argument tells if the final grade should be simplified or not in the final rendering.
Parse string representing grade
parseGrade vv "V10/11" ==> Just (Grade 10 HalfwayNext)Parse string representing grade.
If parsing fails, return the default base/zero grade. This should never be used to handle user input.
parse_ vv "V10/11" ==> Grade 10 HalfwayNextTry to read string in the src format.
Alias to fromGrade vv
Convert to the floating point universal scale
This is useful to convert to different grading systems or saving in a database.
font =
grade
|> Font.toLinearScale
|> Hueco.fromLinearScaleConvert from the floating point universal scale
For bouldering, the floating point scale is based in the American
Hueco/Vermin system. i.e. fromLinearScale 10.0 refers to V10,
which is 7c+ in Fontainbleau scale.
Remove modifiers from grade
parseGrade_ vv "V10+"
|> simplify vv
==> Grade 10 BaseThe lowest grade in the scale
Different scales may start from different levels
Compare two grades
This can be used in sorting algorithms like List.sortWith
Collect methods for a GradeT pseudo-typeclass