Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jespercockx opened this issue Mar 12, 2024 · 0 comments
Milestone

Comments

@jespercockx
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant