Compare commits

...

28 Commits

Author SHA1 Message Date
Daniel Wagner
51dfd77f3c note a few more changes 2017-07-31 21:59:08 -07:00
Daniel Wagner
2e3e61a2b4 Merge remote-tracking branch 'ScottSedgwick/StackCompatibility'
Conflicts:
	encoding.cabal
2017-07-30 18:00:41 -07:00
Daniel Wagner
52aabc47cd mark upper and lower bounds on library dependencies 2017-07-30 17:40:22 -07:00
Daniel Wagner
8925f398af -fno-warn-tabs 2017-07-30 17:39:58 -07:00
Daniel Wagner
7adcda8547 record what's new 2017-07-30 12:31:30 -07:00
Daniel Wagner
59b81ad775 avoid using revisions
Hackage revisions are great, but since we've removed an outdated flag we
can't use them. We'll have to use an actual point release.
2017-07-30 12:28:46 -07:00
Scott Sedgwick
8727ac25a5 Made package stack compatible
Created and added stack.yaml and .gitignore files.
Relaxed the version dependency on 'binary' package in cabal file.  Is that OK?
Also brought the minimum cabal version to >=1.8, so I could add a test target that pulls in the library.
Changed all tabs to spaces - I don't know when the Haskell compiler started giving warnings about that.
2017-07-28 14:17:42 +10:00
Daniel Wagner
6284c1a677 fix up repository metadata 2017-07-15 16:11:47 -07:00
Daniel Wagner
f1a2889bfe fix a typo in the cabal file 2017-07-15 16:11:32 -07:00
Daniel Wagner
7c07f48a45 fix dependencies so it builds
Ignore-this: 1dcaab9390e2cd47b7c429620e697003

darcs-hash:20170715230208-7469c-dcf2ca84d39bd0ca519b47e744f353c05daed1f7
2017-07-15 16:02:08 -07:00
Daniel Wagner
4be65c2f13 bump version to 0.8.1
Ignore-this: 3a50200de9ccce5f0a648ef68615a0cf

darcs-hash:20160731183857-7469c-54bc23ccb38615550b3d4ead6fed2cdcf8e5d5b8
2016-07-31 11:38:57 -07:00
endhrk
63e17e9a22 Implemented CP932 and ShiftJIS encodings
Ignore-this: 67153b679dabd226a7b1fab3ff501453

darcs-hash:20160725070504-fb088-842c21423d713a81a8ada591dffdfbb9cd08b68c
2016-07-25 00:05:04 -07:00
Daniel Wagner
de78ca5f34 update CHANGELOG + bump tag number in cabal file
Ignore-this: ef232119c63c53dcce67c96d5eee0f5a

darcs-hash:20150206173636-7469c-34a56c0a5c25aac0498446a7af9f0eb2fe90035a
2015-02-06 09:36:36 -08:00
Daniel Wagner
2be6331521 bump dependencies and version number
Ignore-this: abdc3ce060ae830738fc026f33a590b2

darcs-hash:20150206173325-7469c-c1698de4dfca938fcf6fd20cbccaeb08951bdebc
2015-02-06 09:33:25 -08:00
Daniel Wagner
2e910834dc unbreak the build
Ignore-this: d1335751599d3d5e80360d415984e1b8

darcs-hash:20150206173311-7469c-f1074a310d4d296496989e0fcb900a1bf93ae996
2015-02-06 09:33:11 -08:00
ryan.trinkle
e5e64a794f Add Applicative instances for instances of Monad
Ignore-this: a95ef4a320b4c1506f5352716a656385

darcs-hash:20150116211446-5ff09-fca82019a01b124f7c93efe6f25ff73d1abfa665
2015-01-16 13:14:46 -08:00
Daniel Wagner
f679a9eb63 update RELEASING script to gzip at the same time as tar'ing and to deal with Hackage's no-GNU-tar restriction
Ignore-this: 6820ea6cb52138b3e39d579abb174d43

darcs-hash:20140707185311-7469c-6c9b30eb0ee847791c52573eb745fa23d5c76afd
2014-07-07 11:53:11 -07:00
Daniel Wagner
699abee92b the "NEWS" file is now called "CHANGELOG"; fix this in the "RELEASING" instructions
Ignore-this: 35ba119bdb111f91844a3c16ecf79e7b

