fork download
  1. object Main extends App {
  2. type ¬[A] = A => Nothing
  3. type[T, U] = ¬[¬[T] with ¬[U]]
  4. type ¬¬[A] = ¬[¬[A]]
  5. type |∨|[T, U] = { type λ[X] = ¬¬[X] <:< (T ∨ U) }
  6.  
  7. def dashboardStat[LabelT: (scala.xml.Elem |∨| String)#λ,
  8. ValueT: (scala.xml.Elem |∨| String)#λ]
  9. (target: String, label: LabelT, value: ValueT, icon: String) =
  10. <a href={target}>
  11. <div class="visual">
  12. <i class={s"fa fa-$target"}></i>
  13. </div>
  14. <div class="details">
  15. <span class="content">{label}</span>
  16. <span class="value">{value}</span>
  17. </div>
  18. <i class="fa fa-play-circle more"></i>
  19. </a>
  20.  
  21. println(dashboardStat("/", <strong>Hello, world!</strong>, 200.00, "money"))
  22. }
  23.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/opt/scala/bin/scalac: line 50: /dev/null: Permission denied
Main.scala:21: error: Cannot prove that (Double => Nothing) => Nothing <:< scala.xml.Elem => Nothing with String => Nothing => Nothing.
  println(dashboardStat("/", <strong>Hello, world!</strong>, 200.00, "money"))
                       ^
one error found
spoj: The program compiled successfully, but Main.class was not found.
      Class Main should contain method: def main(args: Array[String]).
stdout
Standard output is empty