diff --git a/real/mkhprog/Main.lhs b/real/mkhprog/Main.lhs
index 60655f63e9fc34b4826b8c98a813dce5697a4424..d22b37a09b9fb9622979c14f019f48cb59b939bb 100644
--- a/real/mkhprog/Main.lhs
+++ b/real/mkhprog/Main.lhs
@@ -275,9 +275,9 @@ environment).
 > main :: IO ()
 > main = do
 >  (n:_) <- getArgs
+>  input <- unlines <$> words <$> getContents
 >  replicateM_ (read n) $ do
->    (_:argv) <- getArgs
->    parse_args defaultEnv (unlines argv)
+>    parse_args defaultEnv input
 
 \end{haskell}
 
diff --git a/real/mkhprog/Makefile b/real/mkhprog/Makefile
index 6e51d8f19b389c039e3d8bee70fa7fa15806dc32..e7a1411956d9a63880a8e6f79f8ff3d481a09783 100644
--- a/real/mkhprog/Makefile
+++ b/real/mkhprog/Makefile
@@ -3,12 +3,6 @@ include $(TOP)/mk/boilerplate.mk
 
 include $(TOP)/mk/target.mk
 
-ARGS = -a Int -b Float -c Foo -d Bar -e Double \
-  -f String -g String -h Int -j Double -k Bool -n Basil -p Knob -q Wizzle \
-  -r Wissle -s Wibble -u Widdle -A Int -B Float -C Foo -D Bar -E Double \
-  -F String -G String -H Int -I Float -J Double -K Bool -L Bool -M Buzzle \
-  -N Basil -P Knob -Q Wizzle -R Wissle -S Wibble -T Widdle
-
-FAST_OPTS =   200 $(ARGS)
-NORM_OPTS =  2000 $(ARGS)
-SLOW_OPTS = 10000 $(ARGS)
+FAST_OPTS =   350
+NORM_OPTS =  3800
+SLOW_OPTS = 18000
diff --git a/real/mkhprog/mkhprog.stdin b/real/mkhprog/mkhprog.stdin
new file mode 100644
index 0000000000000000000000000000000000000000..2de03d9794bca53a175e8706bbc99e635364b925
--- /dev/null
+++ b/real/mkhprog/mkhprog.stdin
@@ -0,0 +1,41 @@
+-a Int
+-b Float
+-c Foo
+-d Bar
+-e Double
+-f String
+-g String
+-h Int
+-i Double
+-j Double
+-k Bool
+-l Int
+-m Foo
+-n Basil
+-o Float
+-p Knob
+-q Wizzle
+-r Wissle
+-s Wibble
+-t Foobar
+-u Widdle
+-A Int
+-B Float
+-C Foo
+-D Bar
+-E Double
+-F String
+-G String
+-H Int
+-I Float
+-J Double
+-K Bool
+-L Bool
+-M Buzzle
+-N Basil
+-P Knob
+-Q Wizzle
+-R Wissle
+-S Wibble
+-T Widdle
+-X Int