You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following definition compiles in Agda (please ignore the lack of correctness for now):
{-# TERMINATING #-}survey : {a :Set} → (Zipper a -> Zipper a) -> List a -> List a
survey {a} f = maybe [] go ∘ fromList
wherego : Zipper a → List a
go z =let z' = f z in maybe (unzipper z') go (right z')
{-# COMPILE AGDA2HS survey #-}
But the resulting Haskell will not compile because of mismatched type variables:
survey:: (Zippera->Zippera) -> [a] -> [a]
survey f =maybe[] go . fromList
wherego::Zippera-> [a]
go z =maybe (unzipper (f z)) go (right (f z))
It should of course be, with ScopedTypeVariables enabled:
survey::foralla. (Zippera->Zippera) -> [a] -> [a]
survey f =maybe[] go . fromList
wherego::Zippera-> [a]
go z =maybe (unzipper (f z)) go (right (f z))
The text was updated successfully, but these errors were encountered:
The following definition compiles in Agda (please ignore the lack of correctness for now):
But the resulting Haskell will not compile because of mismatched type variables:
It should of course be, with
ScopedTypeVariables
enabled:The text was updated successfully, but these errors were encountered: