Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------
- -- |
- -- Module : Hello++++
- -- Describtion : The simplest fully Non-Turing complete programming language
- -- with only one command `Hello World` which prints out. Based
- -- on Hello++ which is by itself based on Hello.
- -------------------------------------------------------------------------------
- module HelloPPPP where
- import Prelude
- import Control.Monad.Eff (Eff)
- import Control.Monad.Eff.Console (CONSOLE, log)
- import Control.MonadZero (guard)
- import Control.Monad.Reader.Class (ask)
- import Node.ReadLine.Aff.Simple as RLA
- on :: forall a b c. (b -> b -> c) -> (a -> b) -> a -> a -> c
- on f g = \x y -> f x `g` f y
- main :: forall e. Eff (console :: CONSOLE | e) Unit
- main = do
- inp <- liftAff <<< RLA.setLineHandler =<< ask
- (when (inp == _) `on` log) "Hello World"
Add Comment
Please, Sign In to add comment