Skip to content

TypeAbstractions example produces a parse error

Summary

The example from the documentation

f5 :: [forall a. a -> a -> a] f5 = [ \ @a x _ -> x :: a, \ @a _ y -> y :: a ] gives the error

error: [GHC-58481] parse error on input ‘@’ | 26 | f5 = [ \ @a x _ -> x :: a,

Environment

GHC9.8.2

Edited by Jkensik
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information