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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- 8-ball setup validation
-- https://www.codewars.com/kata/58fa711d9fd13e2da9000f8a
module EightBallValid where
import Data.List(reverse, transpose)
import Control.Arrow ((&&&), (***))
import Control.Monad (join)
eightBallValid a = all (\ f -> f a) [eight, bottomCorners, parallel]
where eight = (== 8) . (!! 1) ... | gafiatulin/codewars | src/Beta/EightBallValid.hs | mit | 714 | 0 | 13 | 187 | 274 | 156 | 118 | -1 | -1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGPathSegCurvetoQuadraticSmoothAbs
(js_setX, setX, js_getX, getX, js_setY, setY, js_getY, getY,
SVGPathSegCurvetoQuadraticSmoothAbs,
castToSVGPathSegCurvetoQuadraticSmoothAbs,
gType... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SVGPathSegCurvetoQuadraticSmoothAbs.hs | mit | 2,870 | 28 | 9 | 354 | 615 | 361 | 254 | 44 | 1 |
module CFDI.XmlNode where
import CFDI.Types.Type (ParseError, Type, parse, render)
import Control.Error.Safe (justErr)
import Text.XML.Light.Proc (filterChildName, filterChildrenName, findAttrBy)
import Text.XML.Light
( Attr(..)
, Content(Elem)
, Element(..)
, QName(..)
)
data XmlParseError
= Attr... | yusent/cfdis | src/CFDI/XmlNode.hs | mit | 3,296 | 0 | 12 | 675 | 1,106 | 553 | 553 | 82 | 3 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
-- | Get information from cabal files.
--
-- Motivating example, test discovery based on a library's exposed
-- modules:
--
-- > import Test.Doctest (doctest)
-- > import Cabal.Info (getLibraryModules)
-- >
-- > main :: IO ()
-- > main = getLibraryModules >>= ... | barrucadu/cabal-info | library/Cabal/Info.hs | mit | 6,717 | 0 | 17 | 1,151 | 1,537 | 811 | 726 | 91 | 5 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Types.Usergroup where
import Types.Imports
data Usergroup = Usergroup { usergroupId :: Maybe Int,
usergroupName :: String,
permissions :: [Permission] } deriving (Show, Generic)
instance HasId Usergroup where
getId a = usergroupId... | maciejspychala/haskell-server | src/Types/Usergroup.hs | mit | 1,176 | 0 | 11 | 266 | 337 | 178 | 159 | 32 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Monoid
import Control.Monad
import Control.Exception
import Control.Concurrent
import System.Socket
import System.Socket.Type.SequentialPacket
import System.Socket.Family.Inet as Inet
import System.Socket.Protocol.SCTP as SCTP
main :: IO ()
main = do
... | lpeterse/haskell-socket-sctp | tests/TooSmallBuffer.hs | mit | 1,756 | 0 | 11 | 493 | 616 | 320 | 296 | 47 | 1 |
--
-- Derived from aeson examples and benchmarks
-- See https://github.com/bos/aeson
--
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable, DeriveGeneric, DataKinds, ScopedTypeVariables #-}
module Main where
import Control.DeepSeq
import Criterion.Main
import Data.Data (Typeable, Data)
import Data.HighJson
import Da... | agrafix/highjson | highjson/bench/Twitter.hs | mit | 6,945 | 0 | 33 | 1,933 | 1,857 | 1,024 | 833 | 196 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module FPGrowth.Mine where
import FPGrowth.Types
import FPGrowth.Tree
import FPGrowth.Transaction
import qualified Data.Set as Set
import qualified Data.HashMap.Strict as H
mine :: Count -> Forest -> [FreqSet]
mine minsup = filter (not .... | DM2014/homework2-hs | src/FPGrowth/Mine.hs | mit | 1,899 | 0 | 13 | 417 | 725 | 390 | 335 | 34 | 1 |
{-# LANGUAGE CPP, RecordWildCards, TupleSections #-}
import qualified Data.ByteString.Lazy as B
import qualified Data.ByteString.Lazy.Char8 as BC
import System.Environment
import System.Exit
import System.FilePath
import qualified Data.Binary.Builder as Br
import qualified Data.Binary.Get as G
import Text.Printf
impor... | christiannolte/tip-toi-reveng | src/tttool.hs | mit | 17,424 | 0 | 25 | 5,036 | 5,483 | 2,683 | 2,800 | 380 | 3 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.AST
-- Copyright : (c) 2013-14 Phil Freeman, (c) 2014 Gary Burgess, and other contributors
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-... | michaelficarra/purescript | src/Language/PureScript/AST.hs | mit | 799 | 0 | 4 | 103 | 80 | 64 | 16 | 8 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module EmbedFiles where
import Language.Haskell.TH
import Data.Text
import qualified Data.Text.IO as TIO
| zeqing-guo/gin-haskell | src/EmbedFiles.hs | mit | 178 | 0 | 4 | 25 | 26 | 19 | 7 | 6 | 0 |
module Move2
( move
) where
import Direction
move :: Char -> Direction -> Char
move '1' d =
case d of
D -> '3'
_ -> '1'
move '2' d =
case d of
R -> '3'
D -> '6'
_ -> '2'
move '3' d =
case d of
U -> '1'
L -> '2'
R -> '4'
D -> '7'
move ... | ajm188/advent_of_code | 2016/02/Move2.hs | mit | 1,119 | 0 | 7 | 602 | 448 | 227 | 221 | 70 | 28 |
{-# LANGUAGE ForeignFunctionInterface #-}
module Counter where
import Control.Concurrent
import Control.Monad
foreign export ccall startCounter :: Int -> IO ()
startCounter :: Int -> IO ()
startCounter = void . forkIO . void . loop
where loop i = do
putStrLn (replicate i 'o')
threadDelay (10... | zhangjiji/real-world-haskell | Counter.hs | mit | 362 | 0 | 11 | 103 | 115 | 59 | 56 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html
module Stratosphere.Resources.LogsSubscriptionFilter where
import Stratosphere.Re... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/LogsSubscriptionFilter.hs | mit | 3,244 | 0 | 15 | 369 | 461 | 262 | 199 | 42 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Text.LambdaPass.Storage where
import Text.LambdaPass.Types
import Control.Monad (mzero) -- Remove at 1.0.
import Crypto.Gpgme
import Data.Aeson
import Data.Aeson.TH
import Data.Bool (bool)
import qualified Data.ByteString as B
import qualifie... | flounders/lambdaPass | src/Text/LambdaPass/Storage.hs | gpl-2.0 | 2,469 | 0 | 13 | 518 | 787 | 414 | 373 | 81 | 4 |
-- Aufgabe 12.9
-- a)
data TA = NilA | A TA TB deriving Show
data TB = NilB | B TB TA deriving Show
-- b)
-- Check with `zahlB (A NilA (B NilB NilA))` e.g.
zahlB :: TA -> Int
zahlB NilA = 0
zahlB (A ta tb) = (zahlB ta) + (zahlB' tb)
zahlB' :: TB -> Int
zahlB' NilB = 1
zahlB' (B tb ta) = (zahlB' tb) + (zahlB ... | KaliszAd/programmierung2012 | aufgabe12_9.hs | gpl-2.0 | 328 | 8 | 8 | 88 | 149 | 80 | 69 | 8 | 1 |
{-# LANGUAGE NamedFieldPuns,ScopedTypeVariables #-}
-- Sort functions according to the call graph
module HipSpec.Heuristics.CallGraph where
import Test.QuickSpec.Term
import HipSpec.GHC.Calls
import HipSpec.Sig.Resolve
import HipSpec.GHC.Utils
import Data.Map (Map)
import qualified Data.Map as M
import Id
import ... | danr/hipspec | src/HipSpec/Heuristics/CallGraph.hs | gpl-3.0 | 1,652 | 0 | 12 | 375 | 680 | 395 | 285 | 41 | 1 |
{-# LANGUAGE GADTs, RankNTypes, ScopedTypeVariables #-}
-- (c) JP Bernardy; GPL-licensed.
module Control.Fusion.List.Mu where
import Control.Comonad
import Control.Monad
import Data.Foldable as F hiding (fold)
import Data.Traversable
import Control.Applicative
import Data.Monoid
-- Principles:
-- Avoid using freeze... | jyp/ControlledFusion | Control/Fusion/List/Mu.hs | gpl-3.0 | 4,295 | 0 | 13 | 1,068 | 1,467 | 768 | 699 | 78 | 2 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable, ScopedTypeVariables #-}
module Util.HttpUtil where
import Control.Monad
import Snap.Core
import qualified Data.Text.Lazy.Encoding as E
import qualified Data.Text.Lazy as T
import qualified Data.Text.Encoding as ES
import qualified Data.Text as TS... | raimohanska/rump | src/Util/HttpUtil.hs | gpl-3.0 | 1,199 | 0 | 11 | 236 | 352 | 191 | 161 | 27 | 1 |
module CommonMark.Block.Leaf.Prepend
( prepend
, prepend_header
) where
import System.IO
import System.Environment
import System.IO.Unsafe
import System.Directory
import Data.List
import CommonMark.Block.Leaf.SetextHeader (makeSetextHeader, unmakeSetextHeader)
import CommonMark.Block.Leaf.ATXHeader
import CommonM... | thewildweasel/todo-list | src/CommonMark/Block/Prepend.hs | gpl-3.0 | 4,078 | 6 | 19 | 1,704 | 667 | 358 | 309 | 69 | 5 |
-- |
-- Module : Math.LaTeX.Prelude
-- Copyright : (c) Justus Sagemüller 2017
-- License : GPL v3
--
-- Maintainer : (@) jsag $ hvl.no
-- Stability : experimental
-- Portability : requires GHC>7 extensions
--
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Math.LaTeX.Prelud... | leftaroundabout/Symbolic-math-HaTeX | Math/LaTeX/Prelude.hs | gpl-3.0 | 5,417 | 106 | 7 | 982 | 984 | 777 | 207 | 56 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Get.hs | mpl-2.0 | 5,453 | 0 | 18 | 1,371 | 864 | 503 | 361 | 124 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : $Header$
Description : Specs for tempuhs metadata.
Copyright : (c) plaimi 2015
License : AGPL-3
Maintainer : tempuhs@plaimi.net
-} module Tempuhs.Tests.Requests.Meta (
metaSpec,
) where
import Test.Hspec
(
Spec,
describe,
)
import Tempuhs... | plaimi/tempuhs-server | test/Tempuhs/Tests/Requests/Meta.hs | agpl-3.0 | 729 | 0 | 10 | 165 | 113 | 68 | 45 | 24 | 1 |
-- "Dao/Text/Editor.hs" functions for pretty-printing with "Data.Text.Lazy"
--
-- Copyright (C) 2008-2015 Ramin Honary.
--
-- Dao 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 Li... | printedheart/Dao | src/Dao/Text/Editor.hs | agpl-3.0 | 5,716 | 0 | 16 | 1,112 | 1,233 | 692 | 541 | -1 | -1 |
module Codewars.BackspacesInString where
cleanString :: String -> String
cleanString [] = []
cleanString ls = reverse $ foldl f [] ls
where f [ ] '#' = []
f (a : b) '#' = b
f theList c = c : theList
--
| ice1000/OI-codes | codewars/301-400/backspaces-in-string.hs | agpl-3.0 | 228 | 0 | 9 | 69 | 96 | 50 | 46 | 7 | 3 |
{-# LANGUAGE RecordWildCards, TypeOperators, TypeSynonymInstances, FlexibleInstances, ViewPatterns, FlexibleContexts, UndecidableInstances, TypeFamilies #-}
module Language.Pascal.TypeCheck
(checkTypes,
checkSource
) where
import Control.Monad
import Control.Monad.State
import Control.Monad.Exception
import qua... | portnov/simple-pascal-compiler | Language/Pascal/TypeCheck.hs | lgpl-3.0 | 17,783 | 0 | 23 | 5,567 | 6,299 | 3,053 | 3,246 | 430 | 14 |
module HStatusBar.Alsa
( volume
) where
import qualified Data.Map as M
import HStatusBar.Common
import HStatusBar.Decl
import HStatusBar.Types
import System.Process (proc, readCreateProcess)
import Text.Regex.PCRE
volume :: Decl
volume = volume_ <$> (d... | michalrus/hstatusbar | src/HStatusBar/Alsa.hs | apache-2.0 | 1,095 | 0 | 16 | 339 | 335 | 181 | 154 | -1 | -1 |
-- Copyright 2021 Google LLC
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... | google/hs-portray | portray-diff-hunit/src/Data/Portray/Diff/HUnit.hs | apache-2.0 | 1,606 | 0 | 13 | 280 | 314 | 184 | 130 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-
Copyright 2019 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENS... | pranjaltale16/codeworld | codeworld-compiler/test/Main.hs | apache-2.0 | 2,812 | 0 | 12 | 561 | 601 | 303 | 298 | 61 | 2 |
{-# LANGUAGE LambdaCase #-}
module Language.K3.Driver.CompilerTarget.CPP (compile) where
import Prelude hiding ((*>))
import qualified Data.List as L
import Data.Maybe
import System.FilePath (joinPath)
import Development.Shake
import Development.Shake.FilePath hiding ( joinPath, replaceExtension, takeBaseName )
im... | yliu120/K3 | src/Language/K3/Driver/CompilerTarget/CPP.hs | apache-2.0 | 6,127 | 0 | 20 | 1,611 | 1,768 | 928 | 840 | 104 | 11 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module Life.Engine.HERMIT.HuttonS2 where
import Life.Types
import Data.List
import HERMIT.Set2.Life hiding (Board) -- so we have access to abs/rep functions
type Board = LifeBoard Config [Pos]
neighbs :: Config -> Pos -> [Pos]
neighbs c@((w,h),warp) (x,y) = i... | ku-fpg/better-life | Life/Engine/HERMIT/HuttonS2.hs | bsd-2-clause | 1,496 | 12 | 14 | 318 | 738 | 398 | 340 | 31 | 2 |
module Handler.Wiki
( getWikiHomeR
, getWikiR
) where
import Import
import Network.HTTP.Types (status301)
import qualified Data.Text as T
getWikiHomeR :: Handler Html
getWikiHomeR = redirect ("https://github.com/yesodweb/yesod-cookbook" :: T.Text)
getWikiR :: Text -> Handler Html
getWikiR path = redirect... | wolftune/yesodweb.com | Handler/Wiki.hs | bsd-2-clause | 434 | 0 | 7 | 78 | 98 | 57 | 41 | 13 | 1 |
module FJ.Common where
import Data.List
import Control.Monad.Identity
type Type = String
type Identifier = String
data Variable
= Variable
{ varType :: Type
, varName :: String
}
deriving (Eq, Show)
class Holder a where
getValue :: a b -> b
instance Holder Identity where
getValue = run... | ademinn/RefactoringVerification | src/lib/FJ/Common.hs | bsd-3-clause | 1,349 | 0 | 12 | 335 | 550 | 289 | 261 | -1 | -1 |
-- | The /basic/ interface is the closest to the original.
-- Although it contains some variations too.
--
-- For several reasons, it is recommended to use the /mid/
-- interface instead, which can be found in the
-- "Graphics.Web.Processing.Mid" module.
module Graphics.Web.Processing.Basic (
-- * Types
... | Daniel-Diaz/processing | Graphics/Web/Processing/Basic.hs | bsd-3-clause | 738 | 0 | 5 | 121 | 89 | 69 | 20 | 9 | 0 |
module Spire.Expression.Embedder where
import Unbound.LocallyNameless
import Control.Applicative
import Spire.Canonical.Types
import Spire.Expression.Types
import Spire.Surface.Types
----------------------------------------------------------------------
embedI :: Infer -> FreshM Syntax
embedI (IPi _A _B) = ... | spire/spire | src/Spire/Expression/Embedder.hs | bsd-3-clause | 1,625 | 0 | 9 | 382 | 631 | 304 | 327 | 33 | 1 |
{- |
Conceptually, this library provides a way to arbitrarily extend the
global state represented by the IO monad. Viewed another way, this
library provides a basic facility for setting and retrieving values
from global variables.
The interface takes the form of a very basic key-value store, with
multiple different st... | willdonnelly/io-storage | System/IO/Storage.hs | bsd-3-clause | 3,888 | 0 | 14 | 854 | 820 | 427 | 393 | 58 | 2 |
--
-- Copyright (c) 2009-2011, ERICSSON AB
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list... | rCEx/feldspar-lang-small | src/Feldspar/Core/Frontend/Eq.hs | bsd-3-clause | 2,820 | 0 | 9 | 613 | 606 | 337 | 269 | 37 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE Rank2Types #-}
module Scripts.Assignment where
import ClassyPrelude
import Appian
import Appian.Types
import Appian.Instances
import Appian.Lens
import Appian.Client
import Data.Aeson
import Data.Aeson... | limaner2002/EPC-tools | USACScripts/src/Scripts/Assignment.hs | bsd-3-clause | 2,041 | 0 | 16 | 279 | 480 | 245 | 235 | -1 | -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.
module Duckling.Dimensions.FR
( allDimensions
) where
import Duckling.Dimensions.Types
allDimensions :: [Se... | facebookincubator/duckling | Duckling/Dimensions/FR.hs | bsd-3-clause | 493 | 0 | 6 | 100 | 87 | 50 | 37 | 13 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Guesswork.Analyze where
import Guesswork.Types
import Guesswork.Math.Statistics as S
import qualified Guesswork.Estimate as ESTIMATE
import Text.Printf
data (Sample a) => Analyzed a =
Analyzed { trace :: Trace
, minError :: Double
, maxError :: Dou... | deggis/guesswork | src/Guesswork/Analyze.hs | bsd-3-clause | 994 | 0 | 10 | 273 | 271 | 150 | 121 | 24 | 1 |
-- |
-- Module: $HEADER$
-- Description: Minimalistic lens-like data accessors.
-- Copyright: (c) 2013 Peter Trsko
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: experimental
-- Portability: portable
--
-- Minimalistic lens-like data accessors.
module Main.MiniLens
( L
... | trskop/hpwgen | src/Main/MiniLens.hs | bsd-3-clause | 611 | 0 | 9 | 167 | 192 | 114 | 78 | 13 | 1 |
module Settings.Builders.Happy (happyBuilderArgs) where
import Expression
import Predicates (builder)
happyBuilderArgs :: Args
happyBuilderArgs = builder Happy ? mconcat [ arg "-agc"
, arg "--strict"
, arg =<< getInput
... | quchen/shaking-up-ghc | src/Settings/Builders/Happy.hs | bsd-3-clause | 382 | 0 | 8 | 166 | 75 | 42 | 33 | 8 | 1 |
module SpecHelper
( module Test.Hspec
, module Envirius.Util
) where
import Test.Hspec
import Envirius.Util
| ekalinin/envirius.hs | test/SpecHelper.hs | bsd-3-clause | 121 | 0 | 5 | 27 | 28 | 18 | 10 | 5 | 0 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.MapBufferRange
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabili... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/MapBufferRange.hs | bsd-3-clause | 926 | 0 | 5 | 124 | 85 | 60 | 25 | 15 | 0 |
{-# OPTIONS_GHC -Wall #-}
module Transform.Declaration where
import Control.Applicative ((<$>))
import qualified SourceSyntax.Pattern as P
import SourceSyntax.Expression as E
import SourceSyntax.Declaration as D
import qualified Transform.Expression as Expr
import qualified Transform.Definition as Def
combineAnnota... | deadfoxygrandpa/Elm | compiler/Transform/Declaration.hs | bsd-3-clause | 2,342 | 0 | 24 | 950 | 625 | 313 | 312 | 44 | 10 |
{-# LANGUAGE GADTs, TypeFamilies, Rank2Types, KindSignatures, TypeOperators, FlexibleContexts, CPP #-}
#include "macros.h"
LANGUAGE_TRUSTWORTHY
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Types and functions for storing and manipulating evidence of equality between types of higher kind.
--
-- Available u... | glaebhoerl/type-eq | Type/Eq/Higher.hs | bsd-3-clause | 3,198 | 59 | 15 | 664 | 1,205 | 655 | 550 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcPatSyn]{Typechecking pattern synonym declarations}
-}
{-# LANGUAGE CPP #-}
module TcPatSyn ( tcPatSynSig, tcInferPatSynDecl, tcCheckPatSynDecl
, tcPatSynBuilderBind, tcPatSynBuilderOcc, nonBidir... | nushio3/ghc | compiler/typecheck/TcPatSyn.hs | bsd-3-clause | 37,580 | 0 | 22 | 12,840 | 7,698 | 3,989 | 3,709 | 546 | 19 |
{-# LINE 1 "fptools\libraries\base\System\Time.hsc" #-}
-----------------------------------------------------------------------------
{-# LINE 2 "fptools\libraries\base\System\Time.hsc" #-}
-- |
-- Module : System.Time
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file ... | OS2World/DEV-UTIL-HUGS | libraries/System/Time.hs | bsd-3-clause | 17,437 | 27 | 19 | 5,105 | 3,627 | 1,970 | 1,657 | 261 | 47 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE BangPatterns #-}
-- {-# OPTIONS_GHC -fno-warn- #-}
module PFDS.Sec3.Ex4c where
class Ord e => Heap h e where
empty :: h e
isEmpty :: h e -> Bool
insert :: e -> h e -> h e
merge :: h e -> h e -> h e
findMin :: ... | matonix/pfds | src/PFDS/Sec3/Ex4c.hs | bsd-3-clause | 1,777 | 0 | 12 | 620 | 863 | 431 | 432 | 49 | 1 |
{-# LANGUAGE ViewPatterns, PatternGuards, FlexibleContexts #-}
{-
Find and match:
<TEST>
yes = 1:2:[] -- [1,2]
yes = ['h','e','l','l','o']
yes (1:2:[]) = 1 -- [1,2]
yes ['h','e'] = 1
-- [a]++b -> a : b, but only if not in a chain of ++'s
yes = [x] ++ xs -- x : xs
no = "x" ++ xs
no = [x] ++ xs ++ ys
no = xs ++ [x]... | ndmitchell/hlint | src/Hint/List.hs | bsd-3-clause | 11,630 | 0 | 19 | 2,948 | 4,013 | 2,074 | 1,939 | 188 | 5 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Trans.Crtn.Event
-- Copyright : (c) 2012 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <ianwookim@gmail.com>
-- Stability : experimental
-- Portability : GHC
--
-- coroutine that can... | wavewave/coroutine-object | src/Control/Monad/Trans/Crtn/Event.hs | bsd-3-clause | 1,127 | 0 | 12 | 301 | 75 | 50 | 25 | 3 | 0 |
module Network.XmlPush.HttpPush (HttpPush, HttpPushArgs(..)) where
import Network.XmlPush.HttpPush.Body
| YoshikuniJujo/xml-push | src/Network/XmlPush/HttpPush.hs | bsd-3-clause | 105 | 0 | 5 | 8 | 26 | 18 | 8 | 2 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Spell.ByteString
where
import qualified Data.ByteString.Char8 as BS
import Data.ByteString (ByteString)
import Data.Monoid
import Data.List.Ordered (nubSort)
import Data.Ord
import Data.List
import Control.Monad
type Dict = ( ByteString -> Bool, ByteString -> Int )
singles ... | erantapaa/test-spelling | src/Spell/ByteString.hs | bsd-3-clause | 1,814 | 0 | 15 | 466 | 680 | 367 | 313 | 39 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
module Physics.Falling.Shape.TransformableShape
(
TransformableShape(..)
)
where
class TransformableShape s t s' | s -> s' where
transformShape :: t -> s -> s'
| sebcrozet/falling | Physics/Falling/Shape/TransformableShape.hs | bsd-3-clause | 244 | 0 | 8 | 36 | 51 | 31 | 20 | 7 | 0 |
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ViewPatterns #-}
module PFDS.Sec10.Ex5 where
import PFDS.Commons.Queue
import Prelude hiding (head, tail)
data BQueue q a = E | Q Int [a] (q [a]) Int [a]
deriving instance (Show a, Show (q [a])) => Show (BQueue q a)
instance Queu... | matonix/pfds | src/PFDS/Sec10/Ex5.hs | bsd-3-clause | 1,298 | 0 | 12 | 277 | 554 | 289 | 265 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Description : Parsing messages received from IPython
--
-- This module is responsible for converting from low-level ByteStrings obtained from the 0MQ
-- sockets into Messages. The only exposed function is `parseMessage`, which should only be used in
-- the low-level 0MQ interfac... | artuuge/IHaskell | ipython-kernel/src/IHaskell/IPython/Message/Parser.hs | mit | 7,218 | 0 | 14 | 1,674 | 1,436 | 767 | 669 | 132 | 4 |
module HyLoRes.Core.SMP ( runHyLoRes )
where
import Control.Concurrent
import Control.Monad.State
import Data.Array
import Data.IORef
import Data.Foldable ( foldMap )
import HyLoRes.Clause.BasicClause ( BasicClause )
import HyLoRes.Clause.SelFunction ( SelFunc, fromSelFuncString )
import qualified HyLoRes.Subsump... | nevrenato/HyLoRes_Source | src/HyLoRes/Core/SMP.hs | gpl-2.0 | 3,366 | 0 | 17 | 1,134 | 837 | 467 | 370 | 70 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/Types.hs | mpl-2.0 | 120,785 | 0 | 72 | 30,500 | 20,320 | 11,653 | 8,667 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module ... | advancedtelematic/quickcheck-state-machine-model | src/Test/StateMachine/Labelling.hs | bsd-3-clause | 5,111 | 0 | 15 | 1,404 | 1,392 | 757 | 635 | 91 | 4 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GADTs #-}
module Bench.AltState where
import Pure.Bench
import Pure.Test
import Ef
import Ef.Interpreter as I
import qualified Control.Monad.Trans.State as T
import Data.Functor.Identity
suite :: Test Sy... | grumply/Ef | bench/Bench/AltState.hs | bsd-3-clause | 1,687 | 0 | 12 | 399 | 597 | 315 | 282 | 50 | 2 |
-- | HEC usage analysis.
-- Count time spent with none, some and all HECs active or in garbage collection.
module HecUsage where
import GHC.RTS.Events
import GHC.RTS.Events.Analysis
import Pretty
import Data.Map (Map)
import qualified Data.Map as M
-- | Count results as either N HECs active, or some GC going on
... | mainland/dph | dph-event-seer/src/HecUsage.hs | bsd-3-clause | 3,703 | 0 | 15 | 1,215 | 990 | 525 | 465 | -1 | -1 |
module Parse.Module (moduleDecl, header, getModuleName) where
import Control.Applicative ((<$>), (<*>))
import Text.Parsec hiding (newline, spaces)
import Parse.Helpers
import qualified AST.Module as Module
import qualified AST.Module.Name as ModuleName
import qualified AST.Variable as Var
import Reporting.Annotation... | Axure/elm-compiler | src/Parse/Module.hs | bsd-3-clause | 3,112 | 0 | 15 | 851 | 944 | 468 | 476 | 90 | 2 |
-- (c) The University of Glasgow, 2006
{-# LANGUAGE CPP, ScopedTypeVariables #-}
-- | Package manipulation
module Packages (
module PackageConfig,
-- * Reading the package config, and processing cmdline args
PackageState(preloadPackages),
emptyPackageState,
initPackages,
... | ghc-android/ghc | compiler/main/Packages.hs | bsd-3-clause | 60,202 | 239 | 22 | 16,171 | 10,495 | 5,699 | 4,796 | 842 | 11 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module Stack.ConfigSpec where
import Control.Applicative
import Control.Monad.Logger
import Control.Exception
import Data.Maybe
import Data.Monoid
import Network.HTTP.Conduit (Manager)
import Path
import Path.IO
--imp... | harendra-kumar/stack | src/test/Stack/ConfigSpec.hs | bsd-3-clause | 3,949 | 0 | 27 | 932 | 997 | 479 | 518 | 90 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RankNTypes #-}
module Database.Persist.Sql.Types.Internal
( HasPersistBackend (..)
, IsPersistBackend (..)
, SqlReadBackend (..)
, SqlWriteBackend (..)
, readToUnknown
, readToWrite
, writeToUnknown
, LogFu... | naushadh/persistent | persistent/Database/Persist/Sql/Types/Internal.hs | mit | 8,270 | 0 | 16 | 1,758 | 1,493 | 874 | 619 | -1 | -1 |
{--------------------------------------------------------------------------------
Bouncing Balls demo
--------------------------------------------------------------------------------}
module Main where
import Graphics.UI.WX
main
= start ballsFrame
ballsFrame
= do -- a list of balls, where each ball is represen... | ekmett/wxHaskell | samples/wx/BouncingBalls.hs | lgpl-2.1 | 2,760 | 0 | 16 | 959 | 748 | 382 | 366 | 47 | 1 |
#!/usr/bin/env runghc
import Data.List
import Control.Applicative ((<$>))
import Control.Monad
import System.Directory
import System.FilePath
import System.Process
import System.Exit
topModules :: [String]
topModules =
words
("dist/build/autogen/Paths_nikki " ++
"Base Control Data Editor Game Graphic... | nikki-and-the-robots/nikki | src/haddock.hs | lgpl-3.0 | 2,215 | 0 | 14 | 454 | 585 | 292 | 293 | 50 | 3 |
-- | Packrat parsing: Simple, Powerful, Lazy, Linear time by Bryan
-- Ford. This module achieves monadic parsing library similar to
-- Parsec.
module Text.Packrat.Parse where
import Prelude hiding (exp, rem)
import Data.Char
import Data.List
import Text.Packrat.Pos
import Control.Monad
-- Data types
data Message... | beni55/HaskellNet | src/Text/Packrat/Parse.hs | bsd-3-clause | 12,028 | 5 | 16 | 3,718 | 4,736 | 2,310 | 2,426 | 242 | 3 |
{-
This File exports the list of known parsers for astview.
You can extend the list with your own parsers as proposed with the
CustomParsers.hs module and the concatenation of the list.
Beware, this file will be overwritten when updating the package.
-}
module Parsers where
-- container
import Data.Tree (Tree(Nod... | RefactoringTools/HaRe | hareview/keep/Parsers.hs | bsd-3-clause | 1,442 | 0 | 8 | 241 | 237 | 138 | 99 | 17 | 1 |
module MapDeclMPropStruct where
import MapDeclM
import HsPropStruct
import HsPropMaps
-- we assume only "expressions" & "declarations" may contain declarations
instance (MapDeclM pa ds,MapDeclM pp ds) => MapDeclM (PD i pa pp) ds where
mapDeclM f = seqPD . mapPD return m m
where m x = mapDeclM f x
instance ... | forste/haReFork | tools/property/transforms/MapDeclMPropStruct.hs | bsd-3-clause | 685 | 0 | 8 | 171 | 269 | 136 | 133 | -1 | -1 |
{-# Language PolyKinds, UndecidableInstances #-}
module T13603 where
import GHC.Exts (TYPE, RuntimeRep)
class A (a :: TYPE rep)
class A a => B (a :: TYPE rep)
instance A b => A (a -> (b :: TYPE rep))
instance B b => B (a -> (b :: TYPE rep))
| sdiehl/ghc | testsuite/tests/typecheck/should_compile/T13603.hs | bsd-3-clause | 251 | 0 | 10 | 59 | 117 | 61 | 56 | -1 | -1 |
-- Copyright (c) 2000 Galois Connections, Inc.
-- All rights reserved. This software is distributed as
-- free software under the license in the file "LICENSE",
-- which is included in the distribution.
module Data where
import Data.Array
import CSG
import Geometry
import Illumination
import Primitives
import Surfa... | forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/programs/galois_raytrace/Data.hs | bsd-3-clause | 13,148 | 194 | 17 | 3,647 | 4,022 | 2,258 | 1,764 | 312 | 1 |
module ParserState
( Parser
, ParserT
, ParserState (..)
, FuncTable
, initParserState
, nextLabel
, newFunc
, lookupFunc
) where
import qualified Data.Map as M
import Control.Monad.State
import Lexer (Token)
type FuncTable = M.Map [Char] [Char]
data ParserState = ParserState
{ parserFuncTable :: ... | CindyLinz/Talk-HappyMonadFix-Easy-NPassCompiler | ParserState.hs | mit | 1,492 | 0 | 14 | 362 | 480 | 255 | 225 | 51 | 2 |
module BlocVoting.Tally.Tally where
import BlocVoting.Tally.Resolution
import BlocVoting.Tally.Vote
data Tally = Tally {
tResolution :: Resolution
, tVotes :: [Vote]
}
deriving (Show, Eq)
| XertroV/blocvoting | src/BlocVoting/Tally/Tally.hs | mit | 198 | 0 | 9 | 33 | 54 | 34 | 20 | 7 | 0 |
module E05.A1 where
-- We have already seen zipWith in the last exercise, were we used it to
-- implement pleat'. See the Haskell docs for more info:
-- http://hackage.haskell.org/package/base-4.8.0.0/docs/Prelude.html#v:zipWith
-- Here's an implementation of zipWith:
{-
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
z... | sebschrader/programmierung-ss2015 | E05/A1.hs | mit | 2,486 | 0 | 10 | 598 | 413 | 223 | 190 | 21 | 0 |
module Ch5 where
functionH :: [a] -> Maybe a
functionH [] = Nothing
functionH (x:_) = Just x
functionC :: Ord a => a -> a -> Bool
functionC x y = x > y
functionS :: (a, b) -> b
functionS (_, y) = y
i :: a -> a
i = id
c :: a -> b -> a
c x _ = x
c'' :: b -> a -> b
c'' x _ = x
c' :: a -> b -> b
c' _ x = x
r :: [a]... | timtian090/Playground | Haskell/HaskellProgramming/Ch5.hs | mit | 465 | 0 | 8 | 156 | 319 | 172 | 147 | 24 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module IHaskell.Display.Widgets.String.TextArea
( -- * The TextArea Widget
TextArea
-- * Constructor
, mkTextArea
) where
-- To keep `cabal repl` happy when running fro... | gibiansky/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/TextArea.hs | mit | 2,027 | 0 | 15 | 512 | 392 | 217 | 175 | 45 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module View.Main where
import Data.Monoid
import qualified Data.Set as Set
import Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import Types
import View.Log
links :: Html
links = ... | adzeitor/http-debug | src/View/Main.hs | mit | 882 | 0 | 19 | 301 | 280 | 144 | 136 | 31 | 1 |
module Main (main) where
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
arguments :: [String]
arguments =
[ "--cpp-simple"
, "examples"
, "src"
, "tests"
]
main :: IO ()
main = do
hints <- hlint arguments
if null hints then exitSuccess else exitFailure... | jdreaver/iris | tests/HLint.hs | mit | 321 | 0 | 8 | 74 | 97 | 56 | 41 | 13 | 2 |
module Proteome.Diag where
import qualified Control.Lens as Lens (view)
import Data.Map (foldMapWithKey)
import qualified Data.Text as Text (intercalate)
import Neovim (CommandArguments)
import Path (toFilePath)
import Ribosome.Data.ErrorReport (ErrorReport (ErrorReport))
import Ribosome.Data.Errors (ComponentName (Co... | tek/proteome | packages/proteome/lib/Proteome/Diag.hs | mit | 4,638 | 0 | 14 | 807 | 1,529 | 813 | 716 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Network.BitSmuggler.StreamMultiplex where
import Prelude as P
import Data.Typeable
import Data.Conduit as DC
import Data.Conduit.List as DC
import Data.Conduit.Cereal
import Data.Conduit.Network
import qualified Network.TCP.Proxy.Server a... | danoctavian/bit-smuggler | BitSmuggler/src/Network/BitSmuggler/StreamMultiplex.hs | gpl-2.0 | 4,583 | 0 | 16 | 956 | 1,297 | 671 | 626 | 99 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-| The implementation of Ganeti WConfd daemon server.
As TemplateHaskell require that splices be defined in a separate
module, we combine all the TemplateHaskell functionality that HTools
needs in this module (except the one for unittests).
-}
{-
Copyright (C) 2013, 2014 Google In... | kawamuray/ganeti | src/Ganeti/WConfd/Server.hs | gpl-2.0 | 3,616 | 0 | 14 | 730 | 602 | 320 | 282 | 69 | 2 |
module Octree where
---------------------------------------------------------
import Data.Bits
import qualified Data.List as L
import Vec3D
---------------------------------------------------------
data Octree a = Node
{ center :: Vec3D
, len :: Float
, ftr,... | Chase-C/Octree | src/Octree.hs | gpl-2.0 | 8,285 | 0 | 14 | 2,524 | 3,442 | 1,799 | 1,643 | 163 | 8 |
{-|
Print a histogram report. (The "activity" command).
-}
module Hledger.Cli.Histogram
where
import Data.List
import Data.Maybe
import Data.Ord
import System.Console.CmdArgs.Explicit
import Text.Printf
import Hledger
import Hledger.Cli.Options
import Prelude hiding (putStr)
import Hledger.Utils.UTF8IOCompat (putS... | kmels/hledger | hledger/Hledger/Cli/Histogram.hs | gpl-3.0 | 1,876 | 0 | 11 | 373 | 502 | 274 | 228 | 36 | 1 |
module Parser.VolChpPrinter
( comicTagToFilePath
, unitTagToFilePath
, unitTagString
, formatListDigits
, formatDigits
, formatDigit
, formatSubDigit
, formatVersion
) where
import System.FilePath ((</>))
import qualified System.FilePath as FP
import Data.Maybe
import qualified Da... | pharaun/hComicFetcher | src/Parser/VolChpPrinter.hs | gpl-3.0 | 3,181 | 0 | 14 | 658 | 1,146 | 595 | 551 | 61 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-route53-domains/gen/Network/AWS/Route53Domains/UpdateDomainContactPrivacy.hs | mpl-2.0 | 7,220 | 0 | 9 | 1,391 | 719 | 454 | 265 | 75 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-maps-engine/gen/Network/Google/Resource/MapsEngine/Rasters/Permissions/BatchDelete.hs | mpl-2.0 | 3,707 | 0 | 15 | 828 | 391 | 235 | 156 | 65 | 1 |
module Crypto.Secp256k1Spec (spec) where
import Control.Monad.Par
import qualified Control.Monad.Par as P
import Crypto.Secp256k1
import qualified Data.ByteString as BS
import qualified Data.ByteString.Base16 as B16
import qualified Data.ByteString.Char8 as B8
import Data... | haskoin/secp256k1-haskell | test/Crypto/Secp256k1Spec.hs | unlicense | 9,601 | 0 | 14 | 2,272 | 2,165 | 1,071 | 1,094 | 211 | 2 |
import Control.Applicative
combos :: Int -> [Int] -> Int
combos target = matches . subSeqTotals target . inputs
where coins = [10,5,2,1]
inputs = map explode . zip coins . reverse
explode (c, n) = reverse $ takeWhile (<= target) $ map (* c) [0..n]
matches = length . filter (== target... | itsbruce/hackerrank | alg/discrete/coinage.hs | unlicense | 821 | 0 | 12 | 266 | 364 | 185 | 179 | 21 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1.MetadataFile where
import GHC.Generics
import Data.Text
import Openshift.V1.ObjectFieldSelector
import qualified Data.Aeson
-- | ... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/MetadataFile.hs | apache-2.0 | 695 | 0 | 8 | 100 | 93 | 58 | 35 | 16 | 0 |
{-# LANGUAGE OverloadedStrings, JavaScriptFFI #-}
module Lib
( someFunc
) where
import GHCJS.Foreign ()
import GHCJS.Types
import Data.JSString ()
foreign import javascript unsafe "window.alert($1)" js_alert :: JSString -> IO ()
someFunc :: IO ()
someFunc = do
print "Test"
js_alert "Hello from GHCJS!... | Drezil/SatoriTab | src/Lib.hs | apache-2.0 | 322 | 4 | 7 | 62 | 82 | 44 | 38 | 11 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Node where
import Control.Lens
import Control.Lens.TH
import Control.Concurrent.STM
import NodeState
import Cluster
import Position
import Commutating
import qualified Transaction
import qualified TransactionState
import qualified DeliveryQueue as DQ
newtype NodeID = NodeID In... | kdkeyser/halvin | src/halvin/Node.hs | apache-2.0 | 1,885 | 0 | 13 | 336 | 495 | 255 | 240 | -1 | -1 |
module Auth0.Management.Clients where
--------------------------------------------------------------------------------
import Data.Aeson
import Data.Map
import Data.Proxy
import Data.Text
import GHC.Generics
import Servant.API
import Servant.Client
----------------------------------------------------------------------... | alasconnect/auth0 | src/Auth0/Management/Clients.hs | apache-2.0 | 8,109 | 0 | 13 | 2,028 | 1,822 | 990 | 832 | -1 | -1 |
{-# LANGUAGE RebindableSyntax, NoMonomorphismRestriction #-}
import Prelude hiding (Monad(..))
import Control.Effect
import Control.Effect.Cond
import Control.Effect.ReadOnceReader
foo = do x <- ask
y <- ask
return ("Name " ++ x ++ " age " ++ (show y))
--foo_eval = foo (HCons' 'a' (HCons' "bc" HNil... | dorchard/effect-monad | examples/ReadOnceReader.hs | bsd-2-clause | 735 | 0 | 12 | 244 | 275 | 137 | 138 | 21 | 1 |
module Repo.Repo where
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad.Reader
import Config
import Types
import qualified Store as ST
import qualified Log as LG
import Repo.Rrdp
import ... | lolepezy/rpki-pub-server | src/Repo/Repo.hs | bsd-2-clause | 1,771 | 0 | 16 | 578 | 399 | 207 | 192 | 36 | 1 |
module Crypto.PubKey.ECC.DH (
Curve
, PublicPoint
, PrivateNumber
, SharedKey(..)
, generatePrivate
, calculatePublic
, getShared
) where
import Crypto.Number.Generate (generateMax)
import Crypto.PubKey.ECC.Prim (pointMul)
import Crypto.Random (CPRG)
import Crypto.Types.PubKey.DH (SharedKey(..))
impo... | vincenthz/hs-crypto-pubkey | Crypto/PubKey/ECC/DH.hs | bsd-2-clause | 1,071 | 0 | 8 | 193 | 287 | 167 | 120 | 24 | 1 |
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE UndecidableInstances #-}
module Bug1063 where
class (c => d) => Implies c d
instance (c => d) => Implies c d
| haskell/haddock | html-test/src/Bug1063.hs | bsd-2-clause | 301 | 0 | 7 | 47 | 52 | 29 | 23 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
module YesodDsl.AST where
import Data.Maybe
import Data.List
import Data.Char
import Data.Data (Data)
import Data.Typeable (Typeable)
import Data.Generics.Uniplate.Data
import qualified Data.Map as Map
data Module = Module {
modName :: Maybe String,
modEntities :: ... | tlaitinen/yesod-dsl | YesodDsl/AST.hs | bsd-2-clause | 11,368 | 0 | 15 | 3,322 | 3,349 | 1,858 | 1,491 | 287 | 9 |
module Lexer
( whitespace
, varid
, qvarid
, tyvar
, conid
, qconid
, tycon
, qtycon
, tycls
, qtycls
, reservedid
, varsym
, qvarsym
, consym
, qconsym
, reservedop
, modid
)
where
import Data.List
import Data.Maybe
import Data.Scientific
import Control.Monad (void)
import Text.Meg... | toonn/quintessence | src/Lexer.hs | bsd-2-clause | 5,908 | 0 | 14 | 1,397 | 1,934 | 1,041 | 893 | 172 | 2 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
-- |Monadic Iteratees: incremental input parsers, processors, and transformers
--
-- Maps over restricted-element containers
module Data.Iteratee.Base.LooseMap (
LooseMap (..)
)
where
-- |Enable map functions for containers that require cla... | JohnLato/iteratee | src/Data/Iteratee/Base/LooseMap.hs | bsd-3-clause | 520 | 0 | 9 | 91 | 82 | 48 | 34 | 8 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.