summaryrefslogtreecommitdiff
path: root/Build/EvilLinker.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-06 13:14:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-06 13:14:01 -0400
commit7daf44931cda03c593cb1ccd08c9fe139e6c8227 (patch)
tree49187eb24466531f09ca86134ddcf93c9dca53eb /Build/EvilLinker.hs
parent71edb7f715b1c5897a56a9d12ac82c7c6f8a781b (diff)
foo
Diffstat (limited to 'Build/EvilLinker.hs')
-rw-r--r--Build/EvilLinker.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/Build/EvilLinker.hs b/Build/EvilLinker.hs
index b5944bfd8..978410869 100644
--- a/Build/EvilLinker.hs
+++ b/Build/EvilLinker.hs
@@ -1,7 +1,6 @@
{- Allows linking haskell programs too big for all the files to fit in a
- command line.
-
- -
- Copyright 2013 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
@@ -12,6 +11,7 @@ module Main where
import Data.Maybe
import Data.Either
import Data.List
+import Data.List.Utils
import Text.Parsec
import Text.Parsec.String
import Control.Applicative ((<$>))
@@ -27,7 +27,7 @@ data CmdParams = CmdParams { cmd :: String, opts :: String }
{- Find where ghc calls gcc to link the executable. -}
parseGhcLink :: Parser CmdParams
parseGhcLink = do
- many prelinklines
+ many prelinkline
linkheaderline
char '"'
gcccmd <- many1 (noneOf "\"")
@@ -38,14 +38,18 @@ parseGhcLink = do
linkheaderline = do
string "*** Linker"
restOfLine
- prelinklines = do
+ prelinkline = do
notFollowedBy linkheaderline
restOfLine
manglepaths = replace "\\" "/"
{- Find where gcc calls collect1. -}
parseGccLink :: Parser CmdParams
-parseGccLink = error "TODO"
+parseGccLink = do
+ many prelinkline
+ error "TODO"
+ where
+ prelinkline = error "TODO"
{- Find where collect1 calls ld. -}
parseCollect1 :: Parser CmdParams