Skip to content

Commit

Permalink
RFCT Just list modules instead of finding them
Browse files Browse the repository at this point in the history
The previous was a bit too clever and brittle
  • Loading branch information
luispedro committed May 19, 2020
1 parent 7dbb27a commit e9e5d82
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 34 deletions.
17 changes: 13 additions & 4 deletions NGLess/Modules.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{- Copyright 2015-2019 NGLess Authors
{- Copyright 2015-2020 NGLess Authors
- License: MIT
-}

Expand Down Expand Up @@ -28,14 +28,12 @@ module Modules
- The data type 'Module' encapsulates all information about a module.
-}
import qualified Data.Text as T
import qualified Language.Haskell.TH as TH
import System.IO.Unsafe (unsafePerformIO)
import Control.Monad.IO.Class (liftIO)
import Data.IORef
import Data.Aeson
import Data.Default

import Utils.FindModules (listKnownModules)
import Language
import NGLess

Expand Down Expand Up @@ -154,5 +152,16 @@ loadedModules :: NGLessIO [Module]
loadedModules = liftIO $ readIORef loadedModulesRef

knownModules :: [T.Text]
knownModules = T.pack <$> $(TH.runIO ((TH.ListE . fmap (TH.LitE . TH.stringL)) <$> listKnownModules))
knownModules =
["example-cmd"

,"igc"
,"om-rgc"
,"DogGutCatalog"
,"MouseGutCatalog"
,"PigGutCatalog"

,"specI"
,"motus"
]

30 changes: 0 additions & 30 deletions NGLess/Utils/FindModules.hs

This file was deleted.

0 comments on commit e9e5d82

Please sign in to comment.