projekty
/
fp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c291e22
)
fno-warn unused do bindings
author
Tomas Musil
<tomik.musil@gmail.com>
Sun, 9 Nov 2014 01:40:51 +0000
(
02:40
+0100)
committer
Tomas Musil
<tomik.musil@gmail.com>
Sun, 9 Nov 2014 01:40:51 +0000
(
02:40
+0100)
Lambda.hs
patch
|
blob
|
history
diff --git
a/Lambda.hs
b/Lambda.hs
index
578c00f
..
5165bb8
100644
(file)
--- a/
Lambda.hs
+++ b/
Lambda.hs
@@
-1,3
+1,5
@@
+{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
+
module Lambda where
import Data.Text as T
@@
-54,6
+56,7
@@
rename :: Term -> Term
rename (Lambda x t) = Lambda n (substitute x (Var n) t)
where n = rnm x
rnm v = if (v ++ "r") `isFreeIn` t then rnm (v ++ "r") else v ++ "r"
+rename _ = error "TODO vymyslet reprezentaci, kde pujde udelat fce, ktera bere jen Lambdy"
substitute :: VarName -> Term -> Term -> Term
substitute a b (Var x) = if x == a then b else Var x