mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-16 03:16:20 +00:00
Remove dependence on here, allow haskell-src-exts 1.17
This commit is contained in:
parent
16d5ab079d
commit
c61006202e
@ -1,96 +0,0 @@
|
||||
/*
|
||||
Custom IHaskell CSS.
|
||||
*/
|
||||
|
||||
/* Styles used for the Hoogle display in the pager */
|
||||
.hoogle-doc {
|
||||
display: block;
|
||||
padding-bottom: 1.3em;
|
||||
padding-left: 0.4em;
|
||||
}
|
||||
.hoogle-code {
|
||||
display: block;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
}
|
||||
.hoogle-text {
|
||||
display: block;
|
||||
}
|
||||
.hoogle-name {
|
||||
color: green;
|
||||
font-weight: bold;
|
||||
}
|
||||
.hoogle-head {
|
||||
font-weight: bold;
|
||||
}
|
||||
.hoogle-sub {
|
||||
display: block;
|
||||
margin-left: 0.4em;
|
||||
}
|
||||
.hoogle-package {
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
.hoogle-module {
|
||||
font-weight: bold;
|
||||
}
|
||||
.hoogle-class {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Styles used for basic displays */
|
||||
.get-type {
|
||||
color: green;
|
||||
font-weight: bold;
|
||||
font-family: monospace;
|
||||
display: block;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.show-type {
|
||||
color: green;
|
||||
font-weight: bold;
|
||||
font-family: monospace;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.mono {
|
||||
font-family: monospace;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.err-msg {
|
||||
color: red;
|
||||
font-style: italic;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#unshowable {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.err-msg.in.collapse {
|
||||
padding-top: 0.7em;
|
||||
}
|
||||
|
||||
/* Code that will get highlighted before it is highlighted */
|
||||
.highlight-code {
|
||||
white-space: pre;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/* Hlint styles */
|
||||
.suggestion-warning {
|
||||
font-weight: bold;
|
||||
color: rgb(200, 130, 0);
|
||||
}
|
||||
.suggestion-error {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
.suggestion-name {
|
||||
font-weight: bold;
|
||||
}
|
@ -7,7 +7,7 @@ name: ihaskell
|
||||
-- PVP summary: +-+------- breaking API changes
|
||||
-- | | +----- non-breaking API additions
|
||||
-- | | | +--- code changes with no API change
|
||||
version: 0.8.2.0
|
||||
version: 0.8.3.0
|
||||
|
||||
-- A short (one-line) description of the package.
|
||||
synopsis: A Haskell backend kernel for the IPython project.
|
||||
@ -44,7 +44,6 @@ cabal-version: >=1.16
|
||||
|
||||
data-files:
|
||||
html/kernel.js
|
||||
html/custom.css
|
||||
html/logo-64x64.png
|
||||
|
||||
flag binPkgDb
|
||||
@ -68,9 +67,8 @@ library
|
||||
ghc-parser >=0.1.7,
|
||||
ghc-paths ==0.1.*,
|
||||
haskeline -any,
|
||||
here ==1.2.*,
|
||||
hlint >=1.9 && <2.0,
|
||||
haskell-src-exts ==1.16.*,
|
||||
haskell-src-exts >=1.16 && < 1.18,
|
||||
http-client == 0.4.*,
|
||||
http-client-tls == 0.2.*,
|
||||
mtl >=2.1,
|
||||
@ -114,6 +112,7 @@ library
|
||||
IHaskell.Flags
|
||||
IHaskell.Types
|
||||
IHaskell.BrokenPackages
|
||||
IHaskell.CSS
|
||||
Paths_ihaskell
|
||||
other-modules:
|
||||
IHaskellPrelude
|
||||
@ -142,7 +141,6 @@ executable ihaskell
|
||||
transformers -any,
|
||||
ghc >=7.6 || < 7.11,
|
||||
process >=1.1,
|
||||
here ==1.2.*,
|
||||
aeson >=0.7 && < 0.11,
|
||||
bytestring >=0.10,
|
||||
containers >=0.5,
|
||||
@ -180,9 +178,8 @@ Test-Suite hspec
|
||||
ghc-parser >=0.1.7,
|
||||
ghc-paths ==0.1.*,
|
||||
haskeline -any,
|
||||
here ==1.2.*,
|
||||
hlint >=1.9 && <2.0,
|
||||
haskell-src-exts ==1.16.*,
|
||||
haskell-src-exts >=1.16 && < 1.18,
|
||||
hspec -any,
|
||||
HUnit -any,
|
||||
mtl >=2.1,
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: ipython-kernel
|
||||
version: 0.8.2.0
|
||||
version: 0.8.3.0
|
||||
synopsis: A library for creating kernels for IPython frontends
|
||||
|
||||
description: ipython-kernel is a library for communicating with frontends for the interactive IPython framework. It is used extensively in IHaskell, the interactive Haskell environment.
|
||||
|
@ -26,7 +26,6 @@ import System.Environment (setEnv)
|
||||
#endif
|
||||
import System.Posix.Signals
|
||||
import qualified Data.Map as Map
|
||||
import Data.String.Here (hereFile)
|
||||
import qualified Data.Text.Encoding as E
|
||||
import Data.List (break)
|
||||
|
||||
|
96
src/IHaskell/CSS.hs
Normal file
96
src/IHaskell/CSS.hs
Normal file
@ -0,0 +1,96 @@
|
||||
module IHaskell.CSS (ihaskellCSS) where
|
||||
|
||||
import IHaskellPrelude
|
||||
|
||||
ihaskellCSS :: String
|
||||
ihaskellCSS =
|
||||
unlines [
|
||||
-- Custom IHaskell CSS
|
||||
"/* Styles used for the Hoogle display in the pager */"
|
||||
, ".hoogle-doc {"
|
||||
, "display: block;"
|
||||
, "padding-bottom: 1.3em;"
|
||||
, "padding-left: 0.4em;"
|
||||
, "}"
|
||||
, ".hoogle-code {"
|
||||
, "display: block;"
|
||||
, "font-family: monospace;"
|
||||
, "white-space: pre;"
|
||||
, "}"
|
||||
, ".hoogle-text {"
|
||||
, "display: block;"
|
||||
, "}"
|
||||
, ".hoogle-name {"
|
||||
, "color: green;"
|
||||
, "font-weight: bold;"
|
||||
, "}"
|
||||
, ".hoogle-head {"
|
||||
, "font-weight: bold;"
|
||||
, "}"
|
||||
, ".hoogle-sub {"
|
||||
, "display: block;"
|
||||
, "margin-left: 0.4em;"
|
||||
, "}"
|
||||
, ".hoogle-package {"
|
||||
, "font-weight: bold;"
|
||||
, "font-style: italic;"
|
||||
, "}"
|
||||
, ".hoogle-module {"
|
||||
, "font-weight: bold;"
|
||||
, "}"
|
||||
, ".hoogle-class {"
|
||||
, "font-weight: bold;"
|
||||
, "}"
|
||||
,
|
||||
-- Styles used for basic displays
|
||||
".get-type {"
|
||||
, "color: green;"
|
||||
, "font-weight: bold;"
|
||||
, "font-family: monospace;"
|
||||
, "display: block;"
|
||||
, "white-space: pre-wrap;"
|
||||
, "}"
|
||||
, ".show-type {"
|
||||
, "color: green;"
|
||||
, "font-weight: bold;"
|
||||
, "font-family: monospace;"
|
||||
, "margin-left: 1em;"
|
||||
, "}"
|
||||
, ".mono {"
|
||||
, "font-family: monospace;"
|
||||
, "display: block;"
|
||||
, "}"
|
||||
, ".err-msg {"
|
||||
, "color: red;"
|
||||
, "font-style: italic;"
|
||||
, "font-family: monospace;"
|
||||
, "white-space: pre;"
|
||||
, "display: block;"
|
||||
, "}"
|
||||
, "#unshowable {"
|
||||
, "color: red;"
|
||||
, "font-weight: bold;"
|
||||
, "}"
|
||||
, ".err-msg.in.collapse {"
|
||||
, "padding-top: 0.7em;"
|
||||
, "}"
|
||||
,
|
||||
-- Code that will get highlighted before it is highlighted
|
||||
".highlight-code {"
|
||||
, "white-space: pre;"
|
||||
, "font-family: monospace;"
|
||||
, "}"
|
||||
,
|
||||
-- Hlint styles
|
||||
".suggestion-warning { "
|
||||
, "font-weight: bold;"
|
||||
, "color: rgb(200, 130, 0);"
|
||||
, "}"
|
||||
, ".suggestion-error { "
|
||||
, "font-weight: bold;"
|
||||
, "color: red;"
|
||||
, "}"
|
||||
, ".suggestion-name {"
|
||||
, "font-weight: bold;"
|
||||
, "}"
|
||||
]
|
@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE NoImplicitPrelude, FlexibleContexts, QuasiQuotes, ViewPatterns #-}
|
||||
{-# LANGUAGE NoImplicitPrelude, FlexibleContexts, ViewPatterns #-}
|
||||
|
||||
module IHaskell.Eval.Lint (lint) where
|
||||
|
||||
@ -12,7 +12,6 @@ import qualified Data.ByteString.Char8 as CBS
|
||||
import Prelude (head, tail, last)
|
||||
import Control.Monad
|
||||
import Data.List (findIndex)
|
||||
import Data.String.Here
|
||||
import Data.Char
|
||||
import Data.Monoid
|
||||
import Data.Maybe (mapMaybe)
|
||||
@ -188,16 +187,16 @@ htmlSuggestions = concatMap toHtml
|
||||
_ -> "warning"
|
||||
|
||||
style :: String -> String -> String
|
||||
style cls thing = [i| <div class="suggestion-${cls}">${thing}</div> |]
|
||||
style = printf "<div class=\"suggestion-${cls}\">%s</div>"
|
||||
|
||||
named :: String -> String
|
||||
named thing = [i| <div class="suggestion-name" style="clear:both;">${thing}</div> |]
|
||||
named = printf "<div class=\"suggestion-name\" style=\"clear:both;\">%s</div>"
|
||||
|
||||
styleId :: String -> String -> String -> String
|
||||
styleId cls id thing = [i| <div class="${cls}" id="${id}">${thing}</div> |]
|
||||
styleId = printf "<div class=\"%s\" id=\"%s\">%s</div>"
|
||||
|
||||
floating :: String -> String -> String
|
||||
floating dir thing = [i| <div class="suggestion-row" style="float: ${dir};">${thing}</div> |]
|
||||
floating = printf "<div class=\"suggestion-row\" style=\"float: %s;\">%s</div>"
|
||||
|
||||
showSuggestion :: String -> String
|
||||
showSuggestion = remove lintIdent . dropDo
|
||||
|
@ -1,18 +1,13 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module IHaskell.Publish (publishResult) where
|
||||
|
||||
import IHaskellPrelude
|
||||
|
||||
import Data.String.Here (hereFile)
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.Encoding as E
|
||||
|
||||
import IHaskell.Display
|
||||
import IHaskell.Types
|
||||
|
||||
ihaskellCSS :: String
|
||||
ihaskellCSS = [hereFile|html/custom.css|]
|
||||
import IHaskell.CSS (ihaskellCSS)
|
||||
|
||||
-- | Publish evaluation results, ignore any CommMsgs. This function can be used to create a function
|
||||
-- of type (EvaluationResult -> IO ()), which can be used to publish results to the frontend. The
|
||||
|
15
stack.yaml
15
stack.yaml
@ -16,20 +16,6 @@ packages:
|
||||
- ihaskell-display/ihaskell-aeson/
|
||||
- ihaskell-display/ihaskell-hatex/
|
||||
extra-deps:
|
||||
# - active-0.2.0.3
|
||||
# - Chart-1.5
|
||||
# - Chart-cairo-1.5
|
||||
# - diagrams-1.3
|
||||
# - diagrams-cairo-1.3.0.2
|
||||
# - diagrams-contrib-1.3.0.3
|
||||
# - diagrams-core-1.3.0.1
|
||||
# - diagrams-lib-1.3.0.1
|
||||
# - diagrams-solve-0.1
|
||||
# - diagrams-svg-1.3.1.3
|
||||
# - force-layout-0.4.0.1
|
||||
# - happy-1.19.5
|
||||
# - HList-0.4.0.0
|
||||
# - lucid-svg-0.5.0.0
|
||||
- magic-1.1
|
||||
- Rlang-QQ-0.3.1.0
|
||||
- static-canvas-0.2.0.2
|
||||
@ -38,4 +24,5 @@ extra-deps:
|
||||
- xformat-0.1.2.1
|
||||
- ratio-int-0.1.2
|
||||
- friday-0.2.2.0
|
||||
- haskell-src-exts-1.17.0
|
||||
resolver: nightly-2015-08-15
|
||||
|
Loading…
x
Reference in New Issue
Block a user