debois / elm-mdl

Elm-port of the Material Design Lite CSS/JS library
Apache License 2.0
965 stars 133 forks source link

elm-mdl 8.1.0 does not compile (indentation error) #305

Closed epsilonhalbe closed 7 years ago

epsilonhalbe commented 7 years ago

The error is in `src/Material/Layout.elm on line 800

                       value is available.
                    -}
                }
                (Decoder.map
                    (lift
                        << \key -> -- line 800
                            case key of
                                32
                                {- SPACE -}
                                ->
                                    ToggleDrawer

                                13
                                {- ENTER -}
                                ->
                                    ToggleDrawer

                                _ ->
                                    NOP

it should be

                        << \key ->
                            case key of
                                {- SPACE -}
                                32 -> ToggleDrawer
                                {- ENTER -}
                                13 -> ToggleDrawer
                                {- ANY OTHER KEY -}
                                _  -> NOP

elm version 0.18.0

vipentti commented 7 years ago

Do you have the error available?

epsilonhalbe commented 7 years ago

It should be easily reproduced by

> git clone https://github.com/debois/elm-mdl/
> cd elm-mdl
> elm make
Some new packages are needed. Here is the upgrade plan.

  Install:
    debois/elm-dom 1.2.3
    elm-lang/core 5.1.1
    elm-lang/dom 1.1.1
    elm-lang/html 2.0.0
    elm-lang/mouse 1.0.1
    elm-lang/virtual-dom 2.0.4
    elm-lang/window 1.0.1

Do you approve of this plan? [Y/n] y
Starting downloads...

  ● debois/elm-dom 1.2.3
  ● elm-lang/html 2.0.0
  ● elm-lang/dom 1.1.1
  ● elm-lang/core 5.1.1
  ● elm-lang/mouse 1.0.1
  ● elm-lang/window 1.0.1
  ●
 elm-lang/virtual-dom 2.0.4
Packages configured successfully!
-- PARSE ERROR --------------------------------------- ./src/Material/Layout.elm

Something went wrong while parsing a `case` in drawerButton's definition.

795|                        value is available.
796|                     -}
797|                 }
798|                 (Decoder.map
                                     ^
I was expecting to see more of that `case`. Maybe you forgot some code? Or maybe
the body of `drawerButton` needs to be indented?

Detected errors in 1 module.

I did install elm-0.18 from github manually (on a linux box using haskell stack) - which worked like a charm.

aforemny commented 7 years ago

The instructions you left are working for me on current v8. So I guess this has resolved? If it has not, please re-open.