agda2hs icon indicating copy to clipboard operation
agda2hs copied to clipboard

Dot patterns in arguments corresponding to module parameters should not be allowed

Open jespercockx opened this issue 11 months ago • 0 comments

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

jespercockx avatar Mar 12 '24 14:03 jespercockx