Parcourir la source

Update haskell setup.

cray
Mitch Tishmack il y a 11 ans
Parent
révision
fd230e41e4
5 fichiers modifiés avec 31 ajouts et 1 suppressions
  1. +9
    -0
      haskell/.ghc.hs
  2. +4
    -0
      haskell/.ghci
  3. +1
    -1
      haskell/.profile.d/10-path-haskell.sh
  4. +15
    -0
      haskell/.profile.d/20-functions-haskell.sh
  5. +2
    -0
      haskell/.profile.d/99-alias-haskell.sh

+ 9
- 0
haskell/.ghc.hs Voir le fichier

@@ -0,0 +1,9 @@
import Control.Applicative
import Control.Monad
import Data.Monoid
import Data.Maybe
import Data.List
import Data.Bool
import qualified Data.Set as S
import qualified Data.Map as M
import qualified Data.Text as T

+ 4
- 0
haskell/.ghci Voir le fichier

@@ -1 +1,5 @@
:set prompt "λ "
:set -XPackageImports
:set -XOverloadedStrings
:set -XScopedTypeVariables -XRankNTypes
:l ~/.ghc.hs

+ 1
- 1
haskell/.profile.d/10-path-haskell.sh Voir le fichier

@@ -1,3 +1,3 @@
# haskell/.profile.d/10-path-haskell.sh
PATH="${HOME}/.cabal/bin:${PATH}:${HOME}/.cabin/bin"
PATH="${PATH}:${HOME}/.cabal/bin"
export PATH

+ 15
- 0
haskell/.profile.d/20-functions-haskell.sh Voir le fichier

@@ -0,0 +1,15 @@
# haskell/.profile.d/20-functions-haskell.sh
hmap()
{
ghc -e "interact ($*)"
}

hmapl()
{
hmap "unlines.($*).lines"
}

hmapw()
{
hmapl "map (unwords.($*).words)"
}

+ 2
- 0
haskell/.profile.d/99-alias-haskell.sh Voir le fichier

@@ -0,0 +1,2 @@
# haskell/.profile.d/99-alias-haskell.sh
alias ghce="ghc -e ':l ~/.ghc.hs' -e"

Chargement…
Annuler
Enregistrer