{-
genMakefile :: Name -> String 
genMakefile name = 
    "TARGET := " ++ name ++  "\nCOMMON_PATH := $(CUDA_SDK_PATH)/common\n\n\
    \LIBPATHS := -L$(CUDA_INSTALL_PATH)/lib -L$(COMMON_PATH)/lib -L$(CUDA_\
    \SDK_PATH)/lib\nINCPATHS := -I$(CUDA_INSTALL_PATH)/include -I$(COMMON_\
    \PATH)/inc\nLIBRARIES := -lcuda -lGL -lGLU\n\nLIBRARIESEMU :\
    \=-lGL -lGLU\n\nNVCC := nvcc \n\nall: $(TARGET)\n$(TARGET): \
    \$(TARGET).cu\n\t$(NVCC) -o $(TARGET) $(TARGET).cu $(INCPATHS) $(LIBPA\
    \THS) $(LIBRARIES)\n\nemulation: $(TARGET).cu\n\t$(NVCC) -deviceemu -o\
    \ $(TARGET) $(TARGET).cu $(INCPATHS) $(LIBPATHS) $(LIBRARIESEMU)\n\ncl\
    \ean:\n\trm $(TARGET)\n"
-}


-- -----------------------------------------------------------------------------
-- EXPERIMENT
-- -----------------------------------------------------------------------------
-- EXPERIMENT 
-- -----------------------------------------------------------------------------
  
executep :: (Input (Exp a) , 
             Input (Exp b) , 
             Output (Exp c),
             Output (Exp d), 
             Sources' (GArr (Exp a)),
             Sources' (GArr (Exp b))) => 
           ExecMode -> 
               (GArr (Exp a,Exp b) -> GPU (GArr (Exp c,Exp d))) -> 
                   [(Exp a,Exp b)] -> IO [(Exp c,Exp d)] 
executep _ _ []   = return []
executep :: (Input (Exp a) , 
             Input (Exp b) , 
             Output (Exp c),
             Output (Exp d), 
             Sources' (GArr (Exp a)),
             Sources' (GArr (Exp b))) => 
           ExecMode -> 
               (GArr (Exp a,Exp b) -> GPU (GArr (Exp c,Exp d))) -> 
                   [(Exp a,Exp b)] -> IO [(Exp c,Exp d)]
executep _ _ []   = return []
executep _ _ []   = return []