Unknown option -XPatternSig used in warning
Bas van Dijk
v.dijk.bas at gmail.com
Wed Sep 19 08:20:19 EDT 2007
Hello,
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.7.20070915
When loading the following incorrect program in ghci:
foo (x :: a) = x
ghci rightly complains:
Illegal signature in pattern: a
Use -XPatternSigs to permit it
OK so I follow the advice and load:
{-# OPTIONS_GHC -XPatternSigs #-}
foo (x :: a) = x
Now ghci complains:
unknown flags in {-# OPTIONS #-} pragma: -XPatternSigs ???
The following works though:
{-# OPTIONS_GHC -fglasgow-exts #-}
foo (x :: a) = x
results in:
A pattern type signature cannot bind scoped type variables `a'
unless the pattern has a rigid type context
In the pattern: x :: a
In the definition of `foo': foo (x :: a) = x
Which I expect.
Should I file a bug report, or is there an easy fix?
regards,
Bas van Dijk
More information about the Glasgow-haskell-users
mailing list