diff options
| author | krasimir <krasimir@chalmers.se> | 2010-05-26 09:37:32 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-05-26 09:37:32 +0000 |
| commit | 6eda1118fcc497fda0939f02502569caf8625c7c (patch) | |
| tree | d5c208f79e701e48aa85a2bf08d995f7b28e9619 /src/runtime/haskell/PGF/Binary.hs | |
| parent | b1441f2807a44c63a50382db93f49601550a95a8 (diff) | |
since now we don't do common subexpression elimination for PGF we could simplify the PMCFG generation
Diffstat (limited to 'src/runtime/haskell/PGF/Binary.hs')
| -rw-r--r-- | src/runtime/haskell/PGF/Binary.hs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/runtime/haskell/PGF/Binary.hs b/src/runtime/haskell/PGF/Binary.hs index 241c9cc99..623cbe7bb 100644 --- a/src/runtime/haskell/PGF/Binary.hs +++ b/src/runtime/haskell/PGF/Binary.hs @@ -72,34 +72,6 @@ instance Binary Alternative where put (Alt v x) = put (v,x)
get = liftM2 Alt get get
-instance Binary Term where
- put (R es) = putWord8 0 >> put es
- put (S es) = putWord8 1 >> put es
- put (FV es) = putWord8 2 >> put es
- put (P e v) = putWord8 3 >> put (e,v)
- put (W e v) = putWord8 4 >> put (e,v)
- put (C i ) = putWord8 5 >> put i
- put (TM i ) = putWord8 6 >> put i
- put (F f) = putWord8 7 >> put f
- put (V i) = putWord8 8 >> put i
- put (K (KS s)) = putWord8 9 >> put s
- put (K (KP d vs)) = putWord8 10 >> put (d,vs)
-
- get = do tag <- getWord8
- case tag of
- 0 -> liftM R get
- 1 -> liftM S get
- 2 -> liftM FV get
- 3 -> liftM2 P get get
- 4 -> liftM2 W get get
- 5 -> liftM C get
- 6 -> liftM TM get
- 7 -> liftM F get
- 8 -> liftM V get
- 9 -> liftM (K . KS) get
- 10 -> liftM2 (\d vs -> K (KP d vs)) get get
- _ -> decodingError
-
instance Binary Expr where
put (EAbs b x exp) = putWord8 0 >> put (b,x,exp)
put (EApp e1 e2) = putWord8 1 >> put (e1,e2)
|
