diff --git a/HushGP.cabal b/HushGP.cabal index 49c8ce5..5d303c4 100644 --- a/HushGP.cabal +++ b/HushGP.cabal @@ -57,6 +57,7 @@ library , HushGP.PushTests.IntTests , HushGP.PushTests.GenericTests , HushGP.PushTests.UtilTests + , HushGP.TH -- Modules included in this library but not exported. -- other-modules: diff --git a/TODO.md b/TODO.md index becfb29..b9fd1da 100644 --- a/TODO.md +++ b/TODO.md @@ -15,7 +15,7 @@ - [X] Standardize the pattern matching parameter names, such as c1 : cs - [ ] Write unit/quickcheck tests for all of the instructions - [ ] Use template haskell to generate function lists -- [ ] Move utility functions to their own file +- [X] Move utility functions to their own file ## PushGP TODO - [ ] Implement a Plushy genome translator diff --git a/src/HushGP/TH.hs b/src/HushGP/TH.hs new file mode 100644 index 0000000..52b3cac --- /dev/null +++ b/src/HushGP/TH.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE TemplateHaskell #-} +module HushGP.TH where + +import System.IO + +thTest :: IO () +thTest = do + handle <- openFile "src/HushGP/Instructions/IntInstructions.hs" ReadMode + let list = hGetContents handle + toPrint <- list + print toPrint + hClose handle