brainheck 0.1.0.8 → 0.1.0.9
raw patch · 3 files changed
+17/−13 lines, 3 filesdep +recursiondep −recursion-schemessetup-changedPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: recursion
Dependencies removed: recursion-schemes
API changes (from Hackage documentation)
- Brainheck: instance Data.Foldable.Foldable (Brainheck.SyntaxF a)
- Brainheck: instance Data.Functor.Foldable.Corecursive (Brainheck.Syntax a)
- Brainheck: instance Data.Functor.Foldable.Recursive (Brainheck.Syntax a)
- Brainheck: instance Data.Traversable.Traversable (Brainheck.SyntaxF a)
+ Brainheck: instance Control.Recursion.Recursive (Brainheck.Syntax a)
Files
- Setup.hs +0/−2
- brainheck.cabal +4/−6
- src/Brainheck.hs +13/−5
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
brainheck.cabal view
@@ -1,15 +1,14 @@ cabal-version: 1.18 name: brainheck-version: 0.1.0.8+version: 0.1.0.9 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2016-2018 Vanessa McHale maintainer: vamchale@gmail.com author: Vanessa McHale-homepage: https://github.com/vmchale/brainheck#readme synopsis: Brainh*ck interpreter in haskell description:- Brainh*ck interpreter written in haskell and taking advantage of many prominent libraries+ Brainh*ck interpreter written in haskell and taking advantage of several advanced libraries category: Web build-type: Simple extra-source-files:@@ -36,15 +35,14 @@ Brainheck hs-source-dirs: src default-language: Haskell2010- default-extensions: DeriveFunctor DeriveFoldable DeriveTraversable- TypeFamilies+ default-extensions: DeriveFunctor other-extensions: TemplateHaskell KindSignatures FlexibleContexts ghc-options: -Wall build-depends: base >=4.10 && <5, mtl -any, vector -any,- recursion-schemes -any,+ recursion -any, text -any, lens -any, megaparsec >=6.0,
src/Brainheck.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE KindSignatures #-}-{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeFamilies #-} -- | Module with parser etc. module Brainheck@@ -12,8 +11,7 @@ import Control.Lens hiding (lens) import Control.Monad.State.Lazy-import Data.Functor.Foldable-import Data.Functor.Foldable.TH+import Control.Recursion import qualified Data.Map as M import Data.Maybe import qualified Data.Text as T@@ -32,7 +30,17 @@ | Seq [Syntax a] | Token a -makeBaseFunctor ''Syntax+data SyntaxF a x = LoopF x+ | SeqF [x]+ | TokenF a+ deriving (Functor)++type instance Base (Syntax a) = SyntaxF a++instance Recursive (Syntax a) where+ project (Loop x) = LoopF x+ project (Seq xs) = SeqF xs+ project (Token c) = TokenF c -- | Map a char to its action in the `St` monad toAction :: Char -> St ()