{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} unit sig where signature A where data T instance Show T module M where import A f :: T -> String f x = show x unit mod where module A where type T = String unit join where dependency sig[A=mod:A] dependency mod module S where import M g :: String -> String g x = f (x ++ "a")