Skip to content

-fdefer-typed-holes does not defer in ghci expression evaluation

with ghci-9.6.1, a hole gives an error in expression ... evaluation? (no, I guess - in type checking)

ghci> :set -fdefer-typed-holes 
ghci> print [True,_]

<interactive>:2:13: error: [GHC-88464]
    • Found hole: _ :: Bool
    • In the first argument of ‘print’, namely ‘[True, _]’
...

but this is the behaviour I expect (warning in type checking, exception during evaluation)

ghci> x = [True,_]

<interactive>:3:11: warning: [GHC-88464] [-Wtyped-holes]
    • Found hole: _ :: Bool
...
ghci> print x
[True,*** Exception: <interactive>:3:11: error: [GHC-88464]
    • Found hole: _ :: Bool
...
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information