diff --git a/shared/unison-shared.cabal b/shared/unison-shared.cabal index 101d0fc8a..bea4a2e33 100644 --- a/shared/unison-shared.cabal +++ b/shared/unison-shared.cabal @@ -19,7 +19,7 @@ data-files: source-repository head type: git - location: git://github.com/unisonweb/platform.git + location: git://github.com/unisonweb/unison.git -- `cabal install -foptimized` enables optimizations flag optimized @@ -34,7 +34,6 @@ library hs-source-dirs: src exposed-modules: - Text.Parsec.Layout Unison.ABT Unison.Builtin Unison.BlockStore @@ -92,6 +91,7 @@ library mtl, murmur-hash, parsec, + parsec-layout, prelude-extras, random, stm, diff --git a/stack.yaml b/stack.yaml index 10e9a01f7..561b858c5 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,6 +1,7 @@ flags: {} packages: +- yaks/parsec-layout - shared - node diff --git a/yaks/parsec-layout/LICENSE b/yaks/parsec-layout/LICENSE new file mode 100644 index 000000000..6323f93d6 --- /dev/null +++ b/yaks/parsec-layout/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2013, Edward Kmett, Luke Palmer, Paul Chiusano + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * 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. + + * Neither the name of Edward Kmett nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/yaks/parsec-layout/parsec-layout.cabal b/yaks/parsec-layout/parsec-layout.cabal new file mode 100644 index 000000000..cd18605c1 --- /dev/null +++ b/yaks/parsec-layout/parsec-layout.cabal @@ -0,0 +1,49 @@ +name: parsec-layout +category: Compiler +version: 0.1 +license: MIT +cabal-version: >= 1.8 +license-file: LICENSE +author: Paul Chiusano +maintainer: Paul Chiusano +stability: provisional +homepage: http://unisonweb.org +bug-reports: https://github.com/unisonweb/platform/issues +copyright: Copyright (C) 2013 Ed Kmett, Luke Palmer, and Paul Chiusano +synopsis: Layout parsing functions for parsec +description: Layout parsing functions for parsec + +build-type: Simple +extra-source-files: +data-files: + +source-repository head + type: git + location: git://github.com/unisonweb/unison.git + +-- `cabal install -foptimized` enables optimizations +flag optimized + manual: True + default: False + +flag quiet + manual: True + default: False + +library + hs-source-dirs: src + + exposed-modules: + Text.Parsec.Layout + + build-depends: + base, + parsec + + ghc-options: -Wall -O0 -fno-warn-name-shadowing -fno-warn-missing-pattern-synonym-signatures + + if flag(optimized) + ghc-options: -funbox-strict-fields -O2 + + if flag(quiet) + ghc-options: -v0 diff --git a/shared/src/Text/Parsec/Layout.hs b/yaks/parsec-layout/src/Text/Parsec/Layout.hs similarity index 83% rename from shared/src/Text/Parsec/Layout.hs rename to yaks/parsec-layout/src/Text/Parsec/Layout.hs index dfa6e9ded..acb778ff6 100644 --- a/shared/src/Text/Parsec/Layout.hs +++ b/yaks/parsec-layout/src/Text/Parsec/Layout.hs @@ -1,38 +1,7 @@ +{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} {-# Language BangPatterns #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} --- Copyright (c) 2013, Edward Kmett, Luke Palmer, Paul Chiusano --- --- All rights reserved. --- --- Redistribution and use in source and binary forms, with or without --- modification, are permitted provided that the following conditions are met: --- --- * Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- * 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. --- --- * Neither the name of Edward Kmett nor the names of other --- contributors may be used to endorse or promote products derived --- from this software without specific prior written permission. --- --- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} - -- | These are Haskell-style layout combinators for parsec 3 by Edward Kmett, -- first seen on StackOverflow . -- Should be fairly self-explanatory, with the following notes: @@ -277,3 +246,4 @@ laidout p = braced statements <|> vbraced statements where braced s = between (try (spaced lbrace)) (spaced rbrace) s vbraced s = between (spaced virtual_lbrace) (spaced virtual_rbrace) s statements = p `sepBy` spaced semi +