agda / agda2hs

Compiling Agda code to readable Haskell

Home Page:https://agda.github.io/agda2hs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jespercockx opened this issue · 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