Foo | Bar | Baz |
---|---|---|
```data Foo = Bar | Baz``` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeApplications #-} | |
module Main where | |
import Prelude | |
import Text.Read | |
import Control.Exception (try, evaluate, SomeException) | |
read' :: Read a => String -> a | |
read' = Prelude.read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/lib/cgraph/scan.l | |
+++ b/lib/cgraph/scan.l | |
@@ -32,7 +32,7 @@ | |
#include <stdbool.h> | |
#include <stddef.h> | |
#include <string.h> | |
-// #define YY_BUF_SIZE 128000 | |
+#define YY_BUF_SIZE 128000 | |
#define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */ | |
/* this is a workaround for linux flex */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler/GHC/Linker/Loader.hs b/compiler/GHC/Linker/Loader.hs | |
index 2456844e91..33dd3def33 100644 | |
--- a/compiler/GHC/Linker/Loader.hs | |
+++ b/compiler/GHC/Linker/Loader.hs | |
@@ -1611,7 +1611,6 @@ locateLib interp hsc_env is_hs lib_dirs gcc_dirs lib0 | |
| otherwise = [ "lib" ++ lib ++ lib_tag <.> "a" | |
, lib <.> "a" -- native code has no lib_tag | |
, "lib" ++ lib | |
- , lib | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typecheckHook :: [CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv | |
typecheckHook _ modSum tcGblEnv = do | |
let fakeSpan = Ghc.RealSrcSpan $ | |
Ghc.realSrcLocSpan (Ghc.mkRealSrcLoc (Ghc.mkFastString (moduleNameString $ moduleName . ms_mod $ modSum)) 10 20) | |
addWarnAt NoReason fakeSpan (O.text "This is a test!") | |
-- addErrAt fakeSpan (O.text "huhu") | |
pure tcGblEnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configureDynFlags :: Config -> FilePath -> Ghc DynFlags | |
configureDynFlags cfg tmp = do | |
df <- getSessionDynFlags | |
(df',_,_) <- parseDynamicFlags df $ map noLoc $ ghcOptions cfg | |
loud <- liftIO isLoud | |
let df'' = df' { importPaths = nub $ idirs cfg ++ importPaths df' | |
, libraryPaths = nub $ idirs cfg ++ libraryPaths df' | |
, includePaths = updateIncludePaths df' (idirs cfg) -- addGlobalInclude (includePaths df') (idirs cfg) | |
, packageFlags = ExposePackage "" | |
(PackageArg "ghc-prim") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
[ | |
((Test.hs:1:1, AnnModule), [Test.hs:6:1-6]) | |
,\n ((Test.hs:1:1, AnnWhere), [Test.hs:6:13-17]) | |
,\n ((Test.hs:13:1-9, AnnDcolon), [Test.hs:13:4-5]) | |
,\n ((Test.hs:13:1-9, AnnSemi), [Test.hs:14:1]) | |
,\n ((Test.hs:14:1-7, AnnEqual), [Test.hs:14:4]) | |
,\n ((Test.hs:14:1-7, AnnFunId), [Test.hs:14:1-2]) | |
,\n ((Test.hs:14:1-7, AnnSemi), [Test.hs:16:1]) | |
,\n ((Test.hs:16:1-13, AnnDcolon), [Test.hs:16:6-7]) |
I hereby claim:
- I am adinapoli on github.
- I am adinapoli (https://keybase.io/adinapoli) on keybase.
- I have a public key ASAXsMlL8mkU_EE6aH0dPAyMhuDMfZssFy9B6FvEy-GM8wo
To claim this, I am signing this object:
The context: I'm trying to write a small widget where the user can dynamically add and remove parcels, for a shipment e-commerce website. Example:
I would like to present user with live form validation: the idea would be to display a message if, for example, the user inserted a non-int value (those fields translate as: weight, width, length, depth).
Suppose I have the following (simplified) model:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git lisp/term/xterm.el lisp/term/xterm.el | |
index 19eb37a..6298d88 100644 | |
--- lisp/term/xterm.el | |
+++ lisp/term/xterm.el | |
@@ -917,6 +917,15 @@ versions of xterm." | |
;; are more colors to support, compute them now. | |
(when (> ncolors 0) | |
(cond | |
+ ((= (display-color-cells (selected-frame)) 16777216) ; 24-bit xterm | |
+ (let ((idx (length xterm-standard-colors))) |
NewerOlder