GHC明确要求所有人

时间:2018-08-13 21:20:21

标签: haskell ghc

语言扩展名#!/bin/sh while read oldrev newrev ref do # only checking out the master (or whatever branch you would like to deploy) if [[ $ref = refs/heads/master ]]; then echo "Master ref received. Deploying master branch to production..." git --work-tree=/home/mywebsite/public_html --git- dir=/home/mywebsite/gitrepo/mywebsite.git checkout -f master else if [[ $ref = refs/heads/dev ]]; then echo "Development ref received. Deploying dev branch to staging..." git --work-tree=/home/mywebsite/dev_public_html --git-dir=/home/mywebsite/gitrepo/mywebsite.git checkout -f dev else echo "Ref $ref successfully received. Doing nothing: only the master branch may be deployed on this server." fi fi done 使得可以但不必将类型变量与ExplicitForall绑定。

例如,以下程序会编译

forall

但是,下面的程序也没有编译{-# LANGUAGE ExplicitForAll #-} -- cps1.hs -- non-cps definition of add add :: Int -> Int -> Int add x y = x + y -- cps definition of add add_cps :: forall r . Int -> Int -> (Int -> r) -> r add_cps x y k = k (add x y) 的明确量词。

r

是否存在某种语言扩展或编译器标志的组合,它们会使第二个程序无法编译?

1 个答案:

答案 0 :(得分:2)

不,GHC当前没有工具。