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

Safe HaskellNone
LanguageHaskell2010

Feldspar.Core.Frontend.Switch

Synopsis

Documentation

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

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 -> b Source

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