```hs ghci> fix error "Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: ..." -- repeating infinitely ``` explanation: ```hs error :: HasCallStack => String -> a -- basically raise an exception with a message, return type is a typevar so the expression will be left of the proper type but it wont ever actually evaluate fix :: (a -> a) -> a -- `fix`ed point of a function fix f = let g = f g in g -- yes, recursion in name binding, because why not -- or, fix f = f (fix f) -- but i think thats less efficient -- so, fix error = let g = error g in g -- error (error (error (...)))) ```
btw, from this example, it might seem like ``fix`` is useless, as it "wont ever evaluate", but, the funny part is: you dont actually need to fully evaluate something to make use of it in haskell, as it is lazily evaluated: you could have a lazy infinite list, and get its first N items or something like that and, well, it can fully evaluate, you can just not use the provided argument in ``f`` and evaluate to a final value