darcs-hash:20140707174439-7469c-393e1047f758f9cbd10d88d6cb4003abc97fd37e
2014-07-07 10:44:39 -07:00
Daniel Wagner
4e53752d41 update CHANGELOG
Ignore-this: cd0ef07e4dde5f7dae052954b97ca7de

darcs-hash:20140707174356-7469c-6735a4a73a469a0286aa6e97765f26d88d287f09
2014-07-07 10:43:56 -07:00
Daniel Wagner
80e12d02f9 bump version to 0.7.0.2
Ignore-this: d5645215c8fb8f2d6e51d3e135fd8181

darcs-hash:20140707174202-7469c-123eb74d859455316033f1aeee37b2e0ab5cc158
2014-07-07 10:42:02 -07:00
Daniel Wagner
e6a388b038 amend MacOSRoman to match http://en.wikipedia.org/wiki/Mac_OS_Roman as suggested by Adam Bergmark
Ignore-this: 5c8f8abc665d16ac061cc8fd730b11ae

darcs-hash:20140707173911-7469c-7747c7710cdbbe489dde218eb72ab4e98683e70c
2014-07-07 10:39:11 -07:00
Daniel Wagner
ccdcf9c392 rename NEWS to CHANGELOG in the hopes that it will appear on Hackage
Ignore-this: 4fd873c2ae3f912e62d43aa94871d7cf

darcs-hash:20140525015849-7469c-92982613122be211f4748b94ddcb6f185dc599d6
2014-05-24 18:58:49 -07:00
Daniel Wagner
f565a7e82e note GHC-7.8 compat in NEWS
Ignore-this: d5a83c9d055f00229292d90d8be3d087

darcs-hash:20140525015814-7469c-99f480b54519121089924246e8f6c57c427d8ca0
2014-05-24 18:58:14 -07:00
Daniel Wagner
f81e1808ff bump version number to 0.7.0.1
Ignore-this: d038fd6703c313311cc7bafa1b85b7a3

darcs-hash:20140525015729-7469c-4bbb82545b83f2970aef6d8864db4d1ebd7ebdc0
2014-05-24 18:57:29 -07:00
Daniel Wagner
00f914ebde GHC 7.8 compatibility, based on a patch suggested by José Romildo Malaquias
Ignore-this: 4a655a3a1d2348054d2028f5c26dc0d5

darcs-hash:20140525015603-7469c-30d96daeffde6da775c2b8f6579c0a2fbbfc479a
2014-05-24 18:56:03 -07:00
Daniel Wagner
91f119bbfb update NEWS
Ignore-this: 2d6130b4b59737de15dcbcd0fe692517

darcs-hash:20140117023145-76d51-9cc6bbb709f03381dcf1f3a3ac64ce5aec94586b
2014-01-16 18:31:45 -08:00
Daniel Wagner
da883601cb relax dependencies on binary and HaXml
Ignore-this: e31192fece193a225c138ed779c08e79

darcs-hash:20140117023131-76d51-e66839c37479414aa543da736eacd39d082e13e5
2014-01-16 18:31:31 -08:00
Daniel Wagner
8b1f45a6ec binary-0.6 compatibility
Ignore-this: 6af2adadedc20f51bb5084b3da59724e

darcs-hash:20121213030806-76d51-6d52680cab9b4f4b6c2ba17e29fa457b85d4d838
2012-12-12 19:08:06 -08:00
14 changed files with 15307 additions and 55 deletions

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
### Haskell ###
dist
dist-*
cabal-dev
*.o
*.hi
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
*.prof
*.aux
*.hp
*.eventlog
.stack-work/
cabal.project.local
.HTF/

View File

@ -1,3 +1,36 @@
Changes from 0.8 to 0.8.2
-------------------------
* Deprecated support for very old GHCs
* Updated cabal file to differentiate between build dependencies and setup dependencies
* Add upper and lower bounds to build dependencies
* Stack compatibility
Changes from 0.8 to 0.8.1
-------------------------
* Added the ShiftJIS and CP932 encodings
Changes from 0.7.0.2 to 0.8
---------------------------
* GHC-7.10/AMP compatibility
Changes from 0.7.0.1 to 0.7.0.2
-------------------------------
* Flesh out the MacOSRoman encoding, which was missing 33 code points
Changes from 0.7 to 0.7.0.1
---------------------------
* GHC-7.8 compatibility
Changes from 0.6.7 to 0.7
-------------------------
* the type of ByteSource's fetchAhead method changed to accomodate updates to the binary package
Changes from 0.6.5 to 0.6.7
---------------------------

