@@ -204,37 +204,37 @@ collage : Int -> Int -> [Form] -> Element
204collage = Native.Graphics.Collage.collage
204collage = Native.Graphics.Collage.collage
207−type Path = [(number,number)]
207+type Path = [(Float,Float)]
209{-| Create a path that follows a sequence of points. -}
209{-| Create a path that follows a sequence of points. -}
210−path : [(number,number)] -> Path
210+path : [(Float,Float)] -> Path
211path ps = ps
211path ps = ps
213{-| Create a path along a given line segment. -}
213{-| Create a path along a given line segment. -}
214−segment : (number,number) -> (number,number) -> Path
214+segment : (Float,Float) -> (Float,Float) -> Path
215segment p1 p2 = [p1,p2]
215segment p1 p2 = [p1,p2]
217−type Shape = [(number,number)]
217+type Shape = [(Float,Float)]
219{-| Create an arbitrary polygon by specifying its corners in order.
219{-| Create an arbitrary polygon by specifying its corners in order.
220`polygon` will automatically close all shapes, so the given list
220`polygon` will automatically close all shapes, so the given list
221of points does not need to start and end with the same position.
221of points does not need to start and end with the same position.
223−polygon : [(number,number)] -> Shape
223+polygon : [(Float,Float)] -> Shape
224polygon points = points
224polygon points = points
226{-| A rectangle with a given width and height. -}
226{-| A rectangle with a given width and height. -}
227−rect : number -> number -> Shape
227+rect : Float -> Float -> Shape
228rect w h = let hw = w/2
228rect w h = let hw = w/2
230 in [ (0-hw,0-hh), (0-hw,hh), (hw,hh), (hw,0-hh) ]
230 in [ (0-hw,0-hh), (0-hw,hh), (hw,hh), (hw,0-hh) ]
232{-| A square with a given edge length. -}
232{-| A square with a given edge length. -}
233−square : number -> Shape
233+square : Float -> Shape
234square n = rect n n
234square n = rect n n
236{-| An oval with a given width and height. -}
236{-| An oval with a given width and height. -}
237−oval : number -> number -> Shape
237+oval : Float -> Float -> Shape
238oval w h =
238oval w h =
239 let n = 50
239 let n = 50
240 t = 2 * pi / n
240 t = 2 * pi / n
@@ -244,7 +244,7 @@ oval w h =
244 in List.map f [0..n-1]
244 in List.map f [0..n-1]
246{-| A circle with a given radius. -}
246{-| A circle with a given radius. -}
247−circle : number -> Shape
247+circle : Float -> Shape
248circle r = oval (2*r) (2*r)
248circle r = oval (2*r) (2*r)
250{-| A regular polygon with N sides. The first argument specifies the number
250{-| A regular polygon with N sides. The first argument specifies the number
@@ -253,7 +253,7 @@ of sides and the second is the radius. So to create a pentagon with radius
254 ngon 5 30
254 ngon 5 30
256−ngon : Int -> number -> Shape
256+ngon : Int -> Float -> Shape
257ngon n r =
257ngon n r =
258 let m = toFloat n
258 let m = toFloat n
259 t = 2 * pi / m
259 t = 2 * pi / m