callGraph' f (TELet ty id exprty params expr body)      = do
  let paramData = paramsAsData params
  let localDef = Local id f paramData
  let exprEnv = addData paramData . addControlPoint localDef
  exprGraph <- local exprEnv $ callGraph' localDef expr
  exprSize <- local exprEnv $ sizeOf' f expr
  case exprGraph of
    [] -> case params of
            Just _ -> 
              let env = addData [(id, DataPos $ Deferred expr)] .
                        addControlPoint localDef
              in local env $ callGraph' f body
            Nothing ->
              let env = addData [(id, DataPos exprSize)]
              in local env $ callGraph' f body
    eg -> do
      bodyGraph <- local (addControlPoint localDef) $ callGraph' f body
      return $ eg ++ bodyGraph
callGraph' f (TELet ty id exprty params expr body)      = do
  let paramData = paramsAsData params
  let localDef = Local id f paramData
  let exprEnv = addData paramData . addControlPoint localDef
  exprGraph <- local exprEnv $ callGraph' localDef expr
  exprSize <- local exprEnv $ sizeOf' f expr
  case exprGraph of
    [] -> case params of
            Just _ -> 
              let env = addData [(id, DataPos $ Deferred expr)] .
                        addControlPoint localDef
              in local env $ callGraph' f body
            Nothing ->
              let env = addData [(id, DataPos exprSize)]
              in local env $ callGraph' f body
    eg -> do
      bodyGraph <- local (addControlPoint localDef) $ callGraph' f body
      return $ eg ++ bodyGraph
callGraph' f (TELet ty id exprty params expr body)      = do
  let paramData = paramsAsData params
  let localDef = Local id f paramData
  let exprEnv = addData paramData . addControlPoint localDef
  exprGraph <- local exprEnv $ callGraph' localDef expr
  exprSize <- local exprEnv $ sizeOf' f expr
  case exprGraph of
    [] -> case params of
            Just _ -> 
              let env = addData [(id, DataPos $ Deferred expr)] .
                        addControlPoint localDef
              in local env $ callGraph' f body
            Nothing ->
              let env = addData [(id, DataPos exprSize)]
              in local env $ callGraph' f body
    eg -> do
      bodyGraph <- local (addControlPoint localDef) $ callGraph' f body
      return $ eg ++ bodyGraph