| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
CodeWorld
Description
Module exporting the same interface as provided in the CodeWorld editor.
Synopsis
- data Picture
- (&) :: Picture -> Picture -> Picture
- arc :: Double -> Double -> Double -> Picture
- blank :: Picture
- circle :: Double -> Picture
- clipped :: Double -> Double -> Picture -> Picture
- closedCurve :: [Point] -> Picture
- codeWorldLogo :: Picture
- colored :: Color -> Picture -> Picture
- coloured :: Color -> Picture -> Picture
- coordinatePlane :: Picture
- curve :: [Point] -> Picture
- dilated :: Double -> Picture -> Picture
- lettering :: Text -> Picture
- pictures :: [Picture] -> Picture
- polygon :: [Point] -> Picture
- polyline :: [Point] -> Picture
- rectangle :: Double -> Double -> Picture
- reflected :: Double -> Picture -> Picture
- rotated :: Double -> Picture -> Picture
- scaled :: Double -> Double -> Picture -> Picture
- sector :: Double -> Double -> Double -> Picture
- solidCircle :: Double -> Picture
- solidClosedCurve :: [Point] -> Picture
- solidPolygon :: [Point] -> Picture
- solidRectangle :: Double -> Double -> Picture
- styledLettering :: TextStyle -> Font -> Text -> Picture
- thickArc :: Double -> Double -> Double -> Double -> Picture
- thickCircle :: Double -> Double -> Picture
- thickClosedCurve :: Double -> [Point] -> Picture
- thickCurve :: Double -> [Point] -> Picture
- thickPolygon :: Double -> [Point] -> Picture
- thickPolyline :: Double -> [Point] -> Picture
- thickRectangle :: Double -> Double -> Double -> Picture
- translated :: Double -> Double -> Picture -> Picture
- data Color
- alpha :: Color -> Double
- assortedColors :: [Color]
- black :: Color
- blue :: Color
- bright :: Color -> Color
- brighter :: Double -> Color -> Color
- brown :: Color
- dark :: Color -> Color
- darker :: Double -> Color -> Color
- dull :: Color -> Color
- duller :: Double -> Color -> Color
- gray :: Color
- green :: Color
- grey :: Color
- hue :: Color -> Double
- light :: Color -> Color
- lighter :: Double -> Color -> Color
- luminosity :: Color -> Double
- mixed :: [Color] -> Color
- orange :: Color
- pink :: Color
- purple :: Color
- red :: Color
- saturation :: Color -> Double
- translucent :: Color -> Color
- white :: Color
- yellow :: Color
- type Colour = Color
- dilatedPoint :: Double -> Point -> Point
- dotProduct :: Vector -> Vector -> Double
- reflectedPoint :: Double -> Point -> Point
- rotatedPoint :: Double -> Point -> Point
- rotatedVector :: Double -> Vector -> Vector
- scaledPoint :: Double -> Double -> Point -> Point
- scaledVector :: Double -> Double -> Vector -> Vector
- translatedPoint :: Double -> Double -> Point -> Point
- vectorDifference :: Vector -> Vector -> Vector
- vectorDirection :: Vector -> Double
- vectorLength :: Vector -> Double
- vectorSum :: Vector -> Vector -> Vector
- type Point = (Double, Double)
- type Vector = (Double, Double)
- data Font
- data ReifyPicture a
- = Rectangle Style Double Double
- | Circle Style Double
- | Polyline Shape [Point]
- | Arc Style Double Double Double
- | Curve Shape [Point]
- | Lettering Text
- | StyledLettering TextStyle Font Text
- | Color Color a
- | Translate Double Double a
- | Scale Double Double a
- | Dilate Double a
- | Rotate Double a
- | Reflect Double a
- | Clip Double Double a
- | Pictures [a]
- | And a a
- | CoordinatePlane
- | Logo
- | Blank
- data Shape
- data Style
- data TextStyle
- drawingOf :: Picture -> IO ()
- animationOf :: (Double -> Picture) -> IO ()
- trace :: Text -> a -> a
CodeWorld API
The CodeWorld Picture type and corresponding API for composing images.
Student facing, basic picture type. A value of this type can be build using the CodeWorld API.
CodeWorld.Test also exports pattern synonyms for all contained constructors. This allows for easier pattern matching in generic traversals.
Instances
| MuRef Picture Source # | |||||
Defined in CodeWorld.Tasks.Picture Associated Types
| |||||
| NFData Picture Source # | |||||
Defined in CodeWorld.Tasks.Picture | |||||
| Data Picture Source # | |||||
Defined in CodeWorld.Tasks.Picture Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Picture -> c Picture # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Picture # toConstr :: Picture -> Constr # dataTypeOf :: Picture -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Picture) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Picture) # gmapT :: (forall b. Data b => b -> b) -> Picture -> Picture # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Picture -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Picture -> r # gmapQ :: (forall d. Data d => d -> u) -> Picture -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Picture -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Picture -> m Picture # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Picture -> m Picture # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Picture -> m Picture # | |||||
| Generic Picture Source # | |||||
Defined in CodeWorld.Tasks.Picture Associated Types
| |||||
| Show Picture Source # | |||||
| Eq Picture Source # | |||||
| Ord Picture Source # | |||||
Defined in CodeWorld.Tasks.Picture | |||||
| type DeRef Picture Source # | |||||
Defined in CodeWorld.Tasks.Picture | |||||
| type Rep Picture Source # | |||||
Defined in CodeWorld.Tasks.Picture type Rep Picture = D1 ('MetaData "Picture" "CodeWorld.Tasks.Picture" "codeworld-tasks-0.1.0.0-HDTRBEVOXsr1YTQ9DZ9YSS" 'True) (C1 ('MetaCons "PRec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ReifyPicture Picture)))) | |||||
(&) :: Picture -> Picture -> Picture Source #
Compose two Pictures.
The left argument will be drawn on top of the right argument if they overlap.
arc :: Double -> Double -> Double -> Picture Source #
Draw a thin, hollow circle segment with these start and end angles and radius.
clipped :: Double -> Double -> Picture -> Picture Source #
Clip the image in a rectangle with this length and height.
closedCurve :: [Point] -> Picture Source #
Same as curve but adds another splice between the start and end points to close the shape.
codeWorldLogo :: Picture Source #
A static image of the CodeWorld logo.
coordinatePlane :: Picture Source #
A static image of a coordinate plane extending 5 units in all directions.
curve :: [Point] -> Picture Source #
Draw a thin curve passing through the provided points via a number of Bézier splices.
dilated :: Double -> Picture -> Picture Source #
Scale the image in both directions using the same modifier.
polygon :: [Point] -> Picture Source #
Same as polyline but adds another segment between the start and end points to close the shape.
polyline :: [Point] -> Picture Source #
Draw a sequence of thin line segments passing through the provided points.
rectangle :: Double -> Double -> Picture Source #
Draw a hollow, thin rectangle with this length and height.
reflected :: Double -> Picture -> Picture Source #
Reflect the image across a line through the origin with this angle to the x-axis.
rotated :: Double -> Picture -> Picture Source #
Rotate the image around the origin using this angle in radians.
scaled :: Double -> Double -> Picture -> Picture Source #
Scale the image in x and y-directions using these modifiers.
sector :: Double -> Double -> Double -> Picture Source #
Draw a filled in circle segment with these start and end angles and radius.
This would be solidArc following the usual naming scheme.
solidCircle :: Double -> Picture Source #
Draw a filled in circle with this radius.
solidClosedCurve :: [Point] -> Picture Source #
Draw a curve passing through the provided points via a number of Bézier splices. Adds another splice between the start and end points to close the shape and completely fills the enclosed area.
solidPolygon :: [Point] -> Picture Source #
Draw a sequence of line segments with this line width passing through the provided points and completely fill the enclosed area.
solidRectangle :: Double -> Double -> Picture Source #
Draw a filled in rectangle with this length and height.
thickArc :: Double -> Double -> Double -> Double -> Picture Source #
Draw a hollow circle segment with this line width, these start and end angles and radius. Specifying a negative line width causes a runtime error (mirrors behaviour in CodeWorld editor).
thickCircle :: Double -> Double -> Picture Source #
Draw a hollow circle with this line width and radius. Specifying a negative line width or a line width greater than the circles diameter causes a runtime error (mirrors behaviour in CodeWorld editor).
thickClosedCurve :: Double -> [Point] -> Picture Source #
Same as thickCurve but adds another splice between the start and end points to close the shape.
thickCurve :: Double -> [Point] -> Picture Source #
Draw a curve with this line width passing through the provided points via a number of Bézier splices. Specifying a negative line width causes a runtime error (mirrors behaviour in CodeWorld editor).
thickPolygon :: Double -> [Point] -> Picture Source #
Same as thickPolyline but adds another segment between the start and end points to close the shape.
thickPolyline :: Double -> [Point] -> Picture Source #
Draw a sequence of line segments with this line width passing through the provided points. Specifying a negative line width causes a runtime error (mirrors behaviour in CodeWorld editor).
thickRectangle :: Double -> Double -> Double -> Picture Source #
Draw a hollow rectangle with this line width, length and height. Specifying a negative line width causes a runtime error (mirrors behaviour in CodeWorld editor).
Colours
Color type mirroring CodeWorld's equivalent type. The exposed constructors allow for setting colors directly via numerical values.
Constructors
| RGB Double Double Double | Values for red, green, blue given as a percentage from 0 to 1 |
| HSL Double Double Double | Values for hue, saturation and luminosity |
| RGBA Double Double Double Double | RGB with an additional transparency percentage |
Instances
assortedColors :: [Color] Source #
An infinite list of different colours.
brighter :: Double -> Color -> Color Source #
Increase argument's saturation by a user defined amount.
lighter :: Double -> Color -> Color Source #
Increase argument's luminosity by a user defined amount.
luminosity :: Color -> Double Source #
Returns the luminosity of the argument according to the HSL model.
saturation :: Color -> Double Source #
Returns the saturation of the argument according to the HSL model.
translucent :: Color -> Color Source #
Slightly increase argument's transparency.
Math Utility
dilatedPoint :: Double -> Point -> Point Source #
Dilates a point by given uniform scaling factor. Dilating by a negative factor also reflects across the origin.
reflectedPoint :: Double -> Point -> Point Source #
Reflects a point across a line through the origin at this angle from the X-axis.
rotatedPoint :: Double -> Point -> Point Source #
Rotates a point around the origin by the given angle in radians.
scaledPoint :: Double -> Double -> Point -> Point Source #
Scales a point by given X and Y scaling factor. Scaling by a negative factor also reflects across that axis.
scaledVector :: Double -> Double -> Vector -> Vector Source #
Scales a vector by the given scalar multiplier.
vectorDirection :: Vector -> Double Source #
The counter-clockwise angle of a vector from the X-axis.
vectorLength :: Vector -> Double Source #
The length of a vector.
Text Rendering Modifiers
Text font type used for stylized message rendering.
Instances
| NFData Font Source # | |||||
Defined in CodeWorld.Tasks.Types | |||||
| Data Font Source # | |||||
Defined in CodeWorld.Tasks.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Font -> c Font # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Font # dataTypeOf :: Font -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Font) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Font) # gmapT :: (forall b. Data b => b -> b) -> Font -> Font # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Font -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Font -> r # gmapQ :: (forall d. Data d => d -> u) -> Font -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Font -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Font -> m Font # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Font -> m Font # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Font -> m Font # | |||||
| Generic Font Source # | |||||
Defined in CodeWorld.Tasks.Types Associated Types
| |||||
| Show Font Source # | |||||
| Eq Font Source # | |||||
| Ord Font Source # | |||||
| type Rep Font Source # | |||||
Defined in CodeWorld.Tasks.Types type Rep Font = D1 ('MetaData "Font" "CodeWorld.Tasks.Types" "codeworld-tasks-0.1.0.0-HDTRBEVOXsr1YTQ9DZ9YSS" 'False) ((C1 ('MetaCons "SansSerif" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Serif" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Monospace" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Handwriting" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Fancy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NamedFont" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))) | |||||
data ReifyPicture a Source #
Basic syntax tree type of the CodeWorld API. Each API function has a corresponding constructor.
The type variable is necessary for CSE detection via Reify. The method replaces subexpressions with number ids, so we need to be flexible in the wrapped type.
Constructors
| Rectangle Style Double Double | |
| Circle Style Double | |
| Polyline Shape [Point] | |
| Arc Style Double Double Double | |
| Curve Shape [Point] | |
| Lettering Text | |
| StyledLettering TextStyle Font Text | |
| Color Color a | |
| Translate Double Double a | |
| Scale Double Double a | |
| Dilate Double a | |
| Rotate Double a | |
| Reflect Double a | |
| Clip Double Double a | |
| Pictures [a] | |
| And a a | |
| CoordinatePlane | |
| Logo | |
| Blank |
Instances
| Foldable ReifyPicture Source # | |||||
Defined in CodeWorld.Tasks.Types Methods fold :: Monoid m => ReifyPicture m -> m # foldMap :: Monoid m => (a -> m) -> ReifyPicture a -> m # foldMap' :: Monoid m => (a -> m) -> ReifyPicture a -> m # foldr :: (a -> b -> b) -> b -> ReifyPicture a -> b # foldr' :: (a -> b -> b) -> b -> ReifyPicture a -> b # foldl :: (b -> a -> b) -> b -> ReifyPicture a -> b # foldl' :: (b -> a -> b) -> b -> ReifyPicture a -> b # foldr1 :: (a -> a -> a) -> ReifyPicture a -> a # foldl1 :: (a -> a -> a) -> ReifyPicture a -> a # toList :: ReifyPicture a -> [a] # null :: ReifyPicture a -> Bool # length :: ReifyPicture a -> Int # elem :: Eq a => a -> ReifyPicture a -> Bool # maximum :: Ord a => ReifyPicture a -> a # minimum :: Ord a => ReifyPicture a -> a # sum :: Num a => ReifyPicture a -> a # product :: Num a => ReifyPicture a -> a # | |||||
| NFData a => NFData (ReifyPicture a) Source # | |||||
Defined in CodeWorld.Tasks.Types Methods rnf :: ReifyPicture a -> () # | |||||
| Data a => Data (ReifyPicture a) Source # | |||||
Defined in CodeWorld.Tasks.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ReifyPicture a -> c (ReifyPicture a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ReifyPicture a) # toConstr :: ReifyPicture a -> Constr # dataTypeOf :: ReifyPicture a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ReifyPicture a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ReifyPicture a)) # gmapT :: (forall b. Data b => b -> b) -> ReifyPicture a -> ReifyPicture a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ReifyPicture a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ReifyPicture a -> r # gmapQ :: (forall d. Data d => d -> u) -> ReifyPicture a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ReifyPicture a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ReifyPicture a -> m (ReifyPicture a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ReifyPicture a -> m (ReifyPicture a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ReifyPicture a -> m (ReifyPicture a) # | |||||
| Generic (ReifyPicture a) Source # | |||||
Defined in CodeWorld.Tasks.Types Associated Types
Methods from :: ReifyPicture a -> Rep (ReifyPicture a) x # to :: Rep (ReifyPicture a) x -> ReifyPicture a # | |||||
| Show a => Show (ReifyPicture a) Source # | |||||
Defined in CodeWorld.Tasks.Types Methods showsPrec :: Int -> ReifyPicture a -> ShowS # show :: ReifyPicture a -> String # showList :: [ReifyPicture a] -> ShowS # | |||||
| Eq a => Eq (ReifyPicture a) Source # | |||||
Defined in CodeWorld.Tasks.Types Methods (==) :: ReifyPicture a -> ReifyPicture a -> Bool # (/=) :: ReifyPicture a -> ReifyPicture a -> Bool # | |||||
| Ord a => Ord (ReifyPicture a) Source # | |||||
Defined in CodeWorld.Tasks.Types Methods compare :: ReifyPicture a -> ReifyPicture a -> Ordering # (<) :: ReifyPicture a -> ReifyPicture a -> Bool # (<=) :: ReifyPicture a -> ReifyPicture a -> Bool # (>) :: ReifyPicture a -> ReifyPicture a -> Bool # (>=) :: ReifyPicture a -> ReifyPicture a -> Bool # max :: ReifyPicture a -> ReifyPicture a -> ReifyPicture a # min :: ReifyPicture a -> ReifyPicture a -> ReifyPicture a # | |||||
| type Rep (ReifyPicture a) Source # | |||||
Defined in CodeWorld.Tasks.Types type Rep (ReifyPicture a) = D1 ('MetaData "ReifyPicture" "CodeWorld.Tasks.Types" "codeworld-tasks-0.1.0.0-HDTRBEVOXsr1YTQ9DZ9YSS" 'False) ((((C1 ('MetaCons "Rectangle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))) :+: C1 ('MetaCons "Circle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))) :+: (C1 ('MetaCons "Polyline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Shape) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Point])) :+: C1 ('MetaCons "Arc" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))))) :+: ((C1 ('MetaCons "Curve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Shape) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Point])) :+: C1 ('MetaCons "Lettering" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "StyledLettering" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TextStyle) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Font) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "Color" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Color) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Translate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))))) :+: (((C1 ('MetaCons "Scale" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "Dilate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "Rotate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "Reflect" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Clip" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))) :+: ((C1 ('MetaCons "Pictures" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])) :+: C1 ('MetaCons "And" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CoordinatePlane" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Logo" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Blank" 'PrefixI 'False) (U1 :: Type -> Type)))))) | |||||
Instances
| NFData Shape Source # | |||||
Defined in CodeWorld.Tasks.Types | |||||
| Data Shape Source # | |||||
Defined in CodeWorld.Tasks.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Shape -> c Shape # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Shape # dataTypeOf :: Shape -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Shape) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Shape) # gmapT :: (forall b. Data b => b -> b) -> Shape -> Shape # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Shape -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Shape -> r # gmapQ :: (forall d. Data d => d -> u) -> Shape -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Shape -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Shape -> m Shape # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Shape -> m Shape # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Shape -> m Shape # | |||||
| Generic Shape Source # | |||||
Defined in CodeWorld.Tasks.Types Associated Types
| |||||
| Show Shape Source # | |||||
| Eq Shape Source # | |||||
| Ord Shape Source # | |||||
| type Rep Shape Source # | |||||
Defined in CodeWorld.Tasks.Types type Rep Shape = D1 ('MetaData "Shape" "CodeWorld.Tasks.Types" "codeworld-tasks-0.1.0.0-HDTRBEVOXsr1YTQ9DZ9YSS" 'False) (C1 ('MetaCons "Closed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style)) :+: C1 ('MetaCons "Open" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)))) | |||||
Instances
| NFData Style Source # | |||||
Defined in CodeWorld.Tasks.Types | |||||
| Data Style Source # | |||||
Defined in CodeWorld.Tasks.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Style -> c Style # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Style # dataTypeOf :: Style -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Style) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Style) # gmapT :: (forall b. Data b => b -> b) -> Style -> Style # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r # gmapQ :: (forall d. Data d => d -> u) -> Style -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Style -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Style -> m Style # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style # | |||||
| Generic Style Source # | |||||
Defined in CodeWorld.Tasks.Types Associated Types
| |||||
| Show Style Source # | |||||
| Eq Style Source # | |||||
| Ord Style Source # | |||||
| type Rep Style Source # | |||||
Defined in CodeWorld.Tasks.Types type Rep Style = D1 ('MetaData "Style" "CodeWorld.Tasks.Types" "codeworld-tasks-0.1.0.0-HDTRBEVOXsr1YTQ9DZ9YSS" 'False) (C1 ('MetaCons "Outline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double))) :+: C1 ('MetaCons "Solid" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
Font modifier type used for stylized message rendering.
Instances
| NFData TextStyle Source # | |||||
Defined in CodeWorld.Tasks.Types | |||||
| Data TextStyle Source # | |||||
Defined in CodeWorld.Tasks.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TextStyle -> c TextStyle # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TextStyle # toConstr :: TextStyle -> Constr # dataTypeOf :: TextStyle -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TextStyle) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TextStyle) # gmapT :: (forall b. Data b => b -> b) -> TextStyle -> TextStyle # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TextStyle -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TextStyle -> r # gmapQ :: (forall d. Data d => d -> u) -> TextStyle -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TextStyle -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TextStyle -> m TextStyle # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TextStyle -> m TextStyle # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TextStyle -> m TextStyle # | |||||
| Generic TextStyle Source # | |||||
Defined in CodeWorld.Tasks.Types Associated Types
| |||||
| Show TextStyle Source # | |||||
| Eq TextStyle Source # | |||||
| Ord TextStyle Source # | |||||
| type Rep TextStyle Source # | |||||
Defined in CodeWorld.Tasks.Types type Rep TextStyle = D1 ('MetaData "TextStyle" "CodeWorld.Tasks.Types" "codeworld-tasks-0.1.0.0-HDTRBEVOXsr1YTQ9DZ9YSS" 'False) (C1 ('MetaCons "Plain" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Bold" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Italic" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
CodeWorld IO Interface
Entry points for rendering.
Defining the main function in terms of one of these
would draw the provided image to screen.
All of these are dummy functions (no-op IO actions) as this library does not implement the actual rendering process.