The main package manager to use in Haskell is Cabal. Make sure that the Cabal version that you are using is at
least 3.0. Then build, repl, install, etc will use the upgraded v2-style versions that work with minimal problems.
Documentation
| {-# LANGUAGE BlockArguments #-} | |
| {-# LANGUAGE Rank2Types #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# OPTIONS_GHC -Wall -Werror -Wextra -Wno-name-shadowing #-} | |
| module HyperList where | |
| import Data.Function ((&)) | |
| newtype a -&> b = Hyp {invoke :: (b -&> a) -> b} |
| {-# LANGUAGE BlockArguments #-} | |
| {-# LANGUAGE Rank2Types #-} | |
| {-# OPTIONS_GHC -Wall -Werror -Wextra -Wno-name-shadowing #-} | |
| module HyperPhases where | |
| import Control.Applicative (liftA2) | |
| import Data.Functor ((<&>)) | |
| newtype Phases f a = Phases |
| use std::sync::{Condvar, Mutex}; | |
| pub struct MVar<T> { | |
| locked_value: Mutex<Option<T>>, | |
| empty_cond: Condvar, | |
| full_cond: Condvar, | |
| } | |
| // Methods of MVar that need the Clone type constraint | |
| impl<T> MVar<T> |
| {-# LANGUAGE | |
| GADTs | |
| , DataKinds | |
| , PolyKinds | |
| , RankNTypes | |
| , TypeOperators | |
| , KindSignatures | |
| , TypeApplications | |
| , FlexibleContexts | |
| , FlexibleInstances |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| {-# LANGUAGE UnsaturatedTypeFamilies #-} | |
| import GHC.TypeLits | |
| import Prelude hiding (Functor, Semigroup) | |
| type Main = (Fizz <> Buzz) <$> (0 `To` 100) |
| #! /usr/bin/env nix-shell | |
| #! nix-shell -i runghc -p "haskellPackages.ghcWithPackages(p: with p; [type-level-sets])" | |
| #! nix-shell -I nixpkgs=channel:nixos-18.03 | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE FlexibleInstances #-} |
| Copyright 2017 Austin Seipp | |
| Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
| 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
| 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
| 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |