diff --git a/.gitignore b/.gitignore index aaf7e6c..6f21030 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /dist/ /.cabal-sandbox/ /cabal.sandbox.config +/dist-newstyle/ /.stack-work/ output diff --git a/README.md b/README.md index a29e16f..92d5979 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![Build Status](https://gitlab.com/gilmi/x86-debug/badges/master/build.svg)](https://gitlab.com/gilmi/x86-debug/commits/master/) - # x86-debug An emulator/debugger/REPL for a really [small subset](src/Language/X86/Assembly.hs) of x86 assembly. diff --git a/src/Language/X86/Assembly.hs b/src/Language/X86/Assembly.hs index ef1bc3f..3a675b5 100644 --- a/src/Language/X86/Assembly.hs +++ b/src/Language/X86/Assembly.hs @@ -14,10 +14,6 @@ import qualified Data.Sequence as S import qualified Data.Map as M import qualified Data.Set as Set - - - - data Code = Code { cCode :: S.Seq Line , cLabelMap :: M.Map Label Int32 @@ -109,7 +105,7 @@ data Flag | ZF -- ^ zero flags: Set if result is zero; cleared otherwise | SF -- ^ sign flag: Set equal to high-order bit of result (0 if positive 1 if negative) | OF -- ^ overflow flag: Set if result is too large a positive number or too small a negative number (excluding sign bit) to fit in destination operand; cleared otherwise - -- | PF -- ^ parity flag: Set if low-order eight bits of result contain an even number of "1" bits; cleared otherwise + -- | PF -- ^ parity flag: Set if low-order eight bits of result contain an even number of "1" bits; cleared otherwise deriving (Show, Read, Eq, Ord, Generic, NFData, Data, Typeable) diff --git a/src/Language/X86/Lexer.hs b/src/Language/X86/Lexer.hs index 68aba93..facfc42 100644 --- a/src/Language/X86/Lexer.hs +++ b/src/Language/X86/Lexer.hs @@ -7,7 +7,6 @@ import Control.Arrow ((&&&), first) import Data.Data (showConstr, toConstr, dataTypeConstrs, dataTypeOf) import Data.Char (toUpper, toLower) import Data.Functor -import Control.Monad (void) import Control.Applicative ((<|>)) import Language.X86.Assembly diff --git a/src/Language/X86/PP.hs b/src/Language/X86/PP.hs index b75e732..8a2d6f3 100644 --- a/src/Language/X86/PP.hs +++ b/src/Language/X86/PP.hs @@ -4,7 +4,6 @@ module Language.X86.PP where -import Data.Monoid import Data.Char (toLower) import Data.Data import Data.Foldable as F @@ -123,6 +122,7 @@ ppArg :: Arg -> String ppArg = \case Ref a -> "[" ++ ppArg a ++ "]" AE a -> ppAE show a + AEL a -> ppAE show a -- | Pretty print an argument ppAE :: (var -> String) -> ArithExpr var -> String diff --git a/stack.yaml b/stack.yaml index 88a22ce..865dc40 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-13.13 +resolver: lts-18.18 packages: - '.' diff --git a/stack.yaml.lock b/stack.yaml.lock new file mode 100644 index 0000000..a9834e3 --- /dev/null +++ b/stack.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 586296 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/18.yaml + sha256: 63539429076b7ebbab6daa7656cfb079393bf644971156dc349d7c0453694ac2 + original: lts-18.18 diff --git a/x86-debug.cabal b/x86-debug.cabal index 9315eeb..3548baa 100644 --- a/x86-debug.cabal +++ b/x86-debug.cabal @@ -12,7 +12,6 @@ category: Compiler build-type: Simple extra-source-files: README.md cabal-version: >=1.10 -tested-with: GHC == 8.6.4 library hs-source-dirs: src @@ -26,15 +25,14 @@ library , Language.X86.Parser other-modules: build-depends: - base - ,containers - ,vector - ,bifunctors - ,groom - ,syb - ,deepseq - ,megaparsec - ,parser-combinators + base + , containers + , vector + , bifunctors + , groom + , deepseq + , megaparsec + , parser-combinators default-extensions: ConstraintKinds