有没有一种简单的方法可以阻止GHC显示加载/链接的包?

时间:2014-05-28 09:34:51

标签: haskell ghc verbosity

这对任何人来说都很熟悉吗?

[1 of 1] Compiling Main             ( Main.hs, Main.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package old-locale-1.0.0.6 ... linking ... done.
Loading package time-1.4.2 ... linking ... done.
Loading package containers-0.5.5.1 ... linking ... done.
Loading package bytestring-0.10.4.0 ... linking ... done.
Loading package text-1.1.0.1 ... linking ... done.
Loading package path-pieces-0.1.3.1 ... linking ... done.
Loading package pretty-1.1.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package primitive-0.5.2.1 ... linking ... done.
Loading package vector-0.10.9.1 ... linking ... done.
Loading package yesod-routes-1.2.0.6 ... linking ... done.
Loading package old-time-1.1.0.2 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Loading package unix-2.7.0.1 ... linking ... done.
Loading package directory-1.2.1.0 ... linking ... done.
Loading package process-1.2.0.0 ... linking ... done.
Loading package hashable-1.2.1.0 ... linking ... done.
Loading package scientific-0.2.0.2 ... linking ... done.
Loading package attoparsec-0.11.2.1 ... linking ... done.
Loading package dlist-0.7.0.1 ... linking ... done.
Loading package mtl-2.1.3.1 ... linking ... done.
Loading package syb-0.4.1 ... linking ... done.
Loading package unordered-containers-0.2.4.0 ... linking ... done.
Loading package aeson-0.7.0.3 ... linking ... done.
Loading package exceptions-0.5 ... linking ... done.
Loading package base-unicode-symbols-0.2.2.4 ... linking ... done.
Loading package transformers-base-0.4.1 ... linking ... done.
Loading package monad-control-0.3.2.3 ... linking ... done.
Loading package lifted-base-0.2.2.1 ... linking ... done.
Loading package mmorph-1.0.2 ... linking ... done.
Loading package resourcet-1.1.2 ... linking ... done.
Loading package nats-0.1.3 ... linking ... done.
Loading package semigroups-0.13.0.1 ... linking ... done.
Loading package void-0.6.1 ... linking ... done.
Loading package conduit-1.1.1 ... linking ... done.
Loading package attoparsec-conduit-1.1.0 ... linking ... done.
Loading package blaze-builder-0.3.3.2 ... linking ... done.
Loading package blaze-markup-0.6.1.0 ... linking ... done.
Loading package blaze-html-0.7.0.1 ... linking ... done.
Loading package case-insensitive-1.2.0.0 ... linking ... done.
Loading package cereal-0.4.0.1 ... linking ... done.
Loading package base64-bytestring-1.0.0.1 ... linking ... done.
Loading package byteable-0.1.1 ... linking ... done.
Loading package securemem-0.1.3 ... linking ... done.
Loading package crypto-cipher-types-0.0.9 ... linking ... done.
Loading package cipher-aes-0.2.7 ... linking ... done.
Loading package crypto-random-0.0.7 ... linking ... done.
Loading package random-1.0.1.1 ... linking ... done.
Loading package cprng-aes-0.5.2 ... linking ... done.
Loading package entropy-0.2.2.4 ... linking ... done.
Loading package tagged-0.7.2 ... linking ... done.
Loading package crypto-api-0.13 ... linking ... done.
Loading package skein-1.0.9 ... linking ... done.
Loading package clientsession-0.9.0.3 ... linking ... done.
Loading package parsec-3.1.5 ... linking ... done.
Loading package network-2.5.0.0 ... linking ... done.
Loading package zlib-0.5.4.1 ... linking ... done.
Loading package streaming-commons-0.1.2 ... linking ... done.
Loading package conduit-extra-1.1.0.2 ... linking ... done.
Loading package data-default-class-0.0.1 ... linking ... done.
Loading package data-default-instances-base-0.0.1 ... linking ... done.
Loading package data-default-instances-containers-0.0.1 ... linking ... done.
Loading package data-default-instances-dlist-0.0.1 ... linking ... done.
Loading package data-default-instances-old-locale-0.0.1 ... linking ... done.
Loading package data-default-0.5.3 ... linking ... done.
Loading package cookie-0.4.1.1 ... linking ... done.
Loading package fast-logger-2.1.5 ... linking ... done.
Loading package system-filepath-0.4.10 ... linking ... done.
Loading package system-fileio-0.3.12 ... linking ... done.
Loading package shakespeare-2.0.0.3 ... linking ... done.
Loading package hamlet-1.2.0 ... linking ... done.
Loading package http-types-0.8.4 ... linking ... done.
Loading package monad-loops-0.4.2 ... linking ... done.
Loading package stm-2.4.3 ... linking ... done.
Loading package stm-chans-3.0.0.2 ... linking ... done.
Loading package monad-logger-0.3.6 ... linking ... done.
Loading package safe-0.3.4 ... linking ... done.
Loading package shakespeare-css-1.1.0 ... linking ... done.
Loading package shakespeare-i18n-1.1.0 ... linking ... done.
Loading package shakespeare-js-1.3.0 ... linking ... done.
Loading package unix-compat-0.4.1.1 ... linking ... done.
Loading package vault-0.3.0.3 ... linking ... done.
Loading package wai-2.1.0.2 ... linking ... done.
Loading package ansi-terminal-0.6.1.1 ... linking ... done.
Loading package blaze-builder-conduit-1.1.0 ... linking ... done.
Loading package stringsearch-0.3.6.5 ... linking ... done.
Loading package byteorder-1.0.4 ... linking ... done.
Loading package unix-time-0.2.2 ... linking ... done.
Loading package wai-logger-2.1.1 ... linking ... done.
Loading package word8-0.0.4 ... linking ... done.
Loading package zlib-conduit-1.1.0 ... linking ... done.
Loading package wai-extra-2.1.1.1 ... linking ... done.
Loading package http-date-0.0.4 ... linking ... done.
Loading package network-conduit-1.1.0 ... linking ... done.
Loading package simple-sendfile-0.2.14 ... linking ... done.
Loading package warp-2.1.5 ... linking ... done.
Loading package yesod-core-1.2.15 ... linking ... done.
Linking bin/Main ...

只有很多行只用于包装,这通常几乎没有兴趣。如果我传递-v0详细程度标志,GHC将不会打印此文件,但它也不会打印太多其他内容,那么...是否有办法关闭(或缩短)包列表加载,没有改变别的什么?最好是ghcghci

2 个答案:

答案 0 :(得分:5)

控制此方法的唯一方法是通过-v0标志,正如您所注意到的那样,它也使其对其他消息保持安静。

答案 1 :(得分:0)

GHC 7.10及更高版本不再显示"Loading package foo ... linking ... done."行,请参阅https://ghc.haskell.org/trac/ghc/ticket/7863。 使用ghci -v2将其取回。