[from now] 2012/12/13 18:27:26

diff --git a/Sandbox/TTerm.hs b/Sandbox/TTerm.hs
index 22bae03..2b795d5 100644
--- a/Sandbox/TTerm.hs
+++ b/Sandbox/TTerm.hs
@@ -12,13 +12,13 @@ import Control.Monad.Free
 import Control.Monad.Fix
 import Data.Monoid

-data St v c t = Abst t
+data St v c t = Abst (St v c t)
               | App t (St v c t)
               | Var v
               | Val c

 instance Functor (St v c) where
-  fmap f (Abst t) = Abst (f t)
+  fmap f (Abst st) = Abst (fmap f st)
   fmap f (App t st) = App (f t) (fmap f st)
   fmap f (Var v)  = Var v
   fmap f (Val c)  = Val c
@@ -44,14 +44,12 @@ type StF v c = Free (St v c) (St v c)
 quote :: Index v => v -> StF v c -> StF v c
 quote qv (Abst tm)     = Abst (quote (outer qv) tm)
 quote qv (App arg fun) = App (quote qv arg) (quote qv fun)
-quote qv (Var v)       =
-  Var ( if (qv == v ) then outer v else v)
+quote qv (Var v)       = Var ( if (qv == v ) then outer v else v)
 quote qv other         = other

 subst :: Index v => v -> StF v c -> StF v c -> StT v c
 subst sv tm (Abst fm)     = Abst (subst (outer sv) (quote origin tm) fm)
 subst sv tm (App arg fun) = App (subst sv tm arg) (subst sv tm fun)
-subst sv tm (Var v)       =
-  if (sv == v ) then tm else Var v
+subst sv tm (Var v)       = if (sv == v ) then tm else Var v
 subst sv _  other         = other
pdf
test