ref: a6b9843082a80abae9595f5c805d88509c3c1b1a
parent: 90a309f6dda60b1d82444bdb7dddd182a2e1ecdc
author: Lennart Augustsson <lennart@augustsson.net>
date: Sun Nov 10 13:10:01 EST 2024
Move some file that are only for cpphs bootstrapping.
--- a/Makefile
+++ b/Makefile
@@ -107,7 +107,7 @@
USECPPHS=bin/cpphs
bootstrapcpphs: bin/mhs cpphssrc/malcolm-wallace-universe $(USECPPHS)
- MHSCPPHS=$(USECPPHS) bin/mhs -z -XCPP '-DMIN_VERSION_base(x,y,z)=((x)<4||(x)==4&&(y)<19||(x)==4&&(y)==19&&(z)<=1)' -icpphssrc/malcolm-wallace-universe/polyparse-1.12/src -icpphssrc/malcolm-wallace-universe/cpphs-1.20.9 cpphssrc/malcolm-wallace-universe/cpphs-1.20.9/cpphs.hs -ogenerated/cpphs.c
+ MHSCPPHS=$(USECPPHS) bin/mhs -z -XCPP '-DMIN_VERSION_base(x,y,z)=((x)<4||(x)==4&&(y)<19||(x)==4&&(y)==19&&(z)<=1)' -icpphscompat -icpphssrc/malcolm-wallace-universe/polyparse-1.12/src -icpphssrc/malcolm-wallace-universe/cpphs-1.20.9 cpphssrc/malcolm-wallace-universe/cpphs-1.20.9/cpphs.hs -ogenerated/cpphs.c
# Run test examples with ghc-compiled compiler
runtest: bin/mhseval bin/gmhs tests/*.hs
--- /dev/null
+++ b/cpphscompat/Data/Time/Clock.hs
@@ -1,0 +1,17 @@
+-- A hack to be able to compile cpphs.
+-- We need a proper package for this.
+module Data.Time.Clock(
+ UTCTime(..),
+ getCurrentTime,
+ ) where
+import Prelude
+import System.IO.TimeMilli
+
+-- Second since 1970, probably
+newtype UTCTime = UTCTime Int
+ deriving (Show)
+
+getCurrentTime :: IO UTCTime
+getCurrentTime = do
+ t <- getTimeMilli
+ return $ UTCTime $ t `quot` 1000
--- /dev/null
+++ b/cpphscompat/Data/Time/Format.hs
@@ -1,0 +1,7 @@
+module Data.Time.Format(module Data.Time.Format) where
+import Data.Time.Clock
+
+data TimeLocale
+
+formatTime :: TimeLocale -> String -> UTCTime -> String
+formatTime _ _ (UTCTime t) = show t ++ "s"
--- /dev/null
+++ b/cpphscompat/TimeCompat.hs
@@ -1,0 +1,6 @@
+module TimeCompat(module TimeCompat) where
+import Prelude
+import Data.Time.Format
+
+defaultTimeLocale :: TimeLocale
+defaultTimeLocale = error "defaultTimeLocale"
--- a/lib/Data/Time/Clock.hs
+++ /dev/null
@@ -1,17 +1,0 @@
--- A hack to be able to compile cpphs.
--- We need a proper package for this.
-module Data.Time.Clock(
- UTCTime(..),
- getCurrentTime,
- ) where
-import Prelude
-import System.IO.TimeMilli
-
--- Second since 1970, probably
-newtype UTCTime = UTCTime Int
- deriving (Show)
-
-getCurrentTime :: IO UTCTime
-getCurrentTime = do
- t <- getTimeMilli
- return $ UTCTime $ t `quot` 1000
--- a/lib/Data/Time/Format.hs
+++ /dev/null
@@ -1,7 +1,0 @@
-module Data.Time.Format(module Data.Time.Format) where
-import Data.Time.Clock
-
-data TimeLocale
-
-formatTime :: TimeLocale -> String -> UTCTime -> String
-formatTime _ _ (UTCTime t) = show t ++ "s"
--- a/lib/TimeCompat.hs
+++ /dev/null
@@ -1,6 +1,0 @@
-module TimeCompat(module TimeCompat) where
-import Prelude
-import Data.Time.Format
-
-defaultTimeLocale :: TimeLocale
-defaultTimeLocale = error "defaultTimeLocale"