From b57e221cf69aaf4bfcf8b89d3057133c1d065cca Mon Sep 17 00:00:00 2001 From: Cumhur Korkut Date: Sat, 20 Dec 2014 21:42:55 +0200 Subject: [PATCH] Changed directories of source files --- Norvigs-Spelling-Corrector.cabal | 18 +++++++----------- Main.hs => execs/Main.hs | 4 +++- .../Paths_Norvigs_Spelling_Corrector.hs | 0 Spelling.hs => src/Spelling.hs | 0 4 files changed, 10 insertions(+), 12 deletions(-) rename Main.hs => execs/Main.hs (88%) rename Paths_Norvigs_Spelling_Corrector.hs => src/Paths_Norvigs_Spelling_Corrector.hs (100%) rename Spelling.hs => src/Spelling.hs (100%) diff --git a/Norvigs-Spelling-Corrector.cabal b/Norvigs-Spelling-Corrector.cabal index ab0473c..d5df52c 100644 --- a/Norvigs-Spelling-Corrector.cabal +++ b/Norvigs-Spelling-Corrector.cabal @@ -1,16 +1,13 @@ --- Initial Norvigs-Spelling-Corrector.cabal generated by cabal init. For --- further documentation, see http://haskell.org/cabal/users-guide/ - name: Norvigs-Spelling-Corrector version: 0.1.0.0 synopsis: A Haskell implementation of Peter Norvig's spelling corrector --- description: +-- description: homepage: https://github.com/MarcoSero/Norvigs-Spelling-Corrector license: MIT license-file: LICENSE author: Marco Sero maintainer: sero.marco@gmail.com --- copyright: +-- copyright: category: Text build-type: Simple extra-source-files: README.md @@ -22,15 +19,14 @@ Library build-depends: base >=4.7 && <4.8, bytestring >=0.10 && <0.11, containers >=0.5 && <0.6 - -- hs-source-dirs: + hs-source-dirs: src default-language: Haskell2010 executable Norvigs-Spelling-Corrector main-is: Main.hs - other-modules: Spelling - -- other-extensions: build-depends: base >=4.7 && <4.8, bytestring >=0.10 && <0.11, - containers >=0.5 && <0.6 - -- hs-source-dirs: - default-language: Haskell2010 \ No newline at end of file + containers >=0.5 && <0.6, + Norvigs-Spelling-Corrector + hs-source-dirs: execs + default-language: Haskell2010 diff --git a/Main.hs b/execs/Main.hs similarity index 88% rename from Main.hs rename to execs/Main.hs index ec403bc..0ae36bb 100644 --- a/Main.hs +++ b/execs/Main.hs @@ -1,8 +1,10 @@ +module Main where + import Control.Monad (forever, unless) import System.IO (hFlush, stdout) import Control.Exception (catch) import System.IO.Error (isEOFError) -import Spelling (TrainingDict, nWords, correct) +import Spelling repl :: TrainingDict -> IO () repl ws = forever $ do diff --git a/Paths_Norvigs_Spelling_Corrector.hs b/src/Paths_Norvigs_Spelling_Corrector.hs similarity index 100% rename from Paths_Norvigs_Spelling_Corrector.hs rename to src/Paths_Norvigs_Spelling_Corrector.hs diff --git a/Spelling.hs b/src/Spelling.hs similarity index 100% rename from Spelling.hs rename to src/Spelling.hs