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
--> { | |
"jsonrpc": "2.0", | |
"params": { | |
"rootUri": "file:///Users/pepeiborra/scratch/ide/test/testdata/format", | |
"processId": 78600, | |
"clientInfo": { | |
"name": "lsp-test", | |
"version": "0.13.0.0" | |
}, | |
"rootPath": "/Users/pepeiborra/scratch/ide/test/testdata/format", |
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
git filter-repo --paths-from-file ../ghcide-move.txt --tag-rename '':'ghcide-' --message-callback 'return re.sub(b"#([0-9]*)", b"haskell/ghcide#\\1", message)' |
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 ViewPatterns #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DerivingStrategies #-} | |
{-# LANGUAGE DuplicateRecordFields #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE ScopedTypeVariables #-} |
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
setValues state key file val = do | |
currentValue <- HMap.lookup (file, Key key) <$> readVar state | |
_ <- evaluate currentValue | |
let fin = Just (hPutStrLn stderr "AN OLD VALUE GOT RELEASED") | |
weak <- (evaluate >=> \v -> mkWeakPtr v fin) `traverse` currentValue | |
modifyVar_ state $ \vals -> do | |
-- Force to make sure the old HashMap is not retained |
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 FlexibleInstances, UndecidableInstances #-} | |
> {-# LANGUAGE ConstraintKinds, DerivingVia, DerivingStrategies, GeneralizedNewtypeDeriving, KindSignatures, NoMonomorphismRestriction, RecordWildCards #-} | |
> {-# LANGUAGE GADTs, QuantifiedConstraints, RankNTypes #-} | |
> import Control.Monad.Identity | |
> import Control.Monad.IO.Class | |
> import Control.Monad.Trans.Reader | |
> import Control.Monad.Trans.State | |
> import Control.Monad.Trans.Class | |
> import Control.Monad.Trans.Control | |
> import Data.Time.Clock (NominalDiffTime, diffUTCTime) |
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
module Main (main) where | |
import Control.Concurrent.Async | |
import qualified Control.Exception as Exception | |
import Control.Monad as Monad | |
import qualified Data.ByteString as ByteString | |
import qualified Data.Map.Strict as Map | |
import System.Clock | |
import System.IO | |
import System.Posix.Process |
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 RecordWildCards #-} | |
{-# LANGUAGE PartialTypeSignatures #-} | |
import Data.List hiding (subsequences) | |
import Control.Monad | |
import Numeric.Natural | |
data State = State | |
{ sStack :: [(Int, Int)] | |
, sMax :: Int | |
} |
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
see attached file |
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 ScopedTypeVariables #-} | |
{----------------------------------------------------------------------------- | |
threepenny-gui | |
Example: | |
Small database with CRUD operations and filtering. | |
To keep things simple, the list box is rebuild every time | |
that the database is updated. This is perfectly fine for rapid prototyping. | |
A more sophisticated approach would use incremental updates. | |
------------------------------------------------------------------------------} |
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 PartialTypeSignatures#-} | |
import Prelude hiding (lookup) | |
import Control.Concurrent | |
import Control.Concurrent.Async | |
import Control.Monad (void) | |
import Data.List (isPrefixOf) | |
import Data.Maybe | |
import Data.Monoid | |
import Graphics.UI.Threepenny as UI |
NewerOlder