Skip to content

Commit c5fee1d

Browse files
authored
Move to LTS 13.7 and tidy up some repo-merge bits (#105)
* Update to LTS 13.7 * LTS 13.7 & tighten warnings * More name changes to catch up with repo-merge * Revert some WIP * Temporary comment out WIP csv stuff
1 parent 9629198 commit c5fee1d

File tree

19 files changed

+96
-49
lines changed

19 files changed

+96
-49
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
*.stack-work
22
/.dir-locals.el
3-
/eucalypt-hs.cabal
3+
*.cabal
44
/harness/.build

app/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Eucalypt.Driver.Options
55
import Eucalypt.Driver.Explain (explain)
66
import Eucalypt.Driver.Evaluator (evaluate)
77
import System.Exit
8-
import Paths_eucalypt_hs (version)
8+
import Paths_eucalypt (version)
99
import Data.Version (showVersion)
1010

1111
-- | Primary banner for version data

ci/release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def main(args):
6060
commit = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode('utf8').strip("'")
6161

6262
# TGZ the exe
63-
package = "eucalypt-hs-" + arch + ".tgz"
63+
package = "eucalypt-" + arch + ".tgz"
6464
with tarfile.open(package, "w:gz") as tar:
6565
tar.add(exe_path)
6666

package.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: eucalypt-hs
1+
name: eucalypt
22
version: 0.1.1.0
33
github: "curvelogic/eucalypt"
44
license: MIT
@@ -24,6 +24,7 @@ library:
2424
- array
2525
- bound
2626
- bytestring
27+
- cassava
2728
- comonad
2829
- conduit
2930
- containers
@@ -74,15 +75,15 @@ executables:
7475
- -rtsopts
7576
- -with-rtsopts=-N
7677
dependencies:
77-
- eucalypt-hs
78+
- eucalypt
7879
- optparse-applicative
7980
- directory
8081
- filepath
8182
- path
8283
- network-uri
8384

8485
tests:
85-
eucalypt-hs-test:
86+
eucalypt-test:
8687
main: Spec.hs
8788
source-dirs: test
8889
ghc-options:
@@ -97,7 +98,7 @@ tests:
9798
- bytestring
9899
- conduit
99100
- containers
100-
- eucalypt-hs
101+
- eucalypt
101102
- hspec
102103
- hspec-megaparsec
103104
- libyaml

src/Eucalypt/Core/AnonSyn.hs

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,34 @@ Maintainer : [email protected]
77
Stability : experimental
88
-}
99

10-
module Eucalypt.Core.AnonSyn where
10+
module Eucalypt.Core.AnonSyn (
11+
bif,
12+
infixl_,
13+
infixr_,
14+
prefix_,
15+
postfix_,
16+
var,
17+
int,
18+
lam,
19+
letexp,
20+
letblock,
21+
app,
22+
soup,
23+
args,
24+
block,
25+
str,
26+
sym,
27+
withMeta,
28+
element,
29+
corename,
30+
corelist,
31+
corenull,
32+
corebool,
33+
corelookup,
34+
dynlookup,
35+
unresolved,
36+
Syn.CoreExpr)
37+
where
1138

1239
import Eucalypt.Core.SourceMap
1340
import qualified Eucalypt.Core.Syn as Syn

src/Eucalypt/Core/Cook.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ cookBottomUp _ e = Right e
151151

152152
-- | Run the shunting algorithm until finished or errored
153153
shunt ::
154-
(Show a, Anaphora SymbolicAnaphora a)
154+
(Anaphora SymbolicAnaphora a)
155155
=> State (ShuntState a) (Either CoreError (CoreExp a))
156156
shunt = (shunt1 `untilM_` finished) >> result
157157
where

src/Eucalypt/Core/Metadata.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ determineTarget meta = (, doc, format) <$> target
137137

138138

139139

140-
importsFromMetadata :: ToCoreBindingName a => CoreExp a -> Maybe [Input]
140+
importsFromMetadata :: CoreExp a -> Maybe [Input]
141141
importsFromMetadata m =
142142
readUnevaluatedMetadata "import" m extract
143143
where

src/Eucalypt/Core/Syn.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ isAnaphoricVar t (CoreVar _ s) = isAnaphor t s
517517
isAnaphoricVar _ _ = False
518518

519519
-- | Apply a number to the unnumbered anaphor
520-
applyNumber :: (Anaphora t a, Eq a) => t -> a -> State Int a
520+
applyNumber :: (Anaphora t a) => t -> a -> State Int a
521521
applyNumber t s | s == unnumberedAnaphor t = do
522522
n <- get
523523
put (n + 1)