View File

@ -1,4 +1,4 @@
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MagicHash,BangPatterns #-}
module Data.Array.Static where
import Data.Static
@ -11,5 +11,5 @@ bounds :: Ix i => StaticArray i e -> (i,i)
bounds (StaticArray s e _) = (s,e)
(!) :: (StaticElement e,Ix i) => StaticArray i e -> i -> e
(!) (StaticArray s e addr) i = let (I# ri) = index (s,e) i
(!) (StaticArray s e addr) i = let !(I# ri) = index (s,e) i
in extract addr ri

View File

@ -76,6 +76,7 @@ import Data.Encoding.MacOSRoman
import Data.Encoding.JISX0201
import Data.Encoding.JISX0208
import Data.Encoding.ISO2022JP
import Data.Encoding.ShiftJIS
import Data.Encoding.CP437
import Data.Encoding.CP737
import Data.Encoding.CP775
@ -92,6 +93,7 @@ import Data.Encoding.CP865
import Data.Encoding.CP866
import Data.Encoding.CP869
import Data.Encoding.CP874
import Data.Encoding.CP932
import Data.Char
import Text.Regex
@ -327,6 +329,9 @@ encodingFromStringExplicit codeName = case (normalizeEncoding codeName) of
"jis_x_0208" -> Just $ DynEncoding JISX0208
-- ISO 2022-JP
"iso_2022_jp" -> Just $ DynEncoding ISO2022JP
-- Shift JIS
"shift_jis" -> Just $ DynEncoding ShiftJIS
"sjis" -> Just $ DynEncoding ShiftJIS
-- MSDOS codepages
"cp437" -> Just $ DynEncoding CP437
"cp737" -> Just $ DynEncoding CP737
@ -344,6 +349,7 @@ encodingFromStringExplicit codeName = case (normalizeEncoding codeName) of
"cp866" -> Just $ DynEncoding CP866
"cp869" -> Just $ DynEncoding CP869
"cp874" -> Just $ DynEncoding CP874
"cp932" -> Just $ DynEncoding CP932
-- defaults to nothing
_ -> Nothing
where

View File

@ -11,6 +11,7 @@ import Data.Word
import Data.Foldable (toList)
import Control.Throws
import Control.Exception.Extensible
import Control.Applicative
import Control.Monad.State
import Control.Monad.Identity
import Control.Monad.Reader
@ -80,6 +81,13 @@ instance ByteSink PutM where
newtype PutME a = PutME (Either EncodingException (PutM (),a))
instance Functor PutME where
fmap = liftM
instance Applicative PutME where
pure = return
(<*>) = ap
instance Monad PutME where
return x = PutME $ Right (return (),x)
(PutME x) >>= g = PutME $ do
@ -114,6 +122,13 @@ instance (Monad m,Throws EncodingException m) => ByteSink (StateT (Seq Char) m)
newtype StrictSink a = StrictS (Ptr Word8 -> Int -> Int -> IO (a,Ptr Word8,Int,Int))
instance Functor StrictSink where
fmap = liftM
instance Applicative StrictSink where
pure = return
(<*>) = ap
instance Monad StrictSink where
return x = StrictS $ \cstr pos max -> return (x,cstr,pos,max)
(StrictS f) >>= g = StrictS (\cstr pos max -> do
@ -140,6 +155,13 @@ instance ByteSink StrictSink where
newtype StrictSinkE a = StrictSinkE (StrictSink (Either EncodingException a))
instance Functor StrictSinkE where
fmap = liftM
instance Applicative StrictSinkE where
pure = return
(<*>) = ap
instance Monad StrictSinkE where
return = StrictSinkE . return . Right
(StrictSinkE s) >>= g = StrictSinkE $ do
@ -167,6 +189,13 @@ createStrict sink = createStrictWithLen sink 32
newtype StrictSinkExplicit a = StrictSinkExplicit (StrictSink (Either EncodingException a))
instance Functor StrictSinkExplicit where
fmap = liftM
instance Applicative StrictSinkExplicit where
pure = return
(<*>) = ap
instance Monad StrictSinkExplicit where
return = (StrictSinkExplicit).return.Right
(StrictSinkExplicit sink) >>= f

View File

@ -6,7 +6,9 @@ import Data.Encoding.Exception
import Data.Bits
import Data.Binary.Get
import Data.Char
import Data.Maybe
import Data.Word
import Control.Applicative as A
import Control.Monad.State
import Control.Monad.Identity
import Control.Monad.Reader
@ -19,7 +21,9 @@ import System.IO
class (Monad m,Throws DecodingException m) => ByteSource m where
sourceEmpty :: m Bool
fetchWord8 :: m Word8
fetchAhead :: m a -> m a
-- 'fetchAhead act' should return the same thing 'act' does, but should
-- only consume input if 'act' returns a 'Just' value
fetchAhead :: m (Maybe a) -> m (Maybe a)
fetchWord16be :: m Word16
fetchWord16be = do
w1 <- fetchWord8
@ -95,7 +99,20 @@ instance Throws DecodingException Get where
instance ByteSource Get where
sourceEmpty = isEmpty
fetchWord8 = getWord8
fetchAhead = lookAhead
#if MIN_VERSION_binary(0,6,0)
fetchAhead act = (do
res <- act
case res of
Nothing -> A.empty
Just a -> return res
) <|> return Nothing
#else
fetchAhead act = do
res <- lookAhead act
case res of
Nothing -> return Nothing
Just a -> act
#endif
fetchWord16be = getWord16be
fetchWord16le = getWord16le
fetchWord32be = getWord32be
@ -103,6 +120,12 @@ instance ByteSource Get where
fetchWord64be = getWord64be
fetchWord64le = getWord64le
fetchAheadState act = do
chs <- get
res <- act
when (isNothing res) (put chs)
return res
instance ByteSource (StateT [Char] Identity) where
sourceEmpty = gets null
fetchWord8 = do
@ -112,11 +135,7 @@ instance ByteSource (StateT [Char] Identity) where
c:cs -> do
put cs
return (fromIntegral $ ord c)
fetchAhead act = do
chs <- get
res <- act
put chs
return res
fetchAhead = fetchAheadState
#if MIN_VERSION_base(4,3,0)
#else
@ -135,33 +154,21 @@ instance ByteSource (StateT [Char] (Either DecodingException)) where
c:cs -> do
put cs
return (fromIntegral $ ord c)
fetchAhead act = do
chs <- get
res <- act
put chs
return res
fetchAhead = fetchAheadState
instance (Monad m,Throws DecodingException m) => ByteSource (StateT BS.ByteString m) where
sourceEmpty = gets BS.null
fetchWord8 = StateT (\str -> case BS.uncons str of
Nothing -> throwException UnexpectedEnd
Just (c,cs) -> return (c,cs))
fetchAhead act = do
str <- get
res <- act
put str
return res
fetchAhead = fetchAheadState
instance ByteSource (StateT LBS.ByteString (Either DecodingException)) where
sourceEmpty = gets LBS.null
fetchWord8 = StateT (\str -> case LBS.uncons str of
Nothing -> Left UnexpectedEnd
Just ns -> Right ns)
fetchAhead act = do
chs <- get
res <- act
put chs
return res
fetchAhead = fetchAheadState
instance ByteSource (ReaderT Handle IO) where
sourceEmpty = do
@ -176,5 +183,5 @@ instance ByteSource (ReaderT Handle IO) where
h <- ask
pos <- liftIO $ hGetPosn h
res <- act
liftIO $ hSetPosn pos
when (isNothing res) (liftIO $ hSetPosn pos)
return res

7941
Data/Encoding/CP932.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -26,11 +26,10 @@ instance Encoding ISO2022JP where
encodeable _ c = encodeable ASCII c || encodeable JISX0201 c || encodeable JISX0208 c
instance ISO2022 ISO2022JP where
readEscape _ = do
w <- fetchAhead fetchWord8
readEscape _ = fetchAhead $ do
w <- fetchWord8
if w == 27
then (do
fetchWord8
w2 <- fetchWord8
w3 <- fetchWord8
case w2 of

View File

@ -61,6 +61,38 @@
# * Change mapping of 0xBD from U+2126 to its canonical
# decomposition, U+03A9.
0x00 0x0000 # NULL
0x01 0x0001 # START OF HEADING
0x02 0x0002 # START OF TEXT
0x03 0x0003 # END OF TEXT
0x04 0x0004 # END OF TRANSMISSION
0x05 0x0005 # ENQUIRY
0x06 0x0006 # ACKNOWLEDGE
0x07 0x0007 # BELL
0x08 0x0008 # BACKSPACE
0x09 0x0009 # HORIZONTAL TABULATION
0x0A 0x000A # LINE FEED
0x0B 0x000B # VERTICAL TABULATION
0x0C 0x000C # FORM FEED
0x0D 0x000D # CARRIAGE RETURN
0x0E 0x000E # SHIFT OUT
0x0F 0x000F # SHIFT IN
0x10 0x0010 # DATA LINK ESCAPE
0x11 0x0011 # DEVICE CONTROL ONE
0x12 0x0012 # DEVICE CONTROL TWO
0x13 0x0013 # DEVICE CONTROL THREE
0x14 0x0014 # DEVICE CONTROL FOUR
0x15 0x0015 # NEGATIVE ACKNOWLEDGE
0x16 0x0016 # SYNCHRONOUS IDLE
0x17 0x0017 # END OF TRANSMISSION BLOCK
0x18 0x0018 # CANCEL
0x19 0x0019 # END OF MEDIUM
0x1A 0x001A # SUBSTITUTE
0x1B 0x001B # ESCAPE
0x1C 0x001C # FILE SEPARATOR
0x1D 0x001D # GROUP SEPARATOR
0x1E 0x001E # RECORD SEPARATOR
0x1F 0x001F # UNIT SEPARATOR
0x20 0x0020 # SPACE
0x21 0x0021 # EXCLAMATION MARK
0x22 0x0022 # QUOTATION MARK
@ -156,7 +188,7 @@
0x7C 0x007C # VERTICAL LINE
0x7D 0x007D # RIGHT CURLY BRACKET
0x7E 0x007E # TILDE
#
0x7F 0x007F # DELETE
0x80 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS
0x81 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE
0x82 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA

7093
Data/Encoding/ShiftJIS.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
{-# LANGUAGE MagicHash,FlexibleInstances,BangPatterns #-}
{-# LANGUAGE MagicHash,FlexibleInstances,BangPatterns,CPP #-}
module Data.Static where
import GHC.Exts
@ -36,7 +36,11 @@ instance StaticElement Char where
instance StaticElement (Maybe Char) where
extract addr i = let !v = indexWord32OffAddr# addr i
#if __GLASGOW_HASKELL__ >= 708
in if isTrue# (eqWord# v (int2Word# 4294967295#)) -- -1 in Word32
#else
in if eqWord# v (int2Word# 4294967295#) -- -1 in Word32
#endif
then Nothing
else (if (I# (word2Int# v)) > 0x10FFFF
then error (show (I# (word2Int# v))++" is not a valid char ("++show (I# i)++")")

View File

@ -1,5 +1,5 @@
On each release:
* update NEWS
* update CHANGELOG
* bump the version number in the .cabal file (including in the "this" repository spec)
* cabal upload a release tarball
* darcs tag with the version number
@ -9,7 +9,6 @@ cabal configure
./dist/setup/setup sdist
tar xf dist/encoding-version.tar.gz
rm -r encoding-version/dist
tar cf dist/encoding-version.tar encoding-version
tar --format=ustar -czf dist/encoding-version.tar.gz encoding-version
rm -r encoding-version
gzip -f dist/encoding-version.tar
cabal upload dist/encoding-version.tar

View File

@ -1,18 +1,18 @@
Name: encoding
Version: 0.6.7.2
Version: 0.8.2
Author: Henning Günther
Maintainer: daniel@wagner-home.com
License: BSD3
License-File: LICENSE
Synopsis: A library for various character encodings
Description:
Haskell has excellect handling of unicode, the Char type covers all unicode chars. Unfortunatly, there's no possibility to read or write something to the outer world in an encoding other than ascii due to the lack of support for encodings. This library should help with that.
Haskell has excellect handling of unicode, the Char type covers all unicode chars. Unfortunately, there's no possibility to read or write something to the outer world in an encoding other than ascii due to the lack of support for encodings. This library should help with that.
Category: Codec
Homepage: http://code.haskell.org/encoding/
Cabal-Version: >=1.6
Cabal-Version: >=1.8
Build-Type: Custom
Extra-Source-Files:
NEWS
CHANGELOG
Data/Encoding/Preprocessor/Mapping.hs
Data/Encoding/Preprocessor/XMLMapping.hs
Data/Encoding/Preprocessor/XMLMappingBuilder.hs
@ -22,32 +22,36 @@ Extra-Source-Files:
system_encoding.h
system_encoding.c
Flag splitBase
description: Choose the new smaller, split-up base package.
Flag newGHC
description: Use ghc version > 6.10
Flag systemEncoding
description: Provide the getSystemEncoding action to query the locale.
Source-Repository head
Type: darcs
Location: http://code.haskell.org/encoding
Type: git
Location: http://github.com/dmwit/encoding
Source-Repository this
Type: darcs
Location: http://code.haskell.org/encoding
Tag: 0.6.7.1
Type: git
Location: http://github.com/dmwit/encoding
Tag: 0.8.2
Custom-Setup
Setup-Depends: base >=3 && <5,
Cabal >=1.24 && <1.25,
containers,
filepath,
ghc-prim,
HaXml >=1.22 && <1.26
Library
Build-Depends: binary < 0.6, extensible-exceptions, HaXml >= 1.22 && < 1.24
if flag(splitBase)
Build-Depends: bytestring, base >= 3 && < 5, mtl, containers, array, regex-compat
if flag(newGHC)
Build-Depends: ghc-prim, ghc >= 6.10
else
Build-Depends: ghc < 6.10
else
Build-Depends: base < 3
Build-Depends: array >=0.4 && <0.6,
base >=4 && <5,
binary >=0.7 && <0.10,
bytestring >=0.9 && <0.11,
containers >=0.4 && <0.6,
extensible-exceptions >=0.1 && <0.2,
ghc-prim >=0.3 && <0.6,
mtl >=2.0 && <2.3,
regex-compat >=0.71 && <0.95
Extensions: CPP
@ -95,6 +99,7 @@ Library
Data.Encoding.JISX0212
Data.Encoding.ISO2022
Data.Encoding.ISO2022JP
Data.Encoding.ShiftJIS
Data.Encoding.CP437
Data.Encoding.CP737
Data.Encoding.CP775
@ -111,6 +116,7 @@ Library
Data.Encoding.CP866
Data.Encoding.CP869
Data.Encoding.CP874
Data.Encoding.CP932
System.IO.Encoding
Other-Modules:
Data.Encoding.Base
@ -118,6 +124,8 @@ Library
Data.Map.Static
Data.Static
Data.CharMap
if impl(ghc >= 7.10)
GHC-Options: -fno-warn-tabs
if flag(systemEncoding)
Includes:
system_encoding.h
@ -126,3 +134,16 @@ Library
C-Sources:
system_encoding.c
CPP-Options: -DSYSTEM_ENCODING
test-suite encoding-test
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Main.hs
other-modules: Test.Tester
, Test.Tests
build-depends: base
, bytestring
, encoding
, HUnit
, QuickCheck
ghc-options: -threaded -rtsopts -with-rtsopts=-N

66
stack.yaml Normal file
View File

@ -0,0 +1,66 @@
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# http://docs.haskellstack.org/en/stable/yaml_configuration/
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# resolver: lts-3.5
# resolver: nightly-2015-09-21
# resolver: ghc-7.10.2
# resolver: ghcjs-0.1.0_ghc-7.10.2
# resolver:
# name: custom-snapshot
# location: "./custom-snapshot.yaml"
resolver: lts-8.22
# User packages to be built.
# Various formats can be used as shown in the example below.
#
# packages:
# - some-directory
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
# - location:
# git: https://github.com/commercialhaskell/stack.git
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# extra-dep: true
# subdirs:
# - auto-update
# - wai
#
# A package marked 'extra-dep: true' will only be built if demanded by a
# non-dependency (i.e. a user package), and its test suites and benchmarks
# will not be run. This is useful for tweaking upstream packages.
packages:
- '.'
# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps: []
# Override default flag values for local packages and extra-deps
flags: {}
# Extra package databases containing global packages
extra-package-dbs: []
# Control whether we use the GHC we find on the path
# system-ghc: true
#
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: ">=1.4"
#
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
#
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor