亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? output.hs

?? Haskell是一種程序語言。特別的
?? HS
字號:
-----------------------------------------------------------------------------
-- |
-- Module      :  Output
-- Copyright   :  Thomas Hallgren and Malcolm Wallace
-- 
-- Maintainer  :  Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>
-- Stability   :  Stable
-- Portability :  All
--
-- Constructs the commands for each steps in building (compile, link,
-- & clean).  Each are parameterized by echo :: Bool which indicates
-- whether or not to echo the command to the terminal.
-----------------------------------------------------------------------------

module Output(qCompile,qLink,qCleano,qCleanhi) where

import ListUtil -- (lconcatMap)
import FileName
import List (intersperse)
import Argv
import PreProcessor
import Config
import RunAndReadStdout (basename)

type Graph t t1 t2 t3 = [(String, ((t, String, t1, t2, t3), [String]))]

-- | Given a boolean to indicate whether or not to echo this command to
--   the terminal, construct the command.
doEcho :: Bool -- ^ echo the command before executing it?
       -> String -> String
doEcho True cmd = "echo \"" ++ cmd ++ "\"\n" ++ cmd ++ "\n"
doEcho False cmd = cmd ++ "\n"

oFile,hiFile,hatFile :: DecodedArgs -> String -> String -> String
oFile opts path fmodule =
    let tmod = if hat opts then ("Hat/"++) else id
    in fixFile opts (maybe path id (goalDir opts)) (tmod fmodule) (oSuffix opts)
hiFile opts path fmodule =
       fixFile opts (maybe path id (hiDir opts)) fmodule (hiSuffix opts)
--iFile opts path fmodule =
--       fixFile opts path fmodule ("pp.hs")
hatFile opts path fmodule  =
       fixFile opts path ("Hat/"++fmodule) ("hs")
hatHiFile opts path fmodule  =
       fixFile opts path ("Hat/"++fmodule) (hiSuffix opts)
hxFile opts path fmodule  =
       fixFile opts path fmodule ("hx")

cleanModuleName (Program file)    = file
cleanModuleName (Object file suf) = file

-- | Construct a command for the /clean/ step (rm -f .o files)
qCleano :: DecodedArgs
        -> Bool
        -> Graph a b c d
        -> Goal
        -> String
qCleano  opts echo graph mod =
  let allfiles = close graph [] [cleanModuleName mod]
  in doEcho echo ("rm -f" ++
         concatMap (\(d,f)-> ' ': oFile opts d f) allfiles)

-- | Construct a command for the /realclean/ step (rm -f hi, hat, and hx files)
qCleanhi :: DecodedArgs -- ^ /opts/
         -> Bool        -- ^ Should we echo this command as we run it?
         -> Graph a b c d
         -> Goal        -- ^ /mod/
         -> String
qCleanhi opts echo graph mod =
  let allfiles = close graph [] [cleanModuleName mod]
  in if hat opts then
         doEcho echo ("rm -f" ++
             concatMap (\(d,f)-> ' ': hatHiFile opts d f) allfiles) ++
         doEcho echo ("rm -f" ++
             concatMap (\(d,f)-> ' ': hatFile opts d f) allfiles) ++
         doEcho echo ("rm -f" ++
             concatMap (\(d,f)-> ' ': hxFile opts d f) allfiles)
     else
         doEcho echo ("rm -f" ++
             concatMap (\(d,f)-> ' ': hiFile opts d f) allfiles)

-- | Construct the command for the /compile/ commands, depends upon
--   which compiler we're using, whether we're using hat, etc.
qCompile :: DecodedArgs
         -> Bool
         -> ([(String, String)],
             (String, String, String, Bool, PreProcessor))
         -> String
