Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add weeder to make file #3897

Merged
merged 5 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,9 @@ stan: ##@Stan Run Stan static analysis tool on the Drasil packages.
cat drasil-*/stan.log
#use to display stan logs, cat drasil-*/stan.log

weeder:
weeder

# Credits to "nowox" from StackOverflow: https://stackoverflow.com/a/30796664/16760741
HELP_FUN = \
%help; while(<>){push@{$$help{$$2//'options'}},[$$1,$$3] \
Expand Down
2 changes: 1 addition & 1 deletion code/drasil-gool/lib/Drasil/GOOL/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Utils.Drasil (blank)
import qualified Drasil.GOOL.CodeType as C (CodeType(..))

import Prelude hiding ((<>))
import Control.Applicative (liftA2, liftA3)
import Control.Applicative (liftA3)
import Control.Monad (liftM2, liftM3)
import Control.Monad.State (State)
import Data.List (intersperse)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ import Drasil.GOOL.State (VS, lensGStoFS, lensMStoVS, modifyReturn, revFiles,
useVarName, genLoopIndex)

import Prelude hiding (break,print,(<>),sin,cos,tan,floor)
import Control.Applicative (liftA2)
import Control.Lens.Zoom (zoom)
import Control.Monad (join)
import Control.Monad.State (modify)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ import Drasil.GOOL.State (CS, MS, VS, lensGStoFS, lensFStoCS, lensFStoMS,
addIter, getIter, resetIter, useVarName, genLoopIndex)

import Prelude hiding (break,print,(<>),sin,cos,tan,floor,pi,log,exp,mod,max)
import Control.Applicative (liftA2)
import Control.Lens.Zoom (zoom)
import Control.Monad (join)
import Control.Monad.State (State, modify)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ import Drasil.GOOL.State (VS, lensGStoFS, lensMStoFS, lensMStoVS, lensVStoFS,
genLoopIndex)

import Prelude hiding (break,print,sin,cos,tan,floor,(<>))
import Control.Applicative (liftA2)
import Control.Lens.Zoom (zoom)
import Control.Monad (join)
import Control.Monad.State (modify)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ import Drasil.GOOL.State (VS, lensGStoFS, revFiles, setFileType, lensMStoVS,
getModuleImports, addModuleImportVS, getUsing, getLangImports, getLibImports,
addLibImportVS, useVarName, getMainDoc, genLoopIndex, genVarNameIf)

import Control.Applicative (liftA2)
import Prelude hiding (break,print,sin,cos,tan,floor,(<>))
import Data.Maybe (fromMaybe, isNothing)
import Data.Functor ((<&>))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ import Drasil.GOOL.State (MS, VS, lensGStoFS, lensMStoVS, lensVStoMS, revFiles,

import Prelude hiding (break,print,sin,cos,tan,floor,(<>))
import Data.Maybe (fromMaybe)
import Control.Applicative (liftA2)
import Control.Lens.Zoom (zoom)
import Control.Monad (join)
import Control.Monad.State (modify)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ import Drasil.GOOL.State (MS, VS, lensGStoFS, lensFStoCS, lensFStoMS,
genVarNameIf)

import Prelude hiding (break,print,(<>),sin,cos,tan,floor)
import Control.Applicative (liftA2)
import Control.Lens.Zoom (zoom)
import Control.Monad.State (modify)
import Data.Composition ((.:))
Expand Down
2 changes: 0 additions & 2 deletions code/drasil-printers/lib/Language/Drasil/TeX/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import qualified Text.PrettyPrint as TP

import Language.Drasil

import Control.Applicative hiding (empty)

import qualified Language.Drasil.Printing.Helpers as H

-----------------------------------------------------------------------------
Expand Down
12 changes: 11 additions & 1 deletion code/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# resolver:
# name: custom-snapshot
# location: "./custom-snapshot.yaml"
resolver: lts-20.26
resolver: lts-22.31
JacquesCarette marked this conversation as resolved.
Show resolved Hide resolved

ghc-options:
"$everything": -fwrite-ide-info -hiedir=.hie
Expand Down Expand Up @@ -72,6 +72,7 @@ extra-deps:
- multiplate-0.0.3@sha256:5d2ffc50d23c55008100b7a8b70f77b5fcce08c6f23822c5a6adc5b5b9356a32,1311
- unicode-names-3.2.0.0@sha256:fef7241d93170e26265e84553090253a5e8ee207645d47cf271816f5834d07d2,470
- unicode-properties-3.2.0.0@sha256:239766a6ac4322329353f6b9cd546024fd8c5f0235c8e32b3cba2d6bd245a699,1000
- transformers-0.6.1.1@sha256:80d128763c6965dfcddca2155b3dec3bb1970d476f0c8cceb4bb28608ab75e7c,3243

# The following packages are dependencies needed for 'stan', specifically tested against GHC 9.4.8.
- clay-0.14.0@sha256:a50ba73137a39c55e89f24a7792107ec40ba07320b2c5ff7932049845c50ffc9,2204
Expand All @@ -84,6 +85,13 @@ extra-deps:
- validation-selective-0.2.0.0@sha256:e1ab5482dede8bf676d729a09109c7c5f798363b9d458e4197a27afb8b48fdd3,3907
- colourista-0.1.0.2@sha256:87b6c096563c3dc5afb1161f06891235370862fc3406406f1f10f1864e55e0a1,3364
- slist-0.2.1.0@sha256:679013d3a03ed1f09fc46cc6ef87f94cc36a1320b2bf4fe4f91d102f85277528,3513
- directory-1.3.8.5@sha256:fbeec9ec346e5272167f63dcb86af513b457a7b9fc36dc818e4c7b81608d612b,3166
- exceptions-0.10.8@sha256:c31fd9b35d36196cbb14ffa5fca4de49868fd39acfeddd601fb77e742554aa67,2892
- filepath-1.4.300.2@sha256:345cbb1afe414a09e47737e4d14cbd51891a734e67c0ef3d77a1439518bb81e8,5900
- mtl-2.3.1@sha256:5377696d7315e2ef31a8d15d67b22d733c20cac2caf8b26756ff8524c8217e6d,1868
- parsec-3.1.17.0@sha256:8407cbd428d7f640a0fff8891bd2f7aca13cebe70a5e654856f8abec9a648b56,5149
- process-1.6.20.0@sha256:2a9393de33f18415fb8f4826957a87a94ffe8840ca8472a9b69dca6de45aca03,2790
- unix-2.8.5.1@sha256:3f702a252a313a7bcb56e3908a14e7f9f1b40e41b7bdc8ae8a9605a1a8686f06,9808

# This configuration option allows the use of newer versions of dependencies than what is specified
allow-newer: true
Expand All @@ -92,6 +100,8 @@ allow-newer: true
# In this case, it's allowing newer versions of the 'stan' package.
allow-newer-deps:
- stan
- wedder
JacquesCarette marked this conversation as resolved.
Show resolved Hide resolved
- multiplate

# Used only for a basic set of flags for haddock
build:
Expand Down
7 changes: 7 additions & 0 deletions code/weeder.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
roots = ["Main.main","^Paths_.*"]

type-class-roots = false

root-instances = [{ class = "\\.IsString$" },{ class = "\\.IsList$" }]

unused-types = false
Loading