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 DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
module Lib where
import Control.Monad.Trans.Except (ExceptT, runExceptT)
import Data.Aeson
import Data.Proxy
import Data.Text (Text)
import GHC.Generics
import Network.HTTP.Client (Manager, newMa... | chris-kahn/servant-client-example | src/Lib.hs | bsd-3-clause | 877 | 0 | 10 | 150 | 249 | 142 | 107 | 26 | 1 |
module Main where
import Foreign.C
import Foreign.DSL
import DSL (DSL)
import qualified DSL as D
foreign import ccall "test.h test"
test_c :: DSLChunks DSL -> IO ()
main :: IO ()
main = do
prg <- runForeignDSL test_c
D.runDSL prg
| fizruk/ffi-dsl | examples/free/Main.hs | bsd-3-clause | 240 | 0 | 8 | 50 | 85 | 46 | 39 | 11 | 1 |
{-# LANGUAGE NamedWildcards, ScopedTypeVariables, RankNTypes #-}
module WildcardInstantiations where
foo :: (Show _a, _) => _a -> _
foo x = show (succ x)
bar :: _ -> _ -> _
bar x y = y x
| bitemyapp/ghc | testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.hs | bsd-3-clause | 190 | 0 | 7 | 40 | 70 | 37 | 33 | 6 | 1 |
{-# LANGUAGE
DeriveGeneric
, FlexibleInstances
, LambdaCase
, MultiParamTypeClasses
, Rank2Types
, TypeFamilies #-}
module Type.Permission
( Permission (..)
, green
, red
, toScopedEffect
, Permissions
, getPermissions
, permissions
) where
import C... | sonyandy/mlf | src/Type/Permission.hs | bsd-3-clause | 3,573 | 0 | 27 | 835 | 1,289 | 680 | 609 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : ./Propositional/Symbol.hs
Description : Symbols of propositional logic
Copyright : (c) Dominik Luecke, Uni Bremen 2007
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability : experimental
Portability : po... | spechub/Hets | Propositional/Symbol.hs | gpl-2.0 | 2,454 | 0 | 16 | 579 | 485 | 277 | 208 | 45 | 1 |
{-# LANGUAGE CPP, OverloadedStrings #-}
module Haste.PrimOps (genOp) where
import Prelude hiding (LT, GT)
import PrimOp
import Data.JSTarget
import Haste.Config
-- | Dummy State# RealWorld value for where one is needed.
defState :: Exp
defState = litN 0
-- | Generate primops.
-- Many of these ops return lifted Bool... | santolucito/haste-compiler | src/Haste/PrimOps.hs | bsd-3-clause | 14,428 | 0 | 16 | 4,054 | 4,095 | 1,966 | 2,129 | 293 | 252 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANG... | mrkkrp/stack | src/Stack/Package.hs | bsd-3-clause | 52,562 | 0 | 23 | 15,869 | 12,125 | 6,275 | 5,850 | -1 | -1 |
-- | Text frontend based on HSCurses. This frontend is not fully supported
-- due to the limitations of the curses library (keys, colours, last character
-- of the last line).
module Game.LambdaHack.Client.UI.Frontend.Curses
( -- * Session data type for the frontend
FrontendSession(sescMVar)
-- * The output a... | Concomitant/LambdaHack | Game/LambdaHack/Client/UI/Frontend/Curses.hs | bsd-3-clause | 6,836 | 0 | 15 | 1,614 | 1,866 | 1,003 | 863 | -1 | -1 |
module Haste.Opts (hasteOpts, helpHeader) where
import System.Console.GetOpt
import Haste.Config
import Haste.Environment
import Data.JSTarget.PP (debugPPOpts)
import Data.List
import Control.Shell ((</>))
-- | Haste's command line options. The boolean indicates whether we're running
-- unbooted or not. When unboote... | akru/haste-compiler | src/Haste/Opts.hs | bsd-3-clause | 9,262 | 0 | 18 | 2,617 | 1,612 | 895 | 717 | 178 | 2 |
{-# LANGUAGE OverloadedStrings, CPP #-}
-- |
-- Module: Network.Riak.Request
-- Copyright: (c) 2011 MailRank, Inc.
-- License: Apache
-- Maintainer: Mark Hibberd <mark@hibberd.id.au>, Nathan Hunter <nhunter@janrain.com>
-- Stability: experimental
-- Portability: portable
--
-- Smart constructors for Riak... | k-bx/riak-haskell-client | src/Network/Riak/Request.hs | apache-2.0 | 10,594 | 0 | 13 | 3,301 | 1,843 | 1,093 | 750 | 192 | 4 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables, RankNTypes, DeriveDataTypeable #-}
-- | Run external pagers (@$PAGER@, @less@, @more@).
module System.Process.Pager
( pageWriter
, pageText
, PagerException (..)
) where
import Stack.Prelude
import System.Directory (findExecutable)
import Sy... | juhp/stack | src/System/Process/Pager.hs | bsd-3-clause | 2,338 | 0 | 19 | 776 | 537 | 288 | 249 | 48 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Instances where
import Language.Lua.Token
import Language.Lua.Syntax
import Languag... | mitchellwrosen/language-lua2 | test/Instances.hs | bsd-3-clause | 9,437 | 0 | 14 | 2,795 | 2,563 | 1,350 | 1,213 | 199 | 0 |
module Lib
( someFunc
) where
someFunc :: IO ()
someFunc = do
putStrLn "hello world"
| juhp/stack | test/integration/tests/cabal-public-sublibraries/files/src/Lib.hs | bsd-3-clause | 92 | 0 | 7 | 23 | 30 | 16 | 14 | 5 | 1 |
------------------------------------------------------------------------------
-- |
-- Module: Database.PostgreSQL.Simple.Time.Internal
-- Copyright: (c) 2012 Leon P Smith
-- License: BSD3
-- Maintainer: Leon P Smith <leon@melding-monads.com>
-- Stability: experimental
--
---------------------------------... | avieth/postgresql-simple | src/Database/PostgreSQL/Simple/Time/Internal.hs | bsd-3-clause | 753 | 0 | 4 | 145 | 67 | 49 | 18 | 15 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module TH_NestedSplices where
import Language.Haskell.TH
import TH_NestedSplices_Lib
-- This import brings in
-- spliceExpr :: String -> Q Exp -> Q Exp
-- declareFun :: String -> Q [Dec]
-- Top level splice without $
declareFun "a"
-- Splice inside splice
$(declareFun $(stringE ... | sdiehl/ghc | testsuite/tests/th/TH_NestedSplices.hs | bsd-3-clause | 699 | 0 | 12 | 131 | 145 | 82 | 63 | 13 | 1 |
-- |
-- Module : Data.Array.Accelerate.CUDA.Foreign
-- Copyright : [2013..2014] Manuel M T Chakravarty, Gabriele Keller, Trevor L. McDonell, Robert Clifton-Everest
-- License : BSD3
--
-- Maintainer : Robert Clifton-Everest <robertce@cse.unsw.edu.au>
-- Stability : experimental
-- Portability : non-portab... | flowbox-public/accelerate-cuda | Data/Array/Accelerate/CUDA/Foreign.hs | bsd-3-clause | 602 | 0 | 5 | 79 | 59 | 48 | 11 | 5 | 0 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, TypeFamilies #-}
module PushedInAsGivens where
type family F a
bar y = let foo :: (F Int ~ [a]) => a -> Int
foo x = length [x,y]
in (y,foo y)
-- This example demonstrates why we need to push in
-- an uns... | frantisekfarka/ghc-dsi | testsuite/tests/indexed-types/should_compile/PushedInAsGivens.hs | bsd-3-clause | 750 | 0 | 12 | 193 | 85 | 50 | 35 | 6 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.Read
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libr... | rahulmutt/ghcvm | libraries/base/Text/Read.hs | bsd-3-clause | 3,064 | 0 | 10 | 605 | 392 | 237 | 155 | 41 | 3 |
{-# OPTIONS_GHC -Wall #-}
module Completesig06 where
-- Some non-exhaustive examples
data T = A | B | C
data S = D | E | F
{-# COMPLETE A, B #-}
{-# COMPLETE D #-}
m1 :: T -> ()
m1 A = ()
m2 :: T -> ()
m2 B = ()
m2 C = ()
m3 :: T -> ()
m3 C = ()
m4 :: T -> S -> ()
m4 A E = ()
m4 A F = ()
m4 B F = ()
m4 B E = ()
... | shlevy/ghc | testsuite/tests/pmcheck/complete_sigs/completesig06.hs | bsd-3-clause | 353 | 0 | 7 | 114 | 197 | 107 | 90 | 20 | 1 |
-- A.hs
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE StaticPointers #-}
module T12622_A where
import Data.Typeable
import GHC.StaticPtr
g :: a -> Bool
g _ = True
data T a = T {-# UNPACK #-} !(StaticPtr a)
sg :: Typeable a => T (a -> Bool)
sg = T (static g)
| ezyang/ghc | testsuite/tests/codeGen/should_run/T12622_A.hs | bsd-3-clause | 259 | 0 | 9 | 54 | 88 | 49 | 39 | 10 | 1 |
{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Zip
-- Copyright : (c) Nils Schweinsberg 2011,
-- (c) George Giorgidze 2011
-- (c) University Tuebingen 2011
-- License : BSD-style (see the fil... | urbanslug/ghc | libraries/base/Control/Monad/Zip.hs | bsd-3-clause | 2,055 | 0 | 10 | 483 | 397 | 222 | 175 | 30 | 0 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SourceInfo
(js_getSourceId, getSourceId, js_getKind, getKind, js_getLabel,
getLabel, SourceInfo, castToSourceInfo, gTypeSourceInfo)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Fl... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SourceInfo.hs | mit | 2,157 | 18 | 11 | 293 | 547 | 327 | 220 | 36 | 1 |
module BBQ.FTree (
mkFileTree
, PathTree
, filterFiles
, filterDirs
, filterFTree
, FTree(..)
) where
import System.Directory
import System.FilePath
import Control.Monad
import Data.Maybe
import Prelude
data FTree x = Dir x [FTree x]
| Regular x
deriving (Show)
filterFTree :: forall x. (x... | izgzhen/bbq-sg | src/BBQ/FTree.hs | mit | 1,336 | 0 | 14 | 437 | 482 | 249 | 233 | -1 | -1 |
{-# LANGUAGE
TemplateHaskell, TypeSynonymInstances, ScopedTypeVariables #-}
module DB where
import ClassyPrelude
import Control.Lens
import Data.UUID
import System.Directory (
getAppUserDataDirectory, doesFileExist, createDirectoryIfMissing)
import System.Posix (getFileStatus, fileSize)
import qualified Data.Aeso... | aelve/Jane | Db.hs | mit | 2,355 | 0 | 14 | 639 | 725 | 377 | 348 | 66 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Language.C.Inline.FunPtr
( mkFunPtr
, mkFunPtrFromName
, peekFunPtr
, uniqueFfiImportName
) where
import Foreign.Ptr (FunPtr)
import qualified Language.Haskell.TH as TH
import qualified Language.Haskell.TH.Syntax as TH
---------... | mitchellwrosen/inline-c | src/Language/C/Inline/FunPtr.hs | mit | 1,937 | 0 | 11 | 328 | 327 | 185 | 142 | 30 | 2 |
module Ghost_machine
where
import Lambdaman_types
import Data.Vector ((!), (//))
import Data.Bits
import Text.Printf
import Debug.Trace
data GhostExecuteStatus = GhostExecuteRunning | GhostExecuteHalt | GhostExecuteError
deriving (Show, Eq, Ord, Bounded, Enum)
data GhostExecutionState = ... | ychin/icfp_2014_CannonBrawl | code/ghost_machine.hs | mit | 21,676 | 128 | 13 | 3,185 | 4,445 | 2,300 | 2,145 | -1 | -1 |
module Tree where
import Data.Foldable (Foldable, traverse_)
import qualified Data.Foldable as F
import Data.Monoid ((<>))
import Data.Traversable (Traversable)
import qualified Data.Traversable as T
-- http://stackoverflow.com/a/6799885
-- Edward Kmett shows that this has a g... | genos/Programming | workbench/Tree.hs | mit | 1,842 | 0 | 11 | 532 | 1,000 | 514 | 486 | 53 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
-- | Utilities which don't fit in any particular place.
module Distill.Util where
import Control.Monad.State
import Text.PrettyPrint
-- | Class of objects which can be pretty-printed.
class Pretty a where
-- | Pretty-print an object.
ppr :: a -> ... | DNoved1/distill | src/Distill/Util.hs | mit | 822 | 0 | 8 | 173 | 167 | 90 | 77 | 17 | 2 |
module Robot (Bearing(..),
mkRobot,
coordinates,
bearing,
move,
) where
import Data.List (foldl')
import Control.Arrow (first, second)
data Movement = TurnLeft
| TurnRight
| Advance
deriving (Show, Eq, Enum)... | exercism/xhaskell | exercises/practice/robot-simulator/.meta/examples/success-standard/src/Robot.hs | mit | 1,573 | 0 | 13 | 538 | 515 | 274 | 241 | 46 | 4 |
-- | Supporting functions for turn system.
--
-- Extremely simple at the moment, turns are just integers and there are no
-- actions that take less than one turn.
module RWPAS.Turn
( Turns )
where
-- | Type describing the number of turns.
type Turns = Integer
| Noeda/rwpas | src/RWPAS/Turn.hs | mit | 267 | 0 | 4 | 55 | 22 | 16 | 6 | 3 | 0 |
module Y2016.M09.D19.Exercise where
-- Below imports available in 1HaskellADay git repository
import Data.BlockChain.Block.Types
import Data.Graphics.SVG
import Data.Monetary.BitCoin
import Data.Relation
import Data.Tree.Merkle
import Graph.JSON.Cypher
{--
Okay, from a couple of weeks ago, we are now creating Merkl... | geophf/1HaskellADay | exercises/HAD/Y2016/M09/D19/Exercise.hs | mit | 1,846 | 0 | 7 | 328 | 159 | 102 | 57 | 16 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Main where
import Control.Applicative
import Control.Concurrent
import Control.Distributed.Backend.P2P
import Control.Distributed.Process ... | AndrewRademacher/cyberwolf-test | src/Message.hs | mit | 3,972 | 0 | 15 | 1,454 | 1,078 | 561 | 517 | 72 | 2 |
module Data.Sudoku
( sudokuborders,
sudokubordersg,
)
where
import Data.Grid
import Data.GridShape
import qualified Data.Map.Strict as Map
msqrt :: Integral a => a -> Maybe a
msqrt x = if r ^ (2 :: Int) == x then Just r else Nothing
where
r = round . (sqrt :: Double -> Double) . fromIntegral $ x
mhalf ... | robx/puzzle-draw | src/Data/Sudoku.hs | mit | 1,211 | 0 | 13 | 334 | 540 | 287 | 253 | 25 | 3 |
{-# LANGUAGE PackageImports #-}
{-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-}
-- | Reexports "Foreign.ForeignPtr.Safe.Compat"
-- from a globally unique namespace.
module Foreign.ForeignPtr.Safe.Compat.Repl (
module Foreign.ForeignPtr.Safe.Compat
) where
import "this" Foreign.ForeignPtr.Safe.Com... | haskell-compat/base-compat | base-compat/src/Foreign/ForeignPtr/Safe/Compat/Repl.hs | mit | 324 | 0 | 5 | 31 | 31 | 24 | 7 | 5 | 0 |
import Game.Cosanostra.Glue.Instances.JSON ()
import Game.Cosanostra.Action
import Game.Cosanostra.Game
import Game.Cosanostra.Lenses
import Control.Lens
import qualified Data.ByteString.Char8 as BS
import Data.Yaml
import System.Environment
main :: IO ()
main = do
[gamePath, game'Path] <- getArgs
game <- ei... | rfw/cosanostra | glue/view-messages.hs | mit | 819 | 0 | 15 | 312 | 197 | 104 | 93 | 18 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# L... | DavidAlphaFox/yesod | yesod-auth/Yesod/Auth.hs | mit | 18,149 | 0 | 19 | 4,563 | 3,659 | 1,912 | 1,747 | 336 | 5 |
{-
Copyright (c) 2008
Russell O'Connor
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute... | haasn/colour | Data/Colour/Matrix.hs | mit | 1,536 | 0 | 13 | 240 | 465 | 261 | 204 | 12 | 1 |
{-|
Module : Control.Monad.Bayes.Samplers.RandomFu
Description : Psuedo-random sampling monads based on random-fu package
Copyright : (c) Adam Scibior, 2016
License : MIT
Maintainer : ams240@cam.ac.uk
Stability : experimental
Portability : GHC
Currently not included in the main monad-bayes package to red... | ocramz/monad-bayes | src/Control/Monad/Bayes/Samplers/RandomFu.hs | mit | 2,629 | 0 | 12 | 617 | 547 | 294 | 253 | 47 | 1 |
module E20 where
list = []
definition = last list == '\n' && list /= [] -- No exception is thrown.
{-
list = []
definition = list /= [] && last list == '\n' -- No exception is thrown.
-} | pascal-knodel/haskell-craft | Examples/· Errors/E20.hs | mit | 198 | 0 | 8 | 52 | 35 | 20 | 15 | 3 | 1 |
{-****************************************************************************
* Hamster Balls *
* Purpose: Color table, adapted from YampaArcade code by Henrik Nilson*
* Author: David, Harley, Alex, Matt *
* ... | harley/hamball | src/Colors.hs | mit | 4,313 | 198 | 9 | 1,153 | 1,478 | 830 | 648 | 113 | 1 |
-- |This implementation of the effect monad uses `Free` over a
-- `Union` of functors and then applies `Codensity` over it
-- for asymptotic improvements of ill-associated binds.
module Control.Effects.Eff
( Eff
, Handler
, Comp (Value, Comp)
, Res
, effect
, runPure
, runPureRes
, handle
, continue
, finish
, inj
, M... | edofic/effect-handlers | src/Control/Effects/Eff.hs | mit | 3,219 | 0 | 11 | 685 | 672 | 374 | 298 | -1 | -1 |
module DrawingWindow (showDrawingWindow) where
import Graphics.Gloss
import Graphics.Gloss.Interface.IO.Game
import Types
import Control.Concurrent (MVar, forkIO, takeMVar, putMVar)
import Control.Monad(forever)
width = 800
height = 600
data World = World {
worldObjects :: [Object]
, foreign... | NemoNessuno/SuperAwesomePictureChatOfDoom | DrawingWindow.hs | gpl-2.0 | 4,094 | 0 | 23 | 1,459 | 1,367 | 744 | 623 | 90 | 15 |
import Test.QuickCheck
import Utility
import Data.Word (Word32)
prop_toWord_reversible :: Word32 -> Bool
prop_toWord_reversible x = toWord32 (toWord8 x) == x
main = do
quickCheck prop_toWord_reversible
| siegfried/HSMiner | test/Test.hs | gpl-2.0 | 208 | 0 | 8 | 31 | 60 | 31 | 29 | 7 | 1 |
module Hep where
hep :: [String] -> [String]
hep [] = []
hep ("you":xs) = "u":(hep xs)
hep ("are":xs) = "r":(hep xs)
hep ("your":xs) = "ur":(hep xs)
hep ("by":"the":"way":xs) = "btw":(hep xs)
hep ("for":"your":"information":xs) = "fyi":(hep xs)
hep ("boyfriend":xs) = "bf":(hep xs)
hep ("girlfriend":xs) = "gf":(hep xs... | Kyle-Ferguson/COP-4020 | Assignment 2/Hep.hs | gpl-3.0 | 551 | 0 | 9 | 78 | 396 | 207 | 189 | 16 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
module Fp11pr where
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Identity
import Control.Monad.State
import Control.Monad.Reader
... | ItsLastDay/academic_university_2016-2018 | subjects/Haskell/11/Fp11pr.hs | gpl-3.0 | 11,853 | 0 | 12 | 2,328 | 1,626 | 820 | 806 | 135 | 1 |
module Text.Lox.Parsing where
import Control.Applicative ((<$>), (<*>), (*>), (<*))
import Text.ParserCombinators.Parsec
import Text.Parsec.Char (string)
-- |
-- | Whitespace
-- |
spaceChar = satisfy $ \c -> c == ' ' || c == '\t'
skipSpaces = skipMany spaceChar
-- |
-- | Wrapping & Grouping
-- |
separator = space... | knuton/lox | Text/Lox/Parsing.hs | gpl-3.0 | 849 | 0 | 9 | 201 | 330 | 174 | 156 | 23 | 1 |
-- * CHAPTER 6. Circular Traversals Compositionally
-- ** GHC Options
{-# LANGUAGE
ExistentialQuantification
, TypeOperators -- arrow operators
, Arrows
, MultiParamTypeClasses -- class Fix
, FunctionalDependencies -- class Fix
, FlexibleInstances -- class ArrowCata
, DeriveF... | balez/thesis | programs/Circular_6_1and2.hs | gpl-3.0 | 4,921 | 4 | 10 | 1,341 | 1,298 | 698 | 600 | 83 | 1 |
{-# LANGUAGE TupleSections, ScopedTypeVariables #-}
module Main where
import Control.Applicative
import qualified Control.Concurrent.SSem as Sem
import Control.Exception
import Control.Monad (forM)
import qualified Data.ByteString.UTF8 as B8
import qualified Data.ByteString.Char8 as B
import qualified Data.HashTabl... | ajisaka/locatefs | src/locatefs.hs | gpl-3.0 | 6,527 | 0 | 14 | 2,121 | 1,837 | 984 | 853 | 138 | 4 |
module SyntaxTests (syntaxTests) where
import Syntax
import Test.HUnit
-- printing tests
ppTest1 = TestCase $ assertEqual "(ppProcess Term)"
"0" (ppProcess (Term undefined))
ppTest2 = TestCase $ assertEqual "(ppProcess (Par Term Term))"
"(0 || 0)" (ppProcess (Par (Term undefined) (Term undefin... | fredokun/piexplorer | src/SyntaxTests.hs | gpl-3.0 | 2,052 | 0 | 16 | 552 | 527 | 268 | 259 | 31 | 1 |
module Hive.Imports.MkBinary
( Binary, put, get, putWord8, getWord8
, Typeable
, derive, makeBinary
, Generic
) where
-------------------------------------------------------------------------------
import Data.Binary (Binary, put, get, putWord8, getWord8)
import Data.Typeable (Typeable)
import Data.... | chrisbloecker/Hive | src/Hive/Imports/MkBinary.hs | gpl-3.0 | 386 | 0 | 5 | 61 | 92 | 59 | 33 | 9 | 0 |
-- remove duplicates from a list
p8 :: Eq a => [a] -> [a]
p8 (x:xs@(y:_))
| x == y = p8 xs
| otherwise = x : p8 xs
p8 xs = xs
| yalpul/CENG242 | H99/1-10/p8.hs | gpl-3.0 | 146 | 0 | 10 | 54 | 86 | 43 | 43 | 5 | 1 |
{-# LANGUAGE Safe #-}
module System.Directory.UIO (doesFileExist, getTemporaryDirectory) where
import qualified System.Directory as D
import UnexceptionalIO (UIO, unsafeFromIO)
-- | See http://hackage.haskell.org/package/directory-1.2.1.0/docs/src/System-Directory.html#doesFileExist
doesFileExist ∷ FilePath → UIO Bo... | rimmington/pirandello | src/System/Directory/UIO.hs | gpl-3.0 | 679 | 0 | 6 | 70 | 79 | 48 | 31 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-factchecktools/gen/Network/Google/Resource/FactCheckTools/Claims/Search.hs | mpl-2.0 | 7,599 | 0 | 22 | 1,871 | 1,249 | 716 | 533 | 165 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/MobileCarriers/Get.hs | mpl-2.0 | 5,033 | 0 | 19 | 1,227 | 821 | 474 | 347 | 116 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.ReplicaPool... | rueshyna/gogol | gogol-replicapool/gen/Network/Google/ReplicaPool/Types/Product.hs | mpl-2.0 | 40,417 | 0 | 32 | 9,947 | 7,306 | 4,213 | 3,093 | 819 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-- brittany { lconfig_allowSinglelineRecord: true }
data MyRecord = forall a . Show a => Bar
{ foo :: abittoolongbutnotvery -> abittoolongbutnotvery
}
| lspitzner/brittany | data/Test52.hs | agpl-3.0 | 192 | 0 | 9 | 31 | 34 | 19 | 15 | -1 | -1 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import Data.Char (isUpper, toUpper)
import Data.List
import Control.Monad.Except (ExceptT, runExceptT)
import Control.Monad.Reader (runReaderT)
import Control.Monad.IO.Class (liftIO)
import Con... | azadbolour/boardgame | haskell-server/app/Trial.hs | agpl-3.0 | 4,708 | 0 | 15 | 565 | 1,058 | 625 | 433 | 95 | 1 |
module Xmppbot.Greeting where
import Control.Monad (liftM)
import System.Random (randomRIO)
-- Taken from <http://rosettacode.org/wiki/Pick_random_element#Haskell>
pick :: [a] -> IO a
pick xs = liftM (xs !!) $ randomRIO (0, length xs - 1)
| rnons/xmppbot | Xmppbot/Greeting.hs | unlicense | 241 | 0 | 9 | 34 | 77 | 43 | 34 | 5 | 1 |
{-|
Module : Cloud.Haskzure.Core.Auth
Description : Data structures and functions used for authentication.
Copyright : (c) Nashwan Azhari, 2016
License : Apache 2.0
Maintainer : aznashwan@yahoo.com
Stability : experimental
Portability : POSIX, Win32
This modules defines a set of data structures a... | aznashwan/haskzure | Cloud/Haskzure/Core/Auth.hs | apache-2.0 | 3,548 | 0 | 14 | 909 | 554 | 322 | 232 | 53 | 2 |
{-
- Copyright (c) 2017 The Agile Monkeys S.L. <hackers@theam.io>
-
- 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 requir... | theam/haskell-do | src/common/HaskellDo/State.hs | apache-2.0 | 8,073 | 17 | 23 | 2,095 | 1,727 | 862 | 865 | 146 | 5 |
{-# OPTIONS -fglasgow-exts -#include "../include/gui/qtc_hs_QItemSelectionModel.h" #-}
-----------------------------------------------------------------------------
{-| Module : QItemSelectionModel.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:... | uduki/hsQt | Qtc/Gui/QItemSelectionModel.hs | bsd-2-clause | 18,758 | 0 | 14 | 2,703 | 5,320 | 2,699 | 2,621 | -1 | -1 |
module Propellor.Property.Fstab (
FsType,
Source,
MountPoint,
MountOpts(..),
module Propellor.Property.Fstab,
) where
import Propellor.Base
import qualified Propellor.Property.File as File
import Propellor.Property.Mount
import Data.Char
import Data.List
import Utility.Table
-- | Ensures that </etc/fstab> conta... | ArchiveTeam/glowing-computing-machine | src/Propellor/Property/Fstab.hs | bsd-2-clause | 4,073 | 50 | 13 | 774 | 986 | 533 | 453 | 74 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Language.Drasil.Chunk.Unital
( UnitalChunk(..) , makeUCWDS , uc , uc' , ucs , ucs', ucsWS) where
import Control.Lens (makeLenses, view, (^.))
import Language.Drasil.Chunk.Concept (dcc, dccWDS,cw)
import Language.Drasil.Chunk.DefinedQuantity (DefinedQuantityDict, dqd)
import ... | JacquesCarette/literate-scientific-software | code/drasil-lang/Language/Drasil/Chunk/Unital.hs | bsd-2-clause | 3,196 | 0 | 11 | 636 | 1,002 | 557 | 445 | 50 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Line where
import Graphics.Blank
import Wiki -- (578,200)
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
beginPath()
moveTo(100,150)
lineTo(450,50)
stroke()
wiki $ snapShot context "images/Line.png"
wiki... | ku-fpg/blank-canvas | wiki-suite/Line.hs | bsd-3-clause | 337 | 0 | 13 | 91 | 113 | 55 | 58 | 13 | 1 |
{-# LANGUAGE ConstraintKinds #-}
--------------------------------------------------------------------
-- |
-- Module : Numeric.DSDE
--
-- Main entry point in the distributed SDE solver.
--
-- This module provides wrappers for the most common use cases,
-- and the user only needs to choose if to perform a distributed c... | davnils/sde-solver | src/Numeric/DSDE.hs | bsd-3-clause | 2,954 | 0 | 13 | 622 | 504 | 288 | 216 | 36 | 2 |
module Program.Stlc where
import Prelude hiding (abs)
import Syntax
var :: Term a -> Term a
var x = C "V" [x]
abs :: Term a -> Term a -> Term a
abs v b = C "Abs" [v, b]
app :: Term a -> Term a -> Term a
app p q = C "App" [p, q]
substo :: [Def]
substo = [substoDef]
substoDef :: Def
substoDef =
( Def "substo"... | kajigor/uKanren_transformations | test/resources/Program/Stlc.hs | bsd-3-clause | 2,114 | 0 | 20 | 1,058 | 877 | 484 | 393 | 77 | 1 |
-- | Utility functions for TCP sockets
module Network.Transport.TCP.Internal
( forkServer
, recvWithLength
, recvExact
, recvInt32
, tryCloseSocket
) where
#if ! MIN_VERSION_base(4,6,0)
import Prelude hiding (catch)
#endif
import Network.Transport.Internal (decodeInt32, void, tryIO, forkIOWithUnmask)
#if... | hackern/network-transport-tcp | src/Network/Transport/TCP/Internal.hs | bsd-3-clause | 5,483 | 0 | 21 | 1,292 | 984 | 555 | 429 | 77 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
module Stlc.Parse where
import Control.Applicative (Applicative, (<$>), (*>), (<*), (<*>), (<|>))
import qualified Control.Applicative as A
import Control.Monad.State (StateT(StateT), MonadState, runStateT,... | joelburget/tapl | Stlc/parse.hs | bsd-3-clause | 5,176 | 0 | 15 | 1,208 | 1,662 | 867 | 795 | -1 | -1 |
module Problem59 where
import Data.Bits (xor)
import Data.Char
import Data.Char (chr, isAlphaNum, ord)
import Data.List
import Data.List (cycle)
import Data.List.Utils (split)
import Data.Maybe
possiblePasswords :: [String]
possiblePasswords = [[x, y, z] | x <- ['a'..'z'], y <- ['a'..'z'], z <- ['a'..'z']]
isValidAs... | noraesae/euler | src/Problem59.hs | bsd-3-clause | 1,561 | 0 | 13 | 358 | 676 | 355 | 321 | 46 | 2 |
{-# LANGUAGE FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses,
TemplateHaskell #-}
module Sound.Fluidsynth.Internal.Types
( AudioDriver(..)
, FluidState
, MidiPlayer(..)
, FluidSynth(..)
, MidiDriver(..)
, MidiRouter(..)
, MonadSettings(..)
, ReleaseResources(..)... | projedi/fluidsynth-hs-complete | src/Sound/Fluidsynth/Internal/Types.hs | bsd-3-clause | 6,673 | 0 | 14 | 1,356 | 1,519 | 822 | 697 | 144 | 1 |
-- | Utility functions for TCP sockets
module Network.Transport.TCP.Internal
( ControlHeader(..)
, encodeControlHeader
, decodeControlHeader
, ConnectionRequestResponse(..)
, encodeConnectionRequestResponse
, decodeConnectionRequestResponse
, forkServer
, recvWithLength
, recvExact
, recvWord32
, ... | haskell-distributed/network-transport-tcp | src/Network/Transport/TCP/Internal.hs | bsd-3-clause | 14,045 | 0 | 23 | 3,543 | 2,565 | 1,433 | 1,132 | 238 | 7 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
module FPNLA.Operations.BLAS.Strategies.TRSM.Strategies.ColsPar () where
import Control.DeepSeq (NFData)
import Con... | mauroblanco/fpnla-examples | src/FPNLA/Operations/BLAS/Strategies/TRSM/Strategies/ColsPar.hs | bsd-3-clause | 1,806 | 0 | 12 | 793 | 342 | 190 | 152 | 26 | 0 |
{-# LANGUAGE CPP, ForeignFunctionInterface, BangPatterns #-}
#if __GLASGOW_HASKELL__
{-# LANGUAGE UnliftedFFITypes, MagicHash,
UnboxedTuples, DeriveDataTypeable #-}
#if __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Unsafe #-}
#endif
#endif
{-# OPTIONS_HADDOCK hide #-}
-- |
-- Module : Data.ByteString.Intern... | markflorisson/hpack | testrepo/bytestring-0.10.4.1/Data/ByteString/Internal.hs | bsd-3-clause | 24,785 | 0 | 19 | 5,859 | 4,926 | 2,682 | 2,244 | 292 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Util.Run
-- Description : This modules provides several commands to run an external process.
-- Copyright : (C) 2007 Spencer Janssen, Andrea Rossato, glasser@mit.edu
-- License : BSD-style (see LICENSE)
... | xmonad/xmonad-contrib | XMonad/Util/Run.hs | bsd-3-clause | 7,410 | 0 | 15 | 1,728 | 1,060 | 561 | 499 | 83 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
------------------... | facebookincubator/duckling | Duckling/Ranking/Classifiers/EN_NZ.hs | bsd-3-clause | 264,531 | 0 | 15 | 128,796 | 43,570 | 27,184 | 16,386 | 4,117 | 1 |
----------
-- Bamp --
----------
module Bamp (Bamp, bamp) where
import Game
import Data.Array
import Graphics.UI.WX hiding (border, point)
import Graphics.UI.WXCore hiding (point)
import Tools
data BampField
= Empty
| Portal Player
| Piece Player
| Ball
deriving (Eq, Show)
isPortal :: BampField -> Bo... | HJvT/GeBoP | Bamp.hs | bsd-3-clause | 6,953 | 1 | 24 | 2,781 | 3,237 | 1,713 | 1,524 | -1 | -1 |
{-# LANGUAGE QuasiQuotes #-}
module Dir.Library2(usedFunction1, reexport1, bob, MyClass3(..), myClass1, foo, (=~=), coerced) where
import Dir.Reexport
import Dir.QuasiQuoter
import Data.Coerce
import Dir.CoerceType
import Dir.CoerceValue
bob = reexport2 `seq` usedFunction1
class MyClass1 a where myClass1 :: a
class... | ndmitchell/weeder | test/foo/src/Dir/Library2.hs | bsd-3-clause | 479 | 0 | 6 | 71 | 149 | 89 | 60 | 14 | 1 |
{-|
Module : Werewolf.Command.Heal
Description : Handler for the heal subcommand.
Copyright : (c) Henry J. Wylde, 2016
License : BSD3
Maintainer : public@hjwylde.com
Handler for the heal subcommand.
-}
module Werewolf.Command.Heal (
-- * Handle
handle,
) where
import Control.Monad.Except
import ... | hjwylde/werewolf | app/Werewolf/Command/Heal.hs | bsd-3-clause | 1,205 | 0 | 13 | 233 | 285 | 155 | 130 | 24 | 2 |
module Matterhorn.Draw.ShowHelp
( drawShowHelp
, keybindingMarkdownTable
, keybindingTextTable
, commandTextTable
, commandMarkdownTable
, keybindSections
)
where
import Prelude ()
import Matterhorn.Prelude
import Brick
import Brick.Themes ( themeDescriptions )
im... | matterhorn-chat/matterhorn | src/Matterhorn/Draw/ShowHelp.hs | bsd-3-clause | 25,162 | 93 | 23 | 7,811 | 4,365 | 2,374 | 1,991 | -1 | -1 |
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fcontext-stack42 #-}
module Games.Chaos2010.Database.Cursor_position where
import Games.Chaos2010.Database.Fields
import Database.HaskellDB.DBLayout
type Cursor_position =
Record
(HCons (LVPair X (Expr Int)) (HCons (LVPair Y (Expr Int... | JakeWheat/Chaos-2010 | Games/Chaos2010/Database/Cursor_position.hs | bsd-3-clause | 418 | 0 | 13 | 55 | 92 | 52 | 40 | 10 | 1 |
{-# LANGUAGE PatternGuards #-}
module Idris.Compiler where
import Idris.AbsSyntax
import Core.TT
{-
import Idris.Transforms
import Core.Evaluate
import Core.CaseTree
import Control.Monad.State
import Data.List
import System.Process
import System.IO
import System.Directory
import System.Environment
import Paths_id... | byorgey/Idris-dev | src/Idris/Compiler.hs | bsd-3-clause | 8,862 | 0 | 8 | 3,599 | 50 | 28 | 22 | 6 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Spec.Spec where
import Spec.Machine
import Spec.VirtualMemory
import Spec.Execute
import Spec.Decode
import Spec.CSRSpec
import Spec.CSR
import Utility.Utility
import qualified Spec.CSRField as Field
import Data.Int
import Data.Bits
import Control.Monad
import Control.Monad.T... | mit-plv/riscv-semantics | src/Spec/Spec.hs | bsd-3-clause | 6,026 | 1 | 19 | 2,227 | 1,323 | 663 | 660 | 101 | 13 |
{-# LANGUAGE MagicHash #-}
import Criterion.Main (bench, bgroup, defaultMain, nf)
import Data.Word8Carry
import Data.Word (Word8)
implementations :: [(String, Word8 -> Word8 -> (Word8, Bool))]
implementations =
[ ("boxed", boxed)
, ("primops", primops)
]
main :: IO ()
main =
defaultMain $ map m... | bitemyapp/snoy-extra | bench/word8-carry.hs | mit | 596 | 0 | 12 | 183 | 232 | 135 | 97 | 19 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Text.Extended (
module Data.Text
, constTimeCompare
) where
import Control.Applicative ((<$>))
import Data.Bits
import Data.Char
import Data.Function (on)
import qualified Data.List as L
import Data.... | bitemyapp/haskell-jwt | src/Data/Text/Extended.hs | mit | 563 | 0 | 13 | 176 | 168 | 95 | 73 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module DbTests.TransactionDirectCredit (transactionDirectCreditTests) where
import Test.Tasty
import Test.Tasty.HUnit
import Db
import DbTests.Internal
transactionDirectCreditTests :: TestTree
transactionDirectCreditTests = testGroup "TransactionDirectCredit"
[ testCase "roundTri... | benkolera/talk-stacking-your-monads | code/tests/DbTests/TransactionDirectCredit.hs | mit | 538 | 0 | 7 | 59 | 93 | 53 | 40 | 15 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : $Header$
Description : A abstract syntax for the TPTP-THF Syntax
Copyright : (c) A. Tsogias, DFKI Bremen 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Alexis.Tsogias@dfki.de
Stability : provisional
Portability : portable
A Abstract ... | mariefarrell/Hets | THF/As.der.hs | gpl-2.0 | 12,415 | 0 | 8 | 2,670 | 2,958 | 1,674 | 1,284 | 326 | 0 |
module Fuzzers where
data Fuzzer = Zzuf | Radamsa deriving Show
type FuzzerCommand = Int -> (String, [String])
defaultZzuf :: FuzzerCommand
defaultZzuf seed = ("zzuf", ["-r", "0.000001:0.04", "-s", show seed])
defaultRadamsa :: FuzzerCommand
defaultRadamsa seed = ("radamsa", ["-s", show seed])
-- | Fuzzers to raw c... | elopez/QuickFuzz | app/Fuzzers.hs | gpl-3.0 | 458 | 0 | 7 | 64 | 124 | 73 | 51 | 10 | 1 |
main = putStr . unlines $
[ show 3
, show 3.0
, show 'a'
, show ()
, show (1,2)
, show (1,2,3)
, show (1,2,3,4)
, show (1,2,3,4,5)
, show (1,2,3,4,5,6)
, show (1,2,3,4,5,6,7)
, show (1,2,3,4,5,6,7,8)
, show (1,2,3,4,5,6,7,8,9)
, show (1,2,3,4,5,6,7,8,9,10)
, show ... | roberth/uu-helium | test/correct/Show.hs | gpl-3.0 | 339 | 0 | 8 | 108 | 271 | 164 | 107 | 15 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-cse #-}
{-# OPTIONS_GHC -fno-full-laziness ... | cchalmers/lens | src/Control/Lens/Internal/Reflection.hs | bsd-3-clause | 9,005 | 0 | 35 | 1,597 | 1,548 | 836 | 712 | -1 | -1 |
module Crypto.Cipher.Twofish
( Twofish128
, Twofish192
, Twofish256
) where
import Crypto.Cipher.Twofish.Primitive
import Crypto.Cipher.Types
import Crypto.Cipher.Utils
newtype Twofish128 = Twofish128 Twofish
instance Cipher Twofish128 where
cipherName _ = "Twofish128"
cipherKeySize _ = Ke... | vincenthz/cryptonite | Crypto/Cipher/Twofish.hs | bsd-3-clause | 1,437 | 0 | 10 | 324 | 382 | 199 | 183 | 34 | 0 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2014 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
module OptParser where
import Data.Monoid (Endo(..),Monoid(..))
data OptParser opt
= OptSuccess (Endo opt)
| OptFailur... | TomMD/cryptol | cryptol/OptParser.hs | bsd-3-clause | 949 | 0 | 11 | 219 | 323 | 174 | 149 | 20 | 2 |
{-# LANGUAGE BangPatterns, CPP, MagicHash, NoImplicitPrelude, UnboxedTuples
, UnliftedFFITypes, GHCForeignImportPrim #-}
{-# OPTIONS_HADDOCK hide #-}
module GHC.Integer.BigInteger.Prim (
Integer#,
IntegerPair#,
cmpInteger#,
cmpIntegerInt#,
plusInteger#,
plusIntegerInt#,
minusInteger#,
minus... | alexander-at-github/eta | libraries/integer/GHC/Integer/BigInteger/Prim.hs | bsd-3-clause | 8,363 | 179 | 10 | 1,314 | 1,809 | 955 | 854 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
-- | MD5 digest
module Distribution.Server.Features.Security.MD5 (
MD5Digest
, md5
, md5DigestBytes
, lazyMD5
, ByteStringWithMd5(..)
) where
-- stdlibs
import Control.Applicative
import Control.DeepSeq
import qualified Da... | agrafix/hackage-server | Distribution/Server/Features/Security/MD5.hs | bsd-3-clause | 4,749 | 0 | 14 | 1,203 | 801 | 460 | 341 | 67 | 2 |
{-# LANGUAGE CPP, RankNTypes #-}
import Control.Concurrent.Async
import Control.Monad
import System.Environment
import Control.Concurrent.Chan
import Control.Concurrent.STM
import Control.Concurrent.STM.TQueue
import Control.Concurrent.STM.TBQueue
-- Using CPP rather than a runtime choice between channel types,
-- be... | ml9951/ghc | libraries/pastm/bench/chanbench.hs | bsd-3-clause | 1,497 | 0 | 17 | 353 | 356 | 180 | 176 | 30 | 3 |
<?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="ur-PK">
<title>Automation Framework</title>
<maps>
<homeID>top</homeID>
<mapref locatio... | thc202/zap-extensions | addOns/automation/src/main/javahelp/org/zaproxy/addon/automation/resources/help_ur_PK/helpset_ur_PK.hs | apache-2.0 | 965 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
{-# LANGUAGE ExplicitNamespaces, TypeOperators, RoleAnnotations #-}
{-# OPTIONS -Wno-duplicate-exports #-}
module T16339
(
type (!),
type (!)(Bang),
type (!)(..),
type (.),
type (.)(Dot),
type (.)(..),
) where
data a ! b = Bang
data f . g = Dot
type role (!) phantom phantom
type role (.) ... | sdiehl/ghc | testsuite/tests/parser/should_compile/T16339.hs | bsd-3-clause | 336 | 0 | 5 | 80 | 107 | 75 | 32 | -1 | -1 |
module D2 where
sumSquares (x:xs) = sq x + sumSquares xs
sumSquares [] = 0
sq x = x ^ pow
pow =2
main = sumSquares [1..4]
| kmate/HaRe | old/testing/unfoldDef/D2.hs | bsd-3-clause | 133 | 0 | 7 | 38 | 69 | 36 | 33 | 6 | 1 |
{-# LANGUAGE CPP #-}
module YesodCoreTest (specs) where
import YesodCoreTest.CleanPath
import YesodCoreTest.Exceptions
import YesodCoreTest.Widget
import YesodCoreTest.Media
import YesodCoreTest.Links
import YesodCoreTest.NoOverloadedStrings
import YesodCoreTest.InternalRequest
import YesodCore... | meteficha/yesod | yesod-core/test/YesodCoreTest.hs | mit | 1,468 | 0 | 7 | 275 | 258 | 150 | 108 | 48 | 1 |
{-# LANGUAGE TypeInType, GADTs #-}
module PromotedClass where
import Data.Proxy
data X a where
MkX :: Show a => a -> X a
foo :: Proxy ('MkX 'True)
foo = Proxy
| ezyang/ghc | testsuite/tests/dependent/should_fail/PromotedClass.hs | bsd-3-clause | 165 | 0 | 8 | 37 | 57 | 32 | 25 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface #-}
module SymbolsViaSections where
foreign export ccall test :: Int -> IO ()
test :: Int -> IO ()
test i = putStrLn (replicate i '.')
| urbanslug/ghc | testsuite/tests/llvm/should_run/subsections_via_symbols/SubsectionsViaSymbols.hs | bsd-3-clause | 173 | 0 | 8 | 29 | 57 | 30 | 27 | 5 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.