Elchemy compiler for purposes of experimenting and stretching the boundaries accepts flags.
To pass a flag to a compiler there is a special comment syntax
{- flag flagname:+argument flagname2:+argument2 }
So far there is 4 flag types:
Omits putting the @type
into the compiled output code
Used when you need type checking inside Elchemy ecosystem, without forwarding the definition into the output code.
Example:
{- flag notype:+MyHiddenType -}
type MyHiddenType = Hidden a
Omits entire function definition from the code output. The function @spec
will still be produced.
Example:
{- flag nodef:+myHiddenFunction -}
myHiddenFunction = 1
Omits function spec from the code output Example:
{- flag nospec:+myHiddenFunction -}
myHiddenFunction : Int
Omits function verify macro from the code output. Usable only when using for functions defined as FFI Example:
{- flag nospec:+myHiddenFunction -}
myHiddenFunction : Int