packages feed

sbv-14.0: SBVTestSuite/TestSuite/CompileTests/SCase/SCase11.hs

{-# LANGUAGE QuasiQuotes #-}

{-# OPTIONS_GHC -Wall -Werror -ddump-splices #-}

module T where

import Expr
import Data.SBV

t :: SExpr -> SInteger
t e = [sCase| e of
               Zero          -> 0
               Num i         -> i
               _ -> 3
               Var s         -> ite (s .== "a") 1 2
               Add a b       -> t e + t b
               Let _   _a  b -> t b
      |]