freec-unit-tests

Safe HaskellNone
LanguageHaskell2010

FreeC.Test.Environment

Description

This module contains utility functions for tests that have to setup the environment of the converter monad.

Synopsis

Documentation

renameAndAddTestEntry :: EnvEntry -> Converter String Source #

Adds the given entry to the current environment for testing purposes.

Returns the Coq identifier assigned to the entry by the renamer.

defineTestTypeVar :: String -> Converter String Source #

Adds an entry for a type variable to the current environment for testing purposes.

Returns the Coq identifier assigned to the type variable.

defineTestTypeSyn :: String -> [String] -> String -> Converter String Source #

Adds an entry for a type synonym to the current environment for testing purposes.

Returns the Coq identifier assigned to the type synonym.

defineTestTypeCon :: String -> Int -> [String] -> Converter String Source #

Adds an entry for a type constructor to the current environment for testing purposes.

Returns the Coq identifier assigned to the type constructor.

defineTestCon :: String -> Int -> String -> Converter (String, String) Source #

Adds an entry for a data constructor to the current environment for testing purposes.

The argument and return types are parsed from the given string. Returns the Coq identifier assigned to the data constructor.

defineTestVar :: String -> Converter String Source #

Adds an entry for a local variable to the current environment for testing purposes. Returns the Coq identifier assigned to the variable.

defineTestFunc :: String -> Int -> String -> Converter String Source #

Adds an entry for a function to the current environment for testing purposes.

The argument and return types are parsed from the given string. Returns the Coq identifier assigned to the function.

definePartialTestFunc :: String -> Int -> String -> Converter String Source #

Like defineTestFunc but also marks the given function as partial.

Returns the Coq identifier assigned to the function.

defineStrictTestFunc :: String -> [Bool] -> String -> Converter String Source #

Like defineTestFunc but also allows to mark arguments as strict in the second argument.

Returns the Coq identifier assigned to the function.

definePartialStrictTestFunc :: String -> [Bool] -> String -> Converter String Source #

Like defineTestFunc but also allows to mark arguments as strict in the second argument and marks the given function as partial.

Returns the Coq identifier assigned to the function.