Compilation of non-erased module parameters
jespercockx opened this issue · comments
Jesper Cockx commented
Currently agda2hs
assumes that all non-erased module parameters are types and should be compiled to explicit foralls
. For example:
module _ (x : Int) where
foo : Int
foo = x
{-# COMPILE AGDA2HS foo #-}
is compiled to
foo :: forall x . Int
foo = x
We should either compile the module parameter to a regular function argument, or else throw an error that non-type module parameters are not supported.
Lucas Escot commented
With current master, this compiles to:
foo :: Int
foo x = x
Still bogus, a bit less so. Investigating now.
Jesper Cockx commented
This is fixed by #304