Description
Quick Summary: Compilation hangs and an elm process remains active after <ctrl-c>
. Memory usage of this process reaches >16GB (memory available to system) which bogged down my system.
SSCCE
module Main exposing (..)
foldMap : (a -> b) -> (a -> c) -> (b -> c -> c) -> a -> c
foldMap fab fac fbc a = fac a
break : Float -> (Float, Float)
break input = foldMap identity (\x -> (x, x)) (\( low, high ) x -> ( min low x, max high x )) input
- Elm: Elm 0.19.1
- Browser: NA
- Operating System: macOS 11.4
Additional Details
elm make
hangs after printing Compiling ...
. The orphan elm process only continues if waiting for longer than 5-6 seconds before using to cancel the elm make command.
When changing (\( low, high ) x ->
to (\x ( low, high ) ->
the snippet compiles as expected, and changing ( min low x, max high x )
to ( x, x )
results in the compiler error `foldMap` needs the 4th argument to be: ( ∞, ∞ )
.
Came across this writing a foldMap to calculate the min and max of a List Float but have simplified to get a minimal reproduction.
Love your work!
Metadata
Metadata
Assignees
Labels
No labels