Functions defined with an absurd pattern get no definition in Haskell
flupe opened this issue · comments
Lucas Escot commented
If a function with a single clause is defined with an absurd pattern, only the type signature gets generated in the corresponding Haskell code.
impossible : @0 ⊥ → a
impossible ()
{-# COMPILE impossible #-}
impossible :: a
We probably should have a default clause that throws a runtime error.
Jesper Cockx commented
The idea was that you shouldn't use absurd patterns and instead make an explicit call to the error
function.
Lucas Escot commented
Then it should be caught and prevented by agda2hs!