qCompile opts echo (dep,(p,m,srcfile,cpp,pp)) =
  test dep (preprocess++hattrans++compilecmd)
 where
  -- srcfile -(preprocess)-> pfile -(hattrans)-> hfile -(compile)-> ofile
  ofile = oFile opts p m
  pfile
    | null (ppExecutableName pp) = srcfile
    | otherwise = fixFile opts p m "hs"
  hfile
    | hat opts  = hatFile opts p m
    | otherwise = pfile
  preprocess
    | null (ppExecutableName pp) = ""
    | otherwise = doEcho echo $
                  ppExecutableName pp++" "
                    ++concat (intersperse " " (ppDefaultOptions pp opts
                                               ++[ppOutputFileOption pp pfile]
                                               ++[srcfile]))
  hattrans
    | hat opts && cpp =
            doEcho echo ("gcc -E -traditional -x c "++pfile
                        ++concatMap doD (defs opts ++ zdefs opts)
                        ++" -o /tmp/"++basename pfile)
            ++ doEcho echo ("hat-trans $HATFLAGS -P. /tmp/"++basename pfile
				++" "++pfile)
            ++ doEcho echo ("rm /tmp/"++basename pfile)
         -- ++ doEcho echo ("mv "++hatFile opts "/tmp" m++" "++hfile)
         -- ++ doEcho echo ("mv "++hxFile opts "/tmp" m++" "++hxFile opts p m)
    | hat opts && not cpp = doEcho echo $
                            "hat-trans $HATFLAGS "++pfile
    | otherwise = ""
  compilecmd = doEcho echo $
    hc ++ "-c " ++ cppcmd
    ++ (if hat opts then "-package hat " else " ")
    ++ (if (dflag opts) then "-d "++maybe "." id (goalDir opts)++" "
                        else "-o "++ofile++" ")
    ++ hfile

  hc | isUnix opts = compilerPath (compiler opts)
                     ++" "++unwords (extraCompilerFlags (compiler opts))
                     ++" ${HFLAGS} "
     | otherwise   = compilerPath (compiler opts)
                     ++" "++unwords (extraCompilerFlags (compiler opts))
  cppcmd = if cpp then "-cpp"++concatMap doD (defs opts)++" " else ""
  doD s = " -D"++s

  test []  comp = comp
  test dep comp
    | isUnix opts = "if [ `$OLDER " ++ ofile
                    ++ lconcatMap (\(d,p) -> ' ':hiFile opts p d) dep
                    ++"` = 1 ]\nthen\n"
                    ++ comp
                    ++ "\nfi\n"
    | otherwise = "older " ++ ofile
                           ++ lconcatMap (\(d,p) -> ' ':hiFile opts p d) dep
                   ++ "\nset Nhc$ReturnCode <Sys$ReturnCode>\n"
                   ++ "IF <Nhc$ReturnCode> THEN " ++ comp


-- | Construct the command for the /link/ step in building.
qLink :: DecodedArgs
      -> Bool
      -> Graph a b c d
      -> Goal
      -> String
qLink opts echo graph (Object  file suf) = ""
qLink opts echo graph (Program file)     =
  cmd
 where
  goal = maybe "" id (goalDir opts)
  tmod = if hat opts then ("Hat/"++) else id
  mkOfile path f = if (dflag opts) then
                        fixFile opts ""   (tmod f) (oSuffix opts)
                   else fixFile opts path (tmod f) (oSuffix opts)
  objfiles = close graph [] [file]
  hatflag = if hat opts then "-package hat " else ""
  hc | isUnix opts = compilerPath (compiler opts)++" ${HFLAGS} "
     | otherwise   = compilerPath (compiler opts)
  cmd | isUnix opts =
	  let objs =  lconcatMap (\(d,f) -> ' ':mkOfile d f) objfiles in
          if null goal then
	    let objs =  lconcatMap (\(d,f) -> ' ':mkOfile d f) objfiles in
	    "if [ `$OLDER "++file++" "++objs++"` = 1 ]\nthen\n"
	     ++ doEcho echo (hc++hatflag++" -o "++file++objs++" ${LDFLAGS}")
	     ++ "fi\n"
          else
	    let objs = lconcatMap (\(d,f) -> ' ':
                                      fixFile opts "" (tmod f) (oSuffix opts))
                                  objfiles in
	    "if ( cd "++goal++" && [ `$OLDER "
             ++     file ++ " "++objs++"` = 1 ] )\nthen\n"
	     ++ doEcho echo ("cd "++goal++" && "++hc++hatflag++" -o "
                             ++file++objs++" ${LDFLAGS}")
	     ++ "fi\n"
      | otherwise =
          if length objfiles > 3 then
             "exfile <Wimp$ScrapDir>.nhcmk_via STOP\n"
              ++ lconcatMap (\(d,f) ->
                             ' ': fixFile opts (if null d then goal else d)
                                          f (oSuffix opts)
                                ++ "\n")
                             objfiles
              ++ "STOP\n"
              ++ "nhc98 " ++ " -o " ++ file
              ++ " -via <Wimp$ScrapDir>.nhcmk_via\n"
          else
             "nhc98 " ++ " -o " ++ file
              ++ lconcatMap (\(d,f) ->
                             ' ': fixFile opts (if null d then goal else d)
                                          f (oSuffix opts))
                            objfiles
              ++ "\n"



