When comparing Idris vs Utrecht Haskell Compiler, the Slant community recommends Idris for most people. In the question“What are the best solutions to "The JavaScript Problem"?” Idris is ranked 6th while Utrecht Haskell Compiler is ranked 18th. The most important reason people chose Idris is:
Idris not only has support for type classes, but is a fully dependently typed language, giving you the full power to statically verify your code.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Full dependent types
Idris not only has support for type classes, but is a fully dependently typed language, giving you the full power to statically verify your code.
Pro Domain driven design and type driven development
Because of full dependent types in Idris, the programmer can focus more on modelling the domain with types and waste less time fixing common bugs that the type checker will catch. Dependent types help apply type driven development and a lot of code auto generation, making the compiler and type checker an ally in developing working software instead of just getting in the way.
Pro It's just Haskell
No need to learn any new semantics, it's just a switch to a different compiler.
Pro Flexible FFI
UHC uses a printf-like syntax for its FFI, which is flexible enough to minimize the need for wrapper functions, when, e.g., calling methods on objects. It also supports %*
, for working with functions that take arbitrary parameters, such as concat
.
UHC also has support for wrapper imports and dynamic imports, for passing Haskell functions as callbacks to Javascript, or dealing with curried Javascript functions, respectively.
Cons
Con Not widely used
Con Not widely used
Con Weaker type inference
As type inference is undecidable for dependently-typed languages, Idris cannot offer the full type inference that Haskell supports, and so more type annotations will be needed.
Con Different semantics from Haskell
Idris, while similar to Haskell, has strict semantics, which may cause some confusion if your backend is done in Haskell. If using Idris, it would make sense to do the backend in Idris as well, if not for the fact that Idris currently has fewer libraries available for web development than Haskell.
Con No support for Language Extensions
No support for things like Arrow Syntax - this is particularly a disadvantage when compared to options like Elm (which was designed around good syntax for Arrowized FRP), if you're looking to do Functional Reactive front-end development.