added parser and eval stub
This commit is contained in:
13
src/BC/Types.hs
Normal file
13
src/BC/Types.hs
Normal file
@@ -0,0 +1,13 @@
|
||||
module BC.Types where
|
||||
|
||||
data Value = BInt Integer
|
||||
| BOp String
|
||||
| BErr String
|
||||
instance Show Value where
|
||||
show (BInt i) = show i
|
||||
show (BOp o) = o
|
||||
show (BErr e) = "error: " ++ e
|
||||
|
||||
isErr :: Value -> Bool
|
||||
isErr (BErr _) = True
|
||||
isErr _ = False
|
Reference in New Issue
Block a user