Frege/frege

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?

See also #242

You must use a compiler earlier than 3.24.27

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…

This is exactly the incompatibility we fixed in #242

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.

@russel Yes, that's right, sorry for that. In German, there is no such grammatical difference.

By the way, the other issue was #242

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.