~statianzo/sevenlangs

18767fbbc31874b094f763ec60d5449985e964aa — Jason Staten 2 years ago d5b423c
cabal, to make the extension happy
5 files changed, 42 insertions(+), 3 deletions(-)

A haskell/Main.hs
A haskell/Setup.hs
M haskell/all_even.hs
A haskell/haskell.cabal
D haskell/stack.yaml
A haskell/Main.hs => haskell/Main.hs +4 -0
@@ 0,0 1,4 @@
module Main where

main :: IO ()
main = putStrLn "Hello, Haskell!"

A haskell/Setup.hs => haskell/Setup.hs +2 -0
@@ 0,0 1,2 @@
import Distribution.Simple
main = defaultMain

M haskell/all_even.hs => haskell/all_even.hs +12 -3
@@ 3,9 3,18 @@ module Main where
  allEven [] = []
  allEven (h:t) = if even h then h:allEven t else allEven t

  -- >>> :t allEven
  -- allEven :: [Integer] -> [Integer]
  --
  allEven2 :: [Integer] -> [Integer]
  allEven2 xs = [x | x <- xs, even x]

  allEven3 :: [Integer] -> [Integer]
  allEven3 = filter even

  -- >>> allEven [1, 2, 3, 4, 5, 6]
  -- [2,4,6]
  -- >>> allEven2 [1, 2, 3, 4, 5, 6]
  -- [2,4,6]
  -- >>> allEven3 [1, 2, 3, 4, 5, 6]
  -- [2,4,6]

  main :: IO()
  main =

A haskell/haskell.cabal => haskell/haskell.cabal +24 -0
@@ 0,0 1,24 @@
cabal-version:       >=1.10
-- Initial package description 'haskell.cabal' generated by 'cabal init'.
-- For further documentation, see http://haskell.org/cabal/users-guide/

name:                haskell
version:             0.1.0.0
-- synopsis:
-- description:
-- bug-reports:
-- license:
license-file:        LICENSE
author:              Jason Staten
maintainer:          code@jxs.me
-- copyright:
-- category:
build-type:          Simple

executable haskell
  main-is:             Main.hs
  -- other-modules:
  -- other-extensions:
  build-depends:       base >=4.12 && <4.13
  -- hs-source-dirs:
  default-language:    Haskell2010

D haskell/stack.yaml => haskell/stack.yaml +0 -0