From 92777ed539be13a39d34b0b79f9bded4b490425f Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 27 May 2011 10:07:27 +0900 Subject: [PATCH] Using stringCI. Suggested by eagletmt. --- Cabal.hs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/Cabal.hs b/Cabal.hs index 1cfd268..38def92 100644 --- a/Cabal.hs +++ b/Cabal.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE OverloadedStrings #-} module Cabal (initializeGHC) where import Control.Applicative hiding (many) @@ -46,21 +47,7 @@ findTarget = Just <$> hs_source_dirs hs_source_dirs :: Parser [String] hs_source_dirs = do - satisfy $ inClass "hH" - satisfy $ inClass "sS" - char '-' - satisfy $ inClass "sS" - satisfy $ inClass "oO" - satisfy $ inClass "uU" - satisfy $ inClass "rR" - satisfy $ inClass "cC" - satisfy $ inClass "eE" - char '-' - satisfy $ inClass "dD" - satisfy $ inClass "iI" - satisfy $ inClass "rR" - satisfy $ inClass "sS" - char ':' + stringCI "hs-source-dirs:" many (char ' ') sepBy1 (many . satisfy $ notInClass " ,\n") (many1 . satisfy $ inClass " ,")