cloudy-0.1.0.0: src/Cloudy/NameGen.hs
module Cloudy.NameGen where import Data.Text (Text) import System.Random (randomRIO) nameWords :: [Text] nameWords = [ "able" , "account" , "acid" , "act" , "addition" , "adjustment" , "advertisement" , "agreement" , "air" , "amount" , "amusement" , "angle" , "angry" , "animal" , "answer" , "ant" , "apparatus" , "apple" , "approval" , "arch" , "argument" , "arm" , "army" , "art" , "attack" , "attempt" , "attention" , "attraction" , "authority" , "automatic" , "awake" , "baby" , "back" , "bad" , "bag" , "balance" , "ball" , "band" , "base" , "basin" , "basket" , "bath" , "beautiful" , "bed" , "bee" , "behaviour" , "belief" , "bell" , "bent" , "berry" , "bird" , "birth" , "bit" , "bite" , "bitter" , "black" , "blade" , "blood" , "blow" , "blue" , "board" , "boat" , "body" , "boiling" , "bone" , "book" , "boot" , "bottle" , "box" , "boy" , "brain" , "brake" , "branch" , "brass" , "bread" , "breath" , "brick" , "bridge" , "bright" , "broken" , "brother" , "brown" , "brush" , "bucket" , "building" , "bulb" , "burn" , "burst" , "business" , "butter" , "button" , "cake" , "camera" , "canvas" , "card" , "care" , "carriage" , "cart" , "cat" , "cause" , "certain" , "chain" , "chalk" , "chance" , "change" , "cheap" , "cheese" , "chemical" , "chest" , "chief" , "chin" , "church" , "circle" , "clean" , "clear" , "clock" , "cloth" , "cloud" , "coal" , "coat" , "cold" , "collar" , "colour" , "comb" , "comfort" , "committee" , "common" , "company" , "comparison" , "competition" , "complete" , "complex" , "condition" , "connection" , "conscious" , "control" , "cook" , "copper" , "copy" , "cord" , "cork" , "cotton" , "cough" , "country" , "cover" , "cow" , "crack" , "credit" , "crime" , "cruel" , "crush" , "cry" , "cup" , "current" , "curtain" , "curve" , "cushion" , "cut" , "damage" , "danger" , "dark" , "daughter" , "day" , "dead" , "dear" , "death" , "debt" , "decision" , "deep" , "degree" , "delicate" , "dependent" , "design" , "desire" , "destruction" , "detail" , "development" , "different" , "digestion" , "direction" , "dirty" , "discovery" , "discussion" , "disease" , "disgust" , "distance" , "distribution" , "division" , "dog" , "door" , "doubt" , "drain" , "drawer" , "dress" , "drink" , "driving" , "drop" , "dry" , "dust" , "ear" , "early" , "earth" , "edge" , "education" , "effect" , "egg" , "elastic" , "electric" , "end" , "engine" , "equal" , "error" , "event" , "example" , "exchange" , "existence" , "expansion" , "experience" , "expert" , "eye" , "face" , "fact" , "fall" , "false" , "family" , "farm" , "fat" , "father" , "fear" , "feather" , "feeble" , "feeling" , "female" , "fertile" , "fiction" , "field" , "fight" , "finger" , "fire" , "first" , "fish" , "fixed" , "flag" , "flame" , "flat" , "flight" , "floor" , "flower" , "fly" , "fold" , "food" , "foolish" , "foot" , "force" , "fork" , "form" , "fowl" , "frame" , "free" , "frequent" , "friend" , "front" , "fruit" , "full" , "future" , "garden" , "general" , "girl" , "glass" , "glove" , "goat" , "gold" , "good" , "government" , "grain" , "grass" , "great" , "green" , "grey" , "grip" , "group" , "growth" , "guide" , "gun" , "hair" , "hammer" , "hand" , "hanging" , "happy" , "harbour" , "hard" , "harmony" , "hat" , "hate" , "head" , "healthy" , "hearing" , "heart" , "heat" , "help" , "high" , "history" , "hole" , "hollow" , "hook" , "hope" , "horn" , "horse" , "hospital" , "hour" , "house" , "humour" , "ice" , "idea" , "ill" , "important" , "impulse" , "increase" , "industry" , "ink" , "insect" , "instrument" , "insurance" , "interest" , "invention" , "iron" , "island" , "jelly" , "jewel" , "join" , "journey" , "judge" , "jump" , "kettle" , "key" , "kick" , "kind" , "kiss" , "knee" , "knife" , "knot" , "knowledge" , "land" , "language" , "last" , "late" , "laugh" , "law" , "lead" , "leaf" , "learning" , "leather" , "left" , "leg" , "letter" , "level" , "library" , "lift" , "light" , "like" , "limit" , "line" , "linen" , "lip" , "liquid" , "list" , "living" , "lock" , "long" , "look" , "loose" , "loss" , "loud" , "love" , "low" , "machine" , "male" , "man" , "manager" , "map" , "mark" , "market" , "married" , "mass" , "match" , "material" , "meal" , "measure" , "meat" , "medical" , "meeting" , "memory" , "metal" , "middle" , "military" , "milk" , "mind" , "mine" , "minute" , "mist" , "mixed" , "money" , "monkey" , "month" , "moon" , "morning" , "mother" , "motion" , "mountain" , "mouth" , "move" , "muscle" , "music" , "nail" , "name" , "narrow" , "nation" , "natural" , "necessary" , "neck" , "need" , "needle" , "nerve" , "net" , "new" , "news" , "night" , "noise" , "normal" , "nose" , "note" , "number" , "nut" , "observation" , "offer" , "office" , "oil" , "old" , "open" , "operation" , "opinion" , "opposite" , "orange" , "order" , "organization" , "ornament" , "oven" , "owner" , "page" , "pain" , "paint" , "paper" , "parallel" , "parcel" , "part" , "past" , "paste" , "payment" , "peace" , "pen" , "pencil" , "person" , "physical" , "picture" , "pig" , "pin" , "pipe" , "place" , "plane" , "plant" , "plate" , "play" , "pleasure" , "plough" , "pocket" , "point" , "poison" , "polish" , "political" , "poor" , "porter" , "position" , "possible" , "pot" , "potato" , "powder" , "power" , "present" , "price" , "print" , "prison" , "private" , "probable" , "process" , "produce" , "profit" , "property" , "prose" , "protest" , "public" , "pull" , "pump" , "punishment" , "purpose" , "push" , "quality" , "question" , "quick" , "quiet" , "rail" , "rain" , "range" , "rat" , "rate" , "ray" , "reaction" , "reading" , "ready" , "reason" , "receipt" , "record" , "red" , "regret" , "regular" , "relation" , "religion" , "representative" , "request" , "respect" , "responsible" , "rest" , "reward" , "rhythm" , "rice" , "right" , "ring" , "river" , "road" , "rod" , "roll" , "roof" , "room" , "root" , "rough" , "round" , "rub" , "rule" , "run" , "sad" , "safe" , "sail" , "salt" , "same" , "sand" , "scale" , "school" , "science" , "scissors" , "screw" , "sea" , "seat" , "second" , "secret" , "secretary" , "seed" , "selection" , "self" , "sense" , "separate" , "serious" , "servant" , "shade" , "shake" , "shame" , "sharp" , "sheep" , "shelf" , "ship" , "shirt" , "shock" , "shoe" , "short" , "shut" , "side" , "sign" , "silk" , "silver" , "simple" , "sister" , "size" , "skin" , "skirt" , "sky" , "sleep" , "slip" , "slope" , "slow" , "small" , "smash" , "smell" , "smile" , "smoke" , "smooth" , "snake" , "sneeze" , "snow" , "soap" , "society" , "sock" , "soft" , "solid" , "son" , "song" , "sort" , "sound" , "soup" , "space" , "spade" , "special" , "sponge" , "spoon" , "spring" , "square" , "stage" , "stamp" , "star" , "start" , "statement" , "station" , "steam" , "steel" , "stem" , "step" , "stick" , "sticky" , "stiff" , "stitch" , "stocking" , "stomach" , "stone" , "stop" , "store" , "story" , "straight" , "strange" , "street" , "stretch" , "strong" , "structure" , "substance" , "sudden" , "sugar" , "suggestion" , "summer" , "sun" , "support" , "surprise" , "sweet" , "swim" , "system" , "table" , "tail" , "talk" , "tall" , "taste" , "tax" , "teaching" , "tendency" , "test" , "theory" , "thick" , "thin" , "thing" , "thought" , "thread" , "throat" , "thumb" , "thunder" , "ticket" , "tight" , "time" , "tin" , "tired" , "toe" , "tongue" , "tooth" , "top" , "touch" , "town" , "trade" , "train" , "transport" , "tray" , "tree" , "trick" , "trouble" , "trousers" , "true" , "turn" , "twist" , "umbrella" , "unit" , "use" , "value" , "verse" , "vessel" , "view" , "violent" , "voice" , "waiting" , "walk" , "wall" , "war" , "warm" , "wash" , "waste" , "watch" , "water" , "wave" , "wax" , "way" , "weather" , "week" , "weight" , "wet" , "wheel" , "whip" , "whistle" , "white" , "wide" , "wind" , "window" , "wine" , "wing" , "winter" , "wire" , "wise" , "woman" , "wood" , "wool" , "word" , "work" , "worm" , "wound" , "writing" , "wrong" , "year" , "yellow" , "young" ] randomName :: IO Text randomName = do nameIdx <- randomRIO (0, length nameWords - 1) pure $ nameWords !! nameIdx instanceNameGen :: IO Text instanceNameGen = do name1 <- randomName name2 <- randomName pure $ name1 <> "-" <> name2