3.1. Clash as a Language

As Clash reuses parts of the GHC compiler for its front-end, the syntax and semantics should be familiar to Haskell programmers. For people unfamiliar with Haskell, there are many resources to learn the language, such as

Clash does make some use of more advanced features of GHC Haskell, which are exposed by GHC as language extensions. The extensions used by Clash are


Since GHC 8.6, the StarIsType extension is defined. This extension is explicitly turned off by Clash, meaning Data.Kind.Type must be used to refer to Haskell types.

Clash also enables some GHC plugins by default which improve the type inference for type level numbers. The plugins enabled by default are

Users are free to control the language extensions and GHC options with the normal OPTIONS_GHC and LANGUAGE pragmas in source files. For more information, see the GHC User’s Guide.