agda2hs
agda2hs copied to clipboard
Dot patterns in arguments corresponding to module parameters should not be allowed
open import Haskell.Prelude
module _ where
cast : {a b : Set} → @0 a ≡ b → a → b
cast {a} {b} = cast'
where
cast' : @0 a ≡ b → a → b
cast' refl x = x
{-# COMPILE AGDA2HS cast #-}
This is currently accepted, but compiles to invalid Haskell code:
cast :: a -> b
cast = cast'
where
cast' :: a -> b
cast' x = x