elm-community / webgl

Moved to elm-explorations/webgl

Home Page:https://package.elm-lang.org/packages/elm-explorations/webgl/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove unnecessary tuples from the function calls

w0rm opened this issue · comments

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

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