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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-#LANGUAGE DeriveDataTypeable#-}
module Data.P440.Domain.ComplexTypesZS where
import Data.P440.Domain.SimpleTypes
import Data.P440.Domain.ComplexTypes
import Data.Typeable (Typeable)
import Data.Text (Text)
-- Сложные типы, используемые в запросах пп. 2.4-2.6
-- TODO: Проверить соответстиве форматам
-- Используе... | Macil-dev/440P-old | src/Data/P440/Domain/ComplexTypesZS.hs | unlicense | 1,115 | 18 | 7 | 328 | 353 | 193 | 160 | 18 | 0 |
module OperationExtension3 where
import ColonT
import DataBase
import DataExtension
-- Showing types concisely
instance ShowType Lit
where
t _ = "Exp"
instance (Exp x, Exp y) => ShowType (Add x y)
where
t _ = "Exp"
instance Exp x => ShowType (Neg x)
where
t _ = "Exp"
| egaburov/funstuff | Haskell/tytag/xproblem_src/samples/expressions/Haskell/OpenDatatype2/OperationExtension3.hs | apache-2.0 | 283 | 0 | 7 | 63 | 98 | 52 | 46 | 10 | 0 |
module Tokenizer
( Token(..)
, isScopeEnd
, isLambda
, tokenize
) where
import Data.Char (isSpace)
data Token = Equals
| ScopeBegin
| ScopeEnd
| Lambda
| Number Double
| Identifier String
deriving (Show)
isIdentifierChar :: Char -> Bool
isIdentifier... | shockkolate/shockklang2 | Tokenizer.hs | apache-2.0 | 1,264 | 0 | 11 | 322 | 476 | 250 | 226 | 43 | 4 |
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module QuickCheckUtils (NonEmptyText(..), LatinSpoofableText(..),
NonSpoofableText(..)) where
import Control.Applicative ((<$>))
import Control.DeepSeq (NFData(..))
import Data.Text.ICU (Collator, LocaleName(..), Normalization... | bos/text-icu | tests/QuickCheckUtils.hs | bsd-2-clause | 2,049 | 0 | 14 | 354 | 465 | 272 | 193 | 47 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module NLP.MorfNCP.Show
( showSent
, showData
) where
import qualified Data.Text as T
import qualified Data.Text.Lazy as L
import qualified Data.Text.Lazy.Builder as L
import Data.List (intersperse)
import Text.Printf (printf)
... | kawu/morf-nkjp | src/NLP/MorfNCP/Show.hs | bsd-2-clause | 1,177 | 0 | 13 | 285 | 355 | 199 | 156 | 37 | 2 |
{-# LANGUAGE FlexibleContexts, StandaloneDeriving #-}
{- |
Module : Text.Paraphrase.Chaining
Description : Implementation of chaining combinators
Copyright : (c) Ivan Lazar Miljenovic
License : 3-Clause BSD-style
Maintainer : Ivan.Miljenovic@gmail.com
-}
module Text.Paraphrase.Chaining w... | ivan-m/paraphrase | src/Text/Paraphrase/Chaining.hs | bsd-3-clause | 4,260 | 0 | 15 | 1,202 | 842 | 447 | 395 | 57 | 1 |
{-# LANGUAGE PostfixOperators #-}
{-# OPTIONS_HADDOCK hide #-}
module ForSyDe.Atom.MoC.DE.Interface where
import ForSyDe.Atom.MoC.DE.Lib (sync2, sync3, sync4)
import ForSyDe.Atom.MoC.Stream (Stream(..))
import qualified ForSyDe.Atom.Skel.Vector as V (
Vector, vector, zipx, unzipx, fanout, length... | forsyde/forsyde-atom | src/ForSyDe/Atom/MoC/DE/Interface.hs | bsd-3-clause | 6,606 | 0 | 12 | 1,287 | 1,916 | 1,064 | 852 | 72 | 1 |
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving #-}
module Development.Shake.Util(
Lock, newLock, withLock, withLockTry,
Var, newVar, readVar, modifyVar, modifyVar_, withVar,
Barrier, newBarrier, signalBarrier, waitBarrier,
Duration, duration, Time, offsetTime, sleep,
modifyIORef'', writeIORe... | nh2/shake | Development/Shake/Util.hs | bsd-3-clause | 4,621 | 0 | 15 | 931 | 1,446 | 770 | 676 | 102 | 2 |
{- Data/Metrology/Internal.hs
The units Package
Copyright (c) 2013 Richard Eisenberg
rae@cs.brynmawr.edu
This file gathers and exports user-visible type-level definitions, to
make error messages less cluttered. Non-expert users should never have
to use the definitions exported from this module.
-}
... | goldfirere/units | units/Data/Metrology/Internal.hs | bsd-3-clause | 1,652 | 0 | 5 | 252 | 130 | 95 | 35 | 16 | 0 |
{-# LANGUAGE UndecidableInstances , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , GeneralizedNewtypeDeriving, TypeOperators, ScopedTypeVariables, CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Monoid.Reducer
-- Copyright : (c) Edwar... | ekmett/monoids | Data/Monoid/Reducer.hs | bsd-3-clause | 5,966 | 0 | 10 | 1,329 | 1,709 | 971 | 738 | 66 | 1 |
-- -----------------------------------------------------------------------------
--
-- (c) The University of Glasgow, 2005
--
-- The GHC API
--
-- -----------------------------------------------------------------------------
{-# OPTIONS -fno-warn-tabs #-}
-- The above warning supression flag is a temporary kludge.
-- ... | ilyasergey/GHC-XAppFix | compiler/main/GHC.hs | bsd-3-clause | 47,949 | 593 | 33 | 11,792 | 9,213 | 5,081 | 4,132 | -1 | -1 |
module Tests.Parsing.GeneralSpec
( spec
) where
import Test.Hspec
import Test.QuickCheck
import Tests.Common (assertFa)
import Parsing.General
import Types.Fa as Fa
spec :: Spec
spec = do
describe "FA" $ do
it "is parsed from 0.txt" $ do
canParseFa "0.txt"
it "has correct state count in oneStat... | jakubriha/automata | tests/Tests/Parsing/GeneralSpec.hs | bsd-3-clause | 704 | 0 | 17 | 158 | 213 | 109 | 104 | 21 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import CmdLine (Options(..), getOptions)
import qualified Haskus.Arch.X86_64.ISA.Insn as X86
import... | hsyl20/ViperVM | haskus-system-tools/src/system-info/Main.hs | bsd-3-clause | 13,087 | 0 | 28 | 4,281 | 4,243 | 2,089 | 2,154 | 324 | 25 |
{-# LANGUAGE OverloadedStrings, LambdaCase, ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell, FlexibleContexts #-}
import qualified Network.Wai as Wai
import qualified Network.Wai.Handler.Warp as Warp
import qualified Network.HTTP.Types as HTTP
import qualified Network.HTTP.Conduit as HC
import qualified Network.... | philopon/lwml-preview | main.hs | bsd-3-clause | 9,355 | 5 | 27 | 2,431 | 2,995 | 1,553 | 1,442 | 166 | 5 |
{-# LANGUAGE CPP, RecordWildCards #-}
-- |
-- Package configuration information: essentially the interface to Cabal, with
-- some utilities
--
-- (c) The University of Glasgow, 2004
--
module PackageConfig (
-- $package_naming
-- * PackageKey
packageConfigId,
-- * The PackageConfig ty... | spacekitteh/smcghc | compiler/main/PackageConfig.hs | bsd-3-clause | 5,340 | 0 | 11 | 1,242 | 1,008 | 534 | 474 | 83 | 1 |
import System.Environment (getArgs)
import Data.List (intercalate)
prime :: [Int] -> Int -> Bool
prime _ 2 = True
prime xs n | x*x > n = True
| mod n x == 0 = False
| otherwise = prime (tail xs) n
where x = head xs
primesTo :: [Int] -> Int -> Int -> [Int]
primesTo x... | nikai3d/ce-challenges | moderate/prime_less.hs | bsd-3-clause | 704 | 1 | 14 | 273 | 341 | 165 | 176 | 18 | 1 |
{-# LANGUAGE CPP #-}
module TcCanonical(
canonicalize,
unifyDerived,
makeSuperClasses, mkGivensWithSuperClasses,
StopOrContinue(..), stopWith, continueWith
) where
#include "HsVersions.h"
import TcRnTypes
import TcType
import Type
import TcFlatten
import TcSMonad
import TcEvidence
import Class
... | nushio3/ghc | compiler/typecheck/TcCanonical.hs | bsd-3-clause | 80,858 | 188 | 30 | 22,800 | 9,498 | 5,231 | 4,267 | -1 | -1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Network.XmlRpc.Internals
-- Copyright : (c) Bjorn Bringert 2003
-- License : BSD-style
--
-- Maintainer : bjorn@bringert.net
-- Stability : experimental
-- Portability : non-portable (... | xkollar/haxr | Network/XmlRpc/Internals.hs | bsd-3-clause | 20,895 | 446 | 34 | 4,682 | 6,014 | 3,281 | 2,733 | 391 | 12 |
{-# LANGUAGE CPP #-}
-- We cannot actually specify all the language pragmas, see ghc ticket #
-- If we could, these are what they would be:
{- LANGUAGE MagicHash -}
-- |
-- Module : Data.ByteString.Unsafe
-- License : BSD-style
-- Maintainer : dons@cse.unsw.edu.au, duncan@haskell.org
-- Stability : experim... | markflorisson/hpack | testrepo/bytestring-0.9.1.9/Data/ByteString/Unsafe.hs | bsd-3-clause | 12,600 | 0 | 12 | 2,444 | 1,373 | 807 | 566 | 54 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Bluetooth.TypesSpec (spec) where
import Data.Maybe (fromJust)
import Data.Proxy (Proxy (Proxy))
import Data.Tuple (swap)
import Data.Void (Void)
import DBus
import Lens.Micro
import Test.Hspec
import Test.QuickChe... | plow-technologies/ble | test/Bluetooth/TypesSpec.hs | bsd-3-clause | 3,427 | 3 | 28 | 758 | 959 | 493 | 466 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
-- © 2001 Peter Thiemann
module WASH.HTML.HTMLPrelude
(module WASH.HTML.HTMLPrelude,module WASH.HTML.HTMLTypedBase)
where
import Prelude hiding (div,head,map,span)
import WASH.HTML.HTMLTypedBase
-- identity function
empty x = x
-- reve... | nh2/WashNGo | WASH/HTML/HTMLPrelude.hs | bsd-3-clause | 147,530 | 0 | 8 | 22,241 | 49,315 | 22,591 | 26,724 | 5,202 | 1 |
{-# LANGUAGE DataKinds #-}
module Cardano.Cluster.Util.Spec
(
-- * Miscellaneous
prop_AlternativeDefault
, prop_runAsync
-- * List
, prop_stripFilterPrefix
, prop_sizedSubsequenceLength
, prop_sizedSubsequenceInclusion
-- * String
, prop_sToKkToSRoundTrip
, prop_kToSsToK... | input-output-hk/pos-haskell-prototype | cluster/test/Cardano/Cluster/Util/Spec.hs | mit | 3,711 | 0 | 15 | 939 | 1,096 | 595 | 501 | 91 | 2 |
{-# LANGUAGE CPP #-}
-- | Pairing heap implementation of dictionary
module Data.Graph.Inductive.Internal.Heap(
-- * Type
Heap(..),
prettyHeap,
printPrettyHeap,
-- * Operations
empty,unit,insert,merge,mergeAll,
isEmpty,findMin,deleteMin,splitMin,
build, toList, heapsort
) where
import T... | antalsz/hs-to-coq | examples/graph/graph/Data/Graph/Inductive/Internal/Heap.hs | mit | 2,955 | 1 | 11 | 688 | 1,156 | 619 | 537 | 55 | 3 |
{-# OPTIONS -fno-warn-orphans #-}
module Lib.TimeInstances () where
import Data.Binary (Binary(..))
import Data.Fixed (Pico)
import Data.Time.Clock (NominalDiffTime, DiffTime)
import Prelude.Compat
{-# INLINE toPico #-}
toPico :: Real a => a -> Pico
toPico = realToFrac
{-# INLINE fromPico #-}
fromPico :: Fractional... | buildsome/buildsome | src/Lib/TimeInstances.hs | gpl-2.0 | 605 | 0 | 6 | 116 | 153 | 90 | 63 | 22 | 1 |
module PatBindNovar where
(_:_) = []
| roberth/uu-helium | test/staticerrors/PatBindNovar.hs | gpl-3.0 | 40 | 0 | 6 | 9 | 19 | 11 | 8 | 2 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-elb/gen/Network/AWS/ELB/ApplySecurityGroupsToLoadBalancer.hs | mpl-2.0 | 5,603 | 0 | 10 | 989 | 561 | 340 | 221 | 68 | 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 #-}
-- ... | olorin/amazonka | amazonka-s3/gen/Network/AWS/S3/DeleteObject.hs | mpl-2.0 | 5,981 | 0 | 14 | 1,304 | 1,013 | 598 | 415 | 119 | 1 |
module MediaWiki.API.Query.CategoryInfo.Import where
import MediaWiki.API.Types
import MediaWiki.API.Utils
import MediaWiki.API.Query.CategoryInfo
import Text.XML.Light.Types
import Control.Monad
import Data.Maybe
stringXml :: String -> Either (String,[{-Error msg-}String]) CategoryInfoResponse
stringXml s = parseD... | HyperGainZ/neobot | mediawiki/MediaWiki/API/Query/CategoryInfo/Import.hs | bsd-3-clause | 1,477 | 6 | 17 | 364 | 546 | 273 | 273 | 41 | 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>Linux WebDrivers</title>
<maps>
<homeID>top</homeID>
<mapref location="m... | thc202/zap-extensions | addOns/webdrivers/webdriverlinux/src/main/javahelp/org/zaproxy/zap/extension/webdriverlinux/resources/help_sl_SI/helpset_sl_SI.hs | apache-2.0 | 961 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -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
... | urbanslug/ghc | libraries/base/GHC/MVar.hs | bsd-3-clause | 6,715 | 0 | 13 | 1,542 | 906 | 517 | 389 | 59 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Types.HookedBuildInfo (
HookedBuildInfo,
emptyHookedBuildInfo,
) where
-- import Distribution.Compat.Prelude
import Distribution.Types.BuildInfo
import Distribution.Types.UnqualComponentName
-- | 'HookedBuildInfo' is mec... | themoritz/cabal | Cabal/Distribution/Types/HookedBuildInfo.hs | bsd-3-clause | 3,243 | 0 | 7 | 599 | 123 | 98 | 25 | 10 | 1 |
import Control.Concurrent
import Control.Monad
import Foreign
import Foreign.C.Types
import System.Environment
foreign import ccall safe "finalizerlib.h init_value"
init_value :: Ptr CInt -> IO ()
foreign import ccall safe "finalizerlib.h &finalize_value"
finalize_value :: FinalizerPtr CInt
allocateValue :... | ezyang/ghc | testsuite/tests/rts/T10904.hs | bsd-3-clause | 610 | 0 | 10 | 122 | 182 | 89 | 93 | 20 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TypeSynonymInstances #-}
import ... | positiondev/larceny | test/Spec.hs | isc | 30,269 | 42 | 34 | 9,474 | 6,345 | 3,204 | 3,141 | 542 | 3 |
{-# LANGUAGE RecordWildCards, ScopedTypeVariables #-}
module NameNode where
import Control.Distributed.Process hiding (proxy)
import Control.Concurrent (threadDelay)
import Control.Concurrent.STM
import Control.Exception
import Control.Monad (unless, forever, joi... | Ferdinand-vW/HHDFS | src/NameNode.hs | isc | 13,432 | 0 | 22 | 2,998 | 3,694 | 1,870 | 1,824 | 249 | 3 |
module Main where
import HBlog.Rectifier
main :: IO ()
main = rectifierMain
| rlpowell/hblog | app/rectifier.hs | mit | 87 | 0 | 6 | 23 | 24 | 14 | 10 | 4 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
import System.Console.CmdArgs
import Network.Wai.Handler.Warp (run)
import Network.Wai.Middleware.RequestLogger (logStdout)
import App (withApp)
data Server = Server {port :: Int}
deriving (Show, Data, Typeable)
server = Server {port = 8080 &= typ "PORT" &=
... | martinrehfeld/wai-example | Main.hs | mit | 699 | 0 | 12 | 190 | 191 | 101 | 90 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.HTTP.Toolkit.HeaderSpec (main, spec) where
import Helper
import qualified Data.ByteString.Char8 as B
import Network.HTTP.Toolkit.Error
import Network.HTTP.Toolkit.Header
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe... | zalora/http-kit | test/Network/HTTP/Toolkit/HeaderSpec.hs | mit | 3,367 | 0 | 24 | 760 | 910 | 465 | 445 | 60 | 1 |
{-# LANGUAGE Safe #-}
module Signal.Subscriber.Internal ( Subscriber(..)
, addSubscriptionDisposable
, disposeSubscriber
) where
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.STM
impo... | jspahrsummers/RxHaskell | Signal/Subscriber/Internal.hs | mit | 1,307 | 0 | 11 | 305 | 198 | 114 | 84 | 21 | 1 |
-- | ---------------------------------------------
-- Module : Control.PolyFunctor
--
-- Copyright : (c) 2016 Owain Lewis
--
-- License : BSD-style
-- Maintainer : Owain Lewis <owain@owainlewis.com>
-- Stability : experimental
-- Portability : GHC
-- | ---------------------------------------------
{-# LAN... | owainlewis/polyfunctors | src/Control/PolyFunctor.hs | mit | 2,435 | 0 | 13 | 787 | 1,112 | 592 | 520 | 73 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module ClientSideGeneration (generateGameState) where
import Elm.Module
import Elm.TyRep
import GameState
import Data.Proxy
import Character
import Bullet
import Lib
import Game.MapReader
{-
This module use elm-bridge to create the json wrapper of our records type for the elm applica... | bruno-cadorette/TheLambdaReactor | src/Backend/ClientSideGeneration.hs | mit | 2,177 | 0 | 14 | 499 | 389 | 217 | 172 | 49 | 3 |
{-# LANGUAGE DeriveGeneric #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
import Data.Encrypted
import Data.Encrypted.Internal
import Data.Aeson
import Data.List
import Data.Text (Text)
import qualified Data.Text as T
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qual... | tel/enc | test/Properties.hs | mit | 5,251 | 0 | 17 | 1,662 | 1,545 | 784 | 761 | 117 | 3 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric, MultiParamTypeClasses #-}
module Main where
import HelpEsbClient
import Database.PostgreSQL.Simple
import System.Locale
import Data.List.Split
import Data.Map
import Data.Maybe
import Data.Time
import Data.DateTime
-- JSON Data Structures
import qualified JSON.Event.Res... | suitupalex/ms-event-muncher | HelpEventMuncher.hs | mit | 4,455 | 0 | 19 | 816 | 1,151 | 572 | 579 | 96 | 3 |
module Y2020.M07.D31.Solution where
{--
Well, that's random.
Random numbers, we are told, are a hard thing. I mean, I just can't think of
the random number: 42, and get all sorts of vicious backblow about how that's
not random because of Douglas Adams.
So, we're going to tackle random numbers today.
Today, ...
...... | geophf/1HaskellADay | exercises/HAD/Y2020/M07/D31/Solution.hs | mit | 1,997 | 0 | 12 | 453 | 312 | 159 | 153 | 16 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-- |
-- Module: Network.SIP.Serialization
-- Description: SIP message serialization.
-- Copyright: Copyright (c) 2015-2016 Jan Sipr
-- License: MIT
--
-- Serialize SIP message into transportable form.
m... | Siprj/ragnarok | src/Network/SIP/Serialization.hs | mit | 1,237 | 0 | 10 | 235 | 241 | 147 | 94 | 28 | 1 |
module Main (main) where
--------------------------------------------------------------------------------
import Control.Wire
import FRP.Netwire.Input
import qualified Graphics.UI.GLFW as GLFW
import qualified Lambency as L
import Linear.Vector
import TetrisAttack.Constants
import TetrisAttack.Game
import Prelude... | Mokosha/HsTetrisAttack | Main.hs | mit | 768 | 0 | 11 | 97 | 200 | 114 | 86 | 16 | 1 |
module Crypto.Cipher.ECDSA (
CurveParameters(..),
HashingFunction,
Curve(..),
Point(..),
signz, verifyz,
sign, verify
) where
import Crypto.Cipher.ECDSA.Util
import Crypto.Cipher.ECDSA.Math
import qualified Data.ByteString.Lazy as BS
import System.Random (randomRIO)
import Data.Maybe (fr... | fhaust/bitcoin | src/Crypto/Cipher/ECDSA.hs | mit | 2,588 | 0 | 17 | 852 | 1,017 | 535 | 482 | 75 | 3 |
-- Projekt č. 1 do předmětu FLP
-- Autor: Jan Hrivnák (xhrivn01@stud.fit.vutbr.cz)
-- Zadání: rka2dka - převod rozšířeného konečného automatu na deterministický
-- Datum: 04/2015
-- -------------------------
module KAdata where
type KAstav = String
type KAznak = String
myPrint::[String] -> String
myPrint (t:text)
... | ScOrPiOn9/FIT | FLP/Determinizace konečného automatu [Haskell]/KAdata.hs | mit | 1,558 | 34 | 11 | 310 | 437 | 239 | 198 | 33 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Game.Play.Handler where
import Prelude (IO, flip, pure, ($), (+), (<), (<$>),
(>), (>>=))
im... | rubenmoor/skull | skull-server/src/Game/Play/Handler.hs | mit | 2,945 | 0 | 15 | 897 | 845 | 469 | 376 | 70 | 4 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.AudioTrackList
(js_item, item, js_getTrackById, getTrackById, js_getLength,
getLength, change, addTrack, removeTrack, AudioTrackList,
castToAudioTrackList, gTypeAudioTrackList)
where
... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/AudioTrackList.hs | mit | 2,974 | 22 | 11 | 378 | 650 | 383 | 267 | 44 | 1 |
answer = sum [powMod (i,lastTen) i | i<-[1..1000]] `mod` lastTen where
lastTen = 10^10
-- mod after power
powMod :: Integral a => (a,a) -> a -> a
powMod (x,y) i = let prev = if i>1 then powMod (x,y) (i-1) else 1
in mod (prev * x) y
| yuto-matsum/contest-util-hs | src/Euler/048.hs | mit | 253 | 0 | 12 | 70 | 149 | 81 | 68 | 5 | 2 |
palidrome :: String -> Bool
palidrome s = take l s == reverse(drop l s)
where l = (length s `quot` 2)
products = [ n * m | n <- [100..999], m <- [100..999] ]
main = print . maximum . filter palidrome . map show $ products
| chrisfosterelli/euler.hs | solutions/004.hs | mit | 224 | 0 | 9 | 51 | 122 | 63 | 59 | 5 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.HTMLKeygenElement
(checkValidity, checkValidity_, reportValidity, reportValidity_,
setCustomValidity, set... | ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLKeygenElement.hs | mit | 7,420 | 0 | 12 | 943 | 1,537 | 846 | 691 | 90 | 1 |
{-*********************************************************}
| |
| The implementation of PHPRPC Protocol 3.0 |
| |
| XXTEA.hs |
| ... | bluelovers/phprpc | hs/PHPRPC/Util/XXTEA.hs | gpl-2.0 | 5,831 | 12 | 19 | 2,023 | 1,949 | 1,041 | 908 | 77 | 5 |
-- (2 балла)
import Control.Applicative
data Tree a = Node a [Tree a] deriving (Show)
instance Functor Tree where
fmap f (Node a ch) = Node (f a) $ map (fmap f) ch
instance Applicative Tree where
pure a = Node a $ repeat $ pure a
(Node f lf) <*> (Node v lv) = Node (f v) $ zipWith (<*>) lf lv
| nkartashov/haskell | hw08/App.hs | gpl-2.0 | 305 | 0 | 9 | 70 | 161 | 80 | 81 | 7 | 0 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Graph.Hamilton.Config where
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
data Config = Config
{ nodes :: Int
, edges :: Int
}
deriving ( Typeable )
$(derives [makeReader, makeToDoc] [''Config])
example :: Co... | Erdwolf/autotool-bonn | src/Graph/Hamilton/Config.hs | gpl-2.0 | 426 | 6 | 9 | 103 | 108 | 65 | 43 | 13 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module ImageResponse
(graphImageResponse, timetableImageResponse) where
import Happstack.Server
import qualified Data.ByteString.Lazy as BS
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString.Base64.Lazy as BEnc
import ImageConversion
import Svg.Generator
im... | arkon/courseography | hs/ImageResponse.hs | gpl-3.0 | 2,389 | 0 | 13 | 454 | 550 | 283 | 267 | 51 | 1 |
module Commands where
import qualified Data.Text as T
import Data.Time
import Database.Persist
import Control.Monad
import Database
import Klacz
import Control.Monad.IO.Class(liftIO)
addTerm :: Term -> KlaczMonad ()
addTerm t = void . runDB $ insert t
describeTerm :: T.Text -> KlaczMonad [Term]
describeTerm q = fm... | kubov/klacz2 | Commands.hs | gpl-3.0 | 1,496 | 0 | 18 | 469 | 543 | 261 | 282 | 43 | 3 |
{- |
Module : $Header$
Description : Time representation and manipulation.
Copyright : (c) plaimi 2014
License : GPL-3
Maintainer : plailude@plaimi.net
-} module Plailude.Data.Time (
-- Time.Conversion
asSeconds,
fromGregorian,
-- Time.Units
TimeUnit,
timeVal,
Year (MkYear),
Month (... | plaimi/plailude | src/Plailude/Data/Time.hs | gpl-3.0 | 489 | 0 | 5 | 105 | 81 | 58 | 23 | 25 | 0 |
{-
Python5 — a hypothetic language
Copyright (C) 2015 - Yuriy Syrovetskiy
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 3 of the License, or
(at your option) ... | cblp/python5 | python5/tests/IO.hs | gpl-3.0 | 1,398 | 0 | 13 | 338 | 180 | 96 | 84 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module Authorities.Schema where
import Database.Persist.TH
... | ownclo/authorities | Authorities/Schema.hs | gpl-3.0 | 1,888 | 0 | 8 | 388 | 303 | 164 | 139 | 41 | 0 |
-- Properties of Natural numbers, with swap-definition of plus and
-- multiplication
module NatSwap where
import Hip.Prelude
import Prelude (Eq,Ord,Show,iterate,(!!),fmap,Bool(..))
data Nat = Z | S Nat
deriving (Eq,Ord,Show)
instance Arbitrary Nat where
arbitrary =
let nats = iterate S Z
in (nats !!) `f... | danr/hipspec | examples/old-examples/hip/NatSwap.hs | gpl-3.0 | 3,551 | 0 | 10 | 722 | 1,378 | 682 | 696 | 95 | 1 |
#!/usr/bin/env runghc
import Azubi
main :: IO()
main = defaultMain $ []
& content "/dev/shm/azubi.test" ["this ist a test"]
& link "/dev/shm/azubi.link" "/dev/shm/azubi.test"
| mrVanDalo/azubi | example.hs | gpl-3.0 | 183 | 0 | 8 | 31 | 47 | 24 | 23 | 5 | 1 |
module Math.Topology.KnotTh.Knotted.Threads
( ThreadedCrossing(..)
, allThreads
, numberOfThreads
, allThreadsWithMarks
) where
import Control.Monad (foldM)
import qualified Control.Monad.ST as ST
import Data.Maybe (fromJust)
import Data.STRef (newSTRef, readSTRef, modifySTRef')
import qualified Da... | mishun/tangles | src/Math/Topology/KnotTh/Knotted/Threads.hs | lgpl-3.0 | 3,512 | 9 | 36 | 1,549 | 986 | 512 | 474 | -1 | -1 |
{-# language ViewPatterns, NamedFieldPuns, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Sorts.Nikki (
sorts,
isNikki,
uniqueNikki,
searchNikki,
modifyNikki,
nikkiMass,
maximumWalkingVelocity,
) where
import Prelude hiding (lookup)
import Data.Map (Map, toList... | nikki-and-the-robots/nikki | src/Sorts/Nikki.hs | lgpl-3.0 | 4,668 | 0 | 17 | 1,142 | 1,387 | 715 | 672 | -1 | -1 |
module Data.P440.Domain.BNS where
import Data.P440.Domain.SimpleTypes
import Data.P440.Domain.ComplexTypes
import Data.Text (Text)
-- 2.14 Справка о наличии счетов
data Файл = Файл {
идЭС :: GUID
,типИнф :: Text
,версПрог :: Text
,телОтпр :: Text
,должнОтпр :: Text
,фамОтпр ... | Macil-dev/p440 | src/Data/P440/Domain/BNS.hs | unlicense | 4,039 | 82 | 8 | 1,015 | 895 | 541 | 354 | 93 | 0 |
module Main where
main = do
contents <- getContents
putStrLn $ map (\c -> if c == 'T' then 'U' else c) contents | ctimmons/hs_rosalind | 2 - Transcribing DNA into RNA/Main.hs | unlicense | 120 | 0 | 12 | 31 | 48 | 26 | 22 | 4 | 2 |
module Problem32 where
main =
print $ gcd' 36 63
gcd' a 0 = a
gcd' a b = gcd' b (a `rem` b)
| vasily-kartashov/playground | 99-problems/problem-32.hs | apache-2.0 | 97 | 0 | 7 | 29 | 52 | 28 | 24 | 5 | 1 |
module Marvin.API.Meta.EvaluatorSpec where
import Test.Hspec
spec :: Spec
spec = return ()
| gaborhermann/marvin | test-suite/Marvin/API/Meta/EvaluatorSpec.hs | apache-2.0 | 94 | 0 | 6 | 15 | 28 | 17 | 11 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Strict #-}
{-# LANGUAGE StrictData #-}
module Mangekyo.Parser where
import Control.Applicative hiding (many)
import Data.Char (isHexDigit)
import Numeric (readHex)
import Data.Scientific (Scientific)
import Text.Parser.Expression
import Text.Trifecta hiding (symbol, whit... | nakamuray/mangekyo | src/Mangekyo/Parser.hs | bsd-2-clause | 10,553 | 3 | 18 | 2,714 | 3,634 | 1,832 | 1,802 | 284 | 3 |
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell, GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Model.Persist where
import Prelude
import Yesod
import Data.Typeable (Typeable)
import Dat... | dtekcth/DtekPortalen | src/Model/Persist.hs | bsd-2-clause | 827 | 0 | 8 | 104 | 111 | 68 | 43 | 16 | 0 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, TupleSections,
GeneralizedNewtypeDeriving, DeriveTraversable #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| JSON utility functions. -}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and... | yiannist/ganeti | src/Ganeti/JSON.hs | bsd-2-clause | 20,075 | 0 | 18 | 4,667 | 4,857 | 2,566 | 2,291 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
-- | Provides the `DataSet` type which abstracts over the actual (IO-based)
-- representation of the training dataset.
module Numeric.SGD.DataSet
(
-- * Dataset
DataSet (..)
, shuffle
-- * Reading
, loadData
, randomSample
-- * Construction
, withVect
, withDisk
-- , withData
) w... | kawu/sgd | src/Numeric/SGD/DataSet.hs | bsd-2-clause | 4,106 | 0 | 18 | 956 | 964 | 534 | 430 | 65 | 1 |
{-# LANGUAGE Haskell2010 #-}
module Bug195 where
data T = A { someField :: () -- ^ Doc for someField of A
, someOtherField :: () -- ^ Doc for someOtherField of A
}
| B { someField :: () -- ^ Doc for someField of B
, someOtherField :: () -- ^ Doc for someOtherField of B
... | haskell/haddock | html-test/src/Bug195.hs | bsd-2-clause | 461 | 0 | 9 | 165 | 78 | 51 | 27 | 8 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module HStyle.Rules.TrailingWhiteSpace
( trailingWhiteSpaceRule
, trailingWhiteSpaceChecker
, trailingWhiteSpaceFixer
) where
import Data.Char (isSpace)
import qualified Data.Text as T
import HStyle.Checker
import HStyle.Fixer
import HStyle.Rule
import HStyle.Select... | jaspervdj/hstyle | src/HStyle/Rules/TrailingWhiteSpace.hs | bsd-3-clause | 747 | 0 | 12 | 120 | 163 | 91 | 72 | 21 | 2 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
--------------------------------------------------------------------------------
-- |
--
-- Module: HipChat.AddOn.Types.AuthenticationMethod
--
----------------------------------------------------------------------... | mjhopkins/hipchat | src/HipChat/AddOn/Types/AuthenticationMethod.hs | bsd-3-clause | 1,216 | 0 | 9 | 206 | 198 | 117 | 81 | 23 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
import Prelude hiding (not, id)
import Data.Monoid
import Test.QuickCheck hiding (oneof)
import System.IO.Unsafe (unsafePerformIO)
import Text.Regex.PCRE hiding (Regex)
import Types
import Pretty
test = stackoverflow
stackoverflow = angles (name +> many attr)
where
name ... | jystic/cthulhu | src/Main.hs | bsd-3-clause | 2,272 | 0 | 12 | 560 | 358 | 189 | 169 | 33 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[SimplCore]{Driver for simplifying @Core@ programs}
-}
{-# LANGUAGE CPP #-}
module SimplCore ( core2core, simplifyExpr ) where
#include "HsVersions.h"
import GhcPrelude
import DynFlags
import CoreSyn
import HscTypes
import CSE ( cse... | sdiehl/ghc | compiler/simplCore/SimplCore.hs | bsd-3-clause | 43,210 | 3 | 17 | 14,315 | 5,621 | 3,026 | 2,595 | 473 | 7 |
-- | Operations concerning dungeon level tiles.
--
-- Unlike for many other content types, there is no type @Tile@,
-- of particular concrete tiles in the dungeon,
-- corresponding to 'TileKind' (the type of kinds of terrain tiles).
-- This is because the tiles are too numerous and there's not enough
-- storage space f... | LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Common/Tile.hs | bsd-3-clause | 16,857 | 0 | 24 | 3,730 | 3,901 | 1,984 | 1,917 | -1 | -1 |
{-# LANGUAGE TypeOperators #-}
module Value.List where
import Core.Val
instance ToText a => ToText (List a) where
text = prim Fun "id" "$(function(x){return x})"
index :: Number :-> List a :~> a
index = prim2 Fun "!!" "$(function(i,x){return x ? x[i] : this.v})"
sort :: List a :~> List a
sort = prim Fun "sort" "$... | sebastiaanvisser/frp-js | src/Value/List.hs | bsd-3-clause | 894 | 0 | 11 | 180 | 316 | 164 | 152 | 19 | 1 |
-------------------------------------------------------------------------
-- Subset of UU.Pretty, based on very simple pretty printing
-- Extended with line-nr tracking
-------------------------------------------------------------------------
module Pretty
( PP_Doc, PP(..)
, disp
, (>|<), (>-<)
, (>#<)
, pp... | norm2782/uuagc | src/Pretty.hs | bsd-3-clause | 5,069 | 4 | 15 | 1,633 | 1,731 | 918 | 813 | 134 | 9 |
module Hrpg.Framework.Mobs.AI
( getMobAction
) where
import Control.Monad.Random
import Hrpg.Framework.Combat.CombatAction
getMobAction :: MonadRandom m => m CombatAction
getMobAction = return MeleeAttack -- TODO!
| cwmunn/hrpg | src/Hrpg/Framework/Mobs/AI.hs | bsd-3-clause | 230 | 0 | 6 | 39 | 50 | 30 | 20 | 6 | 1 |
module Data.SomeModule where
test2 :: ()
test2 = undefined
| bennofs/ghc-server | tests/cabal-project/src/Data/SomeModule.hs | bsd-3-clause | 60 | 0 | 5 | 10 | 18 | 11 | 7 | 3 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Actions.UpdateFocus
-- Description : Updates the focus on mouse move in unfocused windows.
-- Copyright : (c) Daniel Schoepe
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : Daniel Schoepe <asg... | xmonad/xmonad-contrib | XMonad/Actions/UpdateFocus.hs | bsd-3-clause | 3,290 | 0 | 17 | 658 | 519 | 289 | 230 | 29 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module LoadModuleInterface
(
ModuleGoal(..)
, guessGoal
, withGhc
, makeInterface
, PkgKey
, pkgKeyToGHC
, pkgKeyFromCabal
)
where
import Control.Monad
import Control.Monad.Trans.State.Strict
import Control.Monad.Trans.Class
import Data.Maybe
import qualif... | cdxr/haskell-interface | src/LoadModuleInterface.hs | bsd-3-clause | 18,967 | 0 | 20 | 4,840 | 4,284 | 2,136 | 2,148 | -1 | -1 |
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Util.ActionQueue
-- Description : Queue of XMonad actions
-- Copyright : (c) 2021 Xiaokui Shu
-- License : BSD-styl... | xmonad/xmonad-contrib | XMonad/Util/ActionQueue.hs | bsd-3-clause | 3,100 | 0 | 14 | 789 | 390 | 234 | 156 | 31 | 2 |
main :: IO ()
main = return ()
{-
import Control.Applicative
import Control.Monad
import Control.Monad.Trans
import qualified Data.ByteString.Char8 as S
import Prelude hiding (lookup)
import Data.Char
import System.Random.Mersenne.Pure64
import System.IO.Unsafe
import D... | tanakh/CurryDB | bench/bench.hs | bsd-3-clause | 951 | 0 | 6 | 267 | 22 | 11 | 11 | 2 | 1 |
module HangmanHspec (hangmanHspec) where
import Hangman
import Test.Hspec
import Test.QuickCheck
hangmanHspec :: Spec
hangmanHspec = do
describe "sd" $ do
it "sd"
(showHangmanWord (newHangmanWord "mad") `shouldBe` "---")
describe "sd" $
it "sd"
(property $ \word -> showHangmanWord (newHangm... | stackbuilders/hangman-off | tests/HangmanHspec.hs | bsd-3-clause | 365 | 0 | 15 | 73 | 119 | 61 | 58 | 12 | 1 |
module Libv4
( main'
) where
-- v4 : Write the parsers
import Text.Parsec
import Text.Parsec.String
-- data ----------------------------------------------------
-- Ranking information - team rank, team name
data Ranking = Ranking
{ rRank :: Int
, rTeam :: String
} deriving Show
-- Result information - di... | mfine/hs-talks | src/Libv4.hs | bsd-3-clause | 1,447 | 0 | 11 | 248 | 274 | 151 | 123 | 33 | 1 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
... | dalaing/type-systems | src/Fragment/Record/Ast/Term.hs | bsd-3-clause | 3,844 | 0 | 17 | 846 | 1,483 | 775 | 708 | 86 | 0 |
module Constants
( pageAmount
, userTypingExpiryInterval
, numScrollbackPosts
, previewMaxHeight
)
where
import Prelude ()
import Prelude.MH
-- | The number of rows to consider a "page" when scrolling
pageAmount :: Int
pageAmount = 15
-- | The expiry interval in seconds for user typing notifications.
user... | aisamanra/matterhorn | src/Constants.hs | bsd-3-clause | 545 | 0 | 4 | 91 | 72 | 46 | 26 | 15 | 1 |
{-# OPTIONS_HADDOCK not-home #-}
{-|
Module : $Header$
Description : Common types in marvin.
Copyright : (c) Justus Adam, 2016
License : BSD3
Maintainer : dev@justus.science
Stability : experimental
Portability : POSIX
-}
module Marvin.Types
( User, Channel, Message, Topic, Script
, ScriptId, mkSc... | JustusAdam/marvin | src/Marvin/Types.hs | bsd-3-clause | 1,029 | 0 | 5 | 189 | 219 | 154 | 65 | 48 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Network.TeleHash.Paths
(
PathJson(..)
, PathIPv4(..)
, PathIPv6(..)
, PathHttp(..)
, PathWebRtc(..)
, PathType(..)
, showPathJson
, pjsonType
, pjsonIp
, pjsonPort
, pjsonHttp
, Port
, Url
) where
import Control.Applicative
import Data.Aeson
im... | alanz/htelehash | src/Network/TeleHash/Paths.hs | bsd-3-clause | 8,684 | 0 | 18 | 1,930 | 1,805 | 966 | 839 | 172 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE Overlo... | silky/DanceView | src/Data.hs | bsd-3-clause | 8,311 | 0 | 11 | 2,900 | 1,503 | 830 | 673 | 208 | 0 |
{-# LANGUAGE NamedFieldPuns #-}
module Main where
import Lib
import Color
import Slither
import Logic
import Data.Maybe
import Control.Monad
import Printer
import qualified Data.Map as M
import Adj
import Control.Concurrent (threadDelay)
testboard1 = Slither.makeSlitherBoard (7, 7)
[ ((0, 0), 2)
, ((0, 1), ... | jvanburen/slither | app/Main.hs | bsd-3-clause | 2,050 | 0 | 11 | 612 | 869 | 496 | 373 | 68 | 3 |
{-# LANGUAGE CPP, FlexibleInstances #-}
module Data.TrieMap.WordMap.SetOp () where
import Control.Monad.Option
import Data.TrieMap.TrieKey
import Data.Word
import Data.TrieMap.WordMap.Base
import Data.TrieMap.WordMap.Searchable ()
import Prelude hiding (lookup)
#define SETOP(op) op f (WordMap m1) (WordMap m2) = W... | lowasser/TrieMap | Data/TrieMap/WordMap/SetOp.hs | bsd-3-clause | 2,614 | 54 | 14 | 859 | 1,306 | 669 | 637 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-| Example usage:
> import Control.Break
> import Control.Monad.State
> import Prelude hiding (break)
>
> example :: State Int ()
> example = loop (do
> n <- lift get -- Inside a `loop`, wrap commands in `lift`
> if n < 10
> then lift (put (n... | Gabriel439/Haskell-Break-Library | src/Control/Break.hs | bsd-3-clause | 2,691 | 0 | 12 | 712 | 343 | 194 | 149 | 35 | 2 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Text.Period
( Period, PeriodFmt(..), parsePeriod, parsePeriodMay, parsePeriod... | akegalj/period | src/Text/Period.hs | bsd-3-clause | 5,617 | 0 | 13 | 1,164 | 1,756 | 897 | 859 | 115 | 6 |
{-# 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-rds/gen/Network/AWS/RDS/CreateEventSubscription.hs | mpl-2.0 | 9,489 | 0 | 13 | 1,916 | 1,122 | 682 | 440 | 127 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module GramLab.Data.Diff.EditTree2 ( make
, apply
, size
, check
, EditTree(..)
)
where
import GramLa... | gchrupala/morfette | src/GramLab/Data/Diff/EditTree2.hs | bsd-2-clause | 2,387 | 0 | 14 | 1,094 | 791 | 419 | 372 | 49 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.PrettyPrint.ANSI.Leijen
-- Copyright : Daan Leijen (c) 2000, http://www.cs.uu.nl/~daan
-- Max Bolingbroke (c) 2008, http://blog.omega-prime.co.uk
-- License : BSD-style (see the file LICENSE)... | seereason/ansi-wl-pprint | Text/PrettyPrint/ANSI/Leijen.hs | bsd-2-clause | 48,378 | 0 | 19 | 12,374 | 7,948 | 4,477 | 3,471 | 479 | 20 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.