packages feed

hscope 0.2 → 0.2.1

raw patch · 6 files changed

+23/−9 lines, 6 files

Files

HScope.hs view
@@ -20,7 +20,8 @@ import Data.Generics.Uniplate.Data (transformBiM) import System.Directory (doesFileExist) import Data.Data-import Language.Preprocessor.Cpphs (runCpphs, defaultCpphsOptions,  CpphsOptions(..))+import Language.Preprocessor.Cpphs (runCpphs, defaultCpphsOptions,  CpphsOptions(..)+            , defaultBoolOptions, BoolOptions(..))  data Flag = Build Bool | File FilePath | Line | Query String                 | CPPInclude String | OExtension String deriving (Show)@@ -126,7 +127,8 @@     where fconts = intercalate "\n" . map cmnt           cmnt ('#':_) = ""           cmnt x = x-          cpphsOpts = defaultCpphsOptions { includes = idirs }+          cpphsOpts = defaultCpphsOptions { includes = idirs, boolopts = bools }+          bools = defaultBoolOptions { stripC89 = True, stripEol = True }  parseCurrentFile :: FilePath -> String -> [Extension] -> Either String (Module SrcSpanInfo) parseCurrentFile f fstr exts = case parseFileContentsWithMode (pmode exts) fstr of
hscope.cabal view
@@ -1,5 +1,5 @@ Name:           hscope-Version:        0.2+Version:        0.2.1 License:        BSD3 License-File:   COPYING Category:       source-tools@@ -23,16 +23,18 @@ homepage:       https://github.com/bosu/hscope Stability:      Experimental Extra-Source-Files:+    t/files/Unbox.hs+    t/files/Simple.hs+    t/files/Setup.lhs     t/files/Arrow.hs     t/files/Fixity.hs-    t/files/a/c.h     t/files/a/a.h-    t/files/b/b.h+    t/files/a/c.h     t/files/CPP2.hs-    t/files/garrs.hs-    t/files/Simple.hs-    t/files/CPP.hs+    t/files/b/b.h     t/files/a.c+    t/files/garrs.hs+    t/files/CPP.hs   Executable hscope     Main-Is: HScope.hs
t/Build.hs view
@@ -23,7 +23,7 @@  main :: IO () main = withTemporaryDirectory "/tmp/hscope_test_XXXXXX" $ \td -> testSimpleMain $ do-    plan 46+    plan 47     hpath <- liftIO $ canonicalizePath "./dist/build/hscope/hscope"     tfile <- liftIO $ canonicalizePath "./t/files/Simple.hs"     ec1 <- liftIO $ system $ "cd " ++ td ++ " && " ++ hpath ++ " -b " ++ tfile@@ -140,5 +140,9 @@     res20 <- liftIO $ readProcess hpath [ "--build", "-f", td ++ "/foo.out"                             , "-X", "MagicHash", "t/files/Unbox.hs" ] ""     is res20 $ ""++    res21 <- liftIO $ readProcess hpath [ "--build", "-f", td ++ "/foo.out"+                            , "t/files/Setup.lhs" ] ""+    is res21 $ ""      return ()
+ t/files/Setup.lhs view
@@ -0,0 +1,3 @@+#!/usr/bin/env runhaskell+> import Distribution.Simple+> main = defaultMain
+ t/files/Unbox.hs view
@@ -0,0 +1,1 @@+f x y# = (x, y#)
t/files/a/c.h view
@@ -1,3 +1,5 @@+/* What? */ type Hello = Int +// ok? type Bye = Bool