Haskell !! operator not realised
Closed this issue · 9 comments
This version of Fibonacci, which compiles with Haskell fails with Frege;
lazyListRecursive :: Integer -> Integer
lazyListRecursive n
| n < 0 = error exceptionErrorMessage
| otherwise = fibonacciSequence !! fromInteger n
where
fibonacciSequence = fs 0 1
where
fs a b = a : fs b (a + b)
The error is:
can't resolve `!!`, did you mean `!~` perhaps?
I am using a 3.23 as there is no 3.24 available on Maven or JCenter.
Does this mean the !! is deprecated and being removed?
Ok, in that case, you'll find it in Data.List
import Data.List (!!)
Ah, OK so where Haskell doesn't require explicitly importing, Frege does…
No worries now I know. I failed to find that other issue, which is embarrassing for me.
@Ingo60 You said "You must use a compiler earlier than 3.24.27" but I think you meant "You must be using a compiler earlier than 3.24.27" The difference is actually rather crucial, and explains some of my comments which may have seemed weird to you at the time.
Interesting that German does not distinguish a command from an observation. :-) But that is for another medium of exchange.
My pressure now has to be to get 3.24.100.1 alive and well on Maven or JCenter – it is not currently.