feldspar-language-0.7: A functional embedded language for DSP and parallelism

Safe HaskellNone

Feldspar.Core.Frontend.Switch

Synopsis

Documentation

select :: (Eq a, Syntax b) => Data a -> [(Data a, b)] -> b -> bSource

Deprecated: select will generate a tree of if-statements. Use switch instead

Select between the cases based on the value of the scrutinee.

switch :: (Eq (Internal a), Syntax a, Syntax b) => b -> [(a, b)] -> a -> bSource

Select between the cases based on the value of the scrutinee. If no match is found return the first argument