minor changes

This commit is contained in:
Yann Esposito (Yogsototh) 2019-09-08 15:01:49 +02:00
parent d3e03799d2
commit 8954403bcb
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
3 changed files with 11 additions and 11 deletions

3
.gitignore vendored
View file

@ -1,5 +1,4 @@
/tutorial.md
/.stack-work/
.stack-work/
.lish-history
*.tix
stack.yaml.lock

View file

@ -85,8 +85,8 @@ _reduceLambda (Atom x) = do
Just s -> return s
_ -> case InternalCommands.lookup x of
Just cmd -> return (Internal cmd)
_ -> return (Str x)
_reduceLambda x = return x
_ -> return (Str x)
_reduceLambda x = return x
reduceLambda :: SExp -> StateT Env IO SExp
reduceLambda x = do

View file

@ -27,13 +27,14 @@ import GHC.IO.Handle (Handle)
import GHC.Show (Show (..))
import Protolude hiding (show,repr)
data ExprF a = Atom Text
| Num Integer
| Bool Bool
| Str Text
| List [a]
| Lambda [a]
| Void
-- | Type representing an expression
data ExprF a = Atom Text -- ^ an atom is just a variable name
| Num Integer -- ^ a number
| Bool Bool -- ^ a boolean
| Str Text -- ^ a string
| List [a] -- ^ a list
| Lambda [a] -- ^ a function (lambda expression)
| Void -- ^ an empty value
-- only exists during evaluation
| Internal InternalCommand
| Fn { params :: [Text]