code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Ak.Tasks (
groupByPriority
) where
import Ak.Types
import Data.Function
( on )
import Data.List
( groupBy )
groupByPriority :: [Task] -> [(Priority,[Task])]
groupByPriority = map upd . groupBy ((==) `on` priority)
where
upd ts@(t:_) = (priority t, ts)
upd _ = error "groupByPriorit... | elliottt/ak | src/Ak/Tasks.hs | bsd-3-clause | 335 | 0 | 10 | 77 | 126 | 73 | 53 | 11 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Startups.Cards where
import qualified Data.Set as S
import qualified Data.Text as T
import qualified Data.MultiSet as MS
import qualified Data.Foldable as F
import qualified Data.Map.Strict as M
import Data.Monoid
import Data.String
import Control.Lens
import Startups.Base
dat... | bitemyapp/7startups | Startups/Cards.hs | bsd-3-clause | 3,980 | 0 | 11 | 1,414 | 903 | 501 | 402 | 88 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Db.Utils where
import Snap
import Database.SQLite.Simple
import qualified Data.Text as T
import Data.Aeson
import Data.Aeson.Types
import Data.Char
import Data.Monoid
import Data.Int
tableExists :: Connect... | kylcarte/qclib | src/Db/Utils.hs | bsd-3-clause | 2,968 | 0 | 15 | 798 | 1,037 | 539 | 498 | 95 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
import Crypto.Random
import Network.BSD
import Network.Socket (socket, Family(..), SocketType(..), sClose, SockAddr(..), connect)
import Network.TLS
import Network.TLS.Extra.Cipher
import System.Console.GetOpt
import System.IO
import System.Timeout... | tolysz/hs-tls | debug/src/SimpleClient.hs | bsd-3-clause | 14,306 | 0 | 26 | 5,205 | 3,786 | 1,953 | 1,833 | 284 | 17 |
import System.IO
import System.Exit
import Control.Monad
import qualified Data.Text.IO as T
import Text.Unicoder
main :: IO ()
main = do
m_config <- loadConfig "test/test.config"
testFile <- case m_config of
Nothing -> die "Could not parse config file."
Just config -> return $ testFile config
... | Zankoku-Okuno/unicoder | test/test.hs | bsd-3-clause | 770 | 0 | 15 | 186 | 267 | 132 | 135 | 21 | 3 |
{-# LANGUAGE OverloadedStrings, TupleSections, TypeFamilies, FlexibleContexts,
PackageImports #-}
module TestPusherT (
XmlPusher(..), Zero(..), One(..), Two(..),
testPusher, checkFingerprint) where
import Control.Applicative
import Control.Monad
import "monads-tf" Control.Monad.Trans
import Control.Concurrent hidi... | YoshikuniJujo/xml-push | examples/TestPusherT.hs | bsd-3-clause | 1,544 | 8 | 15 | 247 | 563 | 299 | 264 | 45 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.NV.ShaderBufferLoad
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/NV/ShaderBufferLoad.hs | bsd-3-clause | 1,165 | 0 | 4 | 133 | 94 | 70 | 24 | 20 | 0 |
module Yesod.Goodies.PNotify.Types where
import Data.Text (Text)
type URL = Text
data NotifyType = Notice
| Info
| Success
| Error
deriving (Eq, Ord, Enum)
data NotifyStyling = JqueryUI
| Bootstrap3
| BrightTheme
... | cutsea110/yesod-pnotify | Yesod/Goodies/PNotify/Types.hs | bsd-3-clause | 665 | 0 | 6 | 339 | 145 | 86 | 59 | 22 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Exec
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- Implementation of the 'exec' command. Runs an arbitrary executable in an
-- environment suitable for making use of the ... | plumlife/cabal | cabal-install/Distribution/Client/Exec.hs | bsd-3-clause | 4,794 | 0 | 15 | 1,228 | 844 | 465 | 379 | 81 | 3 |
module Main where
import System.Nagios.Plugin (runNagiosPlugin)
import System.Nagios.Plugin.Retcond
main :: IO ()
main = runNagiosPlugin checkRetcond
| anchor/nagios-plugin-retcond | src/Main.hs | bsd-3-clause | 180 | 0 | 6 | 46 | 40 | 24 | 16 | 5 | 1 |
module Raskell.Test where
| jonathankochems/raskell-git-download | src/Raskell/Test.hs | bsd-3-clause | 26 | 0 | 3 | 3 | 6 | 4 | 2 | 1 | 0 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE GADTs... | rfranek/duckling | Duckling/Quantity/HR/Rules.hs | bsd-3-clause | 1,799 | 0 | 18 | 398 | 423 | 239 | 184 | 44 | 6 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP, DeriveDataTypeable, DeriveFunctor #-}
-- | CoreSyn holds all the main data types for use by for the Glasgow Haskell Compiler midsection
module CoreSyn (
-- * Main data types
Expr(..), A... | tjakway/ghcjvm | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | 73,140 | 0 | 14 | 19,873 | 8,533 | 4,850 | 3,683 | 598 | 5 |
module Compose where
thing1 = take 5 . enumFrom $ 3
thing2 = take 5 . filter odd . enumFrom $ 3
| brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/Compose.hs | mit | 99 | 0 | 8 | 25 | 43 | 22 | 21 | 3 | 1 |
{-
Copyright (c) 2014 Joachim Breitner
A data structure for undirected graphs of variables
(or in plain terms: Sets of unordered pairs of numbers)
This is very specifically tailored for the use in CallArity. In particular it
stores the graph as a union of complete and complete bipartite graph, which
would be very e... | rahulmutt/ghcvm | compiler/Eta/Utils/UnVarGraph.hs | bsd-3-clause | 4,602 | 0 | 12 | 946 | 1,106 | 596 | 510 | 75 | 5 |
-- |
-- Module : Data.BERT.Packet
-- Copyright : (c) marius a. eriksen 2009
--
-- License : BSD3
-- Maintainer : marius@monkey.org
-- Stability : experimental
-- Portability : GHC
--
-- BERP (BERT packets) support.
module Data.BERT.Packet
( Packet(..)
, fromPacket
, packets
) where
import Cont... | mariusae/bert | Data/BERT/Packet.hs | bsd-3-clause | 1,447 | 0 | 9 | 306 | 339 | 197 | 142 | 30 | 1 |
{- Author: Jeff Newbern
Maintainer: Jeff Newbern <jnewbern@nomaware.com>
Time-stamp: <Thu Jul 24 13:39:30 2003>
License: GPL
-}
{- DESCRIPTION
Example 15 - Using the State monad
Usage: Compile the code and execute the command.
It will print two identical random values of type MyType.
Th... | buetow/hsbot | examples/example15.hs | bsd-3-clause | 2,583 | 2 | 12 | 835 | 468 | 246 | 222 | 32 | 1 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "System/Process.hs" #-}
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE InterruptibleFFI #-}
-----------------------------------------------------------------------------
-- |
-- Module ... | phischu/fragnix | tests/packages/scotty/System.Process.hs | bsd-3-clause | 34,759 | 0 | 34 | 8,743 | 4,607 | 2,487 | 2,120 | 388 | 9 |
{-# LANGUAGE BangPatterns,OverloadedStrings #-}
module Core (doCond, evalExpr, evalArgs, subst, coreTests) where
import Common
import qualified TclObj as T
import qualified Data.ByteString.Char8 as B
import TclParse (parseSubst, Subst(..), SubstArgs, allSubstArgs)
import TclErr
import Control.Monad.Error
import RToken... | muspellsson/hiccup | Core.hs | lgpl-2.1 | 4,228 | 0 | 22 | 1,411 | 1,572 | 780 | 792 | 104 | 9 |
{-
Copyright 2015 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Ye-Yong-Chi/codeworld | codeworld-base/src/GHC/Weak.hs | apache-2.0 | 731 | 0 | 4 | 136 | 23 | 17 | 6 | 4 | 0 |
module Data.Streaming.FileReadSpec (spec) where
import Test.Hspec
import qualified Data.ByteString as S
import qualified Data.Streaming.FileRead as F
import Control.Exception (bracket)
spec :: Spec
spec = describe "Data.Streaming.FileRead" $ do
it "works" $ do
let fp = "LICENSE"
expected <- S.read... | phadej/streaming-commons | test/Data/Streaming/FileReadSpec.hs | mit | 663 | 0 | 25 | 229 | 207 | 107 | 100 | 18 | 2 |
import Graphics.Gnuplot.Simple
type Matrix = [[Double]]
-- Kronecker delta
--
--- http://en.wikipedia.org/wiki/Kronecker_delta
--
δ :: (Int, Int) -> Double
δ (i, j) | i==j = 1.0
| otherwise = 0.0
eye :: Int -> [[Double]]
eye n = [ [ δ(i, j) | i <- [0..(n-1)]] | j <- [0..(n-1)]]
ones :: Int -> [[Dou... | Khady/Functional-Programming | codes/matrix.hs | unlicense | 5,024 | 0 | 13 | 1,460 | 2,192 | 1,196 | 996 | 95 | 1 |
module Main where
import Control.Exception
import Control.Monad
import System.Mem
import Control.Monad.ST
import Data.Array
import Data.Array.ST
import qualified Data.Array.Unboxed as U
import Control.DeepSeq
import Data.Compact
assertFail :: String -> IO ()
assertFail msg = throwIO $ AssertionFailed msg
assertEqu... | snoyberg/ghc | libraries/compact/tests/compact_simple_array.hs | bsd-3-clause | 1,582 | 0 | 16 | 370 | 554 | 284 | 270 | 45 | 2 |
{-# LANGUAGE BangPatterns, MagicHash #-}
-- |
-- Module : Data.Text.Internal.Fusion
-- Copyright : (c) Tom Harper 2008-2009,
-- (c) Bryan O'Sullivan 2009-2010,
-- (c) Duncan Coutts 2009
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
--... | fpco/text-stream-decode | text/Data/Text/Internal/Fusion.hs | mit | 8,429 | 0 | 25 | 3,004 | 2,245 | 1,180 | 1,065 | 151 | 4 |
import StackTest
import System.Directory
import Control.Monad
main :: IO ()
main = do
stack ["test"]
exists1 <- doesFileExist "foo"
unless exists1 $ error "exists1 should be True"
removeFile "foo"
stack ["test", "--no-rerun-tests"]
exists2 <- doesFileExist "foo"
when exists2 $ error "exists2 should be Fa... | juhp/stack | test/integration/tests/no-rerun-tests/Main.hs | bsd-3-clause | 325 | 0 | 8 | 59 | 102 | 46 | 56 | 12 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Prompt.Email
-- Copyright : (c) 2007 Brent Yorgey
-- License : BSD-style (see LICENSE)
--
-- Maintainer : <byorgey@gmail.com>
-- Stability : stable
-- Portability : unportable
--
-- A prompt for sen... | adinapoli/xmonad-contrib | XMonad/Prompt/Email.hs | bsd-3-clause | 2,147 | 0 | 14 | 458 | 191 | 124 | 67 | 13 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Array.ST
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskel... | beni55/haste-compiler | libraries/ghc-7.10/array/Data/Array/ST.hs | bsd-3-clause | 2,607 | 0 | 10 | 521 | 240 | 158 | 82 | 16 | 1 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds... | sdiehl/ghc | testsuite/tests/dependent/should_compile/T13938a.hs | bsd-3-clause | 2,501 | 22 | 20 | 714 | 1,026 | 587 | 439 | -1 | -1 |
module Imp500Aux where
import Imp500
data T1 a
data T2 a b
data T3 a b c
data T4 a b c d
data T5 a b c d e
data T6 a
data T7 a b
data T8 a b c
data T9 a b c d
data T10 a b c d e
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/rename/should_compile/Imp500Aux.hs | bsd-3-clause | 190 | 0 | 3 | 67 | 67 | 55 | 12 | -1 | -1 |
main = do foo() putStrLn "Hello Haskell World!"
| codeboardio/kali | test/src_examples/haskell/error_one_file/Root/Src/Main.hs | mit | 48 | 0 | 8 | 8 | 18 | 8 | 10 | 1 | 1 |
-- | Fake cabal module for local building
module Paths_js_flot(getDataFileName, version) where
import Data.Version
import System.Directory
import System.FilePath
getDataFileName :: FilePath -> IO FilePath
getDataFileName x = do
dir <- getCurrentDirectory
pure $ dir </> "javascript" </> x
version :: Version... | ndmitchell/js-flot | src/Paths.hs | mit | 350 | 0 | 9 | 59 | 96 | 53 | 43 | 10 | 1 |
module Main (main) where
import Test.Framework (defaultMain)
import qualified Tests.Properties as Properties
import qualified Tests.Simple as Simple
main :: IO ()
main = defaultMain [Properties.tests, Simple.tests]
| muhbaasu/hash-id | tests/Tests.hs | mit | 234 | 0 | 7 | 45 | 63 | 39 | 24 | 6 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Scheme.Simplified where
import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Text (Text)
import Data.Set (Set)
import Data.Map (Map)
import Control.Lens
import Scheme.IR
type FunctionTable = Map Text Function
type NameSpace = Set Text
data Simplif... | AKST/scheme.llvm | src/Scheme/Simplified.hs | mit | 566 | 0 | 9 | 93 | 171 | 100 | 71 | 18 | 1 |
module Validation(Validation, valid, invalid) where
import Control.Applicative
import Control.Monad
import Data.Monoid
data Validation e a = Validation a e
valid :: Monoid e => a -> Validation e a
valid x = Validation x mempty
invalid :: Monoid e => a -> e -> Validation e a
invalid x error = Validation x error
isV... | raimohanska/Monads | examples/challenges/Validation/Validation.hs | mit | 964 | 0 | 11 | 222 | 417 | 214 | 203 | 23 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveGeneric #-}
module Codec.Xlsx.Types.Internal.Relationships where
import Data.List (find)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Monoid ((<>))
import Data.Text (Text)
import qualified Data.Text as T
impo... | qrilka/xlsx | src/Codec/Xlsx/Types/Internal/Relationships.hs | mit | 4,805 | 0 | 15 | 896 | 1,186 | 647 | 539 | 98 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.EXT2.Inode
-- Copyright : (C) 2015 Braden Walters,
-- ... | meoblast001/ext2-info | src/Data/EXT2/Inode.hs | mit | 6,973 | 0 | 25 | 1,309 | 1,933 | 1,017 | 916 | -1 | -1 |
import Hello
main :: IO ()
main = putStrLn hello | freels/haskell-project | bin/HelloMain.hs | mit | 49 | 0 | 6 | 10 | 22 | 11 | 11 | 3 | 1 |
{-# LANGUAGE OverloadedStrings, CPP #-}
{-# LANGUAGE NamedFieldPuns, RecordWildCards #-}
module Network.Wai.Handler.Warp.HTTP2.Types where
import Data.ByteString.Builder (Builder)
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative ((<$>), (<*>), pure)
#endif
import Control.Concurrent (forkIO)
import Control.Con... | rgrinberg/wai | warp/Network/Wai/Handler/Warp/HTTP2/Types.hs | mit | 11,061 | 0 | 18 | 2,929 | 2,122 | 1,148 | 974 | 195 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Language.DSKanren
import Test.Tasty.QuickCheck hiding ((===))
import Test.Tasty
import QuickCheckHelper
appendo :: Term -> Term -> Term -> Predicate
appendo l r o =
conde [ program [l === "nil", o === r]
, manyFresh $ \h t o' ->
program ... | jozefg/ds-kanren | test/List.hs | mit | 1,483 | 0 | 13 | 543 | 591 | 305 | 286 | 40 | 2 |
{-# htermination isPrefixOf :: [Bool] -> [Bool] -> Bool #-}
import List
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/List_isPrefixOf_6.hs | mit | 72 | 0 | 3 | 12 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-triggerconfig.html
module Stratosphere.ResourceProperties.CodeDeployDeploymentGrou... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/CodeDeployDeploymentGroupTriggerConfig.hs | mit | 3,093 | 0 | 12 | 254 | 356 | 203 | 153 | 32 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Main where
import Control.Applicative
import Control.Concurrent (threadDelay)
import Control.Lens
import ... | AshyIsMe/lambdatwit | Main.hs | mit | 5,856 | 0 | 28 | 1,945 | 1,458 | 761 | 697 | -1 | -1 |
{-# LANGUAGE DatatypeContexts #-}
{-# LANGUAGE DatatypeContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# language DatatypeContexts #-}
{-# language FlexibleInstances #-}
{-# language DeriveDataTypeable #-}
module Rewriting.TRS
( module Rewriting.TRS
, module Autolib.Symbol
, module Autolib.TES.Term
, module Autolib.T... | marcellussiegburg/autotool | collection/src/Rewriting/TRS.hs | gpl-2.0 | 3,115 | 4 | 18 | 1,108 | 941 | 498 | 443 | 82 | 3 |
module Data.Matrix where
import Foreign.Vector
data Matrix a
fromLists xss = fromVectors $ list_to_vector $ map list_to_vector xss
scaleMatrix :: (Num a) => a -> Matrix a -> Matrix a
builtin scaleMatrix 2 "scaleMatrix" "SModel"
| bredelings/BAli-Phy | haskell/Data/Matrix.hs | gpl-2.0 | 232 | 0 | 8 | 39 | 76 | 39 | 37 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-|
A reader for the timelog file format generated by timeclock.el.
From timeclock.el 2.6:
@
A timelog contains data in the form of a single entry per line.
Each entry has the form:
CODE YYYY/MM/DD HH:MM:SS [COMMENT]
CODE is one of: b, h, i, o or O. COMMENT is optional when the code is
i, o... | trygvis/hledger | hledger-lib/Hledger/Read/TimelogReader.hs | gpl-3.0 | 3,380 | 0 | 13 | 822 | 430 | 232 | 198 | 40 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module EqCommon where
import Data.List
import Data.Foldable (toList)
import Data.Maybe
import qualified Data.ByteString.Lazy as DBL
import qualified Data.Map as Map
import Data.Map ()
import qualified Data.... | AbleNetInc/EqualsAssessment | src/EqCommon.hs | gpl-3.0 | 12,058 | 0 | 16 | 5,630 | 3,677 | 1,948 | 1,729 | 232 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module Hpack(
HeaderField,
HeaderName,
HeaderValue,
Headers,
DynamicTable,
PrefixLength(..),
getHeaderFields,
putHeaderFields,
emptyDynTable
) where
import qualified Control.Monad.State.Lazy as State
import qualified Data.Binary.Get as Get
import qualified Data.Bina... | authchir/SoSe17-FFP-haskell-http2-server | src/Hpack.hs | gpl-3.0 | 8,932 | 6 | 24 | 2,631 | 2,383 | 1,329 | 1,054 | 234 | 5 |
module QFeldspar.Simplification (smp) where
import QFeldspar.MyPrelude
import QFeldspar.Expression.GADTFirstOrder
import QFeldspar.Expression.Utils.Equality.GADTFirstOrder
import QFeldspar.Expression.Utils.GADTFirstOrder
(sucAll,sbs,cntVar)
import QFeldspar.Variable.Typed
import QFeldspar.Singleton
import QFeldsp... | shayan-najd/QFeldspar | QFeldspar/Simplification.hs | gpl-3.0 | 1,391 | 0 | 22 | 472 | 565 | 288 | 277 | -1 | -1 |
{-
hoptics - command line tool for deriving optical constants from transmission
spectra and combining optical constants
freq -> frequency in Hz
omega -> frequency in Hz
nu -> wavenumber in 1/m
lambda -> wavelength in m
alpha -> exctinction coefficient in 1/m
n = n0 + ik
n -> complex index of refraction
n0 -... | sheepforce/Hoptics | src/Hoptics.hs | gpl-3.0 | 25,768 | 7 | 26 | 9,041 | 3,907 | 1,858 | 2,049 | 340 | 23 |
runCont ka (\a -> let kb = kab a
in runCont kb hb) | hmemcpy/milewski-ctfp-pdf | src/content/3.5/code/haskell/snippet28.hs | gpl-3.0 | 69 | 0 | 12 | 31 | 36 | 16 | 20 | -1 | -1 |
module HsPredictor.Render.FLTK where
import HsPredictor.SQL.Queries
import HsPredictor.Types.Types
import HsPredictor.Render.Text (convertList)
getTableData :: DbPath -> IO [[String]]
getTableData dbname = do
t <- getStatsAll dbname
let t' = convertList t
return t'
| jacekm-git/HsPredictor | library/HsPredictor/Render/FLTK.hs | gpl-3.0 | 274 | 0 | 10 | 39 | 84 | 45 | 39 | 9 | 1 |
module CatmullClark where
import qualified Data.Vector as V (Vector, fromList, toList, map, (!))
import Data.List (nub)
import Data.Maybe (catMaybes)
import Vec
import VecGL (toVec3, toVertex3, toNormal3)
import Model
import ObjFile
-- Internal data types for the Catmull Clark algorithm
type Point = Vec3
data Face =... | WraithM/HCatmullClark | src/CatmullClark.hs | gpl-3.0 | 2,640 | 0 | 18 | 655 | 1,018 | 533 | 485 | 52 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Cancel.hs | mpl-2.0 | 3,802 | 0 | 16 | 895 | 474 | 284 | 190 | 71 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/ResetInstanceAttribute.hs | mpl-2.0 | 4,592 | 0 | 9 | 917 | 469 | 288 | 181 | 58 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-cloudtrace/gen/Network/Google/Resource/CloudTrace/Projects/Traces/Get.hs | mpl-2.0 | 5,680 | 0 | 20 | 1,466 | 935 | 542 | 393 | 134 | 1 |
module Echo where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Network.Socket
import System.Environment
import System.IO
echo :: IO ()
echo = withSocketsDo $ do
-- port <- toEnum . read . head <$> getArgs
let port = 3000
newSocket <- socket AF_INET Stream defaultProtocol
se... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/streaming/pipes/src/Echo.hs | unlicense | 799 | 0 | 10 | 140 | 253 | 123 | 130 | 23 | 1 |
import Math.NumberTheory.Powers.Fourth (isFourthPower')
import Data.List (nub, subsequences)
import Helpers.Primes (primePowers)
raiseUp' :: [Integer] -> [[(Integer, Int)]]
raiseUp' = foldr (\a -> concatMap (\ts -> [(a, 1) : ts, (a, 2) : ts, (a, 3) : ts])) [[]]
a328045_list :: [Integer]
a328045_list = [0, 1, 4, 6, 4,... | peterokagey/haskellOEIS | src/Sandbox/Z4LinearAlgebra/CountGraham4.hs | apache-2.0 | 1,848 | 0 | 16 | 532 | 658 | 399 | 259 | 22 | 1 |
module Compiler.SymbolTable where
import Data.Maybe
import qualified Data.Map as M
import Compiler.Syntax
import Compiler.TypeChecking.Nameable
import Compiler.Positioned
import Compiler.CompileError
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Pos
... | michaelmelanson/cminus-compiler | Compiler/SymbolTable.hs | bsd-2-clause | 4,887 | 0 | 15 | 1,726 | 1,340 | 646 | 694 | 68 | 3 |
module Remote.Main where
import qualified Control.Exception as Exception
import Control.Monad (liftM)
import Database.Persist.Sqlite (runMigration)
import Remote.Database (migrateAll, runDB)
import Remote.Server (runServer)
import Syst... | tippenein/hasken | lib/Remote/Main.hs | bsd-3-clause | 600 | 0 | 11 | 168 | 159 | 85 | 74 | 15 | 1 |
module UnaryConstructors where
newtype Goats = Goats Int deriving (Eq, Show)
newtype Cows = Cows Int deriving (Eq, Show)
class TooMany a where
tooMany :: a -> Bool
instance TooMany Int where
tooMany n = n > 42
instance TooMany Goats where
tooMany (Goats n) = tooMany n
| dsaenztagarro/haskellbook | src/chapter11/UnaryConstructors2.hs | bsd-3-clause | 280 | 0 | 8 | 59 | 105 | 56 | 49 | 9 | 0 |
-- | Terrain tile definitions.
module Content.TileKind ( cdefs ) where
import Control.Arrow (first)
import Data.Maybe
import qualified Data.Text as T
import Game.LambdaHack.Common.Color
import Game.LambdaHack.Common.ContentDef
import Game.LambdaHack.Common.Misc
import Game.LambdaHack.Common.Msg
import qualified Game.... | tuturto/space-privateers | GameDefinition/Content/TileKind.hs | bsd-3-clause | 10,454 | 0 | 14 | 2,820 | 2,706 | 1,716 | 990 | 252 | 7 |
-- | Client monad for interacting with a human through UI.
module Game.LambdaHack.Client.UI.MsgClient
( msgAdd, msgReset, recordHistory
, SlideOrCmd, failWith, failSlides, failSer, failMsg
, lookAt, itemOverlay
) where
import Prelude ()
import Prelude.Compat
import Control.Exception.Assert.Sugar
import Contro... | beni55/LambdaHack | Game/LambdaHack/Client/UI/MsgClient.hs | bsd-3-clause | 5,902 | 0 | 19 | 1,440 | 1,636 | 864 | 772 | -1 | -1 |
{-# LANGUAGE CPP #-}
#define DO_NOT_EDIT (doNotEdit __FILE__ __LINE__)
-- | Generates code for HTML tags.
--
module Util.GenerateHtmlCombinators where
import Control.Arrow ((&&&))
import Data.List (sort, sortBy, intersperse, intercalate)
import Data.Ord (comparing)
import System.Directory (createDirectoryIfMissing)
... | jgm/blaze-html | Util/GenerateHtmlCombinators.hs | bsd-3-clause | 17,122 | 0 | 16 | 4,430 | 3,678 | 2,246 | 1,432 | 346 | 2 |
-- Arthur Miranda Gomes - 14.1.8338
-- Pedro Henrique Mendes Batista - 14.1.8403
module Token where
-- Tipo de dado que define uma representação simbolica para caracteres
data Token = TChar Char
| TPlus
| TMinus
| TTimes
| TDot
| TLambda
... | arthurmgo/regex-ftc | src/Token.hs | bsd-3-clause | 1,461 | 0 | 12 | 490 | 377 | 198 | 179 | 38 | 10 |
module Releases2016 where
import PlatformDB
import Types
releases2016 :: [Release]
releases2016 = [hp_8_0_0]
hp_8_0_0 :: Release
hp_8_0_0 =
releaseWithMinimal "8.0.0"
[ incGHC "7.10.3"
, incGHCLib "Cabal" "1.22.5.0"
, incGHCLib "array" ... | gbaz/haskell-platform | hptool/src/Releases2016.hs | bsd-3-clause | 4,841 | 0 | 8 | 2,259 | 569 | 295 | 274 | 73 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.HalfFloatVertex
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabil... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/HalfFloatVertex.hs | bsd-3-clause | 701 | 0 | 5 | 101 | 57 | 43 | 14 | 9 | 0 |
module Jerimum.Tests.Unit.PostgreSQL.Types.BinaryTest
( tests
) where
import Data.ByteString (ByteString, pack)
import Jerimum.PostgreSQL.Types.Binary
import Jerimum.Tests.Unit.PostgreSQL.Types.Helpers
import Test.Tasty
import Test.Tasty.QuickCheck
newtype BinaryG =
BinaryG ByteStrin... | dgvncsz0f/nws | test/Jerimum/Tests/Unit/PostgreSQL/Types/BinaryTest.hs | bsd-3-clause | 760 | 0 | 13 | 157 | 205 | 114 | 91 | 23 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Xml.XPath.Parser where
import Control.Applicative
import Control.Monad
import Data.Char
import Data.Attoparsec.Text
import Data.Attoparsec.Expr
import Data.Text (Text)
import Prelude hiding (takeWhile)
import qualified Data.Text as T
import Xml.XPath.Types
parser :: Text ->... | silkapp/xmlhtml-xpath | src/Xml/XPath/Parser.hs | bsd-3-clause | 6,006 | 0 | 17 | 1,889 | 1,728 | 886 | 842 | 147 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Network.Socket hiding (socket, connect, accept, recv, send)
import Network.Socket.Windows
import Control.Concurrent
import Control.Monad
import System.IO
import System.Timeout
server :: IO ()
server =
void $ forkIO $ do
sock <- socket AF_INET Stream defaultProtocol
... | joeyadams/hs-windows-iocp | lab/connect.hs | bsd-3-clause | 2,377 | 0 | 16 | 700 | 617 | 278 | 339 | 62 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
module PrivacyCA where
import TPM
import Demo3Shared
import VChanUtil
import Data.Binary
import Data.Bits
import Data.ByteString.Lazy (ByteString, cons, empty, pack, toStrict, fromStrict)
import qualified Data.ByteString as B (ByteString, pack)
--import Codec.Crypto.RSA hiding (s... | armoredsoftware/protocol | tpm/mainline/privacyCA/PrivacyCA.hs | bsd-3-clause | 2,809 | 0 | 16 | 646 | 692 | 349 | 343 | 67 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Html
( Html
, renderResult
, renderResults
, renderResults_
, showInterpreter
, indent, delim, getOne, getTwo
) where
import Result
import Lang
import Data.Data.Compare
import Text.XHtml.Strict
import qualified Data.Text as T
--------------------... | divipp/ActiveHs | Html.hs | bsd-3-clause | 4,726 | 0 | 16 | 1,270 | 1,996 | 1,038 | 958 | 126 | 10 |
{-# OPTIONS -XExistentialQuantification -XTypeSynonymInstances
-XFlexibleInstances -XDeriveDataTypeable -XOverloadedStrings #-}
module MFlow.Wai.Response where
import Network.Wai
import MFlow.Cookies
import Data.ByteString.Lazy.UTF8
import MFlow
import Data.Typeable
import Data.Monoid
import System.IO.Un... | agocorona/MFlow | src/MFlow/Wai/Response.hs | bsd-3-clause | 1,758 | 0 | 14 | 340 | 487 | 259 | 228 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -Wno-orphans #-}
{-|
Module : AERN2.MP.Ball.Type
Description : Arbitrary precision dyadic balls
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.com
Stability : experimental
Portability : portab... | michalkonecny/aern2 | aern2-mp/src/AERN2/MP/Ball/Type.hs | bsd-3-clause | 7,709 | 97 | 18 | 1,963 | 2,013 | 1,091 | 922 | -1 | -1 |
module System.Termutils.Xid (
getXid
) where
import Graphics.UI.Gtk
import Foreign
import Foreign.C.Types
import Unsafe.Coerce ( unsafeCoerce )
foreign import ccall "get_xid"
c_get_xid :: Ptr Window -> CULong
getXid :: Window -> IO Integer
getXid gtkWindow = do
let ptrWin = unsafeCoerce gtkWindow ::... | dagle/hermite | src/System/Termutils/Xid.hs | bsd-3-clause | 444 | 0 | 12 | 93 | 123 | 65 | 58 | 13 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for ganeti-htools.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Sof... | kawamuray/ganeti | test/hs/Test/Ganeti/Rpc.hs | gpl-2.0 | 4,870 | 0 | 14 | 674 | 858 | 463 | 395 | 80 | 1 |
module Handler.File where
import Import hiding ((==.), on, isNothing)
import Handler.DB
import Yesod.Auth
import Data.Int
import Database.Esqueleto
import Data.Time.Clock
import System.IO (hPutStrLn, stderr)
import Network.HTTP.Types (status200, status206, status404, hRange, HeaderName)
import qualified Data.Aeson as... | tlaitinen/sms | backend/Handler/File.hs | gpl-3.0 | 2,018 | 0 | 33 | 635 | 571 | 316 | 255 | 44 | 2 |
{-# OPTIONS -fno-monomorphism-restriction #-}
module GramLab.Statistics ( SetPair(..)
, Scores(..)
, Report(..)
, precision
, recall
, f_score
, f_score'
... | gchrupala/morfette | src/GramLab/Statistics.hs | bsd-2-clause | 2,523 | 0 | 12 | 874 | 820 | 436 | 384 | 46 | 1 |
-- This module can (and perhaps should) be separate into its own
-- package, it's generally useful.
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Stack.StaticBytes
... | MichielDerhaeg/stack | src/Stack/StaticBytes.hs | bsd-3-clause | 7,656 | 0 | 27 | 1,824 | 2,555 | 1,296 | 1,259 | 219 | 3 |
{-# LANGUAGE CPP #-}
#include "MachDeps.h"
module Bench.Options (
Options(..),
ndpMain, failWith
) where
import System.Console.GetOpt
import System.IO
import System.Exit
import System.Environment
import Control.Monad ( when )
import Data.Char ( toUpper )
import GHC.IOArray ( newIOArray )
import Data.Array.Para... | mainland/dph | icebox/examples/lib/Bench/Options.hs | bsd-3-clause | 3,001 | 0 | 23 | 1,275 | 1,016 | 548 | 468 | 76 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module FileSpec (fileSpec) where
import TestImport
fileSpec :: Spec
fileSpec = ydescribe "postCloneDirtoryR" $
yit "Clone a diretory, and ensure the common config files can save to Node Manager" $ do
postBody CloneDiretoryR (encode testCloneDirRequest)
printBody... | bitemyapp/node-manager | test/FileSpec.hs | bsd-3-clause | 337 | 0 | 10 | 66 | 61 | 31 | 30 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
module UnitTests.NullaryConstructors
(
nullaryConstructors
) where
import Prelude ()
import Prelude.Compat
import Data.Aeson (decode, eitherDecode, fromEncoding, Value)
import Data.Aeson.Internal (IResult (..), iparse)
impo... | sol/aeson | tests/UnitTests/NullaryConstructors.hs | bsd-3-clause | 2,943 | 0 | 10 | 588 | 701 | 361 | 340 | 51 | 1 |
module Options.Language where
import Types
languageOptions :: [Flag]
languageOptions =
[ flag { flagName = "-fconstraint-solver-iterations=⟨n⟩"
, flagDescription =
"*default: 4.* Set the iteration limit for the type-constraint "++
"solver. Typically one iteration suffices; so please "... | oldmanmike/ghc | utils/mkUserGuidePart/Options/Language.hs | bsd-3-clause | 29,817 | 0 | 10 | 9,276 | 3,751 | 2,429 | 1,322 | 644 | 1 |
{-|
Module : Idris.Error
Description : Utilities to deal with error reporting.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Error where
import Idris.AbsSyntax
import Idris.Core.Constraints
im... | bravit/Idris-dev | src/Idris/Error.hs | bsd-3-clause | 6,869 | 0 | 20 | 1,823 | 2,635 | 1,290 | 1,345 | 138 | 6 |
{-# LANGUAGE RankNTypes, TypeApplications #-}
module VtaCoerce where
import Data.Coerce (coerce)
newtype Age = Age Int
convert :: Int -> Age
convert = coerce @Int @Age
| sdiehl/ghc | testsuite/tests/typecheck/should_compile/VtaCoerce.hs | bsd-3-clause | 172 | 0 | 6 | 30 | 46 | 27 | 19 | 6 | 1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Configure
-- Copyright : (c) David Himmelstrup 2005,
-- Duncan Coutts 2005
-- License : BSD-like
--
-- Maintainer : cabal-devel@haskell.org
-- Portab... | rimmington/cabal | cabal-install/Distribution/Client/Configure.hs | bsd-3-clause | 13,893 | 0 | 22 | 4,023 | 2,186 | 1,204 | 982 | 242 | 3 |
{-# LANGUAGE Arrows #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Prelude hiding (sum)
import Opaleye (Column, Nullable, matchNullable, isNull,
Tabl... | hnfmr/opaleye-tutorial | Main.hs | mit | 4,877 | 10 | 13 | 1,258 | 1,454 | 779 | 675 | 94 | 1 |
module Zipper (
BinTree(..),
Zipper,
fromTree,
toTree,
value,
left,
right,
up,
setValue,
setLeft,
setRight
) where
-- | A binary tree.
data BinTree a = BT {
btValue :: a, -- ^ Value
btLeft :: Maybe (BinTree a), -- ^ Left child
btRight :: Maybe... | exercism/xhaskell | exercises/practice/zipper/.meta/examples/success-standard/src/Zipper.hs | mit | 2,538 | 0 | 11 | 808 | 959 | 504 | 455 | 52 | 3 |
------------------------------------------------------------------------------
-- | Defines the 'Language' accept header with an 'Accept' instance for use in
-- language negotiation.
module Network.HTTP.Media.Language
( Language
, toParts
) where
import Data.ByteString (ByteS... | zmthy/http-media | src/Network/HTTP/Media/Language.hs | mit | 684 | 0 | 7 | 147 | 79 | 50 | 29 | 8 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.ITCH
-- Copyright : (c) 2014, Jakub Kozlowski
-- License : MIT
--
-- Maintainer : mail@jakub-kozlowski.com
--
-- This module specifies types used in ITCH messag... | ggreif/thebook-haskell | src/Data/ITCH/Types.hs | mit | 10,253 | 0 | 15 | 2,584 | 1,884 | 1,063 | 821 | 147 | 2 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLDataListElement
(js_getOptions, getOptions, HTMLDataListElement,
castToHTMLDataListElement, gTypeHTMLDataListElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Doubl... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/HTMLDataListElement.hs | mit | 1,448 | 6 | 11 | 173 | 377 | 238 | 139 | 25 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE CPP #-}
module CommandArgs
( HDevTools(..)
, loadHDevTools
, pathArg
)
where
import Cabal (findFile)
import Data.Version (showVersion)
import Paths_hdevtools (version)
import qualified Config
import System.Console.CmdArgs.Implicit
import System.Console.C... | pacak/hdevtools | src/CommandArgs.hs | mit | 9,350 | 0 | 12 | 3,129 | 2,670 | 1,460 | 1,210 | 254 | 2 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.ModuleDependencies
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-- Portability :
--
-- | Provides th... | bergmark/purescript | src/Language/PureScript/ModuleDependencies.hs | mit | 2,480 | 0 | 16 | 426 | 740 | 407 | 333 | 37 | 8 |
module ReverseRead where
reverseWords :: String -> String
reverseWords = unwords . map reverse . words
main = do
line <- getLine
if null line
then return ()
else do
putStrLn $ reverseWords line
main | limdauto/learning-haskell | cis194/io/ReverseRead.hs | mit | 248 | 0 | 11 | 84 | 73 | 36 | 37 | 10 | 2 |
{-# LANGUAGE JavaScriptFFI #-}
-- | An implementation of the NodeJS Cipher API, as documented
-- <https://nodejs.org/api/crypto.html#crypto_class_cipher here>.
module GHCJS.Node.Crypto.Cipher
( module GHCJS.Node.Crypto.Cipher -- FIXME: specific export list
) where
import GHCJS.Array
import G... | taktoa/ghcjs-electron | src/GHCJS/Node/Crypto/Cipher.hs | mit | 3,173 | 19 | 9 | 761 | 297 | 175 | 122 | 37 | 0 |
module Feature.InsertSpec where
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import Network.Wai.Test (SResponse(simpleBody,simpleHeaders,simpleStatus))
import SpecHelper
import qualified Data.Aeson as JSON
import Data.Maybe (fromJust)
import Text.Heredoc
import Network.HTTP.Types.Header
import ... | johan--/postgrest | test/Feature/InsertSpec.hs | mit | 12,859 | 0 | 26 | 3,854 | 2,667 | 1,371 | 1,296 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
import Control.Concurrent.ParallelIO
import Control.Exception
import Control.Lens
import qualified Data.Map as Map
import Network.HTTP.Client (newManager)
import Network.HTTP.Client.TLS (tlsManagerSettings)
import Network.W... | lattenwald/humblebundle.hs | src/Main.hs | mit | 3,272 | 0 | 21 | 1,010 | 751 | 375 | 376 | 75 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module Capnp.Mutability
( Mutability(..)
, MaybeMutable(..)
, create
, createT
) where
import Control.Monad.Primitive (PrimMonad(PrimState))
import Control.Monad.ST ... | zenhack/haskell-capnp | lib/Capnp/Mutability.hs | mit | 2,390 | 0 | 16 | 520 | 492 | 270 | 222 | 24 | 1 |
module Day11 where
import Data.List
differentPairs :: String -> Bool
differentPairs = go []
where go (x:y:xs) _ = True
go found (x:y:xs)
| pair x y, [x,y] `notElem` found = go ([x,y]:found) (y:xs)
| otherwise = go found (y:xs)
go _ _ = False
... | cirquit/Personal-Repository | Haskell/Playground/AdventOfCode/advent-coding/src/Day11.hs | mit | 1,417 | 0 | 14 | 461 | 681 | 366 | 315 | 37 | 6 |
module GitHub.Repositories.Keys where
import GitHub.Internal
repoKeys o r = ownerRepo o r <> "/keys"
repoKey o r i = repoKeys o r <> "/" <> i
--| GET /repos/:owner/:repo/keys
listKeys ::
OwnerName ->
RepoName ->
GitHub GroupKeysData
listKeys o r = get [] $ repoKeys o r
--| GET /repos/:owner/:repo/keys/:id
getKey ... | SaneApp/github-api | src/GitHub/Repositories/Keys.hs | mit | 878 | 40 | 11 | 170 | 470 | 230 | 240 | -1 | -1 |
module HsPredictor.LoadURL where
--standard
import Control.Exception (catch, throwIO)
import Prelude hiding (catch)
--3rd party
import Data.ByteString.Lazy.Char8 (pack, unpack)
import Data.ByteString.Lazy.Internal (ByteString)
import ... | Taketrung/HsPredictor | library/HsPredictor/LoadURL.hs | mit | 624 | 0 | 9 | 184 | 140 | 80 | 60 | 13 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.