haskelm 0.0.3 → 0.0.4
raw patch · 2 files changed
+2/−63 lines, 2 files
Files
- haskelm.cabal +2/−3
- src/SourceSyntax/Module.hs +0/−60
haskelm.cabal view
@@ -1,5 +1,5 @@ Name: haskelm-Version: 0.0.3+Version: 0.0.4 Synopsis: Elm to Haskell translation Description: Library and binary to translate Haskell code into Elm code Homepage: http://github.com/JoeyEremondi/haskelm@@ -21,7 +21,6 @@ Library exposed-modules: Language.Elm.TH- --Language.Elm.BuildString hs-Source-Dirs: src other-modules: SourceSyntax.Declaration, SourceSyntax.Expression,@@ -53,7 +52,7 @@ th-desugar, temporary, split,- Elm,+ --Elm, --elm-build-lib, binary, haskell-src-exts
src/SourceSyntax/Module.hs view
@@ -14,8 +14,6 @@ import Data.List (intercalate) -import qualified Elm.Internal.Version as Version- data Module def = Module [String] Exports Imports [def] deriving (Show)@@ -53,64 +51,6 @@ in P.sep [modPret, importPret, decPret] -instance Binary ImportMethod where- put method =- let put' n info = putWord8 n >> put info in- case method of- As s -> put' 0 s- Importing ss -> put' 1 ss- Hiding ss -> put' 2 ss - get = do tag <- getWord8- case tag of- 0 -> As <$> get- 1 -> Importing <$> get- 2 -> Hiding <$> get- _ -> error "Error reading valid ImportMethod type from serialized string" -data MetadataModule =- MetadataModule- { names :: [String]- , path :: FilePath- , exports :: [String]- , imports :: [(String, ImportMethod)]- , program :: LExpr- , types :: Map.Map String Type- , fixities :: [(Assoc, Int, String)]- , aliases :: [Alias]- , datatypes :: [ADT]- } deriving Show -type Interfaces = Map.Map String ModuleInterface-type ADT = (String, [String], [(String,[Type])], [Derivation])-type Alias = (String, [String], Type, [Derivation])--data ModuleInterface = ModuleInterface {- iVersion :: Version.Version,- iTypes :: Map.Map String Type,- iImports :: [(String, ImportMethod)],- iAdts :: [ADT],- iAliases :: [Alias],- iFixities :: [(Assoc, Int, String)]-} deriving Show--metaToInterface :: MetadataModule -> ModuleInterface-metaToInterface metaModule =- ModuleInterface- { iVersion = Version.elmVersion- , iTypes = types metaModule- , iImports = imports metaModule- , iAdts = datatypes metaModule- , iAliases = aliases metaModule- , iFixities = fixities metaModule- }--instance Binary ModuleInterface where- get = ModuleInterface <$> get <*> get <*> get <*> get <*> get <*> get- put modul = do- put (iVersion modul)- put (iTypes modul)- put (iImports modul)- put (iAdts modul)- put (iAliases modul)- put (iFixities modul)