Skip to content
  • Martin Wierich's avatar
    fixed fusion bug: The algorithm that derived the type for the specialised function worked like · e014c886
    Martin Wierich authored
    follows: In a first phase bind type variables to their instantiation for all producers. In the
    second phase apply the substitution. This didn't work for consumers that are fused with multiple
    producers, e.g:
      cons :: (a->b) (b->c) a -> c
      prod1 :: Int -> Int
      prod2 :: d->e
    During producer-wise binding a and b were first bound to Int and Int. _Then_ b and c were bound
    to d and e (b was overwritten)
    
    Solution:
    Apply the one substitution for each producer
    e014c886