src/Eucalypt/Driver/Core.hs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import Control.Monad (forM_)
2424
import Control.Monad.Loops (iterateUntilM)
2525
import Control.Monad.State.Strict
2626
import qualified Data.ByteString as BS
27+
-- import qualified Data.ByteString.Lazy as BL
2728
import Data.Either (partitionEithers, rights)
2829
import Data.Foldable (toList)
2930
import qualified Data.Map as M
@@ -44,6 +45,7 @@ import Eucalypt.Driver.Lib (getResource)
4445
import Eucalypt.Driver.Options (EucalyptOptions(..))
4546
import Eucalypt.Reporting.Error (EucalyptError(..))
4647
import Eucalypt.Source.Error (DataParseException(..))
48+
-- import Eucalypt.Source.CsvSource
4749
import Eucalypt.Source.TextSource
4850
import Eucalypt.Source.TomlSource
4951
import Eucalypt.Source.YamlSource
@@ -241,6 +243,7 @@ loadUnit i@(Input locator name format) = do
241243
"toml" -> tomlDataToCore i source
242244
"yaml" -> activeYamlToCore i source
243245
"json" -> yamlDataToCore i source
246+
-- "csv" -> csvDataToCore i source
244247
"eu" -> eucalyptToCore i firstSMID source
245248
_ -> (return . Left . Command . InvalidInput) i
246249
case coreUnit of
@@ -255,7 +258,8 @@ loadUnit i@(Input locator name format) = do
255258
Right expr ->
256259
(return . Right . maybeApplyName . translateToCore input smid) expr
257260
yamlDataToCore input text = do
258-
r <- try (parseYamlExpr (show locator) text) :: IO (Either DataParseException CoreExpr)
261+
r <-
262+
try (parseYamlExpr (show locator) text) :: IO (Either DataParseException CoreExpr)
259263
case r of
260264
Left e -> (return . Left . Source) e
261265
Right core -> (return . Right . maybeApplyName . dataUnit input) core
@@ -266,15 +270,18 @@ loadUnit i@(Input locator name format) = do
266270
parseTomlData text >>=
267271
(return . Right . maybeApplyName <$> dataUnit input)
268272
activeYamlToCore input text = do
269-
r <- try (parseYamlExpr (show locator) text) :: IO (Either DataParseException CoreExpr)
273+
r <-
274+
try (parseYamlExpr (show locator) text) :: IO (Either DataParseException CoreExpr)
270275
case r of
271276
Left e -> (return . Left . Source) e
272277
Right core -> (return . Right . maybeApplyName . dataUnit input) core
273-
278+
-- csvDataToCore input text =
279+
-- parseCsv (BL.fromStrict text) >>=
280+
-- (return . Right . maybeApplyName <$> dataUnit input)
274281

275282

276283
-- | Parse units, reporting and exiting on error
277-
loadUnits :: (Traversable t, Foldable t) => t Input -> CoreLoad [TranslationUnit]
284+
loadUnits :: Traversable t => t Input -> CoreLoad [TranslationUnit]
278285
loadUnits inputs = do
279286
asts <- traverse loadUnit inputs
280287
case partitionEithers (toList asts) of

src/Eucalypt/Driver/Stg.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ debugMachine = initDebugMachineState
6565

6666
-- | Useful for comparing speed of conduit render pipelines with raw
6767
-- evaluation.
68-
runHeadless :: (MonadUnliftIO m, MonadIO m, MonadThrow m, MonadCatch m)
68+
runHeadless :: (MonadUnliftIO m, MonadCatch m)
6969
=> EucalyptOptions
7070
-> CoreExpr
7171
-> m ()
@@ -92,7 +92,7 @@ runHeadless opts expr = do
9292
-- | Build a conduit streaming pipeline where the machine generates
9393
-- events and renderer processes them.
9494
renderConduit ::
95-
(MonadUnliftIO m, MonadIO m, MonadThrow m, MonadCatch m)
95+
(MonadUnliftIO m, MonadCatch m)
9696
=> EucalyptOptions
9797
-> CoreExpr
9898
-> m BS.ByteString
@@ -114,7 +114,7 @@ renderConduit opts expr = handle handler $ do
114114
-- | Step through the machine yielding events via the conduit pipeline
115115
-- at each stage
116116
machineSource ::
117-
(MonadUnliftIO m, MonadResource m, MonadIO m, MonadThrow m)
117+
(MonadUnliftIO m, MonadThrow m)
118118
=> MachineState
119119
-> ConduitT () Event m ()
120120
machineSource ms = do

0 commit comments

Comments
 (0)