Skip to content

Commit

Permalink
Rename spaghetti -> calligraphy
Browse files Browse the repository at this point in the history
  • Loading branch information
jonascarpay committed Mar 17, 2022
1 parent 0466660 commit 9e58f64
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 29 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# spaghetti
[![spaghetti on hackage](https://img.shields.io/hackage/v/spaghetti)](http://hackage.haskell.org/package/spaghetti)
[![spaghetti on Stackage Nightly](https://stackage.org/package/spaghetti/badge/nightly)](https://stackage.org/nightly/package/spaghetti)
# calligraphy
[![calligraphy on hackage](https://img.shields.io/hackage/v/calligraphy)](http://hackage.haskell.org/package/calligraphy)
[![calligraphy on Stackage Nightly](https://stackage.org/package/calligraphy/badge/nightly)](https://stackage.org/nightly/package/calligraphy)

Generated with [template-haskell](https://github.com/jonascarpay/template-haskell)
4 changes: 2 additions & 2 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Dummy
import Spaghetti qualified as S
import Calligraphy qualified as C

main :: IO ()
main = S.main
main = C.main

a, b :: Int
a = b
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
packages:
./

package spaghetti
package calligraphy
tests: True
20 changes: 10 additions & 10 deletions spaghetti.cabal → calligraphy.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cabal-version: 2.4
name: spaghetti
name: calligraphy
version: 0
license: BSD-3-Clause
build-type: Simple
Expand All @@ -15,10 +15,10 @@ extra-doc-files:
-- category:
-- description: description
-- synopsis: one-line synopsis
-- homepage: https://github.com/FIXME/spaghetti#readme
-- homepage: https://github.com/FIXME/calligraphy#readme
-- source-repository head
-- type: git
-- location: git://github.com/FIXME/spaghetti.git
-- location: git://github.com/FIXME/calligraphy

common common-options
build-depends: base >=4.9 && <5
Expand All @@ -32,9 +32,10 @@ common common-options
library
import: common-options
hs-source-dirs: src
other-modules: Paths_spaghetti
autogen-modules: Paths_spaghetti
other-modules: Paths_calligraphy
autogen-modules: Paths_calligraphy
exposed-modules:
Calligraphy
Collapse
Debug
Dummy
Expand All @@ -44,7 +45,6 @@ library
Parse
Printer
Search
Spaghetti
STree

build-depends:
Expand All @@ -62,22 +62,22 @@ library
, text
, transformers

executable spaghetti-exe
executable calligraphy
import: common-options
hs-source-dirs: app
main-is: Main.hs
build-depends: spaghetti
build-depends: calligraphy
ghc-options: -threaded -rtsopts -with-rtsopts=-N

test-suite spaghetti-test
test-suite calligraphy-test
import: common-options
hs-source-dirs: test
main-is: Spec.hs
other-modules: Test.STree
build-depends:
, calligraphy
, hspec
, HUnit
, QuickCheck
, spaghetti

type: exitcode-stdio-1.0
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "spaghetti";
description = "calligraphy";

inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
Expand Down Expand Up @@ -37,6 +37,6 @@
};
flake = pkgs.hsPkgs.flake { };
in
flake // { defaultPackage = flake.packages."spaghetti:exe:spaghetti-exe"; }
flake // { defaultPackage = flake.packages."calligraphy:exe:calligraphy"; }
);
}
9 changes: 3 additions & 6 deletions hie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ cradle:
# config: {cradle: {none: }}

- path: "src"
config: {cradle: {cabal: {component: "lib:spaghetti"}}}
config: {cradle: {cabal: {component: "lib:calligraphy"}}}

- path: "app"
config: {cradle: {cabal: {component: "spaghetti:spaghetti-exe"}}}
config: {cradle: {cabal: {component: "calligraphy:calligraphy"}}}

- path: "test"
config: {cradle: {cabal: {component: "spaghetti:spaghetti-test"}}}

- path: "bench"
config: {cradle: {cabal: {component: "spaghetti:spaghetti-bench"}}}
config: {cradle: {cabal: {component: "calligraphy:calligraphy-test"}}}
6 changes: 3 additions & 3 deletions src/Spaghetti.hs → src/Calligraphy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}

module Spaghetti (main, mainWithConfig) where
module Calligraphy (main, mainWithConfig) where

import Collapse
import Control.Monad.RWS
Expand All @@ -19,7 +19,7 @@ import GraphViz
import HieTypes qualified as GHC
import Options.Applicative
import Parse
import Paths_spaghetti (version)
import Paths_calligraphy (version)
import Printer
import Search
import System.Directory (findExecutable)
Expand All @@ -34,7 +34,7 @@ main = do
where
versionP =
infoOption
( "spaghetti version "
( "calligraphy version "
<> showVersion version
<> "\nhie version "
<> show GHC.hieVersion
Expand Down
2 changes: 1 addition & 1 deletion src/GraphViz.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ data RenderConfig = RenderConfig

render :: RenderConfig -> Prints Modules
render RenderConfig {showCalls, showInfers, splines, reverseDependencyRank, showLoc} (Modules modules calls infers) = do
brack "digraph spaghetti {" "}" $ do
brack "digraph calligraphy {" "}" $ do
unless splines $ textLn "splines=false;"
textLn "node [style=filled fillcolor=\"#ffffffcf\"];"
textLn "graph [outputorder=edgesfirst];"
Expand Down
2 changes: 1 addition & 1 deletion src/Search.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ readHieFileWithWarning path = do
liftIO $ do
putStrLn $ "WARNING: version mismatch in " <> path
putStrLn $ " The hie files in this project were generated with GHC version: " <> show fileGHCVersion
putStrLn $ " This version of spaghetti was compiled with GHC version: " <> show GHC.hieVersion
putStrLn $ " This version of calligraphy was compiled with GHC version: " <> show GHC.hieVersion
putStrLn $ " Optimistically continuing anyway..."
hie <$ put cache'

Expand Down

0 comments on commit 9e58f64

Please sign in to comment.