I'm writing a generic interpreter in Haskell but I have a problem with the definition of the environment.
data Variable a = Variable {
name :: String,
vtype :: String,
value :: a -- Rather than value :: Int
}
After the definition of the Variable structure, I need to define the status of the program (environment) that is simply a List of Variable. If I write
type Env = [Variable]
I had the following problem:
generic_interpreter.hs:11:13: error: * Expecting one more argument to
Variable' Expected a type, butVariable' has kind* -> *' * In the type[Variable]' In the type declaration for `Env' 11 | type Env = [Variable]
Can you help me? Thanks in advance.