From 0dcc8b6b85e0477c145abef85b6ebefea5e77361 Mon Sep 17 00:00:00 2001 From: Rowan Torbitzky-Lane Date: Tue, 11 Feb 2025 16:30:55 -0600 Subject: [PATCH] remove template haskell file --- src/HushGP/TH.hs | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/HushGP/TH.hs diff --git a/src/HushGP/TH.hs b/src/HushGP/TH.hs deleted file mode 100644 index 426f25a..0000000 --- a/src/HushGP/TH.hs +++ /dev/null @@ -1,36 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-} -module HushGP.TH where - -import System.IO -import Text.Regex.TDFA -import Data.List -import HushGP.State -import Language.Haskell.TH -import Language.Haskell.TH.Syntax - --- listFields :: Name -> Q [Dec] --- listFields name = do - -- TyConI (DataD _ _ _ [RecC _ fields] _ ) <- reify name - -strHead :: [String] -> String -strHead strxs = - case uncons strxs of - Just (str, _) -> str - _ -> [] - -instructionRegex :: String -instructionRegex = "instruction[a-zA-Z0-9]* ::" - -testRegex :: String -> Bool -testRegex str = str =~ instructionRegex :: Bool - -thTest :: IO () -thTest = do - handle <- openFile "src/HushGP/Instructions/IntInstructions.hs" ReadMode - let list = hGetContents handle - toPrint <- list - let funcs = map (strHead . words) (filter testRegex (lines toPrint)) - let names = map (newName :: (String -> IO Name)) funcs - hClose handle - print "hello" - -- let instruction = "instructionIntAdd"