Skip to content

ArrowChoice and RebindableSyntax causes core lint error

The below module causes a panic about "no skolem info" in ghc 8.6, 8.8 and 8.10, and a core lint error in ghc 9.0, 9.2, 9.4, and 9.7.20230301

{-# LANGUAGE Arrows           #-}
{-# LANGUAGE RebindableSyntax #-}

{-# OPTIONS_GHC -dcore-lint #-}

module T where

import Prelude
import Control.Arrow

ifThenElse :: Bool -> a -> a -> a
ifThenElse b x y = if b then x else y

f :: ArrowChoice arr => (Int -> Int -> Bool) -> arr Int t -> arr (Int, Int) t
f p f = proc (x,y) ->
    if p x y
      then f -< x+1
      else f -< y+2
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information