diff --git a/app/Main.hs b/app/Main.hs index 739f869acc..30e6e55e73 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -2,6 +2,8 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Main where import Data.Foldable qualified diff --git a/bench/Benchmark.hs b/bench/Benchmark.hs index a8d0022bd6..b5ff67a4a4 100644 --- a/bench/Benchmark.hs +++ b/bench/Benchmark.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Main where import Control.Lens ((&), (.~)) diff --git a/src/Data/BoolExpr.hs b/src/Data/BoolExpr.hs index ffcb6f9c6d..7f97475933 100644 --- a/src/Data/BoolExpr.hs +++ b/src/Data/BoolExpr.hs @@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- Module : Data.BoolExpr -- Copyright : (c) Nicolas Pouillard 2008,2009 -- License : BSD3 +-- SPDX-License-Identifier: BSD3 -- -- Maintainer: Nicolas Pouillard -- Stability : provisional diff --git a/src/Data/BoolExpr/Simplify.hs b/src/Data/BoolExpr/Simplify.hs index 7ff00bedaa..b5730b63b4 100644 --- a/src/Data/BoolExpr/Simplify.hs +++ b/src/Data/BoolExpr/Simplify.hs @@ -1,4 +1,7 @@ --- | Simplification logic for boolean expressions that is not +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Simplification logic for boolean expressions that is not -- provided in the 'boolexpr' package. module Data.BoolExpr.Simplify ( cannotBeTrue, diff --git a/src/Swarm/App.hs b/src/Swarm/App.hs index 25fd7918f6..b056fe6cb9 100644 --- a/src/Swarm/App.hs +++ b/src/Swarm/App.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Main entry point for the Swarm application. module Swarm.App where diff --git a/src/Swarm/DocGen.hs b/src/Swarm/DocGen.hs index f2f8f779cc..2277d8d78c 100644 --- a/src/Swarm/DocGen.hs +++ b/src/Swarm/DocGen.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.DocGen ( generateDocs, GenerateDocs (..), diff --git a/src/Swarm/Game/Achievement/Attainment.hs b/src/Swarm/Game/Achievement/Attainment.hs index 477cef4c66..a1be2ddeac 100644 --- a/src/Swarm/Game/Achievement/Attainment.hs +++ b/src/Swarm/Game/Achievement/Attainment.hs @@ -1,5 +1,9 @@ {-# LANGUAGE TemplateHaskell #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Metadata about achievements that the player has obtained module Swarm.Game.Achievement.Attainment where import Control.Lens hiding (from, (<.>)) diff --git a/src/Swarm/Game/Achievement/Definitions.hs b/src/Swarm/Game/Achievement/Definitions.hs index f44a3d1710..fa2bd8bb70 100644 --- a/src/Swarm/Game/Achievement/Definitions.hs +++ b/src/Swarm/Game/Achievement/Definitions.hs @@ -1,3 +1,7 @@ +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Definitions of all possible achievements. module Swarm.Game.Achievement.Definitions where import Data.Aeson diff --git a/src/Swarm/Game/Achievement/Description.hs b/src/Swarm/Game/Achievement/Description.hs index 6713153391..f5c2dcd38e 100644 --- a/src/Swarm/Game/Achievement/Description.hs +++ b/src/Swarm/Game/Achievement/Description.hs @@ -1,5 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Flavor text about all defined achievements. module Swarm.Game.Achievement.Description where import Swarm.Game.Achievement.Definitions diff --git a/src/Swarm/Game/Achievement/Persistence.hs b/src/Swarm/Game/Achievement/Persistence.hs index 90b0053941..d2045dc5ca 100644 --- a/src/Swarm/Game/Achievement/Persistence.hs +++ b/src/Swarm/Game/Achievement/Persistence.hs @@ -1,5 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Load/save logic for achievements. module Swarm.Game.Achievement.Persistence where import Control.Arrow (left) diff --git a/src/Swarm/Game/CESK.hs b/src/Swarm/Game/CESK.hs index 2683dd219e..1b608547e2 100644 --- a/src/Swarm/Game/CESK.hs +++ b/src/Swarm/Game/CESK.hs @@ -3,6 +3,8 @@ {-# LANGUAGE PatternSynonyms #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- The Swarm interpreter uses a technique known as a -- (if -- you want to read up on them, you may want to start by reading about diff --git a/src/Swarm/Game/Display.hs b/src/Swarm/Game/Display.hs index 14642731dc..165bf615cb 100644 --- a/src/Swarm/Game/Display.hs +++ b/src/Swarm/Game/Display.hs @@ -5,6 +5,8 @@ -- Orphan Hashable instances needed to derive Hashable Display -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Utilities for describing how to display in-game entities in the TUI. module Swarm.Game.Display ( -- * The display record diff --git a/src/Swarm/Game/Entity.hs b/src/Swarm/Game/Entity.hs index dadbdfac24..b1e141bb45 100644 --- a/src/Swarm/Game/Entity.hs +++ b/src/Swarm/Game/Entity.hs @@ -2,6 +2,8 @@ {-# LANGUAGE TypeFamilies #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- An 'Entity' represents an object that exists in the world. Each -- entity has a way to be displayed, some metadata such as a name and -- description, some properties, and possibly an inventory of other diff --git a/src/Swarm/Game/Exception.hs b/src/Swarm/Game/Exception.hs index 8f52312da0..a0ea8451f0 100644 --- a/src/Swarm/Game/Exception.hs +++ b/src/Swarm/Game/Exception.hs @@ -2,6 +2,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Runtime exceptions for the Swarm language interpreter. module Swarm.Game.Exception ( Exn (..), diff --git a/src/Swarm/Game/Failure.hs b/src/Swarm/Game/Failure.hs index 3f30ba8ad5..3e4c0e9218 100644 --- a/src/Swarm/Game/Failure.hs +++ b/src/Swarm/Game/Failure.hs @@ -1,4 +1,6 @@ -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A data type to represent system failures. -- -- These failures are often not fatal and serve diff --git a/src/Swarm/Game/Failure/Render.hs b/src/Swarm/Game/Failure/Render.hs index 820a397ca1..6d582df350 100644 --- a/src/Swarm/Game/Failure/Render.hs +++ b/src/Swarm/Game/Failure/Render.hs @@ -1,5 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Pretty-printing failure messages module Swarm.Game.Failure.Render where import Data.Char (toLower) diff --git a/src/Swarm/Game/Location.hs b/src/Swarm/Game/Location.hs index 1fd00312fb..562e1035f8 100644 --- a/src/Swarm/Game/Location.hs +++ b/src/Swarm/Game/Location.hs @@ -4,6 +4,8 @@ -- Orphan JSON instances for Location and Heading -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Locations and headings. module Swarm.Game.Location ( Location, diff --git a/src/Swarm/Game/Log.hs b/src/Swarm/Game/Log.hs index b4dc359cf5..ed8f10a209 100644 --- a/src/Swarm/Game/Log.hs +++ b/src/Swarm/Game/Log.hs @@ -2,6 +2,8 @@ {-# LANGUAGE TemplateHaskell #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A data type to represent in-game logs by robots. -- -- Because of the use of system robots, we sometimes diff --git a/src/Swarm/Game/Recipe.hs b/src/Swarm/Game/Recipe.hs index 1d72e3ae74..b7f5d134cd 100644 --- a/src/Swarm/Game/Recipe.hs +++ b/src/Swarm/Game/Recipe.hs @@ -2,6 +2,8 @@ {-# LANGUAGE TemplateHaskell #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A recipe represents some kind of process for transforming -- some input entities into some output entities. module Swarm.Game.Recipe ( diff --git a/src/Swarm/Game/ResourceLoading.hs b/src/Swarm/Game/ResourceLoading.hs index 3e771dc2ff..e58a8a3b13 100644 --- a/src/Swarm/Game/ResourceLoading.hs +++ b/src/Swarm/Game/ResourceLoading.hs @@ -1,5 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Various utilities related to loading game data files. module Swarm.Game.ResourceLoading where diff --git a/src/Swarm/Game/Robot.hs b/src/Swarm/Game/Robot.hs index 23aa70e1d4..63e4b65252 100644 --- a/src/Swarm/Game/Robot.hs +++ b/src/Swarm/Game/Robot.hs @@ -7,6 +7,8 @@ {-# LANGUAGE ViewPatterns #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A data type to represent robots. module Swarm.Game.Robot ( -- * Robots data diff --git a/src/Swarm/Game/Scenario.hs b/src/Swarm/Game/Scenario.hs index e552e75da1..fa8c15acc3 100644 --- a/src/Swarm/Game/Scenario.hs +++ b/src/Swarm/Game/Scenario.hs @@ -6,6 +6,8 @@ {-# LANGUAGE TemplateHaskell #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Scenarios are standalone worlds with specific starting and winning -- conditions, which can be used both for building interactive -- tutorials and for standalone puzzles and scenarios. diff --git a/src/Swarm/Game/Scenario/Cell.hs b/src/Swarm/Game/Scenario/Cell.hs index 3a2c676853..aa23af5533 100644 --- a/src/Swarm/Game/Scenario/Cell.hs +++ b/src/Swarm/Game/Scenario/Cell.hs @@ -1,6 +1,8 @@ {-# LANGUAGE DerivingVia #-} {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.Game.Scenario.Cell ( PCell (..), Cell, diff --git a/src/Swarm/Game/Scenario/Objective.hs b/src/Swarm/Game/Scenario/Objective.hs index 20fa8ee0af..62ce6ed9e6 100644 --- a/src/Swarm/Game/Scenario/Objective.hs +++ b/src/Swarm/Game/Scenario/Objective.hs @@ -2,6 +2,8 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.Game.Scenario.Objective where import Control.Applicative ((<|>)) diff --git a/src/Swarm/Game/Scenario/Objective/Graph.hs b/src/Swarm/Game/Scenario/Objective/Graph.hs index ad8e2e59c1..3d9efdc0b1 100644 --- a/src/Swarm/Game/Scenario/Objective/Graph.hs +++ b/src/Swarm/Game/Scenario/Objective/Graph.hs @@ -1,6 +1,9 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} --- | Utilities for performing graph analysis on Objective prerequisites +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Utilities for performing graph analysis on Objective prerequisites module Swarm.Game.Scenario.Objective.Graph where import Control.Arrow ((&&&)) diff --git a/src/Swarm/Game/Scenario/Objective/Logic.hs b/src/Swarm/Game/Scenario/Objective/Logic.hs index c4645dd2d6..eeb968b9dd 100644 --- a/src/Swarm/Game/Scenario/Objective/Logic.hs +++ b/src/Swarm/Game/Scenario/Objective/Logic.hs @@ -1,4 +1,7 @@ --- | A model for defining boolean expressions for Objective prerequisites. +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- A model for defining boolean expressions for Objective prerequisites. -- -- This model is intended to be user-facing in the .yaml files, and is -- distinct from that in 'Data.BoolExpr'. diff --git a/src/Swarm/Game/Scenario/Objective/Validation.hs b/src/Swarm/Game/Scenario/Objective/Validation.hs index 3b2dc84443..2a2883be2d 100644 --- a/src/Swarm/Game/Scenario/Objective/Validation.hs +++ b/src/Swarm/Game/Scenario/Objective/Validation.hs @@ -1,6 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} --- | Validity checking for Objective prerequisites +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Validity checking for Objective prerequisites module Swarm.Game.Scenario.Objective.Validation where import Control.Monad (unless) diff --git a/src/Swarm/Game/Scenario/Objective/WinCheck.hs b/src/Swarm/Game/Scenario/Objective/WinCheck.hs index cbb7ec0396..1232bc59a7 100644 --- a/src/Swarm/Game/Scenario/Objective/WinCheck.hs +++ b/src/Swarm/Game/Scenario/Objective/WinCheck.hs @@ -1,4 +1,7 @@ --- | Utilities to check whether conditions are met for a game win/loss. +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Utilities to check whether conditions are met for a game win/loss. module Swarm.Game.Scenario.Objective.WinCheck where import Data.Aeson diff --git a/src/Swarm/Game/Scenario/RobotLookup.hs b/src/Swarm/Game/Scenario/RobotLookup.hs index 2a5ddba016..1e4ef18ea1 100644 --- a/src/Swarm/Game/Scenario/RobotLookup.hs +++ b/src/Swarm/Game/Scenario/RobotLookup.hs @@ -1,6 +1,8 @@ {-# LANGUAGE DerivingVia #-} {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.Game.Scenario.RobotLookup where import Control.Lens hiding (from, (<.>)) diff --git a/src/Swarm/Game/Scenario/Style.hs b/src/Swarm/Game/Scenario/Style.hs index a6cde691a9..c4f5152ef4 100644 --- a/src/Swarm/Game/Scenario/Style.hs +++ b/src/Swarm/Game/Scenario/Style.hs @@ -1,3 +1,5 @@ +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.Game.Scenario.Style where import Data.Aeson diff --git a/src/Swarm/Game/Scenario/WorldDescription.hs b/src/Swarm/Game/Scenario/WorldDescription.hs index 19c1519022..50f77b88be 100644 --- a/src/Swarm/Game/Scenario/WorldDescription.hs +++ b/src/Swarm/Game/Scenario/WorldDescription.hs @@ -1,6 +1,8 @@ {-# LANGUAGE DerivingVia #-} {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.Game.Scenario.WorldDescription where import Data.Aeson.Key qualified as Key diff --git a/src/Swarm/Game/ScenarioInfo.hs b/src/Swarm/Game/ScenarioInfo.hs index 42c15acbbb..0c3e5895b9 100644 --- a/src/Swarm/Game/ScenarioInfo.hs +++ b/src/Swarm/Game/ScenarioInfo.hs @@ -5,6 +5,8 @@ -- -Wno-orphans is for the Eq/Ord Time instances -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Saving and loading info about scenarios (status, path, etc.) as -- well as loading recursive scenario collections. module Swarm.Game.ScenarioInfo ( diff --git a/src/Swarm/Game/State.hs b/src/Swarm/Game/State.hs index b646f5d92d..0e6516178c 100644 --- a/src/Swarm/Game/State.hs +++ b/src/Swarm/Game/State.hs @@ -7,6 +7,8 @@ {-# LANGUAGE ViewPatterns #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Definition of the record holding all the game-related state, and various related -- utility functions. module Swarm.Game.State ( diff --git a/src/Swarm/Game/Step.hs b/src/Swarm/Game/Step.hs index 881d3e3ed5..ddd99cfbd8 100644 --- a/src/Swarm/Game/Step.hs +++ b/src/Swarm/Game/Step.hs @@ -7,6 +7,8 @@ {-# LANGUAGE ViewPatterns #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Facilities for stepping the robot CESK machines, /i.e./ the actual -- interpreter for the Swarm language. -- diff --git a/src/Swarm/Game/Terrain.hs b/src/Swarm/Game/Terrain.hs index 3f6a3669e8..818e7a7ab8 100644 --- a/src/Swarm/Game/Terrain.hs +++ b/src/Swarm/Game/Terrain.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Terrain types and properties. module Swarm.Game.Terrain ( -- * Terrain diff --git a/src/Swarm/Game/World.hs b/src/Swarm/Game/World.hs index c3009f3494..cd0cb6f349 100644 --- a/src/Swarm/Game/World.hs +++ b/src/Swarm/Game/World.hs @@ -2,6 +2,8 @@ {-# LANGUAGE TypeFamilies #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A /world/ refers to the grid on which the game takes place, and the -- things in it (besides robots). A world has a base, immutable -- /terrain/ layer, where each cell contains a terrain type, and a diff --git a/src/Swarm/Game/WorldGen.hs b/src/Swarm/Game/WorldGen.hs index cf149204b1..84fbe6904f 100644 --- a/src/Swarm/Game/WorldGen.hs +++ b/src/Swarm/Game/WorldGen.hs @@ -2,6 +2,8 @@ {-# LANGUAGE TypeApplications #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Procedural world generation via coherent noise. module Swarm.Game.WorldGen where diff --git a/src/Swarm/Language/Capability.hs b/src/Swarm/Language/Capability.hs index 9eef5d92d9..9b8347af9e 100644 --- a/src/Swarm/Language/Capability.hs +++ b/src/Swarm/Language/Capability.hs @@ -1,4 +1,6 @@ -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Capabilities needed to evaluate and execute programs. Language -- constructs or commands require certain capabilities, and in turn -- capabilities are provided by various devices. A robot must have an diff --git a/src/Swarm/Language/Context.hs b/src/Swarm/Language/Context.hs index 9c4977f4a9..3a6a5f07df 100644 --- a/src/Swarm/Language/Context.hs +++ b/src/Swarm/Language/Context.hs @@ -1,6 +1,8 @@ {-# LANGUAGE DeriveDataTypeable #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Generic contexts (mappings from variables to other things, such as -- types, values, or capability sets) used throughout the codebase. module Swarm.Language.Context where diff --git a/src/Swarm/Language/Elaborate.hs b/src/Swarm/Language/Elaborate.hs index 2cf74ec204..e48a625024 100644 --- a/src/Swarm/Language/Elaborate.hs +++ b/src/Swarm/Language/Elaborate.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Term elaboration which happens after type checking. module Swarm.Language.Elaborate where diff --git a/src/Swarm/Language/LSP.hs b/src/Swarm/Language/LSP.hs index ebedbff3bc..d865c71a34 100644 --- a/src/Swarm/Language/LSP.hs +++ b/src/Swarm/Language/LSP.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Language Server Protocol (LSP) server for the Swarm language. -- See the docs/EDITORS.md to learn how to use it. module Swarm.Language.LSP where diff --git a/src/Swarm/Language/LSP/VarUsage.hs b/src/Swarm/Language/LSP/VarUsage.hs index 4f9e38ab88..a8015c9e5f 100644 --- a/src/Swarm/Language/LSP/VarUsage.hs +++ b/src/Swarm/Language/LSP/VarUsage.hs @@ -1,5 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.Language.LSP.VarUsage where import Control.Monad (guard) diff --git a/src/Swarm/Language/Module.hs b/src/Swarm/Language/Module.hs index 3ff91483b8..808d9b5a9b 100644 --- a/src/Swarm/Language/Module.hs +++ b/src/Swarm/Language/Module.hs @@ -1,4 +1,6 @@ -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A 'Module' packages together a type-annotated syntax tree along -- with a context of top-level definitions. module Swarm.Language.Module ( diff --git a/src/Swarm/Language/Parse.hs b/src/Swarm/Language/Parse.hs index cea41ebc67..88f8aa4210 100644 --- a/src/Swarm/Language/Parse.hs +++ b/src/Swarm/Language/Parse.hs @@ -2,6 +2,8 @@ {-# LANGUAGE TypeFamilies #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Parser for the Swarm language. Note, you probably don't want to -- use this directly, unless there is a good reason to parse a term -- without also type checking it; use diff --git a/src/Swarm/Language/Parse/QQ.hs b/src/Swarm/Language/Parse/QQ.hs index ccd1bf443e..b63e6dee6d 100644 --- a/src/Swarm/Language/Parse/QQ.hs +++ b/src/Swarm/Language/Parse/QQ.hs @@ -1,4 +1,6 @@ -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A quasiquoter for Swarm polytypes. module Swarm.Language.Parse.QQ (tyQ) where diff --git a/src/Swarm/Language/Pipeline.hs b/src/Swarm/Language/Pipeline.hs index 4365b722d8..927f949dac 100644 --- a/src/Swarm/Language/Pipeline.hs +++ b/src/Swarm/Language/Pipeline.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Some convenient functions for putting together the whole Swarm -- language processing pipeline: parsing, type checking, capability -- checking, and elaboration. If you want to simply turn some raw diff --git a/src/Swarm/Language/Pipeline/QQ.hs b/src/Swarm/Language/Pipeline/QQ.hs index a50f13b615..3c5cc45162 100644 --- a/src/Swarm/Language/Pipeline/QQ.hs +++ b/src/Swarm/Language/Pipeline/QQ.hs @@ -1,4 +1,6 @@ -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A quasiquoter for Swarm terms. module Swarm.Language.Pipeline.QQ (tmQ) where diff --git a/src/Swarm/Language/Pretty.hs b/src/Swarm/Language/Pretty.hs index 5880074b8b..d4b19e3788 100644 --- a/src/Swarm/Language/Pretty.hs +++ b/src/Swarm/Language/Pretty.hs @@ -4,6 +4,8 @@ {-# LANGUAGE ViewPatterns #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Pretty-printing for the Swarm language. module Swarm.Language.Pretty where diff --git a/src/Swarm/Language/Requirement.hs b/src/Swarm/Language/Requirement.hs index f760546fae..b7e34fd627 100644 --- a/src/Swarm/Language/Requirement.hs +++ b/src/Swarm/Language/Requirement.hs @@ -1,4 +1,6 @@ -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A requirement is something that is needed in order to successfully -- build a robot running a certain program. module Swarm.Language.Requirement ( diff --git a/src/Swarm/Language/Syntax.hs b/src/Swarm/Language/Syntax.hs index fa247063a8..96044d60a6 100644 --- a/src/Swarm/Language/Syntax.hs +++ b/src/Swarm/Language/Syntax.hs @@ -8,6 +8,8 @@ {-# LANGUAGE ViewPatterns #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Abstract syntax for terms of the Swarm programming language. module Swarm.Language.Syntax ( -- * Directions diff --git a/src/Swarm/Language/Typecheck.hs b/src/Swarm/Language/Typecheck.hs index f11e929133..2b86bf7d30 100644 --- a/src/Swarm/Language/Typecheck.hs +++ b/src/Swarm/Language/Typecheck.hs @@ -7,6 +7,8 @@ -- For 'Ord IntVar' instance -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Type inference for the Swarm language. For the approach used here, -- see -- https://byorgey.wordpress.com/2021/09/08/implementing-hindley-milner-with-the-unification-fd-library/ . diff --git a/src/Swarm/Language/Typed.hs b/src/Swarm/Language/Typed.hs index ddd0aa8e02..6c011cb949 100644 --- a/src/Swarm/Language/Typed.hs +++ b/src/Swarm/Language/Typed.hs @@ -1,5 +1,7 @@ {-# LANGUAGE TemplateHaskell #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.Language.Typed (Typed (..), value, polytype, requires) where import Control.Lens (makeLenses) diff --git a/src/Swarm/Language/Types.hs b/src/Swarm/Language/Types.hs index c394de9cc5..f2bbb5bd52 100644 --- a/src/Swarm/Language/Types.hs +++ b/src/Swarm/Language/Types.hs @@ -5,6 +5,8 @@ -- for the Data IntVar instance -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Types for the Swarm programming language and related utilities. module Swarm.Language.Types ( -- * Basic definitions diff --git a/src/Swarm/Language/Value.hs b/src/Swarm/Language/Value.hs index afdd3d7591..fe08d4b798 100644 --- a/src/Swarm/Language/Value.hs +++ b/src/Swarm/Language/Value.hs @@ -2,6 +2,8 @@ {-# LANGUAGE GADTs #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Values and environments used for interpreting the Swarm language. module Swarm.Language.Value ( -- * Values diff --git a/src/Swarm/TUI/Attr.hs b/src/Swarm/TUI/Attr.hs index 76fd360199..7ab64990b4 100644 --- a/src/Swarm/TUI/Attr.hs +++ b/src/Swarm/TUI/Attr.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Rendering attributes (/i.e./ foreground and background colors, -- styles, /etc./) used by the Swarm TUI. -- diff --git a/src/Swarm/TUI/Border.hs b/src/Swarm/TUI/Border.hs index 8a3b134b79..39fb732270 100644 --- a/src/Swarm/TUI/Border.hs +++ b/src/Swarm/TUI/Border.hs @@ -1,6 +1,8 @@ {-# LANGUAGE TemplateHaskell #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Special border drawing functions that can include labels in more -- places than just the top center. module Swarm.TUI.Border ( diff --git a/src/Swarm/TUI/Controller.hs b/src/Swarm/TUI/Controller.hs index 2d53fb9c81..29053c908a 100644 --- a/src/Swarm/TUI/Controller.hs +++ b/src/Swarm/TUI/Controller.hs @@ -2,6 +2,8 @@ {-# LANGUAGE QuasiQuotes #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Event handlers for the TUI. module Swarm.TUI.Controller ( -- * Event handling diff --git a/src/Swarm/TUI/Controller/Util.hs b/src/Swarm/TUI/Controller/Util.hs index 4c93a7e3ad..494ab5a3bb 100644 --- a/src/Swarm/TUI/Controller/Util.hs +++ b/src/Swarm/TUI/Controller/Util.hs @@ -1,5 +1,7 @@ {-# LANGUAGE PatternSynonyms #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.Controller.Util where import Brick hiding (Direction) diff --git a/src/Swarm/TUI/Inventory/Sorting.hs b/src/Swarm/TUI/Inventory/Sorting.hs index 79ad287d5a..14d831ab1c 100644 --- a/src/Swarm/TUI/Inventory/Sorting.hs +++ b/src/Swarm/TUI/Inventory/Sorting.hs @@ -1,5 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.Inventory.Sorting ( InventorySortOptions (..), InventorySortDirection (..), diff --git a/src/Swarm/TUI/List.hs b/src/Swarm/TUI/List.hs index 44c22c8346..7c5456397a 100644 --- a/src/Swarm/TUI/List.hs +++ b/src/Swarm/TUI/List.hs @@ -1,4 +1,6 @@ -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A special modified version of 'Brick.Widgets.List.handleListEvent' -- to deal with skipping over separators. module Swarm.TUI.List (handleListEventWithSeparators) where diff --git a/src/Swarm/TUI/Model.hs b/src/Swarm/TUI/Model.hs index bcfb726b50..1608c0fc64 100644 --- a/src/Swarm/TUI/Model.hs +++ b/src/Swarm/TUI/Model.hs @@ -5,6 +5,8 @@ {-# LANGUAGE ViewPatterns #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Application state for the @brick@-based Swarm TUI. module Swarm.TUI.Model ( -- * Custom UI label types diff --git a/src/Swarm/TUI/Model/Goal.hs b/src/Swarm/TUI/Model/Goal.hs index eaffedeb99..b6046ce0f9 100644 --- a/src/Swarm/TUI/Model/Goal.hs +++ b/src/Swarm/TUI/Model/Goal.hs @@ -1,6 +1,9 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE NoGeneralizedNewtypeDeriving #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A UI-centric model for Objective presentation. module Swarm.TUI.Model.Goal where diff --git a/src/Swarm/TUI/Model/Menu.hs b/src/Swarm/TUI/Model/Menu.hs index 1cffcc06a1..c63d04d05c 100644 --- a/src/Swarm/TUI/Model/Menu.hs +++ b/src/Swarm/TUI/Model/Menu.hs @@ -4,6 +4,8 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.Model.Menu where import Brick.Widgets.Dialog (Dialog) diff --git a/src/Swarm/TUI/Model/Name.hs b/src/Swarm/TUI/Model/Name.hs index 1c1539827e..688a16e48e 100644 --- a/src/Swarm/TUI/Model/Name.hs +++ b/src/Swarm/TUI/Model/Name.hs @@ -1,3 +1,5 @@ +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.Model.Name where data FocusablePanel diff --git a/src/Swarm/TUI/Model/Repl.hs b/src/Swarm/TUI/Model/Repl.hs index d099ebf294..b2d258fa44 100644 --- a/src/Swarm/TUI/Model/Repl.hs +++ b/src/Swarm/TUI/Model/Repl.hs @@ -4,6 +4,8 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.Model.Repl ( -- ** REPL REPLHistItem (..), diff --git a/src/Swarm/TUI/Model/StateUpdate.hs b/src/Swarm/TUI/Model/StateUpdate.hs index 736c3020c3..777b1ebfa6 100644 --- a/src/Swarm/TUI/Model/StateUpdate.hs +++ b/src/Swarm/TUI/Model/StateUpdate.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.Model.StateUpdate ( initAppState, startGame, diff --git a/src/Swarm/TUI/Model/UI.hs b/src/Swarm/TUI/Model/UI.hs index 3b9d56e983..03027c3bba 100644 --- a/src/Swarm/TUI/Model/UI.hs +++ b/src/Swarm/TUI/Model/UI.hs @@ -4,6 +4,8 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.Model.UI ( UIState (..), GoalDisplay (..), diff --git a/src/Swarm/TUI/Panel.hs b/src/Swarm/TUI/Panel.hs index d3c4a850ec..e9ee0173d4 100644 --- a/src/Swarm/TUI/Panel.hs +++ b/src/Swarm/TUI/Panel.hs @@ -3,6 +3,8 @@ {-# LANGUAGE TemplateHaskell #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A small custom "panel widget" for use in the Swarm TUI. Panels draw -- a border around some content, with the color of the border -- depending on whether the panel is currently focused. Panels exist diff --git a/src/Swarm/TUI/View.hs b/src/Swarm/TUI/View.hs index b8e8e0648d..4199e2710a 100644 --- a/src/Swarm/TUI/View.hs +++ b/src/Swarm/TUI/View.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Code for drawing the TUI. module Swarm.TUI.View ( drawUI, diff --git a/src/Swarm/TUI/View/Achievement.hs b/src/Swarm/TUI/View/Achievement.hs index b20aae788d..a48091695b 100644 --- a/src/Swarm/TUI/View/Achievement.hs +++ b/src/Swarm/TUI/View/Achievement.hs @@ -1,5 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.View.Achievement where import Brick diff --git a/src/Swarm/TUI/View/CellDisplay.hs b/src/Swarm/TUI/View/CellDisplay.hs index 3dd3ce4088..1352ae2248 100644 --- a/src/Swarm/TUI/View/CellDisplay.hs +++ b/src/Swarm/TUI/View/CellDisplay.hs @@ -1,3 +1,5 @@ +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.View.CellDisplay where import Brick diff --git a/src/Swarm/TUI/View/CustomStyling.hs b/src/Swarm/TUI/View/CustomStyling.hs index f5b3561d96..716cbd6f31 100644 --- a/src/Swarm/TUI/View/CustomStyling.hs +++ b/src/Swarm/TUI/View/CustomStyling.hs @@ -1,3 +1,5 @@ +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.View.CustomStyling where import Brick (AttrName, attrName) diff --git a/src/Swarm/TUI/View/Objective.hs b/src/Swarm/TUI/View/Objective.hs index 3c703d1b0b..915f325c04 100644 --- a/src/Swarm/TUI/View/Objective.hs +++ b/src/Swarm/TUI/View/Objective.hs @@ -1,5 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Display logic for Objectives. module Swarm.TUI.View.Objective where diff --git a/src/Swarm/TUI/View/Util.hs b/src/Swarm/TUI/View/Util.hs index 62a97f232a..68f13af527 100644 --- a/src/Swarm/TUI/View/Util.hs +++ b/src/Swarm/TUI/View/Util.hs @@ -1,5 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} +-- | +-- SPDX-License-Identifier: BSD-3-Clause module Swarm.TUI.View.Util where import Brick hiding (Direction) diff --git a/src/Swarm/Util.hs b/src/Swarm/Util.hs index 455115d463..440e0b41d4 100644 --- a/src/Swarm/Util.hs +++ b/src/Swarm/Util.hs @@ -3,6 +3,8 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A random collection of small, useful functions that are (or could -- be) used throughout the code base. module Swarm.Util ( diff --git a/src/Swarm/Util/Yaml.hs b/src/Swarm/Util/Yaml.hs index 3be98aca27..33ab3dfa1c 100644 --- a/src/Swarm/Util/Yaml.hs +++ b/src/Swarm/Util/Yaml.hs @@ -3,6 +3,8 @@ {-# LANGUAGE UndecidableInstances #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Various utilities related to parsing YAML files. module Swarm.Util.Yaml ( With (..), diff --git a/src/Swarm/Version.hs b/src/Swarm/Version.hs index f227a5a49a..6a4ef8aaaf 100644 --- a/src/Swarm/Version.hs +++ b/src/Swarm/Version.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- Query current and upstream Swarm version. module Swarm.Version ( -- * PVP version diff --git a/src/Swarm/Web.hs b/src/Swarm/Web.hs index 2e21899699..980dd9763f 100644 --- a/src/Swarm/Web.hs +++ b/src/Swarm/Web.hs @@ -3,6 +3,8 @@ {-# LANGUAGE TypeOperators #-} -- | +-- SPDX-License-Identifier: BSD-3-Clause +-- -- A web service for Swarm. -- -- The service can be started using the `--port 5357` command line argument, diff --git a/test/integration/Main.hs b/test/integration/Main.hs index 303f301d72..a8cd7f71eb 100644 --- a/test/integration/Main.hs +++ b/test/integration/Main.hs @@ -2,7 +2,10 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-} --- | Swarm integration tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Swarm integration tests module Main where import Control.Lens (Ixed (ix), to, use, view, (&), (.~), (<&>), (<>~), (^.), (^..), (^?!)) diff --git a/test/unit/Main.hs b/test/unit/Main.hs index 3660a1059d..3418868fe4 100644 --- a/test/unit/Main.hs +++ b/test/unit/Main.hs @@ -1,7 +1,10 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-} --- | Swarm unit tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Swarm unit tests module Main where import Control.Monad.Except (runExceptT) diff --git a/test/unit/TestBoolExpr.hs b/test/unit/TestBoolExpr.hs index de3c16db49..32f459500d 100644 --- a/test/unit/TestBoolExpr.hs +++ b/test/unit/TestBoolExpr.hs @@ -1,6 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} --- | Boolean expression unit tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Boolean expression unit tests module TestBoolExpr where import Data.BoolExpr qualified as BE diff --git a/test/unit/TestEval.hs b/test/unit/TestEval.hs index dd27279e97..cc8fd41618 100644 --- a/test/unit/TestEval.hs +++ b/test/unit/TestEval.hs @@ -1,7 +1,10 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeApplications #-} --- | Swarm unit tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Swarm unit tests module TestEval where import Control.Lens ((^.), _3) diff --git a/test/unit/TestInventory.hs b/test/unit/TestInventory.hs index d7c155fbf7..c767a1b314 100644 --- a/test/unit/TestInventory.hs +++ b/test/unit/TestInventory.hs @@ -1,6 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} --- | Swarm unit tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Swarm unit tests module TestInventory where import Control.Lens ((^.)) diff --git a/test/unit/TestLSP.hs b/test/unit/TestLSP.hs index 7624f2b137..7d16b27745 100644 --- a/test/unit/TestLSP.hs +++ b/test/unit/TestLSP.hs @@ -1,6 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} --- | LSP unit tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- LSP unit tests module TestLSP (testLSP) where import Data.Text (Text) diff --git a/test/unit/TestLanguagePipeline.hs b/test/unit/TestLanguagePipeline.hs index 1e6a9ceb87..96408e56b1 100644 --- a/test/unit/TestLanguagePipeline.hs +++ b/test/unit/TestLanguagePipeline.hs @@ -1,8 +1,10 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE TemplateHaskell #-} --- | Swarm unit tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Swarm unit tests module TestLanguagePipeline where import Control.Arrow ((&&&)) diff --git a/test/unit/TestModel.hs b/test/unit/TestModel.hs index b9192a43c8..22ad6e11e6 100644 --- a/test/unit/TestModel.hs +++ b/test/unit/TestModel.hs @@ -1,6 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} --- | Swarm unit tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Swarm unit tests module TestModel where import Data.String (fromString) diff --git a/test/unit/TestNotification.hs b/test/unit/TestNotification.hs index 4ce2bd79a8..ca2718554a 100644 --- a/test/unit/TestNotification.hs +++ b/test/unit/TestNotification.hs @@ -1,6 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} --- | Swarm unit tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Swarm unit tests module TestNotification where import Control.Lens (Getter, Ixed (ix), view, (&), (.~), (^.), (^?!)) diff --git a/test/unit/TestPretty.hs b/test/unit/TestPretty.hs index 1c5a4d8b4f..80cdc84819 100644 --- a/test/unit/TestPretty.hs +++ b/test/unit/TestPretty.hs @@ -1,6 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} --- | Swarm unit tests +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Swarm unit tests module TestPretty where import Swarm.Language.Pretty diff --git a/test/unit/TestUtil.hs b/test/unit/TestUtil.hs index 63f2133703..622686a896 100644 --- a/test/unit/TestUtil.hs +++ b/test/unit/TestUtil.hs @@ -1,7 +1,10 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} --- | Utility functions +-- | +-- SPDX-License-Identifier: BSD-3-Clause +-- +-- Utility functions module TestUtil where import Control.Lens (Ixed (ix), to, use, (&), (.~), (^.), (^?))