PureScript

Comments Off on PureScript

“`purs
module Main where

main :: IO ()
main = putStrLn “Hello World!”
“`

Explanation:

  • module Main where: This line declares a module named Main. In PureScript, your program must be within a module. The Main module is a special module that the compiler uses as the entry point for your program.
  • main :: IO (): This declares the main function.
    • main is the entry point of your application. The compiler will execute this function when your program runs.
    • :: IO () specifies the type of the main function. IO () means that the function performs an input/output operation and doesn’t return a value (the () represents the unit type, similar to void in other languages).
  • main = putStrLn "Hello World!": This is the body of the main function.
    • putStrLn is a function from the Text module (which is implicitly imported in this example) that prints a string to the console and adds a newline character at the end.
    • "Hello World!" is the string literal to be printed.

How to compile and run this code:

  1. Save the code: Save the code in a file named Main.purs.
  2. Compile: Use the PureScript compiler (psc) to compile the code:
    psc Main.purs
    

    This will generate an executable file named Main.

  3. Run: Execute the compiled program:

    ./Main
    

    The output will be:

    Hello World!
    

Dependencies:

The putStrLn function comes from the Text module. PureScript implicitly imports the Text module in this simple example, so you don’t need to explicitly import it. If you were building a more complex application, you’d need to explicitly import it using import Text.

Prompt
young woman, beautiful face, standing, great body, gorgeous figure, long legs, pretty eyes, long hair, learns PureScript programming language, beautiful background, magnificent scenery, Agnolo Bronzino style, HD, sharp focus, stunningly beautiful, hyper-detailed, Neo-Rococo, curved forms, naturalistic ornamentation, elaborate, decorative, gaudy, Neo-Rococo

Negative prompt
verybadimagenegative, bad_prompt_version2-neg, easynegative, FastNegativeV2, ugly, deformed, noisy, blurry, low contrast, extra eyes, bad eyes, ugly eyes, imperfect eyes, deformed pupils, deformed iris, cross-eyed, poorly drawn face, bad face, fused face, ugly face, worst face, unrealistic skin texture, out of frame, poorly drawn hands, cloned face, double face, blurry, bad quality

Text model: gemma3

Image model: Artium