License + GADT
This commit is contained in:
parent
cc83c07086
commit
547187e428
2 changed files with 10 additions and 24 deletions
|
@ -1,4 +1,4 @@
|
|||
cabal-version: 2.2
|
||||
cabal-version: 1.12
|
||||
|
||||
-- This file has been generated from package.yaml by hpack version 0.38.1.
|
||||
--
|
||||
|
@ -6,23 +6,18 @@ cabal-version: 2.2
|
|||
|
||||
name: java-classfile
|
||||
version: 0.1.0.0
|
||||
description: Please see the README on GitHub at <https://github.com/githubuser/java-classfile#readme>
|
||||
homepage: https://github.com/githubuser/java-classfile#readme
|
||||
bug-reports: https://github.com/githubuser/java-classfile/issues
|
||||
author: Author name here
|
||||
synopsis: Multi-Stage classfile parsing and verification.
|
||||
description: Please see the README on Forgejo at <https://git.jossco.de/vegowotenks/java-classfile#readme>
|
||||
author: VegOwOtenks
|
||||
maintainer: example@example.com
|
||||
copyright: 2025 Author name here
|
||||
license: BSD-3-Clause
|
||||
copyright: 2025 VegOwOtenks
|
||||
license: AGPL-3
|
||||
license-file: LICENSE
|
||||
build-type: Simple
|
||||
extra-source-files:
|
||||
README.md
|
||||
CHANGELOG.md
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/githubuser/java-classfile
|
||||
|
||||
library
|
||||
exposed-modules:
|
||||
Data.Enum.Util
|
||||
|
@ -47,8 +42,6 @@ library
|
|||
Language.Java.Classfile.Version
|
||||
other-modules:
|
||||
Paths_java_classfile
|
||||
autogen-modules:
|
||||
Paths_java_classfile
|
||||
hs-source-dirs:
|
||||
src
|
||||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
|
||||
|
@ -64,8 +57,6 @@ executable java-classfile-exe
|
|||
main-is: Main.hs
|
||||
other-modules:
|
||||
Paths_java_classfile
|
||||
autogen-modules:
|
||||
Paths_java_classfile
|
||||
hs-source-dirs:
|
||||
app
|
||||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
|
||||
|
@ -83,8 +74,6 @@ test-suite java-classfile-test
|
|||
main-is: Spec.hs
|
||||
other-modules:
|
||||
Paths_java_classfile
|
||||
autogen-modules:
|
||||
Paths_java_classfile
|
||||
hs-source-dirs:
|
||||
test
|
||||
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE StandaloneKindSignatures #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE GADTs #-}
|
||||
module Language.Java.Classfile.Magic (Magic(..)) where
|
||||
import Data.Word (Word32)
|
||||
import Language.Java.Classfile.Extractable (Extractable, extract, expectConstant)
|
||||
|
@ -16,13 +17,9 @@ import Data.Kind (Type)
|
|||
-- | 'Stage'-indexed Magic type. The 'Resolve' stage is only a unit type.
|
||||
|
||||
type Magic :: Stage -> Type
|
||||
data family Magic stage
|
||||
|
||||
newtype instance Magic Parse = Magic (Hex Word32)
|
||||
deriving Show
|
||||
|
||||
data instance Magic Resolve = Cafebabe
|
||||
deriving Show
|
||||
data Magic stage where
|
||||
Magic :: Hex Word32 -> Magic Parse
|
||||
Cafebabe :: Magic Resolve
|
||||
|
||||
instance Extractable (Magic Parse) where
|
||||
extract :: Extract (Magic Parse)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue