[Haskell-beginners] Non type-variable argument
Nikolay Kurtov
nkurtov at gmail.com
Wed Jun 14 18:52:32 UTC 2017
Hello everyone,
Please help me compile the program without the -XFlexibleContexts extension.
I don't understand the "Non type-variable argument" error message and
googling does not shed any light on the problem.
Any help is appreciated.
% ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3
% ghc orfest.hs
orfest.hs:6:1:
Non type-variable argument
in the constraint: AM.MArray a (t, t, t, [i]) m
(Use FlexibleContexts to permit this)
When checking that ‘go’ has the inferred type
go :: forall (m :: * -> *) t t1 t2 t3 (a :: * -> * -> *) i.
(Read t, AM.Ix i, AM.MArray a (t, t1, t2, [i]) m) =>
a i (t, t1, t2, [i]) -> [[Char]] -> t3 -> i -> m (t3, i)
This works:
% ghc orfest.hs -XFlexibleContexts
Regards,
Orfest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170614/9982367e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: orfest.hs
Type: text/x-haskell
Size: 1087 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170614/9982367e/attachment.hs>
More information about the Beginners
mailing list