codeworld-api 0.7.0 → 0.8.0
raw patch · 8 files changed
+54/−46 lines, 8 filesdep ~aesondep ~base64-bytestringdep ~bytestring
Dependency ranges changed: aeson, base64-bytestring, bytestring, dependent-sum, ghc-prim, hashable, random, ref-tf, template-haskell, text, witherable
Files
- codeworld-api.cabal +25/−25
- src/CodeWorld/App.hs +1/−1
- src/CodeWorld/App2.hs +1/−1
- src/CodeWorld/CanvasM.hs +0/−1
- src/CodeWorld/CollaborationUI.hs +4/−1
- src/CodeWorld/Driver.hs +15/−3
- src/CodeWorld/EntryPoints.hs +7/−7
- src/CodeWorld/Picture.hs +1/−7
codeworld-api.cabal view
@@ -1,5 +1,5 @@ Name: codeworld-api-Version: 0.7.0+Version: 0.8.0 Synopsis: Graphics library for CodeWorld License: Apache License-file: LICENSE@@ -46,26 +46,26 @@ CodeWorld.Event, CodeWorld.Picture, Util.EmbedAsUrl- Build-depends: aeson >= 1.4.3 && < 1.5,+ Build-depends: aeson >= 1.4.3 && < 2.2, base >= 4.11 && < 5,- base64-bytestring >= 1.0 && < 1.1,- bytestring >= 0.9 && < 0.11,+ base64-bytestring >= 1.0 && < 1.3,+ bytestring >= 0.9 && < 0.12, cereal >= 0.5.4 && < 0.6, cereal-text >= 0.1.0 && < 0.2, containers >= 0.5.7 && < 0.7, deepseq >= 1.4 && < 1.5,- dependent-sum >= 0.4 && < 0.6.2,- ghc-prim >= 0.3.1 && < 0.6,- hashable >= 1.2.4 && < 1.4,+ dependent-sum >= 0.4 && < 0.8,+ ghc-prim >= 0.3.1 && < 0.10,+ hashable >= 1.2.4 && < 1.5, monad-loops >= 0.3 && < 0.5, mtl >= 2.2.1 && < 2.3,- random >= 1.1 && < 1.2,- ref-tf >= 0.4 && < 0.5,- reflex >= 0.6.3 && < 0.7,- template-haskell >= 2.8 && < 2.16,- text >= 1.2.2 && < 1.3,+ random >= 1.1 && < 1.3,+ ref-tf >= 0.4 && < 0.6,+ reflex >= 0.6.3 && < 0.9,+ template-haskell >= 2.8 && < 2.20,+ text >= 1.2.2 && < 2.1, time >= 1.8 && < 2.0,- witherable >= 0.3 && < 0.4+ witherable >= 0.3 && < 0.5 if impl(ghcjs) Js-sources: jsbits/sim_fp.js@@ -107,26 +107,26 @@ test-framework-hunit -- Copy of the build dependencies above- Build-depends: aeson >= 1.4.3 && < 1.5,+ Build-depends: aeson >= 1.4.3 && < 2.2, base >= 4.11 && < 5,- base64-bytestring >= 1.0 && < 1.1,- bytestring >= 0.9 && < 0.11,+ base64-bytestring >= 1.0 && < 1.3,+ bytestring >= 0.9 && < 0.12, cereal >= 0.5.4 && < 0.6, cereal-text >= 0.1.0 && < 0.2, containers >= 0.5.7 && < 0.7, deepseq >= 1.4 && < 1.5,- dependent-sum >= 0.4 && < 0.6.2,- ghc-prim >= 0.3.1 && < 0.6,- hashable >= 1.2.4 && < 1.4,+ dependent-sum >= 0.4 && < 0.8,+ ghc-prim >= 0.3.1 && < 0.10,+ hashable >= 1.2.4 && < 1.5, monad-loops >= 0.3 && < 0.5, mtl >= 2.2.1 && < 2.3,- random >= 1.1 && < 1.2,- ref-tf >= 0.4 && < 0.5,- reflex >= 0.6.3 && < 0.7,- template-haskell >= 2.8 && < 2.16,- text >= 1.2.2 && < 1.3,+ random >= 1.1 && < 1.3,+ ref-tf >= 0.4 && < 0.6,+ reflex >= 0.6.3 && < 0.9,+ template-haskell >= 2.8 && < 2.20,+ text >= 1.2.2 && < 2.1, time >= 1.8 && < 2.0,- witherable >= 0.3 && < 0.4+ witherable >= 0.3 && < 0.5 if impl(ghcjs) Js-sources: jsbits/sim_fp.js
src/CodeWorld/App.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE GADTSyntax #-} {-# LANGUAGE KindSignatures #-}-{-# OPTIONS_GHC -Wno-deprecations -Wno-name-shadowing #-}+{-# OPTIONS_GHC -Wno-deprecations -Wno-name-shadowing -Wno-star-is-type #-} {- Copyright 2020 The CodeWorld Authors. All rights reserved.
src/CodeWorld/App2.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE GADTSyntax #-} {-# LANGUAGE KindSignatures #-}-{-# OPTIONS_GHC -Wno-deprecations #-}+{-# OPTIONS_GHC -Wno-deprecations -Wno-star-is-type #-} {- Copyright 2020 The CodeWorld Authors. All rights reserved.
src/CodeWorld/CanvasM.hs view
@@ -21,7 +21,6 @@ module CodeWorld.CanvasM where import Control.Monad.Reader-import Control.Monad.Trans (MonadIO) import Data.Text (Text) #ifdef ghcjs_HOST_OS
src/CodeWorld/CollaborationUI.hs view
@@ -6,7 +6,10 @@ {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-}-{-# OPTIONS_GHC -Wno-unticked-promoted-constructors -Wno-name-shadowing #-}+{-# OPTIONS_GHC -Wno-unticked-promoted-constructors+ -Wno-name-shadowing+ -Wno-star-is-type+ #-} {- Copyright 2020 The CodeWorld Authors. All rights reserved.
src/CodeWorld/Driver.hs view
@@ -16,7 +16,11 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}-{-# OPTIONS_GHC -Wno-name-shadowing -Wno-orphans -Wno-unticked-promoted-constructors #-}+{-# OPTIONS_GHC -Wno-name-shadowing+ -Wno-orphans+ -Wno-unticked-promoted-constructors+ -Wno-incomplete-uni-patterns+ #-} {- Copyright 2020 The CodeWorld Authors. All rights reserved.@@ -58,7 +62,6 @@ import Data.Serialize.Text () import Data.Text (Text) import qualified Data.Text as T-import Data.Witherable import GHC.Fingerprint.Type import GHC.Generics import GHC.Stack@@ -72,6 +75,12 @@ import Text.Printf import Text.Read +#if MIN_VERSION_witherable(0, 4, 0)+import Witherable+#else+import Data.Witherable+#endif+ #ifdef ghcjs_HOST_OS import CodeWorld.CanvasM (MonadCanvas, CanvasM, runCanvasM)@@ -923,7 +932,8 @@ let options = (fromIntegral port) { Canvas.events =- ["mousedown", "mouseup", "mousemove", "keydown", "keyup"]+ ["mousedown", "mouseup", "mousemove", "keydown", "keyup"],+ Canvas.middleware = [] } putStrLn $ printf "Open me on http://127.0.0.1:%d/" (Canvas.port options) Canvas.blankCanvas options $ \context -> do@@ -1043,7 +1053,9 @@ | PartialToken {tokenDeployHash :: Text} deriving (Generic) +#if !MIN_VERSION_base(4,15,0) deriving instance Generic Fingerprint+#endif instance Serialize Fingerprint
src/CodeWorld/EntryPoints.hs view
@@ -5,7 +5,9 @@ {-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE RecordWildCards #-}-{-# OPTIONS_GHC -Wno-name-shadowing #-}+{-# OPTIONS_GHC -Wno-name-shadowing -Wno-star-is-type #-}+{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}+{-# HLINT ignore "Redundant bracket" #-} {- Copyright 2020 The CodeWorld Authors. All rights reserved.@@ -103,11 +105,9 @@ (x : xs) -> Timeline (present : past) x xs restartTimeline :: Timeline a -> Timeline a-restartTimeline timeline@(Timeline {..})- | null past = timeline- | otherwise = Timeline [] x (xs ++ present : future)- where- x : xs = reverse past+restartTimeline timeline@(Timeline {..}) = case reverse past of+ [] -> timeline+ x : xs -> Timeline [] x (xs ++ present : future) timelineLength :: Timeline a -> Int timelineLength (Timeline {..}) = length past + 1 + length future@@ -236,7 +236,7 @@ xToPlaybackSpeed x = snapSlider 0.2 [1 .. 4] $ scaleRange (-1.4, 1.4) (0, 5) x playbackSpeedToX :: Double -> Double-playbackSpeedToX s = scaleRange (0, 5) (-1.4, 1.4) s+playbackSpeedToX = scaleRange (0, 5) (-1.4, 1.4) zoomIncrement :: Double zoomIncrement = 8 ** (1 / 10)
src/CodeWorld/Picture.hs view
@@ -23,7 +23,6 @@ import CodeWorld.Color import Control.DeepSeq import Data.List-import Data.Monoid ((<>)) import Data.Text (Text) import GHC.Generics (Generic) import GHC.Stack@@ -359,15 +358,10 @@ instance Monoid Picture where mempty = blank- mappend = (&) mconcat = pictures -#if MIN_VERSION_base(4,11,0)- instance Semigroup Picture where- (<>) = (&)--#endif+ (<>) = (&) -- | A coordinate plane. Adding this to your pictures can help you measure distances -- more accurately.