Skip to content

Instantly share code, notes, and snippets.

@snoyberg
Created March 16, 2012 05:11
Show Gist options
  • Save snoyberg/2048581 to your computer and use it in GitHub Desktop.
Save snoyberg/2048581 to your computer and use it in GitHub Desktop.
Test out long compile times for Model.hs
main = do
putStrLn "{-# LANGUAGE QuasiQuotes, TemplateHaskell, KindSignatures, TypeFamilies #-}"
putStrLn "{-# LANGUAGE GADTs #-}"
putStrLn "import Database.Persist.Store"
putStrLn "import Database.Persist.TH"
putStrLn "mkPersist sqlSettings [persist|"
mapM_ go [1..50]
putStrLn "|]"
putStrLn "main :: IO ()"
putStrLn "main = return ()"
go i = do
putStrLn $ "Foo" ++ show i ++ " json"
putStrLn " foo String"
putStrLn " bar Int"
putStrLn " baz Double"
putStrLn $ " UniqueFoo" ++ show i ++ " foo bar"
putStrLn " deriving Show Eq"
runghc genmodel.hs > modeltest.hs && ghc --make -O -v3 modeltest.hs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment