PSI Blog Programming, Linux, Gaming, ...
Posts with the tag Haskell:

Functional Programming in Rust and Haskell

Have you ever wondered what is functional programming? This big buzz word everyone is talking about? What is Functional Programming? In Functional Programming everything is implemented using functions. Functions are pieces of code which may receive some input value(parameters) and may return some output value. In this case we have the say_hello function which has no parameters and no output value, this function prints to the screen “hello world”. Rust Example: fn say_hello(){ println!("hello world"); } Haskell Example: say_hello = putStrLn "hello world" And in this case we have the function add_one which has an input value num of the type i32 and returns that value plus 1.

X Could not find Module `Prelude` fix

Today I was experimenting with Haskell and this error struck me: X Could not find Module Prelude There are files missing in the base-x-x-x package, This has an easy fix: Install the ghc-static package sudo pacman -S ghc-static Then all should compile easily.