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 : Idris.Elab.Clause
Description : Code to elaborate clauses.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE PatternGuards #-}
module Idris.Elab.Clause where
import Idris.AbsSyntax
import Idris.ASTUtils
import Idris.Core.CaseTree
import Idris.Core.Elaborate hiding (T... | uuhan/Idris-dev | src/Idris/Elab/Clause.hs | bsd-3-clause | 60,210 | 596 | 29 | 24,052 | 10,724 | 6,485 | 4,239 | 921 | 50 |
{-# LANGUAGE RecordWildCards #-}
-- | Description: Convert text documents into a sequence of features.
--
-- This program reads plain text and produces a sequence of features, which
-- have been normalised with respect to case, punctuation, etc.
module Main where
import Control.Exception
import Control.Monad
import qu... | thsutton/document-analysis | src/prepare.hs | bsd-3-clause | 2,165 | 0 | 12 | 498 | 496 | 260 | 236 | 51 | 1 |
module Data.String.Interpolate.Internal.Util where
import Data.Char
import Data.Maybe
import qualified Numeric as N
import Data.String.Interpolate.Compat
toString :: Show a => a -> String
toString a = let s = show a in fromMaybe s (readMaybe s)
{-# NOINLINE toString #-}
{-# RULES "toStr... | sol/interpolate | src/Data/String/Interpolate/Internal/Util.hs | mit | 4,477 | 0 | 18 | 1,604 | 2,084 | 1,013 | 1,071 | 109 | 83 |
{-# LANGUAGE RankNTypes #-}
-- | This module provides helpers to construct values that have
-- serialization size under the certain limit. Used in block creation
-- and ssc stripping.
module Pos.Core.Limits
( spanHashMap
, stripHashMap
) where
import Universum
import qualified Data.Ha... | input-output-hk/pos-haskell-prototype | core/src/Pos/Core/Limits.hs | mit | 1,766 | 0 | 13 | 487 | 542 | 279 | 263 | 33 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module HROOT.Data.RooFit.Class where
import FFICXX.Generate.Code.Primitive ( bool, bool_
, cppclass, cppclass_
, cppclassref
, cstring
... | wavewave/HROOT-generate | HROOT-generate/lib/HROOT/Data/RooFit/Class.hs | gpl-3.0 | 12,908 | 0 | 9 | 3,807 | 2,896 | 1,597 | 1,299 | 220 | 1 |
{-# LANGUAGE BangPatterns #-}
module Main (main) where
import Data.Vector.Storable as V
import Numeric.FFT.Vector.Unnormalized as U
import Numeric.FFT.Vector.Invertible as I
import Numeric.FFT.Vector.Unitary as O
import Criterion.Main
import Data.Complex
main = do
let mkSize planner k = do
let !v = V.... | judah/vector-fftw | tests/timing/Bench.hs | bsd-3-clause | 1,351 | 0 | 17 | 393 | 568 | 272 | 296 | 31 | 1 |
module Lang.LamIf.Pretty where
import FP
import Lang.LamIf.Val
import qualified FP.Pretty as P
import Lang.LamIf.StateSpace
import Lang.LamIf.CPS as C
import Lang.LamIf.Syntax as L
instance Pretty RawName where
pretty (RawName s) = P.bdr s
instance Pretty LocNum where
pretty (LocNum i) = P.pun $ ptoString i
insta... | davdar/maam | src/Lang/LamIf/Pretty.hs | bsd-3-clause | 4,446 | 4 | 16 | 1,027 | 2,423 | 1,204 | 1,219 | -1 | -1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Types
-- Copyright : (c) David... | tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/Types.hs | bsd-3-clause | 13,686 | 0 | 11 | 2,846 | 2,019 | 1,154 | 865 | 177 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module IHaskell.Display.Widgets.Box.PlaceProxy (
-- * The PlaceProxy widget
PlaceProxy,
-- * Constructor
mkPlaceProxy) where
-- To keep `cabal repl` happy whe... | kfiz/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/PlaceProxy.hs | mit | 1,653 | 0 | 13 | 379 | 301 | 170 | 131 | 35 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- Facade of the Yi library, for use by confguration file. Just
-- re-exports a bunch of modules.
--
--... | siddhanathan/yi | yi-core/src/Yi.hs | gpl-2.0 | 1,148 | 0 | 5 | 236 | 207 | 141 | 66 | 36 | 0 |
module Github.UsersSpec where
import Github.Users (userInfoFor)
import Github.Data.Definitions (DetailedOwner(..))
import Test.Hspec (it, describe, shouldBe, Spec)
fromRight :: Either a b -> b
fromRight (Right b) = b
fromRight (Left _) = error "Expected a Right and got a Left"
spec :: Spec
spec =
describe "userIn... | adarqui/github | spec/Github/UsersSpec.hs | bsd-3-clause | 494 | 0 | 14 | 87 | 150 | 80 | 70 | 13 | 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="sl-SI">
<title>Requester</title>
<maps>
<homeID>requester</homeID>
<mapref location="ma... | thc202/zap-extensions | addOns/requester/src/main/javahelp/help_sl_SI/helpset_sl_SI.hs | apache-2.0 | 960 | 77 | 66 | 155 | 404 | 205 | 199 | -1 | -1 |
module Let1 where
import Control.Parallel.Strategies (rpar, runEval)
fib n | n <= 1 = 1
| otherwise = let n1 = fib (n-1)
n2 = fib (n-2)
n1_2
=
runEval
(do n1_2 <-... | RefactoringTools/HaRe | old/testing/evalMonad/Let1_TokOut.hs | bsd-3-clause | 418 | 0 | 15 | 260 | 116 | 58 | 58 | 11 | 1 |
module Opaleye.SQLite.Internal.PrimQuery where
import Prelude hiding (product)
import qualified Data.List.NonEmpty as NEL
import qualified Opaleye.SQLite.Internal.HaskellDB.PrimQuery as HPQ
import Opaleye.SQLite.Internal.HaskellDB.PrimQuery (Symbol)
data LimitOp = LimitOp Int | OffsetOp Int | Lim... | bergmark/haskell-opaleye | opaleye-sqlite/src/Opaleye/SQLite/Internal/PrimQuery.hs | bsd-3-clause | 2,868 | 0 | 12 | 979 | 861 | 477 | 384 | 49 | 9 |
{-|
Module : Util.Pretty
Description : Utilities for Pretty Printing.
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Util.Pretty (
module Text.PrettyPrint.Annotated.Leijen
, Sized(..)
, nestingSize
, Pretty(..)
) where
--import Text.PrettyPrin... | kojiromike/Idris-dev | src/Util/Pretty.hs | bsd-3-clause | 720 | 0 | 8 | 150 | 182 | 103 | 79 | 17 | 1 |
main :: IO ()
main = print (-10 :: Double)
| beni55/ghcjs | test/fay/nums.hs | mit | 43 | 0 | 7 | 10 | 27 | 14 | 13 | 2 | 1 |
module ShouldFail where
-- !!! Test for parse error in do/let expression
foo = do let foo = True
return ()
-- Note the let binding at the end!
-- This gave a pattern-match failure in tcStmts in ghc-4.04proto
h x = x
| olsner/ghc | testsuite/tests/parser/should_fail/readFail009.hs | bsd-3-clause | 237 | 0 | 11 | 64 | 35 | 20 | 15 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Type inference of @loop@. This is complicated because of the
-- uniqueness and size inference, so the implementation is separate
-- from the main type checker.
module Language.Futhark.TypeChecker.Terms.DoLoop
... | HIPERFIT/futhark | src/Language/Futhark/TypeChecker/Terms/DoLoop.hs | isc | 15,466 | 12 | 30 | 5,086 | 3,571 | 1,790 | 1,781 | 279 | 30 |
--------------------------------------------------------------------------
--
-- Haskell: The Craft of Functional Programming, 3e
-- Simon Thompson
-- (c) Addison-Wesley, 1996-2011.
--
-- Chapter 6
--
--------------------------------------------------------------------------
module Chapter6 where
import Prelude ... | tonyfloatersu/solution-haskell-craft-of-FP | Chapter6.hs | mit | 5,096 | 0 | 13 | 1,138 | 1,247 | 730 | 517 | 93 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Ch22.PodDownload
where
import Ch21.PodDB
import Ch22.PodParser
import qualified Data.Text as T (Text, pack, unpack, splitOn)
import qualified Data.ByteString.Lazy as LB
import Network.HTTP.Client ( Manager
, newManager
, d... | futtetennista/IntroductionToFunctionalProgramming | RWH/src/Ch22/PodDownload.hs | mit | 2,608 | 0 | 17 | 726 | 730 | 379 | 351 | 63 | 2 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | tlaitinen/game | backend/Settings.hs | mit | 5,501 | 0 | 12 | 1,497 | 728 | 418 | 310 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Web.Helojitpo
-- Stability : experimental
-- Portability : POSIX
module Web.Helojito
( -- * Helojito Monad
runHelojito
-- * API Calls
, postTask
, updateTask
, getTask
, getTaskDay
, getTasks
, ... | MSA-Argentina/helojito | src/Web/Helojito.hs | mit | 1,511 | 0 | 7 | 505 | 300 | 188 | 112 | 44 | 1 |
module Lab2 where
------------------------------------------------------------------------------------------------------------------------------
-- Lab 2: Validating Credit Card Numbers
------------------------------------------------------------------------------------------------------------------------------
-- ==... | anwb/fp-one-on-one | lab-02.hs | mit | 5,660 | 0 | 10 | 2,293 | 741 | 454 | 287 | 140 | 1 |
module Main where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Lens
import Control.Monad
import Control.Monad.Identity
import Control.Monad.State.Strict
import Control.Monad.Trans
import Data.Array.IO
import ... | chpatrick/hchip | HChip.hs | mit | 4,355 | 1 | 16 | 1,126 | 1,611 | 839 | 772 | 153 | 10 |
{-|
Module : Obgs.Utils.HashMap
Description : Utility functions for dealing with 'HM.HashMap's.
Copyright : (c) obgs 2017
License : MIT
Maintainer : obgs@protonmail.com
-}
module Obgs.Utils.HashMap
(
-- * Update
assign
-- * Keys
, filterByKey
, keysFor
-- * Key-value sw... | obgs/utils | src/Obgs/Utils/HashMap.hs | mit | 6,623 | 0 | 12 | 1,738 | 1,622 | 869 | 753 | 101 | 1 |
-- This is the module where an end user writes the actual domain specific analysis.
{-# LANGUAGE OverloadedStrings #-}
module Skel.Kmer.UserAnalysis (userAnalysis) where
import qualified Data.Text as T
import Skel.Kmer.UserParameters
import qualified Data.ByteString as S
-- Our analysis consists of a number... | teuffy/min-var-ci | src/Skel/Kmer/UserAnalysis.hs | mit | 1,245 | 0 | 10 | 257 | 111 | 69 | 42 | 13 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module OpenWeatherMap.Types.Coordinate where
import Control.Applicative
import Control.Monad
import Data.Aeson
i... | AndrewRademacher/open-weather-map | src/OpenWeatherMap/Types/Coordinate.hs | mit | 881 | 0 | 9 | 206 | 226 | 125 | 101 | 20 | 0 |
module QLib
( quantumRun
) where
import Data.Complex
import Data.Bits
import qualified Data.List as L
import Text.Printf
import Numeric.LinearAlgebra
quantumRun :: IO ()
quantumRun = do putStrLn "Some Func"
let a = newRegister 4
putStrLn $ show a
-- putStrLn $ pr... | byronwasti/Quantum-Computer-Simulation | haskell/src/QLib.hs | mit | 3,216 | 0 | 11 | 992 | 509 | 297 | 212 | 29 | 2 |
module P032Spec where
import qualified P032 as P
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = -- do
describe "solveBasic" $
it "1からNまでのパンデジタルになる掛け算の積の和" $
map P.solveBasic [1..5] `shouldBe` [0, 0, 0, 12, 52]
| yyotti/euler_haskell | test/P032Spec.hs | mit | 290 | 0 | 8 | 55 | 91 | 53 | 38 | 10 | 1 |
engcoins = [200, 100, 50, 20, 10, 5, 2, 1]
count _ 0 = 1
count [] _ = 0
count (coin:coins) money = sum $ map (\i -> count coins (money - i*coin)) [0 .. (money `div` coin)]
answer = count engcoins 200
| gumgl/project-euler | 31/31.hs | mit | 202 | 0 | 12 | 46 | 127 | 71 | 56 | 5 | 1 |
module Bench.KMeans
( benchKMeans ) where
import Criterion.Main
import qualified Data.Matrix.Unboxed as MU
import qualified Data.Vector.Unboxed as U
import Data.Word
import System.IO.Unsafe
import System.Random.MWC
import AI.Clustering.KMeans
import Be... | kaizhang/clustering | benchmarks/Bench/KMeans.hs | mit | 1,648 | 0 | 16 | 522 | 382 | 208 | 174 | 37 | 1 |
module OpMeth where
-- example where using a method named 'op' fails to translate
-- correctly
class Magma a where
op :: a -> a -> a
instance Magma Bool where op = (&&)
| antalsz/hs-to-coq | examples/base-tests/OpMeth.hs | mit | 176 | 0 | 8 | 41 | 43 | 25 | 18 | 4 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
-- |Multi-parameter variant of Functor.
-- The contained data type is an explicit type parameter,
-- allowing instances to be made dependent on it.
-- Sets, for example, require an Ord-context on their
-- type parameters, while the type @Dat... | ombocomp/CSP | Data/Functor/MultiParam.hs | mit | 1,363 | 0 | 9 | 239 | 277 | 160 | 117 | 19 | 0 |
-- This module provides the familiar state effect.
module Control.Effects.State where
import Control.Effects.Eff
import Control.Monad
-- |The functor representing the effect. You shouldn't need
-- to create this manually, just use `get`, `put` or `state`.
data State s a = SGet (s -> a)
| SPut s a
... | edofic/effect-handlers | src/Control/Effects/State.hs | mit | 1,155 | 0 | 10 | 278 | 441 | 231 | 210 | -1 | -1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
module Web.App.Tenants
( tenantsR
, addTenantsR
, tenantSplices
, tenantFormSplice
... | katychuang/raw-pixels | src/Web/App/Tenants.hs | gpl-2.0 | 7,006 | 4 | 16 | 1,690 | 1,531 | 820 | 711 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Database.Design.Ampersand.Input.ADL1.FilePos (
FilePos(..), Origin(..), Traced(..),
addPos, initPos, updatePos
) where
import Database.Design.Ampersand.Basics
import Data.Typeable
import GHC.Generics (Generic)
import Data.Hashable
import... | 4ZP6Capstone2015/ampersand | src/Database/Design/Ampersand/Input/ADL1/FilePos.hs | gpl-3.0 | 3,022 | 0 | 12 | 800 | 892 | 482 | 410 | 70 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TypeFamilies #-}
module DB.AcidStateBackend ( insertUserQ
, insertSessTokenQ
, verifySessTokenQ
, checkUserExistsQ
, getPassHashQ... | MortimerMcMire315/sparkive | src/DB/AcidStateBackend.hs | gpl-3.0 | 4,892 | 0 | 13 | 1,652 | 1,371 | 710 | 661 | 104 | 2 |
module FrSIRSNetwork.Run (
runFrSIRSNetworkWithRendering,
runFrSIRSNetworkStepsAndRender,
runFrSIRSNetworkStepsAndWriteToFile,
runFrSIRSNetworkReplicationsAndWriteToFile
) where
import FRP.Yampa
import FrSIRSNetwork.Init
import FrSIRSNetwork.Model
import FrSIRSNetwork.Renderer
import Utils.Sir
im... | thalerjonathan/phd | coding/libraries/chimera/examples/ABS/SIRExamples/FrSIRSNetwork/Run.hs | gpl-3.0 | 5,107 | 0 | 18 | 1,389 | 912 | 482 | 430 | 95 | 1 |
module B where
import C
b :: Int
b = c + 3
data Foo = Bar { fooBar :: Int }
quux :: Foo
quux = Bar b
flooble :: Int -> Int
flooble foo = foo + (foo * (foo - foo))
erpt :: Int
erpt = fooBar quux
| ktvoelker/hjc | example/B.hs | gpl-3.0 | 202 | 0 | 9 | 59 | 97 | 55 | 42 | 11 | 1 |
-- * CHAPTER 7. Circular Traversals using Attribute Grammars
-- ** GHC Options
{-# LANGUAGE
ExistentialQuantification
, TypeOperators
, NoMonomorphismRestriction
, Arrows
, MultiParamTypeClasses -- class Fix
, FunctionalDependencies
, FlexibleInstances
, DeriveFunctor
, FlexibleCont... | balez/thesis | programs/Circular_7_1.hs | gpl-3.0 | 6,137 | 1 | 12 | 1,714 | 2,316 | 1,278 | 1,038 | 110 | 4 |
-- Parse module.
-- By Gregory W. Schwartz
--
{- | Collection of functions for the parsing of a fasta file. Uses the lazy Text
type.
-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module Data.Fasta.Text.Lazy.Parse ( parsecFasta
, parsecCLIPFasta
... | GregorySchwartz/fasta | src/Data/Fasta/Text/Lazy/Parse.hs | gpl-3.0 | 6,419 | 0 | 14 | 2,007 | 1,903 | 1,021 | 882 | 144 | 2 |
module Helium.Utils.Texts where
import Data.Maybe
data Language = English | Dutch deriving Eq
language :: Language
language = English
data Arrow a b = a :-> b
infix 0 :->
select :: Language -> [Arrow Language msg] -> msg
select lan table = fromMaybe (error "Texts.select: unknown language") $
let convert (a :-... | Helium4Haskell/helium | src/Helium/Utils/Texts.hs | gpl-3.0 | 12,428 | 0 | 12 | 3,210 | 2,344 | 1,282 | 1,062 | 270 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-blogger/gen/Network/Google/Resource/Blogger/Pages/Get.hs | mpl-2.0 | 4,729 | 0 | 19 | 1,232 | 857 | 496 | 361 | 119 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Firewalls/Get.hs | mpl-2.0 | 3,132 | 0 | 15 | 757 | 391 | 235 | 156 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Projects/Locations/Buckets/Views/Patch.hs | mpl-2.0 | 6,690 | 0 | 17 | 1,380 | 870 | 511 | 359 | 128 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/CheckDataAccess.hs | mpl-2.0 | 7,006 | 0 | 16 | 1,364 | 783 | 459 | 324 | 126 | 1 |
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
-- |Connects and parses Bitstamp exchange feed
module Market.Bitstamp (bitstamp) where
import Control.Applicative
import Control.Monad
import Control.Concurrent.STM.TChan
import Data.Text (Text)
import Data.Aeson
import Data.Aeson.Types
import Data.Scientific (Scient... | koodilehto/kryptoradio | data_sources/exchange/Market/Bitstamp.hs | agpl-3.0 | 1,762 | 0 | 14 | 336 | 457 | 245 | 212 | 32 | 4 |
module RegExpParser
( RegExp(..)
, parseRegExp
) where
--
import Data.Char
import Data.List
import Data.List.Split (splitOn)
import Data.Maybe
import Control.Monad
import Control.Applicative -- hiding (many, some)
data RegExp = Normal Char -- ^ A character that is not in "()*|."
... | ice1000/OI-codes | codewars/301-400/regular-expression-parser.hs | agpl-3.0 | 3,251 | 0 | 13 | 937 | 1,375 | 715 | 660 | 98 | 6 |
module Text.ParserCombinators.Poly.Result
( -- * The parsing result type
Result(..) -- A parsing result type, with Success, Failure, and Commitment.
, resultToEither
) where
-- | A return type like Either, that distinguishes not only between
-- right and wrong answers, but also has commitment, so that a f... | Kludgy/polyparse-fork | src/Text/ParserCombinators/Poly/Result.hs | lgpl-2.1 | 1,141 | 0 | 8 | 258 | 247 | 134 | 113 | 15 | 1 |
{-|
Module : WxSuite
Description : Графическая система отображения и взаимодействия с пользователем
License : LGPLv3
-}
module WxSuite( createWxDrawing
, createWxPlayer ) where
import WxSuite.Internal
| cmc-haskell-2015/checkers | src/WxSuite.hs | lgpl-3.0 | 283 | 0 | 4 | 50 | 18 | 12 | 6 | 3 | 0 |
module Statsd
(
-- * Types
StatsdT
, Statsd
, Bucket
, SamplePct
-- * StatsD API
, runStatsd
, statsdCounter
, statsdSampledCounter
, statsdTimer
, statsdGauge
, statsdGaugePlus
, statsdGaugeMinus
, statsdSet
) where
import Control.Exception
... | mitchellwrosen/statsd-haskell | src/Statsd.hs | lgpl-3.0 | 4,661 | 0 | 14 | 1,234 | 1,045 | 562 | 483 | -1 | -1 |
import Data.Vector.Unboxed hiding ((++), map)
import qualified Data.ByteString as BS
import Data.Bits
import Data.Char
data CpuState = CpuState {
_registers :: Vector Int,
_programCounter :: Int,
_memory :: Vector Int,
_stack :: [Int],
_halted :: Bool,
_nextInput :: Char }
instance S... | flashcurd/HaskellVirtualMachine | src/Main.hs | lgpl-3.0 | 13,288 | 19 | 20 | 5,917 | 4,077 | 2,011 | 2,066 | 246 | 5 |
module TableDifferences.A333880 (a333880) where
import Helpers.TableDifferences (differenceCount)
powerTable :: [[Int]]
powerTable = map (\k -> map (^k) [0..]) [2..]
a333880 :: Int -> Int
a333880 n = sum $ map (differenceCount n) table where
table = takeWhile (\r -> r !! 2 <= n + 1) powerTable
| peterokagey/haskellOEIS | src/TableDifferences/A333880.hs | apache-2.0 | 299 | 0 | 12 | 51 | 129 | 72 | 57 | 7 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Finance.Hqfl.Instrument.Futures
-- Copyright : (C) 2016 Mika'il Khan
-- License : (see the file LICENSE)
-- Maintainer : Mika'il Khan <co.kleisli@gmail.com>
-- Stability : stable
-- Portability : portable
... | cokleisli/hqfl | src/Finance/Hqfl/Instrument/Future.hs | apache-2.0 | 529 | 0 | 6 | 75 | 41 | 30 | 11 | 3 | 0 |
{-# LANGUAGE TypeFamilies #-}
module Revelation.Rect (
Rect (..)
, unsafeCreateRect, createRect
, cloneRect
, topLeft, bottomRight, width, height
, contains
) where
import Revelation.Core
import Revelation.Point
import OpenCV
import Foreign
import Foreign.C
import System.IO.Unsafe
import Control.Applicative
data ... | arjuncomar/revelation | Revelation/Rect.hs | bsd-3-clause | 1,323 | 0 | 10 | 205 | 416 | 220 | 196 | 31 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Cataskell.Server.MainSpec (main, spec) where
import Test.Hspec
import Test.Hspec.Snap
import Snap (route)
import Cataskell.Server.Main (app, staticFiles)
main :: IO ()
main = hspec spec
spec :: Spec
spec = snap (route [("/", staticFiles)]) app $ do
describe "GET /" $
... | corajr/cataskell | test-server/Cataskell/Server/MainSpec.hs | bsd-3-clause | 593 | 0 | 11 | 138 | 173 | 90 | 83 | 19 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Matrix.Class.MMatrixBase
-- Copyright : Copyright (c) , Patrick Perry <patperry@stanford.edu>
-- License : BSD3
-- Maintainer... | patperry/hs-linear-algebra | lib/Data/Matrix/Class/MMatrixBase.hs | bsd-3-clause | 7,214 | 0 | 12 | 1,665 | 2,282 | 1,166 | 1,116 | 149 | 1 |
import Control.Applicative
import Control.Concurrent.Actor
import Control.Monad
import System.Environment
main :: IO ()
main = do
(n : t : _) <- map read <$> getArgs
wait master (n, t)
master :: Behavior (Int, Int) ()
master (n, t) = do
self <- getSelf
nodeIds <- replicateM (n - 1) $ create node ()
rootId <... | amutake/simple-actor | examples/ring.hs | bsd-3-clause | 974 | 0 | 11 | 273 | 477 | 230 | 247 | 40 | 2 |
{-# LANGUAGE GADTs #-}
module Llvm.Asm.Data.Module
( module Llvm.Asm.Data.Module
, module Llvm.Asm.Data.SimpleConst
, module Llvm.Asm.Data.AtomicEntity
, module Llvm.Asm.Data.Type
, module Llvm.Asm.Data.DataLayout
) where
import Llvm.Asm.Data.SimpleConst
import Llvm.Asm.Data.A... | sanjoy/hLLVM | src/Llvm/Asm/Data/Module.hs | bsd-3-clause | 15,634 | 0 | 15 | 4,633 | 4,045 | 2,278 | 1,767 | 264 | 2 |
{-# LANGUAGE QuasiQuotes #-}
module Atomo.Kernel.Continuation where
import Data.IORef
import Atomo
load :: VM ()
load = do
[p|current-continuation|] =:::
[e|{ cc | cc } call/cc|]
-- call/cc actually makes an object delegating to Continuation
-- so just add the show definiton here
[p|Continu... | vito/atomo | src/Atomo/Kernel/Continuation.hs | bsd-3-clause | 2,351 | 0 | 19 | 771 | 811 | 420 | 391 | -1 | -1 |
{-# LANGUAGE CPP, RecordWildCards #-}
-- |
-- Package configuration information: essentially the interface to Cabal, with
-- some utilities
--
-- (c) The University of Glasgow, 2004
--
module PackageConfig (
-- $package_naming
-- * UnitId
packageConfigId,
-- * The PackageConfig type: ... | gridaphobe/ghc | compiler/main/PackageConfig.hs | bsd-3-clause | 6,090 | 0 | 12 | 1,383 | 1,210 | 635 | 575 | 97 | 3 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
module Data.Net.FullyConnected where
import Control.Applicative
import Data.Net
import Data.Vector.Fixed.Linear
import Data.Vector.Fixed
import Data.Vector.Fixed.Size (Known)
import Data.Profunctor
import Data.Functor.Identity
import Data.Foldable
import... | Apsod/fixed | Data/Net/FullyConnected.hs | bsd-3-clause | 2,163 | 0 | 11 | 606 | 860 | 450 | 410 | 42 | 1 |
module Module3.Task15 where
import Prelude hiding (repeat)
repeat = iterate repeatHelper
repeatHelper = id
| dstarcev/stepic-haskell | src/Module3/Task15.hs | bsd-3-clause | 109 | 0 | 5 | 16 | 28 | 17 | 11 | 4 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Types whe... | yemi/fabian-blog | server/Types.hs | bsd-3-clause | 4,272 | 0 | 14 | 1,601 | 1,087 | 611 | 476 | 113 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Either.Combinators
-- Copyright : (c) 2010-2014 Gregory Crosswhite, Chris Done, Edward Kmett
-- License : BSD-style
--
-- Maintainer : ekmett@gmail.com
-- Stability : provisional
-- Portability : port... | phaazon/either | src/Data/Either/Combinators.hs | bsd-3-clause | 6,495 | 0 | 11 | 1,303 | 1,028 | 631 | 397 | 56 | 1 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE FlexibleContexts,FlexibleInstances
,MultiParamTypeClasses,TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
module Exp where
import QuickWeave.Runtime.Constructable
import Prelude hiding ((++))
import Data.List (intercalate)
import qualified Data.List as DL ((++))
data... | shayan-najd/QuickWeave | Examples/Experimental_Constructable/Exp.hs | bsd-3-clause | 2,315 | 0 | 11 | 741 | 885 | 464 | 421 | 60 | 0 |
module Geometry
( sphereVolume
, sphereArea
, cubeVolume
, cubeArea
, cuboidArea
, cuboidVolume
) where
sphereVolume :: Float -> Float
sphereVolume radius = (4.0 / 3.0) * pi * (radius ^ 3)
sphereArea :: Float -> Float
sphereArea radius = 4 * pi * (radius ^ 2)
cubeVolume :: Float -> Float
cubeVolume side = cuboidVolu... | jamesyang124/haskell-playground | src/Geometry.hs | bsd-3-clause | 708 | 0 | 10 | 145 | 272 | 142 | 130 | 21 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Java ( module X ) where
import Java.Array as X
import Java.Core as X
import Java.Primitive as X
import Java.String as X
import Java.Utils as X
| alexander-at-github/eta | libraries/base/Java.hs | bsd-3-clause | 202 | 0 | 4 | 48 | 46 | 33 | 13 | 7 | 0 |
{-# LANGUAGE TemplateHaskell #-}
-- | see Debug.FileLocation module for more definitions
module FileLocation
( err, err', undef, fromJst, fromRht, indx, indxShow
, debug, debugM, debugMsg, debugMsgIf, dbg, dbgMsg, trc, ltrace, ltraceM, strace
, locationToString
, thrwIO, thrwsIO
, reThrow
)
where
import ... | gregwebs/FileLocation.hs | FileLocation.hs | bsd-3-clause | 2,864 | 0 | 12 | 621 | 582 | 337 | 245 | 59 | 2 |
-- Copyright © 2013 Cameron White
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
-- 1. Redistributions of source code must retain the above copyright
-- notice, this list of condition... | cameronbwhite/ComputationalStructures | Haskell/Converters.hs | bsd-3-clause | 2,620 | 0 | 14 | 518 | 452 | 249 | 203 | 25 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : BitBoard
-- Copyright : (c) 2014 Jeffrey Rosenbluth
-- Maintainer : jeffrey.rosenbluth@gmail.com
--
-- References : https://chessprogramming.wikispaces.com/Flipping+Mirroring+and+Rotating#FlipabouttheDiagonal
-- ... | jeffreyrosenbluth/Othello | src/BitBoard.hs | bsd-3-clause | 10,491 | 0 | 24 | 2,546 | 3,600 | 2,006 | 1,594 | 221 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Chris Done's style.
--
-- Documented here: <https://github.com/chrisdone/haskell-style-guide>
module HIndent.Styles.ChrisDone where
import HIndent.Pretty
import HIndent.Comments
import HIndent.Types
import Control.Monad
import Control.Monad.L... | gittywithexcitement/hindent | src/HIndent/Styles/ChrisDone.hs | bsd-3-clause | 15,322 | 0 | 24 | 5,711 | 4,053 | 2,006 | 2,047 | 381 | 9 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE FlexibleContexts #-}
module Elm.Utils
( (|>), (<|)
, getAsset
, run, unwrappedRun
, CommandError(..)
, isDeclaration
) where
import Control.Monad.Except (MonadError, MonadIO, liftIO, throwError)
import qualified Data.List as List
import System.Directory (d... | MaxGabriel/elm-compiler | src/Elm/Utils.hs | bsd-3-clause | 4,436 | 0 | 16 | 1,122 | 984 | 533 | 451 | 101 | 3 |
{--
--- Day 5: Doesn't He Have Intern-Elves For This? ---
Santa needs help figuring out which strings in his text file are naughty or nice.
A nice string is one with all of the following properties:
It contains at least three vowels (aeiou only), like aei, xazegov, or aeiouaeiouaeiou.
It contains at least on... | hlmerscher/advent-of-code-2015 | src/Day5.hs | bsd-3-clause | 4,688 | 0 | 13 | 1,439 | 712 | 377 | 335 | 56 | 3 |
{-# LANGUAGE OverloadedStrings, DoAndIfThenElse, TemplateHaskell, QuasiQuotes #-}
-- CSS selector for Text.XML (xml-conduit) library.
--
--
-- Examples
-- doc <- H.readFile "input.html"
-- let c = fromDocument c
-- c $| query
-- c $| query "meta[name='dc.Creator']" >=> attribute "content"
-- |This module has query f... | nebuta/dom-selector | Text/XML/Selector.hs | bsd-3-clause | 7,056 | 0 | 14 | 1,550 | 2,087 | 1,083 | 1,004 | 121 | 8 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
module Pos.Chain.Ssc.Behavior
( SscBehavior (..)
, SscOpeningParams (..)
, SscSharesParams (..)
) where
import Universum
import qualified Data.Aeson as A
import Data.Aeson.Options (defaultOptions)
import ... | input-output-hk/pos-haskell-prototype | chain/src/Pos/Chain/Ssc/Behavior.hs | mit | 3,371 | 0 | 14 | 796 | 421 | 244 | 177 | 51 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-| Implementation of the opcodes.
-}
{-
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 Software Foundation; either version 2 o... | sarahn/ganeti | src/Ganeti/OpCodes.hs | gpl-2.0 | 16,963 | 0 | 10 | 4,447 | 3,525 | 2,095 | 1,430 | 547 | 2 |
{-|
A reader for the timeclock file format generated by timeclock.el
(<http://www.emacswiki.org/emacs/TimeClock>). Example:
@
i 2007\/03\/10 12:26:00 hledger
o 2007\/03\/10 17:26:02
@
From timeclock.el 2.6:
@
A timeclock contains data in the form of a single entry per line.
Each entry has the form:
CODE YYYY/MM/... | ony/hledger | hledger-lib/Hledger/Read/TimeclockReader.hs | gpl-3.0 | 4,355 | 0 | 18 | 1,144 | 545 | 298 | 247 | 47 | 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="hr-HR">
<title>SOAP Scanner | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapre... | veggiespam/zap-extensions | addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_hr_HR/helpset_hr_HR.hs | apache-2.0 | 974 | 80 | 66 | 160 | 415 | 210 | 205 | -1 | -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="bs-BA">
<title>Python Scripting</title>
<maps>
<homeID>top</homeID>
<mapref location="... | veggiespam/zap-extensions | addOns/jython/src/main/javahelp/org/zaproxy/zap/extension/jython/resources/help_bs_BA/helpset_bs_BA.hs | apache-2.0 | 962 | 79 | 66 | 157 | 415 | 209 | 206 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( getApplicationDev
, appMain
, develMain
, makeFoundation
-- * for DevelMain
, getApplicationRepl
, shutdownApp
-- * for GHCI
, handler
, db
) where
import Control.Monad.Logger (liftLoc, runLoggingT)
i... | HaskellForCats/HaskellForCats | WarpFunctorOne/YesWarpOne00/Application.hs | mit | 6,796 | 0 | 16 | 1,761 | 1,012 | 542 | 470 | -1 | -1 |
{-# LANGUAGE CPP, GADTs, NondecreasingIndentation #-}
-- The default iteration limit is a bit too low for the definitions
-- in this module.
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}
#endif
-----------------------------------------------------------------------------
--
-- G... | tjakway/ghcjvm | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | 117,682 | 14 | 23 | 38,979 | 30,737 | 15,156 | 15,581 | -1 | -1 |
{-# LANGUAGE Arrows #-}
module CmdFail005 where
f = proc x -> x@(_ -< _)
| sdiehl/ghc | testsuite/tests/parser/should_fail/cmdFail005.hs | bsd-3-clause | 74 | 1 | 8 | 16 | 28 | 16 | 12 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Typecheck arrow notation
-}
{-# LANGUAGE RankNTypes, TupleSections #-}
module TcArrows ( tcProc ) where
import {-# SOURCE #-} TcExpr( tcMonoExpr, tcInferRho, tcSyntaxOp, tcCheckId, tcPolyExpr )
import HsSyn
import TcM... | oldmanmike/ghc | compiler/typecheck/TcArrows.hs | bsd-3-clause | 16,443 | 0 | 18 | 5,337 | 3,533 | 1,868 | 1,665 | 216 | 2 |
-- | /Since: 4.7.0.0/
module GHC.Profiling where
foreign import ccall startProfTimer :: IO ()
foreign import ccall stopProfTimer :: IO ()
| spacekitteh/smcghc | libraries/base/GHC/Profiling.hs | bsd-3-clause | 139 | 0 | 7 | 22 | 37 | 21 | 16 | 3 | 0 |
{-# LANGUAGE ForeignFunctionInterface #-}
{-# OPTIONS_GHC -fwarn-unused-imports #-}
-- Trac #1386
-- We do not want a warning about unused imports
module Foo () where
import Control.Monad (liftM)
foo :: IO ()
foo = id `liftM` return ()
foreign export ccall "hs_foo" foo :: IO ()
| wxwxwwxxx/ghc | testsuite/tests/rename/should_compile/rn058.hs | bsd-3-clause | 284 | 0 | 7 | 51 | 64 | 38 | 26 | 7 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Futhark.Analysis.ScalExpTests
( tests
, parseScalExp
, parseScalExp'
)
where
import Test.Framework
import Control.Applicative
import Control.Monad.Identity
import qualified Data.Map as M
imp... | ihc/futhark | unittests/Futhark/Analysis/ScalExpTests.hs | isc | 4,773 | 0 | 19 | 1,480 | 1,557 | 814 | 743 | 103 | 2 |
module Tamien.TI.Eval where
import Tamien.Core
import qualified Tamien.Heap as H
import Tamien.Heap (Addr, Heap)
import Data.List (foldl', mapAccumL)
import Data.Maybe (fromMaybe)
import Text.PrettyPrint
data TiState = TiState
{ tiStack :: TiStack
, tiDump :: TiDump
, tiHeap :: TiHeap
, tiGlo... | cpettitt/tamien | Tamien/TI/Eval.hs | mit | 13,151 | 0 | 14 | 4,076 | 4,739 | 2,458 | 2,281 | 292 | 5 |
module GameController (spawnControlThread) where
import App.Prelude as P
--import qualified Control.Concurrent as Conc
import qualified Log
import Types
import Control.Concurrent.Structured
spawnControlThread :: Server -> Group -> Concurrent ()
spawnControlThread srv@Server{..} gr@Group{... | ruicc/chat-server | src/GameController.hs | mit | 1,420 | 0 | 23 | 474 | 390 | 186 | 204 | -1 | -1 |
-- GENERATED by C->Haskell Compiler, version 0.16.4 Crystal Seed, 24 Jan 2009 (Haskell)
-- Edit the ORIGNAL .chs file instead!
{-# LINE 1 "Entity.chs" #-}{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# context lib="hyd" #-}
module Hyd.Entity where
import Foreign
import Foreign.... | Smilex/hyd_engine | bindings/haskell/Hyd/Entity.hs | mit | 1,634 | 65 | 13 | 304 | 579 | 326 | 253 | -1 | -1 |
module Main where
import Control.Monad.Except
import Lib
import Network.AWS as AWS
import Options.Applicative as Opts
romeVersion :: String
romeVersion = "0.9.0.18"
-- Main
main :: IO ()
main = do
let opts = info (Opts.helper <*> Opts.flag' Nothing (Opts.long ... | r-peck/Rome | app/Main.hs | mit | 825 | 0 | 20 | 240 | 235 | 116 | 119 | 21 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Scheme.Config where
import qualified Data.Set as Set
import Data.Text
import Data.Set (Set)
globalNamespace :: Set Text
globalNamespace = Set.fromList ["-", "+", "*", "/"]
| AKST/scheme.llvm | src/Scheme/Config.hs | mit | 223 | 0 | 6 | 37 | 60 | 37 | 23 | 7 | 1 |
-- |
-- Module: Math.NumberTheory.Primes.Sieve.Eratosthenes
-- Copyright: (c) 2011 Daniel Fischer
-- Licence: MIT
-- Maintainer: Daniel Fischer <daniel.is.fischer@googlemail.com>
-- Stability: Provisional
-- Portability: Non-portable (GHC extensions)
--
-- Sieve
--
{-# LANGUAGE CPP, BangPatterns, Flexible... | cfredric/arithmoi | Math/NumberTheory/Primes/Sieve/Eratosthenes.hs | mit | 17,481 | 0 | 34 | 6,552 | 5,413 | 2,712 | 2,701 | 349 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
#if MIN_VERSION_base(4,6,0) && !MIN_VERSION_base(4,7,0)
-- Control.Concurrent.QSem is deprecated in base-4.6.0.*
{-# OPTIONS_GHC -fno-warn-deprecations #-}
#endif
module Test.Hspec.Core.RunnerSpec (spec) where
import Pr... | hspec/hspec | hspec-core/test/Test/Hspec/Core/RunnerSpec.hs | mit | 23,270 | 1 | 90 | 7,704 | 6,542 | 3,142 | 3,400 | 543 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Blaze.React.Examples.RoutingTest
( app
) where
import Blaze.React
import qualified Data.Text as T
import Data.Void
import qualified Text.Blaze.Event ... | LumiGuide/blaze-react | src/Blaze/React/Examples/RoutingTest.hs | mit | 1,752 | 0 | 12 | 473 | 333 | 189 | 144 | 37 | 2 |
module Core.Atomize (atomize) where
import Core
import Core.Helper
import Weight
import Debug.Trace (trace)
import Type
{-
- This module converts all expressions in case expressions and function applications
- to atomic expressions (Variables)
-}
atomize :: [Function] -> CompilerM [Function]
atomize = functionApp... | C-Elegans/linear | Core/Atomize.hs | mit | 1,508 | 0 | 15 | 372 | 542 | 267 | 275 | 36 | 2 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Main where
import System.FilePath
import Web.Spock
import Web.Spock.Config
import System.Directory
import Control.Monad.Trans
import Data.Semigroup
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Data.Time.Clock.POSIX
type MySes... | Javran/misc | kc3kai-db-export/storer/src/Main.hs | mit | 1,535 | 0 | 18 | 406 | 464 | 230 | 234 | 42 | 1 |
module Network.UDP.HolePunch where
{-
P2P hole punching strategy as implemented by
chownat http://samy.pl/chownat/
-}
{-
get a udp connenction flowing
-}
import Network.Socket
import System.Posix.Directory
import System.Posix.Files
import System.Posix.IO
import System.Posix.Process
import System.Exit
import System.... | danoctavian/chownat | src/Network/UDP/HolePunch.hs | mit | 3,909 | 0 | 16 | 1,019 | 1,054 | 523 | 531 | 91 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, BangPatterns #-}
--------------------------------------------------------------------------------
-- 3x3 and 4x4 matrices
--------------------------------------------------------------------------------
module HCraft.Math.Matrix where
import HCraft.Math.Vector
in... | nandor/hcraft | HCraft/Math/Matrix.hs | mit | 8,524 | 0 | 22 | 3,207 | 4,342 | 2,245 | 2,097 | 184 | 1 |
-- Decimal to Factorial and Back
-- http://www.codewars.com/kata/54e320dcebe1e583250008fd/
module Codewars.Kata.Dec2Fact where
import Data.List (unfoldr)
import Data.Maybe(fromJust)
dec2FactString :: Integer -> String
dec2FactString n = reverse . unfoldr f $ (n, 1)
where ns = ['0'..'9'] ++ ['A'..'Z']
... | gafiatulin/codewars | src/5 kyu/Dec2Fact.hs | mit | 673 | 0 | 14 | 165 | 270 | 149 | 121 | 12 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.