diff --git a/Compiler/Hoopl/Dataflow.hs b/Compiler/Hoopl/Dataflow.hs
--- a/Compiler/Hoopl/Dataflow.hs
+++ b/Compiler/Hoopl/Dataflow.hs
@@ -56,7 +56,7 @@
 -}
 
 module Compiler.Hoopl.Dataflow 
-  ( DataflowLattice(..)
+  ( DataflowLattice(..), JoinFun, OldFact(..), NewFact(..)
   , ChangeFlag(..), changeIf
   , FwdPass(..),  FwdTransfer, FwdRewrite, SimpleFwdRewrite
   , noFwdRewrite, thenFwdRw, shallowFwdRw, deepFwdRw
@@ -78,14 +78,18 @@
 --		DataflowLattice
 -----------------------------------------------------------------------------
 
-data DataflowLattice a = DataflowLattice  { 
-  fact_name       :: String,                   -- Documentation
-  fact_bot        :: a,                        -- Lattice bottom element
-  fact_extend     :: a -> a -> (ChangeFlag,a), -- Lattice join plus change flag
-                                               -- (changes iff result > first arg)
-  fact_do_logging :: Bool                      -- log changes
-}
+data DataflowLattice a = DataflowLattice  
+ { fact_name       :: String          -- Documentation
+ , fact_bot        :: a               -- Lattice bottom element
+ , fact_extend     :: JoinFun a       -- Lattice join plus change flag
+                                      -- (changes iff result > old fact)
+ , fact_do_logging :: Bool            -- log changes
+ }
 
+type JoinFun a = OldFact a -> NewFact a -> (ChangeFlag, a)
+newtype OldFact a = OldFact a
+newtype NewFact a = NewFact a
+
 data ChangeFlag = NoChange | SomeChange
 changeIf :: Bool -> ChangeFlag
 changeIf changed = if changed then SomeChange else NoChange
@@ -349,7 +353,7 @@
     (cha2, res_fact) 
        = case lookupFact fbase lbl of
            Nothing -> (SomeChange, new_fact)  -- Note [Unreachable blocks]
-           Just old_fact -> fact_extend lat new_fact old_fact
+           Just old_fact -> fact_extend lat (OldFact old_fact) (NewFact new_fact)
     new_fbase = extendFactBase fbase lbl res_fact
 
 fixpoint :: forall n f. Edges n
diff --git a/hoopl.cabal b/hoopl.cabal
--- a/hoopl.cabal
+++ b/hoopl.cabal
@@ -1,5 +1,5 @@
 Name:                hoopl
-Version:             3.7.3.4
+Version:             3.7.3.5
 Description:         Higher-order optimization library
 License:             BSD3
 License-file:        LICENSE
@@ -8,7 +8,7 @@
 Build-Type:          Simple
 Cabal-Version:       >=1.2
 Synopsis:            A library to support dataflow analysis and optimization
-Category:            Compilers/Interpeters
+Category:            Compilers/Interpreters
 Extra-source-files:  README, hoopl.pdf
 
 Library
diff --git a/hoopl.pdf b/hoopl.pdf
Binary files a/hoopl.pdf and b/hoopl.pdf differ
