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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
import Data.Maybe
import Data.Fixed
import Data.List (foldl')
import System.Environment
fastFindIndex cond xs prev now
| prev==now && matchNow = Just now
| prev==now && not matchNow = Nothing
| not matchNow && not matchPrev = fastFindIndex cond xs now (now+(now-prev)*2)
| not matchNow && matchP... | yuto-matsum/contest-util-hs | src/Euler/025.hs | mit | 2,157 | 1 | 12 | 294 | 570 | 289 | 281 | 32 | 1 |
fib :: Int -> Int
fib 0 = 1
fib 1 = 1
fib x | x > 1 = fib (x - 2) + fib (x - 1)
main = do
print (sum [fib x | x <- [1..32], even (fib x)])
| jamesbarnett/boring-attempts-to-learn-something-of-dubious-economic-value | haskell/problem002.hs | mit | 144 | 0 | 14 | 48 | 117 | 57 | 60 | 6 | 1 |
module MinesImage where
import Codec.Picture
import Control.Arrow ((&&&))
import Data.Function
import Data.List
import Data.Maybe
import Data.Ord
import Data.Word
import Debug.Trace
import Logic
type Img = Image PixelRGB8
type CellCoords = ([Int], [Int], Int)
findTopLeftCorner :: Img -> (Int,Int)
findTopLeftCorner... | cmears/mines-solver | MinesImage.hs | mit | 4,161 | 0 | 14 | 1,063 | 1,890 | 1,068 | 822 | 94 | 5 |
import System.IO
main = do
gen <- getStdGen
let (randNumber, _) = randomR (1,length $ lines contents) gen :: (Int, StdGen)
handle <- openFile "przemyslenia 2016-05-10.txt" ReadMode
contents <- hGetContents handle
let firstLine = head $ lines contents
putStrLn firstLine
putStrLn $ show randNumber
hClos... | RAFIRAF/HASKELL | randomQuote.hs | mit | 328 | 0 | 13 | 63 | 121 | 56 | 65 | 10 | 1 |
{-
** *********************************************************************
* *
* This software is part of the pads package *
* Copyright (c) 2005-2011 AT&T Knowledge Ventures *
* an... | elitak/forest | Language/Forest/Quote.hs | epl-1.0 | 3,003 | 0 | 11 | 1,340 | 293 | 154 | 139 | 30 | 2 |
module MegaHAL
( initialize
, greeting
, learnAndReply
, learn
, cleanup
, MegaHal()
) where
import Prelude hiding (log)
import Foreign.C.Types
import Foreign.C.String
import Foreign.Marshal.Alloc (free)
import qualified Data.ByteString as BS
import MegaHAL.CBits
data MegaHal = MegaHal... | pharaun/MegaHAL | src/MegaHAL.hs | gpl-2.0 | 1,531 | 0 | 10 | 320 | 445 | 232 | 213 | 36 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-s3/gen/Network/AWS/S3/ListParts.hs | mpl-2.0 | 8,503 | 0 | 26 | 2,214 | 1,528 | 887 | 641 | 152 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/UpdateMaintenanceStartTime.hs | mpl-2.0 | 6,558 | 0 | 13 | 1,336 | 854 | 509 | 345 | 108 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/Delegates/Create.hs | mpl-2.0 | 6,901 | 0 | 20 | 1,524 | 806 | 478 | 328 | 116 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/GetIAMPolicy.hs | mpl-2.0 | 6,358 | 0 | 16 | 1,366 | 805 | 470 | 335 | 122 | 1 |
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-}
module HLol.Data.LolStaticData where
import Control.Applicative
import Control.Lens
import Control.Monad
import Data.Aeson
import qualified Data.Map as M
import qualified Data.Vector as V
data BlockItemDto = BlockItemDto {
_count :: Int,
_blockItemId :: Int... | tetigi/hlol | src/HLol/Data/LolStaticData.hs | agpl-3.0 | 17,202 | 0 | 53 | 4,854 | 5,008 | 2,703 | 2,305 | 597 | 0 |
module Data.Vector.DynamicTimeWarping where
import Control.Monad (forM_)
import qualified Data.Vector.Generic as V
import qualified Data.Array.ST as ST
import qualified Data.Array.MArray as MArray
import qualified Data.Array.Base as Arr
-- | Calculate the modification distance of two vectors.
--
-- The sequences don't... | zombiecalypse/DynamicTimeWarp | src/Data/Vector/DynamicTimeWarping.hs | lgpl-3.0 | 1,567 | 0 | 26 | 470 | 529 | 284 | 245 | 30 | 1 |
module Main where
import qualified MAlonzo.Code.Qgetline as Q
main :: IO ()
main = Q.main
| haroldcarr/learn-haskell-coq-ml-etc | agda/examples-that-run/getline/app/Main.hs | unlicense | 92 | 0 | 6 | 17 | 30 | 19 | 11 | 4 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import T... | SaintOlga/FruitHools | src/Foundation.hs | apache-2.0 | 10,243 | 0 | 16 | 2,548 | 1,431 | 776 | 655 | 139 | 2 |
-- | Exporting records.
module Bug6( A(A), B(B), b, C(C,c1,c2), D(D,d1), E(E) ) where
-- |
-- This record is exported without its field
data A = A { a :: Int }
-- |
-- .. with its field, but the field is named separately in the export list
-- (should still be visible as a field name)
data B = B { b :: Int }
-- |
-- ... | nominolo/haddock2 | examples/Bug6.hs | bsd-2-clause | 620 | 0 | 8 | 150 | 147 | 102 | 45 | 16 | 0 |
module Handler.Item where
import Import
import Yesod.Form
import qualified Data.Text as T
import Lol.Items
import Widget
data ItemParams = ItemParams { ipItem :: Item }
itemChoices :: [(Text, Item)]
itemChoices = let itemList = [Empty ..]
in zip (map (T.pack . show) itemList) itemList
itemForm :: AForm Lolle... | MostAwesomeDude/lollerskates | Handler/Item.hs | bsd-2-clause | 764 | 0 | 15 | 173 | 239 | 126 | 113 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
-- | Generic methods for CouchDB documents. Unlike explicit, generic methods
-- uses "Data.Generic".
--
-- > {-# LANGUAGE DeriveDataTypeable #-}
-- > {-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
-- >
-- > import Control.Monad.IO.Class (liftI... | lostbean/neo4j-conduit | src/Database/CouchDB/Conduit/Generic.hs | bsd-2-clause | 4,173 | 0 | 11 | 1,096 | 523 | 326 | 197 | 47 | 1 |
{-| Implementation of the Ganeti network objects.
This is does not (yet) cover all methods that are provided in the
corresponding python implementation (network.py).
-}
{-
Copyright (C) 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification... | apyrgio/snf-ganeti | src/Ganeti/Network.hs | bsd-2-clause | 4,266 | 0 | 11 | 842 | 592 | 323 | 269 | 49 | 2 |
{-# Language GADTs,
FlexibleContexts #-}
{-
TODO:
- Correctly get number of threads, lengths (Cheating with this all over).
- Support kernels that takes other arrays than just Arrays of int.
- Output to the intermediate CoordC language instead of to strings.
- GlobalArrays as t... | svenssonjoel/GCDObsidian | Obsidian/Coordination/Array.hs | bsd-3-clause | 15,358 | 0 | 17 | 4,884 | 3,927 | 2,044 | 1,883 | 230 | 2 |
module DataAnalysis05 where
import Data.List (genericLength)
import Math.Combinatorics.Exact.Binomial (choose)
import DataAnalysis02 (average)
probabilityMassFunction :: Integral a => a -> a -> Double -> Double
probabilityMassFunction k n p = fromIntegral (n `choose` k) * p^k * (1-p)^(n-k)
standardDeviation :: [Dou... | mrordinaire/data-analysis | src/DataAnalysis05.hs | bsd-3-clause | 502 | 0 | 13 | 84 | 206 | 113 | 93 | 11 | 1 |
module Main where
import Data.Text
import Test.QuickCheck
data Thingy = Thingy
{ name :: Text
, number :: Int
} deriving (Show)
instance Arbitrary Thingy where
arbitrary = Thingy <$> arbitraryText <*> arbitrary
arbitraryText :: Gen Text
arbitraryText = elements
[ "hello"
, "no way"
, "wh... | toddmohney/concurrency-example | arbitrary/Main.hs | bsd-3-clause | 457 | 0 | 8 | 109 | 126 | 71 | 55 | 19 | 1 |
-- 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 GADT... | rfranek/duckling | Duckling/Duration/SV/Rules.hs | bsd-3-clause | 3,461 | 0 | 21 | 832 | 909 | 508 | 401 | 97 | 2 |
{-# LANGUAGE RecordWildCards #-}
module Yesod.Worker.Util
( enqueue
, enqueueAt
, enqueueIn
) where
import qualified Keenser as K
import Yesod
import Yesod.Worker.Types
import Control.Concurrent (readMVar)
import Data.Thyme.Clock (UTCTime)
enqueue :: (ToJSON a, YesodWorker master) => K.Worker (HandlerT mas... | jamesdabbs/yesod-worker | src/Yesod/Worker/Util.hs | bsd-3-clause | 1,033 | 0 | 11 | 197 | 381 | 193 | 188 | 28 | 1 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
module Fragment.TyArr.Ast (
module X
) where
import Fragment.TyArr.Ast.Type as X
import Fragment.TyArr.Ast.Error as X
| dalaing/type-systems | src/Fragment/TyArr/Ast.hs | bsd-3-clause | 278 | 0 | 4 | 51 | 32 | 24 | 8 | 4 | 0 |
module Program.Bottles where
import Syntax
true = C "true" []
six = ofInt 6
four = ofInt 4
nine = ofInt 9
seven = ofInt 7
ofInt 0 = C "o" []
ofInt n = C "s" [ofInt $ n - 1]
query = Program bottles $ fresh ["a", "b", "c"] (call "checkAnswer" [V "a", V "b", V "c", true])
query' =
Program definition $ fresh ["q"... | kajigor/uKanren_transformations | test/resources/Program/Bottles.hs | bsd-3-clause | 11,403 | 0 | 43 | 4,008 | 4,947 | 2,592 | 2,355 | 279 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
module Onedrive.Types.OauthTokenResponse where
import Control.Lens (makeLensesWith, camelCaseFields)
import Data.Aeson (FromJSON(parseJS... | asvyazin/hs-onedrive | src/Onedrive/Types/OauthTokenResponse.hs | bsd-3-clause | 1,291 | 0 | 15 | 214 | 277 | 159 | 118 | 36 | 0 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Util.UDP
-- Copyright : (c) Einar Karttunen
-- License : BSD-style
--
-- Maintainer : ekarttun@cs.helsinki.fi
-- Stability : alpha
-- Portability : network
--
-- Basic UDP connectivity... | creswick/hsntp | HSNTP/Util/UDP.hs | bsd-3-clause | 2,177 | 0 | 12 | 615 | 496 | 258 | 238 | 32 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-|
Module : Numeric.AERN.Basics.Exception
Description : exception type to signal AERN specific errors
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.com
Stability : experimental
Portability : portable
... | michalkonecny/aern | aern-order/src/Numeric/AERN/Basics/Exception.hs | bsd-3-clause | 3,732 | 0 | 12 | 936 | 622 | 310 | 312 | 66 | 4 |
-- | Provides file tools used for outputting and converting JSON plan
-- files.
module Database.Algebra.SQL.File where
import Control.Monad.Error.Class
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BL
import System.FilePath
import System.Process
impor... | ulricha/algebra-sql | src/Database/Algebra/SQL/File.hs | bsd-3-clause | 1,310 | 0 | 13 | 326 | 321 | 173 | 148 | 26 | 2 |
-- |
-- Module: $HEADER$
-- Description: Commonly used generators of input alphabet.
-- Copyright: (c) 2013 Peter Trsko
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: experimental
-- Portability: portable
--
-- Commonly used generators of input alphabet.
module Text.Pwgen.Co... | trskop/hpwgen | src/Text/Pwgen/Common.hs | bsd-3-clause | 7,155 | 0 | 10 | 1,753 | 1,588 | 916 | 672 | 114 | 1 |
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.MVar
-- Copyright : (c) The University of Glasgow 2008
... | joelburget/haste-compiler | libraries/base-ghc-7.6/GHC/MVar.hs | bsd-3-clause | 5,504 | 0 | 13 | 1,294 | 741 | 422 | 319 | 51 | 2 |
-- 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.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Quantity.K... | facebookincubator/duckling | Duckling/Quantity/KM/Rules.hs | bsd-3-clause | 8,305 | 0 | 19 | 2,305 | 1,981 | 1,096 | 885 | 199 | 2 |
{-# LANGUAGE CPP, OverloadedStrings, PatternGuards, TupleSections, Rank2Types #-}
module HTIG.TwitterAPI
( Timeline
, Status(..)
, TwitterUser(..)
, getHomeTimeline
, getMentions
, getFriends
, getLastStatus
, updateStatus
, followScreenName
, unFollowScreenName
, retweet
... | nakamuray/htig | HTIG/TwitterAPI.hs | bsd-3-clause | 16,046 | 0 | 18 | 4,571 | 4,218 | 2,239 | 1,979 | 314 | 3 |
module PackageManagement ( Transplantable(..)
, parseVersion
, parsePkgInfo
, insideGhcPkg
, outsideGhcPkg
, getHighestVersion
, GhcPkg
) where
... | Paczesiowa/hsenv | src/PackageManagement.hs | bsd-3-clause | 5,095 | 0 | 17 | 1,217 | 1,161 | 574 | 587 | 94 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-|
This snaplet makes it simple to use a SQLite database from your Snap
application and is based on the sqlite-simple library
(<http://hackage.haskell.org/package/sqlite-simple>). Now, adding a
database to your ... | nurpax/snaplet-sqlite-simple | src/Snap/Snaplet/SqliteSimple.hs | bsd-3-clause | 7,445 | 0 | 16 | 1,395 | 1,045 | 590 | 455 | 85 | 1 |
{-# LANGUAGE MagicHash, UnboxedTuples #-}
module CoreFoundation.Types.Array.Internal where
import GHC.Exts(touch#)
import GHC.IO(IO(..))
import qualified Data.Vector as V
import qualified Data.Vector.Storable as S
import qualified Data.Vector.Storable.Mutable as SM
import CoreFoundation.Types.Base
import Foreign
im... | reinerp/CoreFoundation | CoreFoundation/Types/Array/Internal.hs | bsd-3-clause | 887 | 0 | 14 | 166 | 406 | 213 | 193 | 23 | 1 |
module Render.Atom where
import Prettyprinter
import Polysemy
import Polysemy.Input
import Relude hiding ( Handle
, lift
)
import Foreign.Storable
import ... | expipiplus1/vulkan | generate-new/src/Render/Atom.hs | bsd-3-clause | 1,603 | 0 | 26 | 717 | 382 | 190 | 192 | -1 | -1 |
{-#LANGUAGE FlexibleInstances #-}
{-#LANGUAGE TypeSynonymInstances #-}
module Twilio.Types.Capability where
import Control.Monad
import Data.Aeson
import qualified Data.HashMap.Strict as HashMap
import Data.Set (Set)
import qualified Data.Set as Set
import qualified Data.Text as T
type Capabilities = Set Capability
... | seagreen/twilio-haskell | src/Twilio/Types/Capability.hs | bsd-3-clause | 870 | 0 | 16 | 249 | 244 | 137 | 107 | 26 | 0 |
module Singletons.Fixity where
import Data.Singletons
import Data.Singletons.TH
import Language.Haskell.TH.Desugar
import Prelude.Singletons
$(singletons [d|
class MyOrd a where
(<=>) :: a -> a -> Ordering
infix 4 <=>
(====) :: a -> a -> a
a ==== _ = a
infix 4 ====
|])
| goldfirere/singletons | singletons-base/tests/compile-and-dump/Singletons/Fixity.hs | bsd-3-clause | 290 | 0 | 7 | 63 | 43 | 27 | 16 | -1 | -1 |
-- |
-- Module : Crypto.Hash.Blake2
-- License : BSD-style
-- Maintainer : Nicolas Di Prima <nicolas@primetype.co.uk>
-- Stability : experimental
-- Portability : unknown
--
-- Module containing the binding functions to work with the
-- Blake2
--
-- Implementation based from [RFC7693](https://tools.ietf.org... | tekul/cryptonite | Crypto/Hash/Blake2.hs | bsd-3-clause | 6,710 | 0 | 11 | 1,591 | 1,518 | 816 | 702 | -1 | -1 |
-- | Data.Algorithm.Diff-like API
module Data.Snakes.DiffLike
( Diff (..)
, getDiff
) where
import Data.Functor.Identity
import Data.Snakes
getDiff :: Eq t => [t] -> [t] -> [Diff t]
getDiff l r = case runIdentity $ diffStream Straight Nothing l r of
Just s -> runIdentity $ streamToList s
Nothing -> error "... | schernichkin/snakes | src/Data/Snakes/DiffLike.hs | bsd-3-clause | 418 | 0 | 9 | 76 | 116 | 63 | 53 | 10 | 2 |
op :: Op -> Val -> Maybe Val
op Add1 (LitV (I n)) = Just $ LitV $ I $ n+1
op Sub1 (LitV (I n)) = Just $ LitV $ I $ n-1
op IsNonNeg (LitV (I n)) | n >= 0 = Just $ LitV $ B True
| otherwise = Just $ LitV $ B False
op _ _ = Nothing
| davdar/quals | writeup-old/sections/03AAMByExample/01Concrete/01Op.hs | bsd-3-clause | 254 | 0 | 9 | 89 | 166 | 80 | 86 | 6 | 1 |
module HPack.System
( module X )
where
import HPack.System.PkgDB as X
| markflorisson/hpack | src/HPack/System.hs | bsd-3-clause | 71 | 0 | 4 | 12 | 20 | 14 | 6 | 3 | 0 |
module PermutationStatistics where
import Tree
import Permutation(allPermutations, inverse)
ignoresInverse :: (Eq a) => ([Int] -> a) -> Int -> Bool
ignoresInverse f = all g . allPermutations
where
g p = f p == f (inverse p)
descents [] = []
descents (p:ps) = zipWith (<) ps (p:ps)
des :: [Int] -> ... | cullina/Extractor | src/PermutationStatistics.hs | bsd-3-clause | 360 | 0 | 10 | 84 | 162 | 87 | 75 | 10 | 1 |
module Snaplet.Authentication.Queries
( lookupByEmail
, hashFor
, resetUidpwdUserPassword
, createUidpwdUser
, getGithubAccessToken
, handleSql
, HashedPassword
) where
import Control.Exception (throw)
import Control.Monad.IO.Class
import Crypto.BCrypt
import Data.Text (Text)
import Data.Text.Encoding
... | krisajenkins/snaplet-auth | src/Snaplet/Authentication/Queries.hs | bsd-3-clause | 2,800 | 0 | 17 | 549 | 788 | 407 | 381 | 78 | 3 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
module PFDS.Sec9.Ex14 where
import qualified PFDS.Commons.QueueFamily as Q
import qualified PFDS.Commons.RandomAccessList as L
import PFDS.Commons.SkewBinaryRandomAccessList
import Prel... | matonix/pfds | src/PFDS/Sec9/Ex14.hs | bsd-3-clause | 2,544 | 0 | 15 | 588 | 1,285 | 658 | 627 | 60 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
module Test.Hspec.Expectations.FloatingSpec (spec) where
import Test.Hspec.Meta
import Test.QuickCheck
import Control.Exception
import Control.Monad
import Data.List
import Data.Proxy
import GHC.Fingerprint (fin... | sol/hspec-expectations | test/Test/Hspec/Expectations/FloatingSpec.hs | mit | 3,581 | 0 | 24 | 993 | 1,131 | 563 | 568 | -1 | -1 |
module Sound.Tidal.SimpleSynth where
import Sound.Tidal.Stream (makeI, makeF)
import Sound.Tidal.MIDI.Control
keys :: ControllerShape
keys = ControllerShape {params = [
mCC "modwheel" 1,
mCC "balance" 10,
mCC "expression" 11,
... | lennart/tidal-midi | Sound/Tidal/SimpleSynth.hs | gpl-3.0 | 823 | 0 | 8 | 327 | 186 | 105 | 81 | 20 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/CreateVpnConnection.hs | mpl-2.0 | 6,093 | 0 | 9 | 1,325 | 704 | 432 | 272 | 81 | 1 |
-- -*- Mode: Haskell; -*-
--
-- QuickCheck tests for Megaparsec, utility functions for parser testing.
--
-- Copyright © 2015 Megaparsec contributors
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
-- met:
--
-- * Redistr... | tulcod/megaparsec | tests/Util.hs | bsd-2-clause | 7,133 | 0 | 12 | 1,494 | 1,181 | 641 | 540 | 79 | 5 |
{- |
Module : $Header$
Description : Goal management GUI.
Copyright : (c) Rene Wagner, Klaus Luettich, Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability : provisional
Portability : needs POSIX
Goal management GUI for the structured l... | keithodulaigh/Hets | GUI/HTkProverGUI.hs | gpl-2.0 | 22,843 | 0 | 49 | 6,693 | 6,113 | 2,892 | 3,221 | 484 | 5 |
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.DynamicBars
-- Copyright : (c) Ben Boeckel 2012
-- License : BSD-style (as xmonad)
--
-- Maintainer : mathstuf@gmail.com
-- Stability : unstable
-- Portabili... | f1u77y/xmonad-contrib | XMonad/Hooks/DynamicBars.hs | bsd-3-clause | 6,953 | 0 | 19 | 1,299 | 1,403 | 729 | 674 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Wai.Middleware.ForceSSLSpec
( main
, spec
) where
import Test.Hspec
import Network.Wai.Middleware.ForceSSL
import Control.Monad
import Data.ByteString (ByteString)
import Data.Monoid ((<>))
import Network.HTTP.Types (methodPost, status200, status301, stat... | sordina/wai | wai-extra/test/Network/Wai/Middleware/ForceSSLSpec.hs | bsd-2-clause | 1,890 | 0 | 15 | 437 | 517 | 274 | 243 | 41 | 1 |
module Fibonacci.Plugin (fibonacci) where
import Neovim
-- | Neovim is not really good with big numbers, so we return a 'String' here.
fibonacci :: Int -> Neovim' String
fibonacci n = return . show $ fibs !! n
where
fibs :: [Integer]
fibs = 0:1:scanl1 (+) fibs
| saep/nvim-hs-config-example | lib/Fibonacci/Plugin.hs | mit | 274 | 0 | 8 | 60 | 77 | 43 | 34 | 6 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module CommandLine.Helpers where
import Control.Monad.Error.Class (MonadError)
import Control.Monad.Trans (MonadIO, liftIO)
import System.Directory
import System.IO
import qualified Elm.Utils as Utils
yesOrNo :: IO Bool
yesOrNo =
do hFlush stdout
input <- getLine
cas... | laszlopandy/elm-package | src/CommandLine/Helpers.hs | bsd-3-clause | 1,150 | 0 | 12 | 294 | 380 | 192 | 188 | 33 | 3 |
{-# OPTIONS_GHC -Wall #-}
module Reporting.Error.Docs where
import qualified Reporting.Error.Helpers as Help
import qualified Reporting.Report as Report
data Error
= NoDocs
| OnlyInDocs String [String]
| OnlyInExports [String]
| NoComment String
| NoType String
-- TO REPORT
toReport :: Error -... | Axure/elm-compiler | src/Reporting/Error/Docs.hs | bsd-3-clause | 2,479 | 0 | 16 | 700 | 286 | 154 | 132 | 45 | 5 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
HsImpExp: Abstract syntax: imports, exports, interfaces
-}
{-# LANGUAGE DeriveDataTypeable #-}
module HsImpExp where
import Module ( ModuleName )
import HsDoc ( HsDocString )
import OccName ... | tjakway/ghcjvm | compiler/hsSyn/HsImpExp.hs | bsd-3-clause | 9,409 | 0 | 19 | 3,161 | 1,702 | 922 | 780 | 115 | 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="id-ID">
<title>Call Graph</title>
<maps>
<homeID>callgraph</homeID>
<mapref location="m... | thc202/zap-extensions | addOns/callgraph/src/main/javahelp/help_id_ID/helpset_id_ID.hs | apache-2.0 | 961 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
import Communication.IVC(InOutChannel)
import qualified Communication.IVC as IVC
import Communication.Rendezvous
import Control.Monad
import Data.Binary
import Data.Binary.Get
import Data.ByteString.Lazy(unpack)
import Data.Char
import Hypervisor.Console
import Hypervisor.Debug
import Hypervisor.XenStore
import Prelude... | thumphries/HaLVM | examples/IVC/ROT13/Terminal.hs | bsd-3-clause | 1,681 | 0 | 13 | 331 | 537 | 264 | 273 | 49 | 3 |
module Main where
import Data.Char (toLower)
palindrome s = lowered == reverse lowered where lowered = map toLower s
main = do
if palindrome "Tacocat" then
putStrLn "tacocat is a palindrome"
else
putStrLn "tacocat is not a palindrome"
if palindrome "HelLo" then
putStrLn "hello is a palindrome"
el... | OpenGenus/cosmos | code/string_algorithms/src/palindrome_checker/palindrome.hs | gpl-3.0 | 365 | 0 | 8 | 82 | 86 | 43 | 43 | 10 | 3 |
main = do
-- All reserved words
let break = "break" in putStrLn break
let catch = "catch" in putStrLn catch
let const = "const" in putStrLn const
let continue = "continue" in putStrLn continue
let debugger = "debugger" in putStrLn debugger
let delete = "delete" in putStrLn delete
let enum = "enum" in p... | manyoo/ghcjs | test/fay/reservedWords.hs | mit | 1,627 | 0 | 10 | 347 | 621 | 257 | 364 | 38 | 1 |
-- !!! Testing the Word Enum instances.
{-# OPTIONS_GHC -F -pgmF ./enum_processor.bat #-}
-- The processor is a non-CPP-based equivalent of
-- #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) })
-- which is not portable to clang
module Main(main) where
import Control.Exception
import Data.Word
... | ezyang/ghc | libraries/base/tests/enum03.hs | bsd-3-clause | 8,901 | 0 | 15 | 1,602 | 4,803 | 2,627 | 2,176 | 182 | 1 |
-- | Types for the general graph colorer.
module GraphBase (
Triv,
Graph (..),
initGraph,
graphMapModify,
Node (..), newNode,
)
where
import UniqSet
import UniqFM
-- | A fn to check if a node is trivially colorable
-- For graphs who's color classes are disjoint t... | forked-upstream-packages-for-ghcjs/ghc | compiler/utils/GraphBase.hs | bsd-3-clause | 3,291 | 0 | 11 | 1,163 | 391 | 241 | 150 | 44 | 1 |
module GMachine
where
import Types
import Heap
-- Getter and setter of the G-machine state
getOutput :: GMState -> GMOutput
getOutput (o, _, _, _, _, _, _) = o
putOutput :: GMOutput -> GMState -> GMState
putOutput o' (_, i, stack, dump, heap, globals, stats)
= (o', i, stack, dump, heap, globals, stats)
ge... | typedvar/hLand | hcore/GMachine.hs | mit | 10,154 | 0 | 15 | 2,624 | 4,116 | 2,184 | 1,932 | 247 | 5 |
module FantasyProfession where
import System.Random
import Probability
import Quality
import Skill
import FantasyStats
import Alignment
import Precondition
data ProfessionalRarity = Basic | Adventurer | Epic
deriving (Eq, Show, Read)
data Profession = Profession { profe... | jweissman/heroes | src/FantasyProfession.hs | mit | 9,417 | 4 | 10 | 1,699 | 707 | 433 | 274 | 55 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Unison.Hash (Hash(Hash), toBytes, base32Hex, base32Hexs, fromBase32Hex, fromBytes, unsafeFromBase32Hex, showBase32Hex, validBase32HexChars) where
import Unison.Prelude
import Data.ByteString.Builder (doubleBE, word64BE, int64BE, toLazyByteStrin... | unisonweb/platform | unison-core/src/Unison/Hash.hs | mit | 3,848 | 0 | 14 | 729 | 1,025 | 561 | 464 | 75 | 8 |
module Graphics.D3D11Binding.Interface.D3D11ClassInstance where
data ID3D11ClassInstance = ID3D11ClassInstance | jwvg0425/d3d11binding | src/Graphics/D3D11Binding/Interface/D3D11ClassInstance.hs | mit | 113 | 0 | 5 | 9 | 15 | 10 | 5 | 2 | 0 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, DataKinds, OverloadedStrings #-}
-- | Embed compiled purescript into the 'EmbeddedStatic' subsite.
--
-- This module provides an alternative way of embedding purescript code into a yesod application,
-- and is orthogonal to the support in "Yesod.PureScript".
--
-- To use this ... | jasonzoladz/yesod-purescript | Yesod/PureScript/EmbeddedGenerator.hs | mit | 9,060 | 4 | 19 | 2,260 | 937 | 541 | 396 | -1 | -1 |
module Folds where
import Data.Char
import Data.List
import Debug.Trace
-- Ex 04:
myConcat :: [[a]] -> [a]
myConcat = foldr (++) []
myTakeWhile_rec :: (a -> Bool) -> [a] -> [a]
myTakeWhile_rec f (a:as) | f a = a : myTakeWhile_rec f as
myTakeWhile_rec _ (_:_) = []
myTakeWhile_rec _ [] = []
myTakeWhile_fold :: (a ->... | lpenz/realworldhaskell-exercises | ch04/Folds.hs | mit | 1,602 | 0 | 12 | 484 | 874 | 465 | 409 | 43 | 3 |
{-# LANGUAGE TemplateHaskell, StandaloneDeriving, DeriveDataTypeable, DeriveGeneric #-}
module CoqCoreBind where
import qualified Prelude
import qualified Data.ByteString
import qualified Data.Array
import qualified Data.IntMap
import qualified FastString
import qualified Data.Data as Data
import qualified GHC.Ge... | antalsz/hs-to-coq | structural-isomorphism-plugin/src/CoqCoreBind.hs | mit | 24,197 | 0 | 16 | 5,765 | 5,445 | 3,217 | 2,228 | 872 | 0 |
module Main
where
import qualified Data.ByteString.Lazy as B
import qualified Data.ByteString.Lazy.Char8 as C
import Data.Char
import Data.Word
import Data.Bits
import System.IO
main :: IO ()
main = do
hSetBinaryMode stdin True
hSetBinaryMode stdout True
bsIn <- C.getContents
let hexBs = C.filter (isHexDigi... | andreyk0/hex2bin | Main.hs | mit | 997 | 0 | 12 | 236 | 425 | 219 | 206 | 32 | 2 |
module Workplaces.ResourceAddition where
import Rules
import TestFramework
import TestHelpers
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.QuickCheck.Monadic
resourceAdditionTests :: TestTree
resourceAdditionTests = localOption (QuickCheckMaxRatio 500) $ testGroup "Resource addition tests" $ [
test... | martin-kolinek/some-board-game-rules | test/Workplaces/ResourceAddition.hs | mit | 1,452 | 0 | 13 | 231 | 302 | 148 | 154 | 26 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.Text
(js_newText, newText, js_splitText, splitText, js_replaceWholeText,
replaceWholeText, js_getWholeText, getWholeText, Text, castToText,
gTypeText, IsText, toText)
where
import Pre... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/Text.hs | mit | 2,687 | 28 | 11 | 415 | 691 | 402 | 289 | 44 | 1 |
module Web.Hastodon
( module Web.Hastodon.Option
, module Web.Hastodon.Streaming
, module Web.Hastodon.Types
, HastodonClient(..)
, mkHastodonClient
, getAccountById
, getCurrentAccount
, getFollowers
, getFollowersWithOption
, getFollowing
, getFollowingWithOption
, getAccountStatuses
, getAc... | syucream/hastodon | Web/Hastodon.hs | mit | 1,632 | 0 | 5 | 294 | 258 | 173 | 85 | 74 | 0 |
-- Selective fear of numbers
-- http://www.codewars.com/kata/55b1fd84a24ad00b32000075/
module Codewars.Exercise.Fear {- of the dark -} where
amIAfraid :: String -> Int -> Bool
amIAfraid "Monday" = (== 12)
amIAfraid "Tuesday" = (> 95)
amIAfraid "Wednesday" = (== 34)
amIAfraid "Thursday" = (== 0)
amIAfraid "Fri... | gafiatulin/codewars | src/7 kyu/Fear.hs | mit | 406 | 0 | 6 | 75 | 107 | 63 | 44 | 9 | 1 |
module Handler.AnalogWrite where
import Global
import Import
import System.Hardware.Arduino
getAnalogWriteR :: Word8 -> Int -> Handler Value
getAnalogWriteR p v = do
putMVar gArduinoIO analog_write
_ <- takeMVar gArduinoRes
return $ toJSON ()
where
analog_write = analogWrite (digital p) v
| aufheben/lambda-arduino | Handler/AnalogWrite.hs | mit | 302 | 0 | 9 | 52 | 92 | 46 | 46 | 10 | 1 |
module Main where
import Control.Concurrent (threadDelay)
import Control.Monad (unless)
import Data.Semigroup ((<>))
import System.IO (hFlush, stdout)
import Game.Core (mutate, difference)
import Game.IO (printC, printD, prepareScreen)
import Game.Read (readSeedContent)
import Options.Applicative
main :: IO ()
main =... | airt/game-of-life | app/Main.hs | mit | 1,272 | 0 | 14 | 282 | 415 | 211 | 204 | 44 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module MarketData where
import Control.Monad
import Data.Aeson
import Data.Time
import GHC.Generics (Generic)
import Data.Time.Clock.POSIX
newtype EpochTime =
EpochTime {time :: UTCTime}
deriving (Show,Eq)
instance FromJSON EpochTime where
parseJSON (Number v) =
return $
... | krisajenkins/BellRinger | src/MarketData.hs | epl-1.0 | 840 | 0 | 9 | 220 | 239 | 136 | 103 | 30 | 0 |
module Util (
palindrome,
runLength,
none,
splitOn,
takeWhileInclude,
removeCharacters,
maxPathSum,
runningTotal,
removeDuplicates,
digits,
digitList,
digitsToInt,
partitionBy,
everyNth,
rotateInteger,
enumerateListRotations,
enumerateIntegralRotations... | liefswanson/projectEuler | src/Util.hs | gpl-2.0 | 5,039 | 1 | 12 | 1,455 | 2,075 | 1,117 | 958 | 146 | 3 |
{-# LANGUAGE LambdaCase #-}
module Spiteful.Reddit where
import Control.Concurrent (threadDelay)
import Control.Monad (forM, forM_)
import Control.Monad.IO.Class
import Data.Either.Combinators (mapLeft)
import qualified Data.HashMap.Strict as HM
import Data.List.Split (chunksOf)
import Data.Maybe (fromMaybe, isJust, ... | Xion/spiteful | src/Spiteful/Reddit.hs | gpl-2.0 | 9,557 | 0 | 26 | 2,629 | 2,428 | 1,194 | 1,234 | -1 | -1 |
module Main (
main
) where
import Sivi
import Linear hiding (rotate)
import ScrewHoles
corner = V3 (-40) 5 0
probeCorner = translate corner $ probeInnerCornerNE 5 (ProbeTool 3 42)
bearing = chain 1 [
circularPocket 14 2.5 0.5
, withTool (EndMill 2 42) $ probeZMinus (V3 15 0 0... | iemxblog/sivi-haskell | examples/z_plate.hs | gpl-2.0 | 2,221 | 0 | 14 | 776 | 729 | 379 | 350 | 44 | 1 |
module FormalMethods.Terms where
import Notes hiding (constant)
makeDefs
[ "signature"
, "arity"
, "constant"
, "variable"
, "term algebra"
, "term"
, "equation"
, "rule"
, "equational theory"
, "equational derivation"
, "free term algebra"
, "free equational ... | NorfairKing/the-notes | src/FormalMethods/Terms.hs | gpl-2.0 | 893 | 0 | 7 | 255 | 170 | 102 | 68 | -1 | -1 |
-- This file is part of seismic_repa_3.1.
--
-- seismic_repa_3.1 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 Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- seismic... | agremm/Seismic | repa_3/Seismic.hs | gpl-3.0 | 3,823 | 0 | 15 | 1,087 | 1,101 | 612 | 489 | 56 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Vector where
import Prelude(Show)
import Base
import Functional
class LikeVector v where
map :: (a -> b) -> v a -> v b
zip :: (a -> b -> c) -> v a -> v b -> v c
fold :: (a -> a -> a) -> v a -> a
class LikeNumber a where
(+) :: a -> a -> a
(*) :: a -> a -> a
inst... | zakharvoit/haskell-homework | Vector.hs | gpl-3.0 | 2,667 | 0 | 16 | 760 | 963 | 535 | 428 | 54 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/UpdateInstance.hs | mpl-2.0 | 9,029 | 0 | 10 | 1,989 | 1,084 | 652 | 432 | 109 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Language.Types
-- Copyright : (c) 2015-2016 Brendan Ha... | rueshyna/gogol | gogol-language/gen/Network/Google/Language/Types.hs | mpl-2.0 | 5,141 | 0 | 7 | 1,368 | 606 | 428 | 178 | 147 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/GetPermissions.hs | mpl-2.0 | 5,374 | 0 | 20 | 1,283 | 785 | 456 | 329 | 118 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPSProxies/SetURLMap.hs | mpl-2.0 | 5,258 | 0 | 17 | 1,140 | 557 | 333 | 224 | 92 | 1 |
{-#LANGUAGE OverloadedStrings#-}
module Data.P440.XML.Instances.IZV where
import qualified Data.P440.Domain.IZV as IZV
import Data.P440.Domain.SimpleTypes
import Data.P440.XML.XML
import Data.P440.XML.Instances.SimpleTypes
instance ToNode IZV.Файл where
toNode (IZV.Файл идЭС версПрог телОтпр
... | Macil-dev/440P-old | src/Data/P440/XML/Instances/IZV.hs | unlicense | 1,346 | 0 | 9 | 339 | 600 | 310 | 290 | 24 | 0 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE NoMonomorphismRestr... | wdanilo/container | src/Data/HMap/Lazy.hs | apache-2.0 | 2,925 | 0 | 11 | 692 | 726 | 410 | 316 | -1 | -1 |
module Chapter4 where
awesome = ["Papuchon", "curry", ":)"]
alsoAwesome = ["Quake", "The Simons"]
allAwesom = [awesome, alsoAwesome]
myAbs :: Integer -> Integer
myAbs x = if x < 0 then -x else x
isPalindrome :: (Eq a) => [a] -> Bool
isPalindrome x = reverse x == x
f :: (a, b) -> (c, d) -> ((b,d), (... | logistark/haskellbookexercises | 4 - BasicDatatypes/chapter4.hs | apache-2.0 | 422 | 0 | 8 | 117 | 221 | 128 | 93 | 13 | 2 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, FlexibleContexts #-}
module Sync where
import Network.HTTP.Conduit
import Control.Monad.Except
import Control.Monad.Trans.Resource
import Control.Monad.Reader (ReaderT, ask, runReaderT)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
im... | froden/digipostarkiv | src/Sync.hs | apache-2.0 | 16,595 | 0 | 20 | 3,765 | 4,618 | 2,238 | 2,380 | 308 | 6 |
(lp1
(ccopy_reg
_reconstructor
p2
(cpygments.token
_TokenType
p3
c__builtin__
tuple
p4
(S'Comment'
p5
S'Single'
p6
ttRp7
(dp8
S'subtypes'
p9
c__builtin__
set
p10
((ltRp11
sS'parent'
p12
g2
(g3
g4
(g5
ttRp13
(dp14
g12
g2
(g3
g4
(ttRp15
(dp16
g5
g13
sS'Name'
p17
g2
(g3
g4
(g17
ttRp18
(dp19
S'Function'
p20
g2
(g3
g4
(g17
... | qsnake/pygments | tests/examplefiles/output/SmallCheck.hs | bsd-2-clause | 99,778 | 796 | 5 | 19,315 | 50,465 | 27,762 | 22,703 | -1 | -1 |
-- Copyright (c) 2012-2019, Christopher Hall <hsw@ms2.hinet.net>
-- Licence BSD2 see LICENSE file
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-}
module SessionParser where
import Data.Aeson
--import Data.Aeson.Encode.Pretty (encodePretty)
import Data.Text
import Data.String
import Control.Monad (mzero)
import q... | hxw/conlecterm | src/SessionParser.hs | bsd-2-clause | 1,859 | 0 | 12 | 411 | 448 | 233 | 215 | 52 | 2 |
{-# LANGUAGE CPP #-}
module Main where
import System.FilePath
import System.Process
import Control.Monad (when)
import System.Exit
import System.Directory
import System.IO.Error
import Control.Exception (catch)
import Control.Monad.Error (ErrorT(..))
import Language.GTL.Parser.Monad as GTL
import Language.GTL.Parser... | hguenther/gtl | Main.hs | bsd-3-clause | 3,183 | 0 | 16 | 678 | 769 | 413 | 356 | 71 | 8 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Main where
import TestUtil
import Control.Exception
import Control.Monad (when)
import Criterion.Main
import Data.ExternalSort (externalSortFile)
import System.Directory
import System.E... | sseefried/external-sort | test/SortTester.hs | bsd-3-clause | 1,012 | 0 | 21 | 307 | 239 | 116 | 123 | 28 | 1 |
module Arguments
( Arguments (..)
, opts
) where
import Options.Applicative
import Data.Maybe
import Data.Time
data Arguments = Arguments
{ runRate :: NominalDiffTime
, exceptionRate :: NominalDiffTime
, configFile :: FilePath
, logFile :: FilePath
, debug :: Bool
}
setDefault :: Alternative m => a... | prophet-on-that/log-monitor | src-exe/log-monitor/Arguments.hs | bsd-3-clause | 1,887 | 0 | 16 | 694 | 395 | 198 | 197 | 47 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedLists #-}
-- | Optics for the @lens@ library that correspond to the types in
-- "Penny.Copper.Types" are in this module.
module Penny.Copper.Optics
( module Penny.Copper.Optics.Auto
, module Penny.Copper.Optics.Manual
) where
import Penny.Copper.Optics.Aut... | massysett/penny | penny/lib/Penny/Copper/Optics.hs | bsd-3-clause | 356 | 0 | 5 | 49 | 43 | 32 | 11 | 7 | 0 |
module SOPBench.Roundtrip where
import qualified Generics.SOP as SOP
import qualified GHC.Generics as GHC
class Roundtrip a where
roundtrip :: a -> a
soproundtrip :: SOP.Generic a => a -> a
soproundtrip = SOP.to . SOP.from
ghcroundtrip :: GHC.Generic a => a -> a
ghcroundtrip = GHC.to . GHC.from
| well-typed/generics-sop | generics-sop/bench/SOPBench/Roundtrip.hs | bsd-3-clause | 303 | 0 | 7 | 55 | 102 | 57 | 45 | 9 | 1 |
{-# LANGUAGE InstanceSigs #-} -- Because i love it
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RankNTypes #-} -- See syntaxIso
module Sky.Parsing.Invertible where
import Prelude hiding (id, (.), (<$>), (<*>), pure, print)
import Control.Category -- yay
import C... | xicesky/sky-haskell-playground | src/Sky/Parsing/Invertible.hs | bsd-3-clause | 7,624 | 0 | 13 | 2,186 | 2,122 | 1,139 | 983 | 124 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.