-- Could be more polymorphic
-- close :: forall b a t3 t2 t1 t.
--          (Eq b) =>
--          [(b, ((t, a, t1, t2, t3), [b]))] -> [(a, b)] -> [b] -> [(a, b)]
close :: Graph a b c d
      -> [(String, String)]
      -> [String]
      -> [(String, String)]
close graph acc []      = acc
close graph acc (f:fs)  =
    if any ((f==).snd) acc then
      close graph acc fs
    else
      case assocDef graph (error "Use?") f of
        ((tps,d,s,_,_),new) -> 
          close graph ((d,f):acc) (fs ++ new)


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久网站| 亚洲国产日韩在线一区模特| 色综合久久99| 国产一区二区三区免费观看| 亚洲综合免费观看高清完整版 | 国产精品99久久久久久似苏梦涵| 18成人在线观看| 久久精品亚洲乱码伦伦中文| 欧美亚洲国产怡红院影院| 国产精一区二区三区| 天天综合网 天天综合色| 国产精品不卡一区| 久久一区二区三区四区| 欧美精品日日鲁夜夜添| 91香蕉视频污在线| 粉嫩久久99精品久久久久久夜| 免费一级片91| 日韩中文字幕av电影| 一区二区在线看| 中文字幕一区二区三区乱码在线| 久久亚洲欧美国产精品乐播| 7777精品伊人久久久大香线蕉完整版 | 亚洲一级不卡视频| 国产精品久久久久久久裸模| 久久亚洲综合av| 日韩欧美国产系列| 欧美一区二区在线免费播放| 欧美午夜理伦三级在线观看| 色婷婷综合久久久中文一区二区| 国产盗摄视频一区二区三区| 国产一区二区三区四区在线观看| 蜜桃久久久久久久| 免费人成在线不卡| 日韩国产高清在线| 免费在线观看一区二区三区| 欧美bbbbb| 久久成人精品无人区| 久久99热这里只有精品| 久久精品国产一区二区| 久久99精品视频| 国产一区啦啦啦在线观看| 国产精品18久久久久久vr| 国产盗摄一区二区| 北岛玲一区二区三区四区| 99精品在线免费| 在线日韩av片| 在线播放亚洲一区| 日韩精品中午字幕| 26uuu欧美日本| 国产精品国产三级国产普通话三级 | 午夜精品123| 日韩不卡一区二区三区 | 丰满亚洲少妇av| av电影在线观看一区| 91在线码无精品| 欧美精品乱码久久久久久按摩| 欧美一区二区三区思思人| 精品国产91久久久久久久妲己| 国产亚洲综合性久久久影院| 中文字幕+乱码+中文字幕一区| 亚洲天堂免费看| 亚洲成人你懂的| 精品一区二区三区影院在线午夜| 国产成人精品三级麻豆| jlzzjlzz亚洲女人18| 91免费视频网| 91精品啪在线观看国产60岁| 久久综合色天天久久综合图片| 国产人成亚洲第一网站在线播放| 亚洲欧美综合另类在线卡通| 亚洲国产精品影院| 精品亚洲国内自在自线福利| 成人黄色小视频| 欧美日韩国产小视频在线观看| 精品久久久久久久久久久院品网| 欧美国产成人精品| 亚洲成a人v欧美综合天堂下载 | 五月天亚洲精品| 国产曰批免费观看久久久| 色综合视频在线观看| 91精品国产免费| 国产精品久久久久9999吃药| 日韩精品色哟哟| 不卡av在线免费观看| 91精品国产综合久久福利软件| 亚洲国产高清aⅴ视频| 香蕉久久夜色精品国产使用方法| 国产精品一区二区在线观看不卡 | 国产99久久久国产精品免费看| 91电影在线观看| 久久久久久99精品| 亚洲一区二区欧美日韩| 国产成人激情av| 欧美日韩成人综合| ●精品国产综合乱码久久久久| 美女网站在线免费欧美精品| 色婷婷亚洲综合| 国产欧美一区二区精品性色超碰 | 国产精品一区二区在线看| 欧美色成人综合| 国产精品理论片在线观看| 美洲天堂一区二卡三卡四卡视频| 99re热这里只有精品免费视频| 欧美xxxxxxxx| 午夜精品爽啪视频| 一本久道中文字幕精品亚洲嫩| 久久夜色精品国产欧美乱极品| 午夜a成v人精品| 欧美日韩中文另类| 国产精品国产三级国产aⅴ无密码| 精品一区二区三区香蕉蜜桃| 欧美日本在线播放| 亚洲激情六月丁香| 99久久亚洲一区二区三区青草| 欧美成va人片在线观看| 午夜精品福利视频网站| 欧美亚洲一区三区| 亚洲精品视频在线看| 国产成人99久久亚洲综合精品| 精品奇米国产一区二区三区| 日韩成人一区二区三区在线观看| 色香色香欲天天天影视综合网| 日韩一区在线看| 99久久伊人久久99| 国产精品国产a| 成人午夜伦理影院| 中文在线一区二区| 成人小视频免费观看| 中文文精品字幕一区二区| 国产美女精品人人做人人爽| 久久免费国产精品| 国产电影精品久久禁18| 国产午夜精品一区二区三区四区| 加勒比av一区二区| 久久综合av免费| 国产传媒日韩欧美成人| 国产拍揄自揄精品视频麻豆| 国产呦萝稀缺另类资源| 久久久久88色偷偷免费| 国产精品综合av一区二区国产馆| 久久久91精品国产一区二区精品| 国产乱国产乱300精品| 日本一区二区高清| www.日韩av| 亚洲一区影音先锋| 777奇米成人网| 黄色精品一二区| 亚洲国产精品v| 91丨国产丨九色丨pron| 亚洲美女区一区| 欧美丰满高潮xxxx喷水动漫 | 色乱码一区二区三区88| 亚洲成人激情综合网| 91精品国产乱| 国产麻豆午夜三级精品| 国产精品日韩成人| 在线精品视频一区二区三四| 午夜精品久久久久久久久| 日韩欧美激情四射| a级精品国产片在线观看| 亚洲一本大道在线| 日韩欧美亚洲国产精品字幕久久久| 国内外成人在线| 亚洲欧美日韩在线播放| 欧美片网站yy| 国产麻豆视频精品| 亚洲精品国产精华液| 欧美一区二区视频观看视频| 国产成人午夜高潮毛片| 亚洲午夜久久久久久久久久久| 91精品国产91综合久久蜜臀| 国产电影一区在线| 亚洲123区在线观看| 久久婷婷国产综合精品青草| 99国产精品99久久久久久| 日韩av成人高清| **网站欧美大片在线观看| 欧美嫩在线观看| 波多野结衣欧美| 免费在线观看成人| 亚洲老妇xxxxxx| 久久久久亚洲蜜桃| 欧美三级电影在线观看| 成人午夜免费视频| 日本午夜一区二区| 曰韩精品一区二区| 久久精子c满五个校花| 欧美日韩免费视频| 成av人片一区二区| 激情综合网av| 视频一区二区三区入口| 国产精品久久久久久久久晋中 | 一区二区三区蜜桃| 久久久久久黄色| 91精品国产91久久久久久最新毛片 | 国产综合色视频| 亚洲电影在线播放| 国产精品国产自产拍高清av| 精品国产一区久久| 欧美老人xxxx18|