Guest User

Untitled

a guest
Nov 18th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. -------------------------------------------------------------------------------
  2. -- |
  3. -- Module : Hello++++
  4. -- Describtion : The simplest fully Non-Turing complete programming language
  5. -- with only one command `Hello World` which prints out. Based
  6. -- on Hello++ which is by itself based on Hello.
  7. -------------------------------------------------------------------------------
  8.  
  9. module HelloPPPP where
  10.  
  11. import Prelude
  12. import Control.Monad.Eff (Eff)
  13. import Control.Monad.Eff.Console (CONSOLE, log)
  14. import Control.MonadZero (guard)
  15. import Control.Monad.Reader.Class (ask)
  16.  
  17. import Node.ReadLine.Aff.Simple as RLA
  18.  
  19. on :: forall a b c. (b -> b -> c) -> (a -> b) -> a -> a -> c
  20. on f g = \x y -> f x `g` f y
  21.  
  22. main :: forall e. Eff (console :: CONSOLE | e) Unit
  23. main = do
  24. inp <- liftAff <<< RLA.setLineHandler =<< ask
  25. (when (inp == _) `on` log) "Hello World"
Add Comment
Please, Sign In to add comment