Skip to content

SpecConstr does not specialise for literal arguments.

I would expect this code to specialize:

{-# NOINLINE bar #-}
bar = goo 0 1
  where
    goo :: Int -> Int -> Int
    goo 0 1 = 1
    goo _ (0) = 3
    goo n x = goo n (x-1)

But after worker-wrapper the go function takes literal ints for which SpecConstr currently doesn't create specializations.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information