From 5f38b880cb0eed798a00c293913ca421373a9058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Quenneville?= Date: Fri, 31 Oct 2025 11:47:34 -0400 Subject: [PATCH] Remove Haskell guides We don't write Haskell on a regular basis anymore. We haven't touched the guide in years. It's time to remove it. --- README.md | 1 - haskell/README.md | 19 ---------- haskell/sample.hs | 94 ----------------------------------------------- 3 files changed, 114 deletions(-) delete mode 100644 haskell/README.md delete mode 100644 haskell/sample.hs diff --git a/README.md b/README.md index 24556b7b..e804bff6 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,6 @@ programming in style. - [Elixir](/elixir/) - [ERB](/erb/) - [HAML](/haml/) -- [Haskell](/haskell/) - [HTML](/html/) - [Java](/java/) - [JavaScript & TypeScript](/javascript-typescript/) diff --git a/haskell/README.md b/haskell/README.md deleted file mode 100644 index 76b131a1..00000000 --- a/haskell/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Haskell - -[Sample](sample.hs) - -- Avoid partial functions (`head`, `read`, etc). -- Compile code with `-Wall -Werror`. -- Break long expressions before operators or keywords. -- Break long type signatures between arguments. -- Use a blank line between pragma and module statements. -- Order imports in three sections, separating each by a blank line: [standard - libraries], third-party libraries, application modules. Within each section, - alphabetize the imports and place qualified imports last. -- Order pragma statements alphabetically. -- Use comma-first style exports, records, and lists. -- Use four-space indentation except the `where` keyword which is indented two - spaces. [Example](sample.hs#L41). -- Use only one pragma statement per line. - -[standard libraries]: http://www.haskell.org/ghc/docs/latest/html/libraries/index.html diff --git a/haskell/sample.hs b/haskell/sample.hs deleted file mode 100644 index 828a757e..00000000 --- a/haskell/sample.hs +++ /dev/null @@ -1,94 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} - -module Haskell - ( SomeType(..) - , someFunction - , anotherFunction - ) where - -import Control.Monad.State (state, evalState) -import Data.List (foldl') -import Data.Text (Text) -import qualified Data.Map as M -import qualified Data.Text as T - -import Database.Persistent (runSql) -import Yesod -import Yesod.Auth (requireAuthId, maybeAuthId) - -import Foundation -import Settings - -data Colors = Red | Blue | Green - -data HTTPException - = NotFound - | NotAuthorized - | InternalServerError - | Whatever - | YouGetTheIdea - -data SomeType = SomeType - { accessorOne :: String - , accessorTwo :: String - , accessorThree :: String - } deriving Show - -someType :: SomeType -someType = SomeType - { accessorOne = "foo" - , accessorTwo = "bar" - , accessorThree = theThird - } - where - theThird :: String - theThird = "bar" - -myFunction :: Show a - => a - -> a - -> (a -> b) - -> (b, b) -myFunction = -- ... - -aList :: [String] -aList = - [ one - , two - , three - ] - -aShortFunction = let x = 7 in x + 2 - -aLongerFunction = - let x = 42 - y = 57 - z = 57 - in sum $ [x, y, z] - -aCasedFunction x = - case x of - Just y -> y - Nothing -> 0 - -aShortIf x = if x then y else z - -aLongIf xs = - if take 10 xs == [1..10] - then drop 2 $ reverse xs - else [] - -lineBreaks = take 3 -- prefix - . reverse . drop 1 . reverse . drop 1 -- strip - . map upcase -- scream - -main :: IO () -main = do - let x = getX - andY = getY - - a <- getA - andB <- getB - - return $ x + andY + a + andB