Skip to content

Commit

Permalink
Add SPDX-License-Identifier to all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Feb 27, 2023
1 parent 6629364 commit 3437657
Show file tree
Hide file tree
Showing 89 changed files with 222 additions and 17 deletions.
2 changes: 2 additions & 0 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
module Main where

import Data.Foldable qualified
Expand Down
2 changes: 2 additions & 0 deletions bench/Benchmark.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
module Main where

import Control.Lens ((&), (.~))
Expand Down
1 change: 1 addition & 0 deletions src/Data/BoolExpr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <nicolas.pouillard@gmail.com>
-- Stability : provisional
Expand Down
5 changes: 4 additions & 1 deletion src/Data/BoolExpr/Simplify.hs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/App.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{-# LANGUAGE OverloadedStrings #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
--
-- Main entry point for the Swarm application.
module Swarm.App where

Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/DocGen.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
module Swarm.DocGen (
generateDocs,
GenerateDocs (..),
Expand Down
4 changes: 4 additions & 0 deletions src/Swarm/Game/Achievement/Attainment.hs
Original file line number Diff line number Diff line change
@@ -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, (<.>))
Expand Down
4 changes: 4 additions & 0 deletions src/Swarm/Game/Achievement/Definitions.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
-- |
-- SPDX-License-Identifier: BSD-3-Clause
--
-- Definitions of all possible achievements.
module Swarm.Game.Achievement.Definitions where

import Data.Aeson
Expand Down
4 changes: 4 additions & 0 deletions src/Swarm/Game/Achievement/Description.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/Swarm/Game/Achievement/Persistence.hs
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/CESK.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
{-# LANGUAGE PatternSynonyms #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
--
-- The Swarm interpreter uses a technique known as a
-- <https://matt.might.net/articles/cesk-machines/ CESK machine> (if
-- you want to read up on them, you may want to start by reading about
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Display.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Entity.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Exception.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{-# LANGUAGE OverloadedStrings #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
--
-- Runtime exceptions for the Swarm language interpreter.
module Swarm.Game.Exception (
Exn (..),
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Failure.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/Swarm/Game/Failure/Render.hs
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Location.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Log.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Recipe.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 3 additions & 0 deletions src/Swarm/Game/ResourceLoading.hs
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Robot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
{-# LANGUAGE ViewPatterns #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
--
-- A data type to represent robots.
module Swarm.Game.Robot (
-- * Robots data
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Scenario.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Scenario/Cell.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE OverloadedStrings #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
module Swarm.Game.Scenario.Cell (
PCell (..),
Cell,
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Scenario/Objective.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ((<|>))
Expand Down
5 changes: 4 additions & 1 deletion src/Swarm/Game/Scenario/Objective/Graph.hs
Original file line number Diff line number Diff line change
@@ -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 ((&&&))
Expand Down
5 changes: 4 additions & 1 deletion src/Swarm/Game/Scenario/Objective/Logic.hs
Original file line number Diff line number Diff line change
@@ -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'.
Expand Down
5 changes: 4 additions & 1 deletion src/Swarm/Game/Scenario/Objective/Validation.hs
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
5 changes: 4 additions & 1 deletion src/Swarm/Game/Scenario/Objective/WinCheck.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Scenario/RobotLookup.hs
Original file line number Diff line number Diff line change
@@ -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, (<.>))
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Scenario/Style.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-- |
-- SPDX-License-Identifier: BSD-3-Clause
module Swarm.Game.Scenario.Style where

import Data.Aeson
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Scenario/WorldDescription.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/ScenarioInfo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/State.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Step.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
--
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/Terrain.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{-# LANGUAGE OverloadedStrings #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
--
-- Terrain types and properties.
module Swarm.Game.Terrain (
-- * Terrain
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/World.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Game/WorldGen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{-# LANGUAGE TypeApplications #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
--
-- Procedural world generation via coherent noise.
module Swarm.Game.WorldGen where

Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Language/Capability.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Language/Context.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Language/Elaborate.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{-# LANGUAGE OverloadedStrings #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
--
-- Term elaboration which happens after type checking.
module Swarm.Language.Elaborate where

Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Language/LSP.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Language/LSP/VarUsage.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{-# LANGUAGE OverloadedStrings #-}

-- |
-- SPDX-License-Identifier: BSD-3-Clause
module Swarm.Language.LSP.VarUsage where

import Control.Monad (guard)
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Language/Module.hs
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Language/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Swarm/Language/Parse/QQ.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
-- |
-- SPDX-License-Identifier: BSD-3-Clause
--
-- A quasiquoter for Swarm polytypes.
module Swarm.Language.Parse.QQ (tyQ) where

Expand Down
Loading

0 comments on commit 3437657

Please sign in to comment.