34+ results for 'haskell =<<' (1526 ms)
6-- 7-- Maintainer : duncan@haskell.org 8-- Stability : provisional 150 . foldlTarball extract ([], []) 151 =<< BS.readFile indexFile 152 222 . GZip.decompress 223 =<< BS.readFile indexFile 224Index.hs https://gitlab.com/kranium/cabal | Haskell | 218 lines
3-- Module : Distribution.Client.Index 4-- Maintainer : cabal-devel@haskell.org 5-- Portability : portable 188 BS.writeFile tmpFile . Tar.writeEntries . Tar.filterEntries (p l) . Tar.read 189 =<< BS.readFile path 190 -- This invalidates the cache, so we don't have to update it explicitly.Format.hs https://github.com/upwawet/vision.git | Haskell | 194 lines
1-- -*-haskell-*- 2-- Vision (for the Voice): an XMMS2 client. 141loadFormatDefs = do 142 putFormatDefs' . map trim =<< config "playlist-formats.conf" builtinFormats 143 updateFormats False 164saveFormatDefs = do 165 writeConfig "playlist-formats.conf" =<< getFormatDefs 166 return () 170updateFormats notify = do 171 putMakeInfo =<< makeMakeInfo =<< getFormats 172 when notify $ atomically $ doInstallSymlink.hs https://github.com/Lainepress/hp-2009.2.0.2.git | Haskell | 240 lines
12-- 13-- Maintainer : cabal-devel@haskell.org 14-- Stability : provisional 208 . takeDirectory 209 =<< canonicalizePath 210 . (symlink </>) 210 . (symlink </>) 211 =<< readSymbolicLink symlink 212IO.hs https://github.com/Lainepress/hp-2011.2.0.1.git | Haskell | 207 lines
46import qualified Data.Text.Lazy as L 47#if __GLASGOW_HASKELL__ <= 610 48import Data.Text.Lazy.Encoding (decodeUtf8) 98hGetContents :: Handle -> IO Text 99#if __GLASGOW_HASKELL__ <= 610 100hGetContents = fmap decodeUtf8 . L8.hGetContents 141hGetLine :: Handle -> IO Text 142#if __GLASGOW_HASKELL__ <= 610 143hGetLine = fmap (decodeUtf8 . L8.fromChunks . (:[])) . S8.hGetLine 160interact :: (Text -> Text) -> IO () 161interact f = putStr . f =<< getContents 162haskell.js https://github.com/andreaskc/orbeon-forms.git | JavaScript | 242 lines
1CodeMirror.defineMode("haskell", function(cmCfg, modeCfg) { 2 7 8 // These should all be Unicode extended, as per the Haskell 2010 report 9 var smallRE = /[a-z_]/; 184 setType("hs-prelude-varsym")( 185 "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<", 186 "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*", "**"); 241 242CodeMirror.defineMIME("text/x-haskell", "haskell"); 243IndexUtils.hs https://github.com/Lainepress/hp-2011.2.0.1.git | Haskell | 265 lines
6-- 7-- Maintainer : duncan@community.haskell.org 8-- Stability : provisional 153 . foldlTarball extract ([], []) 154 =<< BS.readFile indexFile 155 225 . maybeDecompress 226 =<< BS.readFile indexFile 227Main.hs git://github.com/ierton/haskdogs.git | Haskell | 229 lines
55 value "" <> 56 help "File containing Haskell sources to process" ) 57 <*> strOption ( 84opts = info (helper <*> versionParser <*> optsParser) 85 ( fullDesc <> header (exename ++ " - Recursive hasktags-based TAGS generator for a Haskell project" )) 86 139 readLinedFile f = 140 lines <$> (hGetContents =<< ( 141 if (f=="-") 183 184 -- Maps import name to haskell package name 185 iname2module :: String -> IO (Maybe String)Eval.hs git://github.com/ghcjs/ghcjs.git | Haskell | 305 lines
6{- | 7 Evaluate Template Haskell splices on node.js 8 -} 53 54import qualified Language.Haskell.TH as TH 55import qualified Language.Haskell.TH.Syntax as TH 70runModFinalizers :: GHCJSQ () 71runModFinalizers = go =<< getState 72 where 177 let lookup :: forall a. Typeable a => Map TypeRep Dynamic -> Maybe a 178 lookup m = fromDynamic =<< M.lookup (typeOf (undefined::a)) m 179 in return (lookup (qsMap s), s) 200 201-- | the Template Haskell server 202runTHServer :: IO ()haskell.js https://gitlab.com/Blueprint-Marketing/cdnjs | JavaScript | 242 lines
1CodeMirror.defineMode("haskell", function(cmCfg, modeCfg) { 2 7 8 // These should all be Unicode extended, as per the Haskell 2010 report 9 var smallRE = /[a-z_]/; 184 setType("builtin")( 185 "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<", 186 "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*", "**"); 241 242CodeMirror.defineMIME("text/x-haskell", "haskell"); 243Configure.hs https://github.com/Lainepress/hp-2009.2.0.2.git | Haskell | 210 lines
7-- 8-- Maintainer : cabal-devel@haskell.org 9-- Portability : portable 140 (AvailablePackageDb _ availablePrefs) = do 141 pkg <- readPackageDescription verbosity =<< defaultPackageDesc verbosity 142 let -- The trick is, we add the local package to the available index andMonad.hs https://github.com/jberthold/ghc.git | Haskell | 358 lines
9-- 10-- Maintainer : libraries@haskell.org 11-- Stability : provisional 36 , sequence_ 37 , (=<<) 38 , (>=>) 257For further information, see this Trac comment, which includes side-by-side 258Core: https://ghc.haskell.org/trac/ghc/ticket/11795#comment:6 259-}haskell.js https://gitlab.com/alidz1982/cdnjs | JavaScript | 267 lines
13 14CodeMirror.defineMode("haskell", function(_config, modeConfig) { 15 20 21 // These should all be Unicode extended, as per the Haskell 2010 report 22 var smallRE = /[a-z_]/; 199 setType("builtin")( 200 "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<", 201 "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*", "**"); 264 265CodeMirror.defineMIME("text/x-haskell", "haskell"); 266sumeuler.hs git://github.com/PatrickMaier/HdpH.git | Haskell | 172 lines
8 9{-# LANGUAGE TemplateHaskell #-} 10 60par_sum_totient lower upper chunksize = 61 sum <$> (mapM join =<< (mapM fork_sum_euler $ chunked_list)) 62 where 81 let chunks_round_robin = zip chunked_list (cycle nodes) 82 sum <$> (mapM join =<< (mapM push_sum_euler $ chunks_round_robin)) 83 wherePointful.hs https://github.com/23Skidoo/pointful.git | Haskell | 356 lines
17import Data.Maybe 18import Language.Haskell.Exts.Simple as Hs hiding (alt, name, var) 19 35-- (cast -> Just _) patterns causes compiler crashes with ghc before 36-- version 8; cf. https://ghc.haskell.org/trac/ghc/ticket/11336 37 309 "id = \\x -> x ", 310 "(=<<) = flip (>>=) ", 311 "liftM2 = \\f m1 m2 -> m1 >>= \\x1 -> m2 >>= \\x2 -> return (f x1 x2) ", 354-- 355-- main = test "f = tail . head; g = head . tail; h = tail + tail; three = g . h . i; dontSub = (\\x -> x + x) 1; ofHead f = f . head; fm = flip mapM_ xs (\\x -> g x); po = (+1); op = (1+); g = (. f); stabilize = fix (ap . flip (ap . (flip =<< (if' .) . (==))) =<<)" 356--List.hs https://gitlab.com/lingnan/hoppy | Haskell | 242 lines
32#endif 33import Foreign.Hoppy.Generator.Language.Haskell ( 34 HsTypeSide (HsHsSide), 93 Nothing -> id 94 Just conversion -> addAddendumHaskell $ makeAddendum conversion) $ 95 addReqs reqs $ 161 when (conversion == ConvertValue) $ 162 addImports $ hsImport1 "Prelude" "(=<<)" 163 214 ConvertPtr -> "" 215 ConvertValue -> "HoppyFHR.decode =<< ", 216 iterGet, " iter'"]Input.hs https://gitlab.com/pavelkogan/reflex-dom | Haskell | 322 lines
1{-# LANGUAGE ConstraintKinds, TypeFamilies, FlexibleContexts, DataKinds, GADTs, ScopedTypeVariables, FlexibleInstances, RecursiveDo, TemplateHaskell #-} 2module Reflex.Dom.Widget.Input (module Reflex.Dom.Widget.Input, def, (&), (.~)) where 53textInput (TextInputConfig inputType initial eSetValue dAttrs) = do 54 e <- liftM castToHTMLInputElement $ buildEmptyElement "input" =<< mapDyn (Map.insert "type" inputType) dAttrs 55 liftIO $ htmlInputElementSetValue e initial 143checkboxView dAttrs dValue = do 144 e <- liftM castToHTMLInputElement $ buildEmptyElement "input" =<< mapDyn (Map.insert "type" "checkbox") dAttrs 145 eClicked <- wrapDomEvent e elementOnclick $ do 168fileInput (FileInputConfig dAttrs) = do 169 e <- liftM castToHTMLInputElement $ buildEmptyElement "input" =<< mapDyn (Map.insert "type" "file") dAttrs 170 eChange <- wrapDomEvent e elementOnchange $ liftIO $ do 210 return k 211 dValue <- combineDyn readKey options =<< holdDyn (Just k0) (leftmost [eChange, fmap Just setK]) 212 return $ Dropdown dValue (attachDynWith readKey options eChange)Anonymous.hs https://gitlab.com/kranium/cabal | Haskell | 315 lines
79 80 -- | The Haskell compiler (and hopefully version) used 81 compiler :: CompilerId, 197parseFields input = do 198 fields <- mapM extractField =<< readFields input 199 let merged = mergeBy (\desc (_,name,_) -> compare (fieldName desc) name)MongoDB.hs https://bitbucket.org/calxi/snaplet-mongodb.git | Haskell | 152 lines
1{-# LANGUAGE TemplateHaskell, TypeFamilies, QuasiQuotes #-} 2 99 toValue a = toValue $ V.toList a 100 fromValue v = return . V.fromList =<< fromValue v 101---------------------------------------------------------------------- 113 toKV (Bson.Doc d) = do 114 key <- fromValue =<< Bson.look (u "key") d 115 value <- fromValue =<< Bson.look (u "value") dLanguagePragmas.hs https://gitlab.com/alx741/stylish-haskell | Haskell | 168 lines
1-------------------------------------------------------------------------------- 2module Language.Haskell.Stylish.Step.LanguagePragmas 3 ( Style (..) 12import qualified Data.Set as S 13import qualified Language.Haskell.Exts as H 14 16-------------------------------------------------------------------------------- 17import Language.Haskell.Stylish.Block 18import Language.Haskell.Stylish.Editor 18import Language.Haskell.Stylish.Editor 19import Language.Haskell.Stylish.Step 20import Language.Haskell.Stylish.Util 127 pragmas' = pragmas $ fmap linesFromSrcSpan module' 128 longest = maximum $ map length $ snd =<< pragmas' 129 groups = [(b, concat pgs) | (b, pgs) <- groupAdjacent pragmas']WriterOptions.hs https://github.com/jgm/pandoc.git | Haskell | 244 lines
42 TypeTable -> peekWriterOptionsTable idx 43 _ -> failPeek =<< 44 typeMismatchMessage "WriterOptions userdata or table" idx 55 <#> udparam typeWriterOptions "opts" "options to print in native format" 56 =#> functionResult pushString "string" "Haskell representation" 57 ]Set.hs https://gitlab.com/lingnan/hoppy | Haskell | 213 lines
32#endif 33import Foreign.Hoppy.Generator.Language.Haskell ( 34 HsTypeSide (HsHsSide), 95 Nothing -> id 96 Just conversion -> addAddendumHaskell $ makeAddendum conversion) $ 97 addReqs reqs $ 137 when (conversion == ConvertValue) $ 138 addImports $ mconcat [hsImport1 "Prelude" "(=<<)"] 139 182 ConvertPtr -> "" 183 ConvertValue -> "HoppyFHR.decode =<< ", 184 iterGetConst, " iter'"]Wreq.hs https://gitlab.com/tunixman/wreq | Haskell | 623 lines
26-- 27-- \-\- Conversion of Haskell values to JSON. 28-- import "Data.Aeson" ('Data.Aeson.toJSON') 211getWith :: Options -> String -> IO (Response L.ByteString) 212getWith opts url = runRead =<< prepareGet opts url 213 241postWith :: Postable a => Options -> String -> a -> IO (Response L.ByteString) 242postWith opts url payload = runRead =<< preparePost opts url payload 243 271headWith :: Options -> String -> IO (Response ()) 272headWith opts url = runIgnore =<< prepareHead opts url 273 279putWith :: Putable a => Options -> String -> a -> IO (Response L.ByteString) 280putWith opts url payload = runRead =<< preparePut opts url payload 281Manager.hs https://github.com/khskrede/mehh.git | Haskell | 402 lines
46import Control.Exception (finally) 47import Control.Monad ((=<<), forM_, liftM, sequence_, when) 48import Data.IORef (IORef, atomicModifyIORef, mkWeakIORef, newIORef, readIORef, 138TODO: Evaluate the content of the IORef to WHNF on each insert once 139this bug is resolved: http://hackage.haskell.org/trac/ghc/ticket/3838 140-} 178new :: IO EventManager 179new = newWith =<< newDefaultBackend 180Setup.hs https://github.com/RefactoringTools/HaRe.git | Haskell | 89 lines
1#!/usr/bin/runhaskell 2 5import Distribution.PackageDescription (emptyHookedBuildInfo,HookedBuildInfo(..)) 6import Language.Haskell.HsColour (hscolour,Output(CSS)) 7import Language.Haskell.HsColour.Colourise (defaultColourPrefs) 22 -- file <- readFile "data/astview-tmpl.html" 23 replaced <- mapM replaceOrEcho . lines =<< readFile "data/astview-tmpl.html" 24 29-- echoes the current line, or, if mymatch succeeds: 30-- replaces the line with colourized haskell code. 31replaceOrEcho :: String -> IO [String]Buffer.hs git://github.com/acowley/CLUtil.git | Haskell | 219 lines
134-- buffer. This is typically used to have an OpenCL kernel write 135-- directly to a Haskell vector. If the OpenCL context can not 136-- directly use the pointer, this will raise a runtime error! 165 fp <- newForeignPtr_ $ castPtr ptr 166 x <- evaluate =<< (unsafeSTToIO . f 167 $ VM.unsafeFromForeignPtr0 fp n) 172 -- let go = do fp <- newForeignPtr_ $ castPtr ptr 173 -- x <- evaluate =<< 174 -- (unsafeSTToIO . fEvent.hs https://gitlab.com/platonic/shpadoinkle | Haskell | 207 lines
6{-# LANGUAGE ScopedTypeVariables #-} 7{-# LANGUAGE TemplateHaskell #-} 8{-# LANGUAGE TypeApplications #-} 55mkWithFormVal valTo evt from f = listenRaw evt $ \(RawNode n) _ -> 56 f <$> liftJSM (valTo =<< unsafeGetProp from =<< valToObject n) 57 75mkOnKey t f = listenRaw t $ \_ (RawEvent e) -> 76 f <$> liftJSM (fmap round $ valToNumber =<< unsafeGetProp "keyCode" =<< valToObject e) 77 155 (fun $ \_ _ -> \case 156 e:_ -> notify . round =<< valToNumber =<< unsafeGetProp "keyCode" =<< valToObject e 157 [] -> return ()) 175 unless isRepeat $ 176 notify . round =<< valToNumber =<< unsafeGetProp "keyCode" eObj 177 [] -> return ())FDB.hs git://github.com/tom-lpsd/tokyocabinet-haskell.git | Haskell | 268 lines
97-- | Free FDB resource forcibly. 98-- FDB is kept by ForeignPtr, so Haskell runtime GC cleans up memory for 99-- almost situation. Most always, you don't need to call this. 151 withForeignPtr (unTCFDB fdb) $ \fdb' -> 152 c_tcfdbout fdb' =<< keyToInt key 153 167 withForeignPtr (unTCFDB fdb) $ \fdb' -> do 168 vsize <- c_tcfdbvsiz fdb' =<< keyToInt key 169 return $ if vsize == (-1) 205 FDB -> k1 -> Int -> IO (q k2) 206fwmkeys fdb k maxn = smap fromString =<< fwmkeys' fdb k maxn 207 where fwmkeys' = fwmHelper c_tcfdbrange4 unTCFDBBinary.hs https://github.com/khskrede/mehh.git | Haskell | 719 lines
11-- 12-- Binary serialisation of Haskell values to and from lazy ByteStrings. 13-- The Binary library provides methods for encoding Haskell values as 88-- 89#if __GLASGOW_HASKELL__ >= 606 90import qualified Data.Sequence as Seq 96-- | The @Binary@ class provides 'put' and 'get', methods to encode and 97-- decode a Haskell value to a lazy ByteString. It mirrors the Read and 98-- Show classes for textual representation of Haskell types, and is 98-- Show classes for textual representation of Haskell types, and is 99-- suitable for serialising Haskell values to disk, over the network. 100-- 110-- That is, the 'get' and 'put' methods should be the inverse of each 111-- other. A range of instances are provided for basic Haskell types. 112--SrcDist.hs https://github.com/khskrede/mehh.git | Haskell | 384 lines
5-- 6-- Maintainer : cabal-devel@haskell.org 7-- Portability : portable 126 127 date <- toCalendarTime =<< getClockTime 128 let pkg' | snapshot = snapshotPackage date pkgTopDown.hs https://gitlab.com/kranium/cabal | Haskell | 942 lines
6-- 7-- Maintainer : cabal-devel@haskell.org 8-- Stability : provisional 266 . (\cs -> search configure preferences cs initialPkgNames) 267 =<< pruneBottomUp platform comp 268 =<< addTopLevelConstraints constraints 268 =<< addTopLevelConstraints constraints 269 =<< addTopLevelTargets targets emptyConstraintSet 270Tar.hs https://gitlab.com/kranium/cabal | Haskell | 926 lines
9-- 10-- Maintainer : duncan@community.haskell.org 11-- Portability : portable 110createTarGzFile tar base dir = 111 BS.writeFile tar . GZip.compress . write =<< pack base [dir] 112 117extractTarGzFile dir expected tar = do 118 unpack dir . checkTarbomb expected . read . GZipUtils.maybeDecompress =<< BS.readFile tar 119SrcDist.hs https://gitlab.com/kranium/cabal | Haskell | 441 lines
5-- 6-- Maintainer : cabal-devel@haskell.org 7-- Portability : portable 121 122 date <- toCalendarTime =<< getClockTime 123 let pkg' | snapshot = snapshotPackage date pkgDocker.hs https://gitlab.com/alx741/stack | Haskell | 942 lines
2 OverloadedStrings, PackageImports, RankNTypes, RecordWildCards, ScopedTypeVariables, 3 TemplateHaskell, TupleSections #-} 4 260 <*> hIsTerminalDevice stderr 261 <*> (parseAbsDir =<< getHomeDirectory) 262 isStdoutTerminal <- asks getTerminal