import Parser
import Syntax
-import Char
-import List
-import System ( getArgs )
-import Maybe ( catMaybes )
+import Data.Char
+import Data.List
+import Data.Maybe ( catMaybes )
+import System.Environment ( getArgs )
main :: IO ()
main = getArgs >>= \args ->
++ unlines (map (("\t" ++) . hdr) entries)
++ ") where\n"
++ "\n"
- ++ "import GHC.Bool\n"
+ ++ "import GHC.Types\n"
++ "\n"
++ "{-\n"
++ unlines (map opt defaults)
-- don't need the Prelude here so we add NoImplicitPrelude.
++ "module GHC.PrimopWrappers where\n"
++ "import qualified GHC.Prim\n"
- ++ "import GHC.Bool (Bool)\n"
+ ++ "import GHC.Types (Bool)\n"
++ "import GHC.Unit ()\n"
++ "import GHC.Prim (" ++ types ++ ")\n"
++ unlines (concatMap f specs)