elm-community / webgl

Moved to elm-explorations/webgl
https://package.elm-lang.org/packages/elm-explorations/webgl/latest
BSD 3-Clause "New" or "Revised" License
131 stars 18 forks source link

Remove unnecessary tuples from the function calls #20

Closed w0rm closed 7 years ago

w0rm commented 7 years ago
type FunctionCall
    = Enable Capability
    | Disable Capability
    | BlendColor ( Float, Float, Float, Float )
    | BlendEquation BlendMode
    | BlendEquationSeparate ( BlendMode, BlendMode )
    | BlendFunc ( BlendOperation, BlendOperation )
    | DepthFunc CompareMode
    | SampleCoverageFunc ( Float, Bool )
    | StencilFunc ( CompareMode, Int, Int )
    | StencilFuncSeparate ( FaceMode, CompareMode, Int, Int )
    | StencilOperation ( ZMode, ZMode, ZMode )
    | StencilOperationSeparate ( FaceMode, ZMode, ZMode, ZMode )

can become

type FunctionCall
    = Enable Capability
    | Disable Capability
    | BlendColor Float Float Float Float
    | BlendEquation BlendMode
    | BlendEquationSeparate BlendMode BlendMode
    | BlendFunc BlendOperation BlendOperation
    | DepthFunc CompareMode
    | SampleCoverageFunc Float Bool
    | StencilFunc CompareMode Int Int
    | StencilFuncSeparate FaceMode CompareMode Int Int
    | StencilOperation ZMode ZMode ZMode
    | StencilOperationSeparate FaceMode ZMode ZMode ZMode
w0rm commented 7 years ago

As discussed with Evan, we will not export constructors, but rather define a function for each function call.