Open cdupont opened 10 years ago
Add a primitive able to interpret code in the Exp GADT:
Inter :: String -> Nomex (Either String (Nomex ()))
When executed, it interprets the given string. If the type is a Nomex ()
, then the corresponding function is returned. Otherwise an error message is given.
Steps 2 done
The idea is to allow the player to interpret himself some strings as a Nomex (). This would allow the rules themselves to read code inputted by the players. Currently the players are inputting the new rules through a dedicated field not controlled by the rules.