unexpected parsing error, "in" is treated as reserved word in type class constraints
|Reported by:||carter||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
I'm amidst writing a nice ffi binding to BLAS for ghc 7.6 and newer, and I hit an bizarre parser error when i had the follwoing type for a function transpose
transposeMatrix :: (in ~ (Transpose out) , out ~ (Transpose in) ) => Matrix in elem -> Matrix out elem transposeMatrix (RowMajorMatrix x y stride arr)= (ColMajorMatrix x y stride arr) transposeMatrix (ColMajorMatrix x y stride arr) =(RowMajorMatrix x y stride arr)
src/Numerical/OpenBLAS/MatrixTypes.hs:83:21: parse error on input ‛in’ Failed, modules loaded: none.
i hit this error in GHC head I built this week AND with ghc 7.6
i'm pretty sure "in" shouldn't be a reserved word in types! If i rename "in" to "inor" the parser error goes away.
if this is valid behavior, it'd be hepful to get a more precise parser error like "encountered reserved word "in", expected a variable"
attaching the full module for your pleasure