diff options
author | Rene Ladan <rene@FreeBSD.org> | 2018-09-03 19:04:10 +0000 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2018-09-03 19:04:10 +0000 |
commit | c448dc79d32cb0f5566a3b55483f90426cfe7678 (patch) | |
tree | 6303480335b7bf01117e0c40925cba2467aa97f7 /www/hs-activehs | |
parent | 0201adce225b87df06e2a6fcf8769d31a9619eab (diff) | |
download | ports-c448dc79d32cb0f5566a3b55483f90426cfe7678.tar.gz ports-c448dc79d32cb0f5566a3b55483f90426cfe7678.zip |
Notes
Diffstat (limited to 'www/hs-activehs')
-rw-r--r-- | www/hs-activehs/Makefile | 27 | ||||
-rw-r--r-- | www/hs-activehs/distinfo | 3 | ||||
-rw-r--r-- | www/hs-activehs/files/patch-Converter.hs | 77 | ||||
-rw-r--r-- | www/hs-activehs/files/patch-Parse.hs | 85 | ||||
-rw-r--r-- | www/hs-activehs/files/patch-Qualify.hs | 76 | ||||
-rw-r--r-- | www/hs-activehs/files/patch-Specialize.hs | 48 | ||||
-rw-r--r-- | www/hs-activehs/files/patch-activehs.cabal | 41 | ||||
-rw-r--r-- | www/hs-activehs/pkg-descr | 4 |
8 files changed, 0 insertions, 361 deletions
diff --git a/www/hs-activehs/Makefile b/www/hs-activehs/Makefile deleted file mode 100644 index 12b931d44536..000000000000 --- a/www/hs-activehs/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# $FreeBSD$ - -PORTNAME= activehs -PORTVERSION= 0.3.2 -PORTREVISION= 3 -CATEGORIES= www haskell - -MAINTAINER= haskell@FreeBSD.org -COMMENT= Haskell code presentation tool - -LICENSE= BSD3CLAUSE - -BROKEN= fails to build -DEPRECATED= Doesn't build with recent dependencies -EXPIRATION_DATE=2018-09-02 - -USE_CABAL= activehs-base blaze-html blaze-markup cmdargs data-pprint \ - dia-base dia-functions exceptions haskell-src-exts \ - highlighting-kate hint hoogle mtl pandoc pureMD5 \ - QuickCheck simple-reflect snap-core snap-server split syb \ - utf8-string - -STANDALONE= yes -EXECUTABLE= activehs - -.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" -.include <bsd.port.mk> diff --git a/www/hs-activehs/distinfo b/www/hs-activehs/distinfo deleted file mode 100644 index c2289b0c3e26..000000000000 --- a/www/hs-activehs/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -TIMESTAMP = 1501411977 -SHA256 (cabal/activehs-0.3.2.tar.gz) = f70dfee1dbed1edce6d6ecec56a4c16ec4b9462e5b52130058c3bdd85659ab58 -SIZE (cabal/activehs-0.3.2.tar.gz) = 33457 diff --git a/www/hs-activehs/files/patch-Converter.hs b/www/hs-activehs/files/patch-Converter.hs deleted file mode 100644 index ea445675558b..000000000000 --- a/www/hs-activehs/files/patch-Converter.hs +++ /dev/null @@ -1,77 +0,0 @@ ---- Converter.hs.orig 2017-07-30 10:48:49 UTC -+++ Converter.hs -@@ -53,7 +53,7 @@ convert ghci args@(Args {magicname, sourcedir, gendir, - object = sourcedir </> what <.> "o" - - --extract :: ParseMode -> Bool -> TaskChan -> Args -> Language -> Doc -> IO () -+extract :: ParseMode -> Bool -> TaskChan -> Args -> Language -> Doc loc -> IO () - extract mode verbose ghci (Args {lang, templatedir, sourcedir, exercisedir, gendir, magicname}) what (Doc meta modu ss) = do - - writeEx (what <.> ext) [showEnv mode $ importsHiding []] -@@ -63,10 +63,9 @@ extract mode verbose ghci (Args {lang, templatedir, so - - writeFile' (gendir </> what <.> "xml") $ flip writeHtmlString (Pandoc meta $ concat ss') - $ def -- { writerStandalone = True -- , writerTableOfContents = True -+ { writerTableOfContents = True - , writerSectionDivs = True -- , writerTemplate = ht -+ , writerTemplate = Just ht - } - - where -@@ -95,10 +94,10 @@ extract mode verbose ghci (Args {lang, templatedir, so - system s - - importsHiding funnames = case modu of -- HaskellModule (HSyn.Module loc (HSyn.ModuleName modname) directives _ _ imps _) -> -+ HaskellModule (HSyn.Module loc (Just (HSyn.ModuleHead _ (HSyn.ModuleName _ modname) _ _)) directives imps _) -> - HPty.prettyPrint $ -- HSyn.Module loc (HSyn.ModuleName "") directives Nothing Nothing -- ([mkImport modname funnames, mkImport_ ('X':magicname) modname] ++ imps) [] -+ HSyn.Module loc Nothing directives -+ ([mkImport loc modname funnames, mkImport_ loc ('X':magicname) modname] ++ imps) [] - -- _ -> error "error in Converter.extract" - - mkCodeBlock l = -@@ -237,27 +236,26 @@ showEnv HaskellMode prelude - ++ prelude - ++ "\n{-# LINE 1 \"input\" #-}\n" - --mkImport :: String -> [Name] -> HSyn.ImportDecl --mkImport m d -+mkImport :: loc -> String -> [Name] -> HSyn.ImportDecl loc -+mkImport loc m d - = HSyn.ImportDecl -- { HSyn.importLoc = undefined -- , HSyn.importModule = HSyn.ModuleName m -+ { HSyn.importModule = HSyn.ModuleName loc m - , HSyn.importQualified = False - , HSyn.importSrc = False - , HSyn.importPkg = Nothing - , HSyn.importAs = Nothing -- , HSyn.importSpecs = Just (True, map (HSyn.IVar . mkName) d) -+ , HSyn.importSpecs = Just (HSyn.ImportSpecList loc True (map (HSyn.IVar loc . mkName loc) d)) - , HSyn.importSafe = False - } - --mkName :: String -> HSyn.Name --mkName n@(c:_) -- | isLetter c = HSyn.Ident n --mkName n = HSyn.Symbol n -+mkName :: loc -> String -> HSyn.Name loc -+mkName loc n@(c:_) -+ | isLetter c = HSyn.Ident loc n -+mkName loc n = HSyn.Symbol loc n - --mkImport_ :: String -> String -> HSyn.ImportDecl --mkImport_ magic m -- = (mkImport m []) { HSyn.importQualified = True, HSyn.importAs = Just $ HSyn.ModuleName magic } -+mkImport_ :: loc -> String -> String -> HSyn.ImportDecl loc -+mkImport_ loc magic m -+ = (mkImport loc m []) { HSyn.importQualified = True, HSyn.importAs = Just $ HSyn.ModuleName loc magic } - - ------------------ - diff --git a/www/hs-activehs/files/patch-Parse.hs b/www/hs-activehs/files/patch-Parse.hs deleted file mode 100644 index 3fe4d59c4070..000000000000 --- a/www/hs-activehs/files/patch-Parse.hs +++ /dev/null @@ -1,85 +0,0 @@ ---- Parse.hs.orig 2017-07-30 10:48:49 UTC -+++ Parse.hs -@@ -17,6 +17,7 @@ import Text.Pandoc - - import qualified Language.Haskell.Exts.Parser as HPar - import qualified Language.Haskell.Exts.Syntax as HSyn -+import qualified Language.Haskell.Exts.SrcLoc as HLoc - - import Data.List.Split (splitOn) - import Data.List (tails, partition, groupBy) -@@ -30,15 +31,15 @@ import qualified Data.Set as Set - data ParseMode = HaskellMode -- | AgdaMode - deriving (Show, Enum, Eq) - --data Module -- = HaskellModule HSyn.Module -+data Module loc -+ = HaskellModule (HSyn.Module loc) - -- | AgdaModule ASyn.Module - deriving (Show) - --data Doc -+data Doc loc - = Doc - Meta{-title, author, date-} -- Module{-module directives, module name, imports-} -+ (Module{-module directives, module name, imports-} loc) - [BBlock] - deriving (Show) - -@@ -68,7 +69,7 @@ testCommandList = "EeFfH" - - ----------------------------------- - --mainParse :: ParseMode -> FilePath -> IO Doc -+mainParse :: ParseMode -> FilePath -> IO (Doc HLoc.SrcSpanInfo) - mainParse mode s = do - c <- readFile s - case readMarkdown pState . unlines . concatMap preprocess . lines $ c of -@@ -80,7 +81,7 @@ mainParse mode s = do - fmap (Doc meta header) $ collectTests mode $ map ({-highlight . -}interpreter . Text) blocks - Left err -> fail $ "readMarkdown: " ++ show err - where -- parseModule :: ParseMode -> String -> IO Module -+ parseModule :: ParseMode -> String -> IO (Module HLoc.SrcSpanInfo) - parseModule HaskellMode m = case HPar.parseModuleWithMode HPar.defaultParseMode m of - (HPar.ParseOk m) -> return $ HaskellModule m - parseError -> fail $ "parseHeader: " ++ show parseError -@@ -137,17 +138,17 @@ processHaskellLines isExercise l_ = return (concatMap - names = concatMap (getFName . snd) x - - getFName (HPar.ParseOk x) = case x of -- HSyn.TypeSig _ a _ -> map printName a -- HSyn.PatBind _ (HSyn.PVar a) _ _ -> [printName a] -- HSyn.FunBind (HSyn.Match _ a _ _ _ _ :_) -> [printName a] -- HSyn.TypeDecl _ a _ _ -> [printName a] -- HSyn.DataDecl _ _ _ a _ x _ -> printName a: [printName n | HSyn.QualConDecl _ _ _ y<-x, n <- getN y] -- _ -> [] -+ HSyn.TypeSig _ a _ -> map printName a -+ HSyn.PatBind _ (HSyn.PVar _ a) _ _ -> [printName a] -+ HSyn.FunBind _ ((HSyn.Match _ a _ _ _):_) -> [printName a] -+ HSyn.TypeDecl _ (HSyn.DHead _ a) _ -> [printName a] -+ HSyn.DataDecl _ _ _ (HSyn.DHead _ a) x _ -> printName a: [printName n | HSyn.QualConDecl _ _ _ y<-x, n <- getN y] -+ _ -> [] - getFName _ = [] - -- getN (HSyn.ConDecl n _) = [n] -- getN (HSyn.InfixConDecl _ n _) = [n] -- getN (HSyn.RecDecl n l) = n: concatMap fst l -+ getN (HSyn.ConDecl _ n _) = [n] -+ getN (HSyn.InfixConDecl _ _ n _) = [n] -+ getN (HSyn.RecDecl _ n l) = n : concatMap (\(HSyn.FieldDecl _ xs _) -> xs) l - - isVisible (HPar.ParseOk (HSyn.TypeSig _ _ _)) = True - isVisible (HPar.ParseOk (HSyn.InfixDecl _ _ _ _)) = True -@@ -181,6 +182,6 @@ parseQuickCheck :: String -> ([String], String) - parseQuickCheck s = case splitOn ";;" s of - l -> (init l, last l) - --printName :: HSyn.Name -> Name --printName (HSyn.Ident x) = x --printName (HSyn.Symbol x) = x -+printName :: HSyn.Name loc -> Name -+printName (HSyn.Ident _ x) = x -+printName (HSyn.Symbol _ x) = x diff --git a/www/hs-activehs/files/patch-Qualify.hs b/www/hs-activehs/files/patch-Qualify.hs deleted file mode 100644 index b9a90bf0bb18..000000000000 --- a/www/hs-activehs/files/patch-Qualify.hs +++ /dev/null @@ -1,76 +0,0 @@ ---- Qualify.hs.orig 2017-07-30 10:48:49 UTC -+++ Qualify.hs -@@ -21,44 +21,47 @@ qualify - -> String -- ^ Haskell expression - -> Either String String -- ^ either the modified expression or an error - qualify q ns x = case parseExpWithMode defaultParseMode x of -- ParseOk y -> Right $ prettyPrint $ runReader (trExp y) ns -+ ParseOk y -> Right $ prettyPrint $ runReader (trExp proxy y) ns - e -> Left $ show e -- where -- trQName :: QName -> R QName -- trQName y@(UnQual x) = do -- b <- asks (printName x `elem`) -- return $ if b then (Qual (ModuleName q) x) else y -- trQName y = return y -+ where -+ proxy = error "qualify" - -- trExp :: Exp -> R Exp -- trExp (Lambda loc pats e) = do -- pats' <- tr pats -- e' <- local (\\ vars pats) $ trExp e -+ trQName :: Data loc => loc -> QName loc -> R (QName loc) -+ trQName _ y@(UnQual loc x) = do -+ b <- asks (printName loc x `elem`) -+ return $ if b then (Qual loc (ModuleName loc q) x) else y -+ trQName _ y = return y -+ -+ trExp :: Data loc => loc -> Exp loc -> R (Exp loc) -+ trExp _ (Lambda loc pats e) = do -+ pats' <- tr loc pats -+ e' <- local (\\ vars loc pats) $ trExp loc e - return $ Lambda loc pats' e' -- trExp (Let b e) = do -- (b', e') <- local (\\ vars b) $ tr (b, e) -- return $ Let b' e' -- trExp x = gmapM tr x -+ trExp _ (Let loc b e) = do -+ (b', e') <- local (\\ vars loc b) $ tr loc (b, e) -+ return $ Let loc b' e' -+ trExp loc x = gmapM (tr loc) x - - {- - Alt: - Alt SrcLoc Pat GuardedAlts Binds - -} - -- tr :: Data x => x -> R x -- tr = everywhereM (mkM trQName) `extM` trExp -+ tr :: (Data loc, Data a) => loc -> a -> R a -+ tr loc = everywhereM (mkM (trQName loc)) `extM` (trExp loc) - -- vars :: Data a => a -> [String] -- vars = map printName . everything (++) (mkQ [] patVars_) -+ vars :: (Typeable loc, Data a) => loc -> a -> [String] -+ vars loc = map (printName loc) . everything (++) (mkQ [] (patVars_ loc)) - -- patVars_ :: Pat -> [Name] -- patVars_ (PVar x) = [x] -- patVars_ (PAsPat x _) = [x] -- patVars_ (PNPlusK x _) = [x] -- patVars_ _ = [] -+ patVars_ :: loc -> Pat loc -> [Name loc] -+ patVars_ _ (PVar _ x) = [x] -+ patVars_ _ (PAsPat _ x _) = [x] -+ patVars_ _ (PNPlusK _ x _) = [x] -+ patVars_ _ _ = [] - -- printName (Ident x) = x -- printName (Symbol x) = x -+ printName :: loc -> Name loc -> String -+ printName _ (Ident _ x) = x -+ printName _ (Symbol _ x) = x - - {- !!! - PatTypeSig SrcLoc Pat Type diff --git a/www/hs-activehs/files/patch-Specialize.hs b/www/hs-activehs/files/patch-Specialize.hs deleted file mode 100644 index 0c4371a06918..000000000000 --- a/www/hs-activehs/files/patch-Specialize.hs +++ /dev/null @@ -1,48 +0,0 @@ ---- Specialize.hs.orig 2017-07-30 10:48:49 UTC -+++ Specialize.hs -@@ -23,32 +23,32 @@ specialize a - - in Right (prettyPrint t', prettyPrint t'') - --split :: Type -> ([(String, [String])], Type) --split (TyForall Nothing l t) -+split :: Type a -> ([(String, [String])], Type a) -+split (TyForall _ Nothing (Just (CxTuple _ l)) t) - = ( map (\x -> (fst (head x), map snd x)) $ groupBy ((==) `on` fst) $ sort -- [(v,s) | ClassA (UnQual (Ident s)) [TyVar (Ident v)]<-l] -+ [(v,s) | ClassA _ (UnQual _ (Ident _ s)) [TyVar _ (Ident _ v)]<-l] - , t - ) - split t - = ([], t) - --convert :: ([(String, [String])], Type) -> (Type, Type) -+convert :: ([(String, [String])], Type a) -> (Type a, Type a) - convert (m, t) = (app True mm t, app False mm t) where mm = map resolve m - --app :: Bool -> [(String, [[Char]])] -> Type -> Type -+app :: Bool -> [(String, [[Char]])] -> Type a -> Type a - app b m t = f t where -- f (TyFun a b) = TyFun (f a) (f b) -- f (TyTuple bo l) = TyTuple bo $ map f l -- f (TyList t) = TyList (f t) -- f (TyParen t) = TyParen (f t) -- f (TyApp x t) = TyApp (f x) (f t) -- f (TyVar (Ident s)) = mkV $ head $ [y | (v,x)<-m, v==s, y<-ff x] ++ ff allT -+ f (TyFun t a b) = TyFun t (f a) (f b) -+ f (TyTuple t bo l) = TyTuple t bo $ map f l -+ f (TyList x t) = TyList x (f t) -+ f (TyParen x t) = TyParen x (f t) -+ f (TyApp v x t) = TyApp v (f x) (f t) -+ f (TyVar v (Ident _ s)) = mkV v $ head $ [y | (v,x)<-m, v==s, y<-ff x] ++ ff allT - f t = t - - ff = if b then id else reverse - --mkV :: String -> Type --mkV v = TyVar $ Ident v -+mkV :: a -> String -> Type a -+mkV x v = TyVar x $ Ident x v - - resolve :: (String, [String]) -> (String, [String]) - resolve (v, l) = (v, foldl1 intersect $ map res l) diff --git a/www/hs-activehs/files/patch-activehs.cabal b/www/hs-activehs/files/patch-activehs.cabal deleted file mode 100644 index 050911e6acb2..000000000000 --- a/www/hs-activehs/files/patch-activehs.cabal +++ /dev/null @@ -1,41 +0,0 @@ ---- activehs.cabal.orig 2017-07-30 10:48:49 UTC -+++ activehs.cabal -@@ -73,30 +73,30 @@ Executable activehs - activehs-base >= 0.2 && < 0.4, - data-pprint >= 0.2 && < 0.3, - base >= 4.0 && < 5.0, -- QuickCheck >= 2.4 && < 2.9, -+ QuickCheck >= 2.4 && < 2.11, - array >= 0.3 && < 0.6, -- directory >= 1.1 && < 1.3, -+ directory >= 1.1 && < 1.4, - containers >= 0.4 && < 0.6, - filepath >= 1.2 && < 1.5, - text >= 1.1 && < 1.3, - snap-core >= 1.0 && < 1.1, - snap-server >= 1.0 && < 1.1, -- syb >= 0.6 && < 0.7, -- haskell-src-exts >= 1.17 && < 1.18, -+ syb >= 0.6 && < 0.8, -+ haskell-src-exts >= 1.17 && < 1.20, - bytestring >= 0.9 && < 0.11, - utf8-string >= 0.3 && < 1.1, - xhtml >= 3000.2 && < 3000.3, -- blaze-html >= 0.6 && < 0.9, -- blaze-markup >= 0.6 && < 0.8, -+ blaze-html >= 0.6 && < 0.10, -+ blaze-markup >= 0.6 && < 0.9, - pureMD5 >= 2.1 && < 2.2, - deepseq >= 1.1 && < 1.5, - exceptions >= 0.6 && < 0.9, - split >= 0.1 && < 0.3, -- pandoc >= 1.17 && < 1.18, -+ pandoc >= 1.17 && < 1.20, - time >= 1.6 && < 1.7, - old-time >= 1.0 && < 1.2, - process >= 1.4 && < 1.5, -- hint >= 0.6 && < 0.7, -+ hint >= 0.6 && < 0.8, - simple-reflect >= 0.2 && < 0.4, - mtl >= 2.0 && < 2.3, - old-locale >= 1.0 && < 1.1, diff --git a/www/hs-activehs/pkg-descr b/www/hs-activehs/pkg-descr deleted file mode 100644 index 24d9095c701c..000000000000 --- a/www/hs-activehs/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -ActiveHs is a Haskell source code presentation tool, developed for education -purposes. - -WWW: http://hackage.haskell.org/package/activehs |