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 DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/Get.hs | mpl-2.0 | 3,362 | 0 | 15 | 779 | 388 | 233 | 155 | 65 | 1 |
module GCrypt.MPI.Data (
MPI,
) where
import GCrypt.Base
| sw17ch/hsgcrypt | src/GCrypt/MPI/Data.hs | lgpl-3.0 | 63 | 0 | 4 | 14 | 18 | 12 | 6 | 3 | 0 |
-- Hoff -- A gatekeeper for your commits
-- Copyright 2016 Ruud van Asseldonk
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- A copy of the License has been included in the root of the repository.
{-# LANGUAGE OverloadedString... | ruuda/hoff | src/Server.hs | apache-2.0 | 8,686 | 0 | 16 | 1,779 | 1,751 | 898 | 853 | 158 | 5 |
module Lycopene.Core.Resource
( Resource(..)
, runResource
, file
, connection
) where
import System.IO
import Database.HDBC (IConnection, disconnect)
import Control.Monad.Trans
import Control.Exception (bracket, onException)
-- | Generic Resource
-- http:/... | utky/lycopene | src/Lycopene/Core/Resource.hs | apache-2.0 | 1,660 | 0 | 13 | 459 | 596 | 312 | 284 | 38 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Main(main) where
import DNA.Channel.File (readDataMMap)
import DNA
import DDP
import DDP_Slice_CUDA
----------------------------------------------------------------
-- Distributed dot product
--
-- Note that actors which do not spawn actors on other nodes do not
-- receive CA... | SKA-ScienceDataProcessor/RC | MS2/dna-programs/ddp-in-memory-cuda.hs | apache-2.0 | 1,706 | 0 | 16 | 408 | 494 | 255 | 239 | 39 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
#include "version-compatibility-macros.h"
-- | This module shows how to write a custom prettyprinter backend, based on
-- directly converting a 'SimpleDocStream' to an output format using a stack
-- machi... | quchen/prettyprinter | prettyprinter/src/Prettyprinter/Render/Tutorials/StackMachineTutorial.hs | bsd-2-clause | 6,009 | 0 | 15 | 1,178 | 752 | 426 | 326 | 63 | 7 |
-- |
-- Module : Text.Megaparsec.Byte.Lexer
-- Copyright : © 2015–2017 Megaparsec contributors
-- License : FreeBSD
--
-- Maintainer : Mark Karpov <markkarpov92@gmail.com>
-- Stability : experimental
-- Portability : portable
--
-- Stripped-down version of "Text.Megaparsec.Char.Lexer" for streams of... | recursion-ninja/megaparsec | Text/Megaparsec/Byte/Lexer.hs | bsd-2-clause | 8,006 | 0 | 19 | 1,786 | 1,573 | 856 | 717 | 112 | 1 |
{-# LANGUAGE Haskell2010 #-}
module NamedDoc where
-- $foo bar
| haskell/haddock | html-test/src/NamedDoc.hs | bsd-2-clause | 65 | 0 | 2 | 12 | 6 | 5 | 1 | 2 | 0 |
-- |
-- Module: $Header$
-- Description: Top-level application mode
-- Copyright: (c) 2018-2020 Peter Trško
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: experimental
-- Portability: GHC specific language extensions.
--
-- Top-level application mode. It provides the ability for u... | trskop/command-wrapper | command-wrapper-core/src/CommandWrapper/Core/Options/GlobalMode.hs | bsd-3-clause | 1,914 | 0 | 13 | 485 | 464 | 248 | 216 | -1 | -1 |
module Annales.Buildings (
buildBuilding
,destroyBuilding
) where
import TextGen (
TextGen
,word
,choose
,remove
,list
)
import Annales.Empire (
TextGenCh
,Empire
,buildings
,generate
,randRemove
)
import Annales.Descriptions (
descNewBuilding
,descBuildingName
,descModifyBuilding... | spikelynch/annales | app/Annales/Buildings.hs | bsd-3-clause | 1,195 | 0 | 18 | 304 | 411 | 215 | 196 | 46 | 2 |
{-# LANGUAGE PatternGuards #-}
-- | This module does command line completion
module System.Console.CmdArgs.Explicit.Complete(
Complete(..), complete,
completeBash, completeZsh
) where
import System.Console.CmdArgs.Explicit.Type
import Control.Monad
import Data.List
import Data.Maybe
-- | How to complete... | ndmitchell/cmdargs | System/Console/CmdArgs/Explicit/Complete.hs | bsd-3-clause | 7,708 | 0 | 15 | 2,197 | 2,161 | 1,136 | 1,025 | 144 | 10 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Rank2Types #-}
module Server.SVUser where
import Control.Lens ((.=), preuse, ix, use, (^.), zoom, (-=), (+=), (&), (.~))
import Control.Monad (unless, when, liftM, void)
import Data.Bits ((.&.))
import Data... | ksaveljev/hake-2 | src/Server/SVUser.hs | bsd-3-clause | 20,683 | 0 | 34 | 5,791 | 5,059 | 2,545 | 2,514 | -1 | -1 |
module TestLoadBucket (tests) where
import Asserts
import Bucket.Import
import Bucket.Load
import Bucket.Types
import Data.Maybe
import Fixtures
import System.FilePath
import Test.Hspec.HUnit()
import Test.Hspec.Monadic
import Test.HUnit
tests = describe "loading bucket" $ do
it "loading non-existent bucket retu... | rickardlindberg/orgapp | tests/TestLoadBucket.hs | bsd-3-clause | 2,262 | 0 | 20 | 563 | 616 | 301 | 315 | 42 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedLists #-}
module Day10 where
import Protolude hiding (try)
import Prelude (read)
import Control.Lens
import Text.Megaparsec hiding (State)
import Text.Megaparsec.Text
import Data.MultiMap (MultiMap)
import Data.Map (Map)
import qualified Data.MultiMap as MMap
im... | patrickherrmann/advent2016 | src/Day10.hs | bsd-3-clause | 2,977 | 0 | 18 | 716 | 932 | 472 | 460 | -1 | -1 |
module Data.TTask.Pretty.Contents
( ppActive
, ppStory
, ppStoryI
, ppStoryList
, ppSprint
, ppSprintList
, ppProjectPbl
, ppProjectSprintList
, ppProjectSprint
, ppProjectSprintDetail
, ppSprintHeaderDetail
, ppProjectStory
, ppProjectTask
, ppStatusRecord
) where
import Contr... | tokiwoousaka/ttask | src/Data/TTask/Pretty/Contents.hs | bsd-3-clause | 4,059 | 0 | 14 | 762 | 1,329 | 695 | 634 | 94 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Api.hs
--
-- Maintainer : adam.smyczek@gmail.com
-- Stability : experimental
-- Portability : portable
--
-- ReviewBoard API
--
-- This module provides the basic ReviewBoard API calls.
-- All calls are executed in... | asmyczek/hreviewboard | ReviewBoard/Api.hs | bsd-3-clause | 10,015 | 0 | 12 | 1,830 | 2,024 | 1,061 | 963 | 104 | 5 |
-- Copyright (c) 2015 Eric McCorkle. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- 1. Redistributions of source code must retain the above copyright
-- notice, this list of conditi... | emc2/iridium | src/IR/Common/Rename.hs | bsd-3-clause | 1,680 | 0 | 5 | 295 | 53 | 46 | 7 | 4 | 0 |
-- Compiler Toolkit: some basic definitions used all over the place
--
-- Author : Manuel M. T. Chakravarty
-- Created: 16 February 95
--
-- Version $Revision: 1.44 $ from $Date: 2000/10/05 07:51:28 $
--
-- Copyright (c) [1995..2000] Manuel M. T. Chakravarty
--
-- This library is free software; you can redistribu... | mwotton/ctkl | src/Text/CTK/Common.hs | bsd-3-clause | 4,962 | 0 | 10 | 1,108 | 713 | 458 | 255 | 56 | 3 |
module Data.ROS.Service ( Service(..) ) where
import Data.ROS.Service.Definition
import Data.ROS.Service.Internal
| ROSVendor/msg_dbg | lib/Data/ROS/Service.hs | bsd-3-clause | 116 | 0 | 5 | 12 | 30 | 21 | 9 | 3 | 0 |
{-# LANGUAGE TemplateHaskell #-}
-- | Instance of 'Lift' for 'SimpleCon'
module Data.Unboxed.LiftCon(SimpleCon(..), SimpleData(..), simpleCon, unSimpleCon, toName, fromName, Lift) where
import Language.Haskell.TH.Syntax
import Language.Haskell.TH.Lift
-- names
type SimpleName = String
toName :: SimpleName -> Name
t... | reinerp/th-unboxing | Data/Unboxed/LiftCon.hs | bsd-3-clause | 3,878 | 0 | 10 | 628 | 1,474 | 772 | 702 | 81 | 1 |
module System.Taffybar.Widget.Generic.ChannelGraph where
import BroadcastChan
import Control.Concurrent
import Control.Monad
import Control.Monad.IO.Class
import Data.Foldable (traverse_)
import GI.Gtk
import System.Taffybar.Widget.Generic.Graph
-- | Given a 'BroadcastChan' and an action to consume that broadcast cha... | teleshoes/taffybar | src/System/Taffybar/Widget/Generic/ChannelGraph.hs | bsd-3-clause | 952 | 0 | 16 | 165 | 213 | 111 | 102 | 20 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module River.Core.Primitive (
Prim(..)
) where
import Control.DeepSeq (NFData)
import Data.Data (Data)
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Typ... | jystic/river | src/River/Core/Primitive.hs | bsd-3-clause | 787 | 0 | 7 | 235 | 225 | 135 | 90 | 38 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE GADTs #-}
module BitD.BitcoinD.RPC ( rpcCall
, rpcGetBlockHash
, rpcGetBlockCount
, rpcGetRawMemPool
, rpcGetRawMemPool'
... | benma/bitd | src/BitD/BitcoinD/RPC.hs | bsd-3-clause | 4,171 | 0 | 19 | 1,065 | 1,166 | 623 | 543 | 91 | 3 |
{-# OPTIONS_HADDOCK not-home #-}
module Test.WebDriver.Types
( -- * WebDriver sessions
WD(..), WDSession(..), defaultSession, SessionId(..)
-- * Capabilities and configuration
, Capabilities(..), defaultCaps, allCaps
, Platform(..), ProxyType(..), UnexpectedAlertBehavior(..)
... | fpco/hs-webdriver | src/Test/WebDriver/Types.hs | bsd-3-clause | 1,406 | 0 | 5 | 342 | 322 | 228 | 94 | 31 | 0 |
{-# LANGUAGE UndecidableInstances #-}
module Data.Rivers.Monads where
data Cofree f a = Root { extract :: a, branch :: f (Cofree f a) }
data Free f a = Var a | Com (f (Free f a))
instance (Show a, Show (f (Cofree f a))) => Show (Cofree f a) where show (Root a x) = show a ++ "@" ++ show x
instance (Show a, ... | d-rive/rivers | Data/Rivers/Monads.hs | bsd-3-clause | 1,767 | 0 | 11 | 633 | 1,001 | 509 | 492 | -1 | -1 |
{-# LANGUAGE CPP, RebindableSyntax, OverloadedStrings #-}
module Main where
import TestExampleDataSource
import BatchTests
import CoreTests
import DataCacheTest
#ifdef HAVE_APPLICATIVEDO
import AdoTests
#endif
import Data.String
import Test.HUnit
import Haxl.Prelude
main :: IO Counts
main = runTestTT $ TestList
[... | tolysz/Haxl | tests/Main.hs | bsd-3-clause | 593 | 0 | 9 | 77 | 109 | 62 | 47 | 15 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Saturnin.Git
( readFile
, runCmd
, GitSource (..)
, GitURI (..)
, GitRevOrRef (..)
)
where
import qualified Data.ByteString as B
import Data.Text.Lazy (Text, unpack, pack)
import Formatting
import Prelude hiding (readFile)
import System.Exit
import Syst... | yaccz/saturnin | library/Saturnin/Git.hs | bsd-3-clause | 2,885 | 1 | 18 | 847 | 771 | 425 | 346 | 70 | 2 |
module Camera(
Camera(..)
, cameraMoveForward
, cameraMoveLeft
, cameraMoveRight
, cameraRotateYaw
, cameraRotatePitch
) where
import Control.DeepSeq
import GHC.Generics
import Linear
data Camera = Camera {
cameraUp :: !(V3 Float)
, cameraForward :: !(V3 Float)
, cameraEye :: !(V3 Float)
} ... | Teaspot-Studio/model-gridizer | src/Camera.hs | bsd-3-clause | 1,249 | 0 | 12 | 235 | 449 | 241 | 208 | -1 | -1 |
module CallByName.EvaluatorSuite
( tests
) where
import CallByName.Data
import CallByName.Evaluator
import CallByName.Parser (expression)
import Control.Monad.Trans.State.Lazy (evalStateT)
import Data.List (stripPrefix)
import ... | li-zhirui/EoplLangs | test/CallByName/EvaluatorSuite.hs | bsd-3-clause | 5,678 | 0 | 15 | 2,114 | 994 | 518 | 476 | 143 | 4 |
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wall #-}
-- | Algebra
module Tower.Ordering (
-- * lattice
POrd(..)
, POrdering(..)
, Topped(..)
, Bottomed(..)
, Bounded
, Negated(..)
, Semilat... | tonyday567/tower | src/Tower/Ordering.hs | bsd-3-clause | 5,394 | 0 | 11 | 1,065 | 1,847 | 970 | 877 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
-- | This module provides the 'Constraint' type.
module Jat.Constraints
(
PATerm
, PAFun (..)
, PAVar (..)
, vmap
, top
, bot
, isTop,isBot
, not
, add,sub,and,or,gte,eq,neq,ass
, ufun, int, bool
, uvar, ivar, bvar
, pr... | ComputationWithBoundedResources/jat | src/Jat/Constraints.hs | bsd-3-clause | 5,515 | 0 | 15 | 1,660 | 2,653 | 1,382 | 1,271 | 170 | 19 |
{-# LANGUAGE BinaryLiterals #-}
module Main where
import Prelude hiding (cycle)
import Machine
import AssemblerParser
import AssemblerTranslator
import Text.Parsec (parse)
import System.IO
import PpComputerState
import Control.Monad.State.Lazy
fetchASM :: IO [ASM]
fetchASM = do putStr "Path to .xasm file: "
... | danielbarter/xcomputer | src/Main.hs | bsd-3-clause | 1,095 | 0 | 13 | 350 | 344 | 173 | 171 | 31 | 2 |
module Lichen.Plagiarism.Provided where
import qualified Data.Set as Set
--import qualified Data.Map.Strict as Map
import Lichen.Plagiarism.Submitty
providedFingerprints :: FilePath -> Set.Set Fingerprint
providedFingerprints _ = undefined
| Submitty/AnalysisTools | src/Lichen/Plagiarism/Provided.hs | bsd-3-clause | 243 | 0 | 7 | 28 | 44 | 27 | 17 | 5 | 1 |
{-# LANGUAGE QuasiQuotes, TypeFamilies, PackageImports #-}
import File.Binary
import File.Binary.Instances
import File.Binary.Instances.BigEndian
import Control.Monad.Instances
import "monads-tf" Control.Monad.Error
main :: IO ()
main = do
-- let hoge = fromBinary () "hello" :: Maybe (TestBitsConst, String)
(hoge, ... | YoshikuniJujo/binary-file | examples/testBitConstant.hs | bsd-3-clause | 550 | 0 | 9 | 83 | 120 | 66 | 54 | 13 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Astro.Coords.ECRSpec where
import Test.Hspec
import Test.QuickCheck
import Data.AEq
import TestUtil
import TestInstances
import Astrodynamics (greenwichRA)
import Astro.Coords
import Astro.Coords.ECR
import Astro.Coords.PosVel
import Astro.Place
import Astro.Time -- (UT1,... | bjornbm/astro | test/Astro/Coords/ECRSpec.hs | bsd-3-clause | 2,578 | 0 | 16 | 467 | 817 | 419 | 398 | 50 | 1 |
module TiState where
import Debug.Trace
import Language
import PrettyPrint
import Parser
import TiTypes
--import GCMarkScan
import GCTwoSpace
import Utils
extraPreludeDefns :: CoreProgram
extraPreludeDefns
= [ ("False", [], EConstr 1 0)
, ("True", [], EConstr 2 0)
, ("and", ["x", "y"], EAp (EAp (EAp (EVar... | caasi/spj-book-student-1992 | src/TiState.hs | bsd-3-clause | 19,509 | 0 | 15 | 5,161 | 7,250 | 3,942 | 3,308 | 413 | 6 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Eclogues.APISpec (spec) where
import Eclogues.API (Action (..))
import Eclogues.Job (mkBoxSpec)
import TestUtils (forceName)
import Data.Aeson (encode)
import Data.String.QQ (s)
import Test.Hspec
spec :: Spec
spec = describe "Action" $
it "... | rimmington/eclogues | eclogues-impl/test/Eclogues/APISpec.hs | bsd-3-clause | 578 | 0 | 12 | 96 | 155 | 90 | 65 | 15 | 1 |
-- |
-- TH.Lib contains lots of useful helper functions for
-- generating and manipulating Template Haskell terms
{-# LANGUAGE CPP #-}
module Language.Haskell.TH.Lib where
-- All of the exports from this module should
-- be "public" functions. The main module TH
-- re-exports them all.
import Language.H... | tjakway/ghcjvm | libraries/template-haskell/Language/Haskell/TH/Lib.hs | bsd-3-clause | 24,488 | 0 | 13 | 6,078 | 7,991 | 4,112 | 3,879 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Pos.Diffusion.Full.Block
( getBlocks
, requestTip
, announceBlockHeader
, handleHeadersCommunication
, streamBlocks
, blockListeners
, R... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Diffusion/Full/Block.hs | mit | 35,606 | 0 | 30 | 10,480 | 7,122 | 3,657 | 3,465 | -1 | -1 |
module Channel.YoutubeMeSpec (main, spec) where
import Helper
import qualified Data.ByteString.Lazy as L
import Channel.Command
import Channel.Event
import Channel.YoutubeMe
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "youtubeMe" $ do
it "makes Alo... | wimdu/alonzo | test/Channel/YoutubeMeSpec.hs | mit | 791 | 0 | 21 | 175 | 167 | 87 | 80 | 18 | 2 |
{- |
Module : ./CspCASLProver/CspProverConsts.hs
Description : Isabelle Abstract syntax constants for CSP-Prover operations
Copyright : (c) Liam O'Reilly and Markus Roggenbach,
Swansea University 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : csliam@swansea.ac.uk
Stabi... | spechub/Hets | CspCASLProver/CspProverConsts.hs | gpl-2.0 | 16,541 | 0 | 12 | 3,014 | 2,097 | 1,203 | 894 | 309 | 1 |
module Sound.Tidal.Chords where
{-
Chords.hs - For .. chords
Copyright (C) 2020, Alex McLean and contributors
This library 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 ... | bgold-cosmos/Tidal | src/Sound/Tidal/Chords.hs | gpl-3.0 | 8,852 | 0 | 10 | 2,852 | 2,918 | 1,821 | 1,097 | 233 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/UpdateIdentityPool.hs | mpl-2.0 | 6,088 | 0 | 13 | 1,309 | 816 | 487 | 329 | 108 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- Module : Khan.Internal.Orphans
-- Copyright : (c) 2013 Brendan Hay <brendan.g.ha... | zinfra/khan | khan/src/Khan/Internal/Orphans.hs | mpl-2.0 | 1,691 | 0 | 8 | 424 | 250 | 149 | 101 | 33 | 0 |
{--------------------------------------------------------------------------------
Camel game by Maarten Löfler (mloffler@cs.uu.nl) (adapted by Daan Leijen).
--------------------------------------------------------------------------------}
module Main where
import Graphics.UI.WX
import Graphics.UI.WXCore
import Pat... | jacekszymanski/wxHaskell | samples/contrib/Camels.hs | lgpl-2.1 | 7,749 | 0 | 17 | 3,058 | 2,895 | 1,479 | 1,416 | 133 | 5 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Handler.Root
( getRootR
, getPageR
, getStaticContentR
) where
import Wiki
import Handler.Topic (getTopicR')
import Text.Hamlet (hamlet)
import Util (renderContent)
getRootR :: Handler RepHtml
getR... | snoyberg/yesodwiki | Handler/Root.hs | bsd-2-clause | 1,301 | 0 | 20 | 359 | 362 | 187 | 175 | 32 | 4 |
{-# LANGUAGE TemplateHaskell, TypeOperators, GADTs, KindSignatures #-}
{-# LANGUAGE ViewPatterns, PatternGuards, LambdaCase #-}
{-# LANGUAGE FlexibleContexts, ConstraintKinds #-}
{-# LANGUAGE MagicHash, CPP #-}
{-# OPTIONS_GHC -Wall #-}
-- TODO: Restore the following pragmas
{-# OPTIONS_GHC -fno-warn-unused-imports #... | conal/lambda-ccc | src/LambdaCCC/Unused/ReifyLambda.hs | bsd-3-clause | 23,611 | 0 | 27 | 7,038 | 4,845 | 2,602 | 2,243 | -1 | -1 |
module Ivory.Language.Syntax (
module Exports
) where
import Ivory.Language.Syntax.AST as Exports
import Ivory.Language.Syntax.Names as Exports
import Ivory.Language.Syntax.Type as Exports
| Hodapp87/ivory | ivory/src/Ivory/Language/Syntax.hs | bsd-3-clause | 199 | 0 | 4 | 29 | 40 | 30 | 10 | 5 | 0 |
import Test.Tasty
import Test.Tasty.Hspec
import Test.Tasty.QuickCheck
import Yi.Regex
import Text.Regex.TDFA.ReadRegex (parseRegex)
import Text.Regex.TDFA.Pattern
ignoreDoPa :: Pattern -> Pattern
ignoreDoPa (PCarat dp ) = PCarat (DoPa 0)
ignoreDoPa (PDollar dp ) = PDollar (DoPa 0)
ignoreDoPa (PDot dp ) = ... | siddhanathan/yi | yi-language/test/Spec.hs | gpl-2.0 | 1,881 | 0 | 16 | 428 | 711 | 352 | 359 | 40 | 1 |
module Var00001 where
-- Believe it or not, this is valid!
qualified = True
| charleso/intellij-haskforce | tests/gold/parser/Var00001.hs | apache-2.0 | 77 | 0 | 4 | 15 | 10 | 7 | 3 | 2 | 1 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
module Opaleye.Internal.Values where
import qualified Opaleye.PGTypes as T
import Opaleye.Internal.Column (Column(Column))
import qualified Opaleye.Internal.Unpackspec as U
import qualified Opaleye.Internal.Tag as T
import qualified Opaleye.Internal... | bergmark/haskell-opaleye | src/Opaleye/Internal/Values.hs | bsd-3-clause | 3,667 | 0 | 16 | 785 | 895 | 501 | 394 | 57 | 2 |
<?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="hi-IN">
<title>SAML Support</title>
<maps>
<homeID>saml</homeID>
<mapref location="map.... | thc202/zap-extensions | addOns/saml/src/main/javahelp/help_hi_IN/helpset_hi_IN.hs | apache-2.0 | 958 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.ParserCombinators.Parsec.Perm
-- Copyright : (c) Paolo Martini 2007
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provisional
-- Portability ... | maurer/15-411-Haskell-Base-Code | src/Text/ParserCombinators/Parsec/Perm.hs | bsd-3-clause | 617 | 0 | 4 | 118 | 55 | 44 | 11 | 8 | 0 |
module M1 where
data BTree a
= Empty | T a (BTree a) (BTree a) deriving Show
buildtree :: (Monad m, Ord a) => [a] -> m (BTree a)
buildtree [] = return Empty
buildtree ((x : xs))
= do res1 <- buildtree xs
res <- insert x res1
return res
insert
:: (Monad m, Ord a) => a -> (BTree ... | kmate/HaRe | old/testing/unfoldAsPatterns/M1AST.hs | bsd-3-clause | 760 | 0 | 15 | 308 | 344 | 170 | 174 | 23 | 3 |
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE GADTs #-}
module T13998 where
import Data.Type.Equality
class EqForall f where
eqForall :: f a -> f a -> Bool
class EqForall f => EqForallPoly f where
eqForallPoly :: f a -> f b ... | shlevy/ghc | testsuite/tests/deriving/should_compile/T13998.hs | bsd-3-clause | 1,234 | 0 | 11 | 244 | 436 | 220 | 216 | 32 | 2 |
import CmmExpr
#if !(MACHREGS_i386 || MACHREGS_x86_64 || MACHREGS_sparc || MACHREGS_powerpc)
import Panic
#endif
import Reg
#include "ghcautoconf.h"
#include "stg/MachRegs.h"
#if MACHREGS_i386 || MACHREGS_x86_64
# if MACHREGS_i386
# define eax 0
# define ebx 1
# define ecx 2
# define edx 3
# define esi 4
# de... | tjakway/ghcjvm | includes/CodeGen.Platform.hs | bsd-3-clause | 23,178 | 0 | 9 | 5,983 | 2,654 | 1,559 | 1,095 | 13 | 1 |
{-# LANGUAGE PatternSynonyms, MagicHash, BangPatterns #-}
module ShouldCompile where
import GHC.Base
data Foo = MkFoo Int# Int#
pattern P x = MkFoo 0# x
f x = let !(P arg) = x in arg
| urbanslug/ghc | testsuite/tests/patsyn/should_compile/unboxed-bind-bang.hs | bsd-3-clause | 187 | 0 | 11 | 38 | 64 | 32 | 32 | 6 | 1 |
module Main where
import Spark
import System.Environment (getArgs)
main :: IO ()
main = do as <- getArgs
let output | null as = "Usage: spark [natural numbers]"
| otherwise = sparkLine $ (read <$> as :: [Double])
putStrLn output
| HalosGhost/hs | spark/src/Main.hs | isc | 274 | 0 | 13 | 85 | 89 | 45 | 44 | 8 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
import Control.Monad
import Control.Applicative
import Control.Arrow
import Luck.Template
import Test.QuickCheck
import Data.Data
import Data.Maybe
import Data.List
import System.Directory
import System.Process
import Data.Data
data Type = TArrow Type Type
... | QuickChick/Luck | luck/examples-template/Stlc.hs | mit | 2,935 | 0 | 16 | 717 | 923 | 458 | 465 | 78 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module TrackTest
( trackSpecs
) where
import App.Pieces
import App.UTCTimeP
import Data.Aeson
import Data.Time.Clock.POSIX
import Handler.Track
import TestImport
trackSpecs :: Spec
trackSpecs =
ydescribe "Track ... | TimeAttack/time-attack-server | tests/TrackTest.hs | mit | 2,594 | 0 | 17 | 942 | 662 | 292 | 370 | 59 | 1 |
------------------------------------------------------------------------
-- |
-- Module : Test.BenchPress
-- Copyright : (c) Johan Tibell 2008
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : johan.tibell@gmail.com
-- Stability : experimental
-- Portability : portable
--
-- Benchmarks action... | hephaestus-pl/hephaestus | alexandre/feature-modeling/trouble-deps/benchpress-0.2.2.6/Test/BenchPress.hs | mit | 9,371 | 0 | 17 | 2,434 | 1,844 | 1,021 | 823 | 119 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
module Reflex.Cocos2d.Builder.Base
(
NodeBuilderEnv(..)
, ImmediateNodeBuilderT(..)
, runI... | lynnard/reflex-cocos2d | src/Reflex/Cocos2d/Builder/Base.hs | mit | 6,389 | 0 | 18 | 1,331 | 1,517 | 795 | 722 | 117 | 1 |
module Identity where
import Test.QuickCheck
import Test.QuickCheck.Checkers (EqProp, eq, (=-=))
data Identity a = Identity a deriving (Show, Eq)
instance Functor Identity where
fmap f (Identity x) = Identity (f x)
instance Foldable Identity where
foldr f z (Identity x) = f x z
foldl f z (... | JoshuaGross/haskell-learning-log | Code/Haskellbook/Foldable/src/Identity.hs | mit | 687 | 0 | 9 | 170 | 258 | 133 | 125 | 18 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UnicodeSyntax #-}
-- |
-- Module: Configuration.Utils.Operators
-- Description: Useful operators for defining functions in an applicative context
-- Copyright: Copyright © 2015 PivotCloud, Inc.
-- License: MIT
-- Maintainer: Lars Kuhtz <lkuhtz@pivo... | alephcloud/hs-configuration-tools | src/Configuration/Utils/Operators.hs | mit | 2,309 | 0 | 10 | 433 | 452 | 287 | 165 | 35 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
module Info
( getIdentifierInfo
, getType
) where
import Control.Monad (liftM)
import Data.Generics (GenericQ, mkQ, extQ, gmapQ)
import Data.List (find, sortBy, intersperse)
import Data.Maybe (catMaybes, fromMaybe)
import Data.Typeable (Typeable)
import Mona... | bennofs/hdevtools | src/Info.hs | mit | 9,358 | 0 | 17 | 1,883 | 2,662 | 1,392 | 1,270 | 145 | 3 |
import Data.List
import Data.Time
data DatabaseItem = DbString String
| DbNumber Integer
| DbDate UTCTime
deriving (Eq, Ord, Show)
utctime2 :: UTCTime
utctime2 = UTCTime (fromGregorian 1921 5 1) (secondsToDiffTime 34123)
utctime3 :: UTCTime
... | JoshuaGross/haskell-learning-log | Code/Haskellbook/DataProc.hs | mit | 1,761 | 0 | 10 | 421 | 598 | 315 | 283 | 47 | 2 |
{-# LANGUAGE QuasiQuotes #-}
module Y2018.M01.D10.Solution where
{--
Today's Haskell exercise is a bit of a warming-up exercise. Today we'll store
packet information in the packet table (the structure of the table matching
Packet (see Y2017.M12.D20.Solution), and also write the fetch function that
retrieves packet in... | geophf/1HaskellADay | exercises/HAD/Y2018/M01/D10/Solution.hs | mit | 4,108 | 0 | 19 | 764 | 850 | 469 | 381 | 61 | 1 |
module ProjectEuler.Problem34
( problem
) where
import Data.Char
import Petbox
import ProjectEuler.Types
problem :: Problem
problem = pureProblem 34 Solved result
verify :: Int -> Bool
verify x = sum (map (factorial . digitToInt) (show x)) == x
result :: Int
result = sum $ filter verify [3..99999]
| Javran/Project-Euler | src/ProjectEuler/Problem34.hs | mit | 309 | 0 | 10 | 58 | 110 | 60 | 50 | 11 | 1 |
module Game.Position where
import qualified Game.Resources as R
type Position = (Int, Int)
-- | Lyhenne fromIntegral funktiolle
fi :: (Integral a, Num b) => a -> b
fi = fromIntegral
-- | Muuntaa pelikoordinaatit isometrisiksi ruutukoordinaateiksi
toIsom :: Position -> (Float, Float)
toIsom (x, y) = ((fi y * hw) + (... | maqqr/psycho-bongo-fight | Game/Position.hs | mit | 813 | 0 | 12 | 168 | 345 | 196 | 149 | 13 | 1 |
module FeatureModel.Parsers.SPLOT.SPLOT2FeatureModel where
import qualified FeatureModel.Types as FM
import FeatureModel.Parsers.SPLOT.AbsSPLOT
modeloSPLOT = SPLOT (FeatureModel (Feature (FName2 (Ident "r")) [SetRelation (FName2 (Ident "r_6")) (Cardinality 2 1) [GroupedFeature (FName2 (Ident "r_6_7")) [BinRelation ... | hephaestus-pl/hephaestus | alexandre/feature-modeling/src/FeatureModel/Parsers/SPLOT/SPLOT2FeatureModel.hs | mit | 3,745 | 0 | 25 | 674 | 1,359 | 685 | 674 | 53 | 2 |
{-# LANGUAGE LambdaCase #-}
module Butter.Core where
import Butter.Core.BlockDownload
import Butter.Core.MetaInfo
import Butter.Core.Peer
import Butter.Core.Torrent
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad.IO.Class
import qualified Data.Map as Map
import q... | yamadapc/butter-core | src/Butter/Core.hs | mit | 1,274 | 0 | 15 | 366 | 310 | 166 | 144 | 34 | 2 |
{-# LANGUAGE RankNTypes, DeriveAnyClass, TypeOperators #-}
--------------------------------------------------
--------------------------------------------------
module Enumerate.Function.Types where
--------------------------------------------------
import Enumerate.Types
import Enumerate.Function.Extra
----------... | sboosali/enumerate | enumerate-function/sources/Enumerate/Function/Types.hs | mit | 3,437 | 0 | 9 | 553 | 175 | 114 | 61 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html
module Stratosphere.ResourceProperties.ElasticLoadBala... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/ElasticLoadBalancingV2LoadBalancerSubnetMapping.hs | mit | 2,719 | 0 | 13 | 222 | 267 | 153 | 114 | 29 | 1 |
{-# LANGUAGE BangPatterns #-}
{-| Implementation of the Ganeti Query2 server.
-}
{-
Copyright (C) 2012, 2013 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the Li... | damoxc/ganeti | src/Ganeti/Query/Server.hs | gpl-2.0 | 9,947 | 0 | 18 | 2,438 | 2,269 | 1,180 | 1,089 | 181 | 5 |
{-
Copyright (C) 2005 John Goerzen <jgoerzen@complete.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is di... | jgoerzen/gopherbot | NetClient.hs | gpl-2.0 | 2,859 | 0 | 14 | 897 | 790 | 392 | 398 | 58 | 5 |
-- | Type and instance declarations for scheme expressions and errors.
--
-- Copyright 2008 Mats Klingberg
--
-- This file is part of hscheme and is licensed under the GNU GPL, see the
-- LICENSE file for the full license text.
module Types (
Env,
Expr(..),
SchemeError(..),
PrimitiveFunction,
Throw... | matkli/hscheme | Types.hs | gpl-3.0 | 4,268 | 0 | 9 | 1,017 | 990 | 536 | 454 | 79 | 1 |
-- | Generation of 'TC.Service' objects from the specification.
module Generation.ServiceGenerator(generateService) where
import qualified Data.Map as M
import Data.Maybe (fromJust, fromMaybe, isJust)
import qualified Data.Set as S
import qualified Gener... | SantiMunin/harmony | src/Generation/ServiceGenerator.hs | gpl-3.0 | 4,343 | 0 | 15 | 1,256 | 977 | 535 | 442 | 64 | 9 |
{-# LANGUAGE FlexibleInstances #-}
module Mudblood.Contrib.Lisp.MB
( Value (..)
, mkBoolValue, mkIntValue, mkFloatValue, mkStringValue
, mkAttrStringValue
, typeBool, typeInt, typeFloat, typeString
, typeAttrString
, parseValue
, mbBuiltins
-- re-exports
, typeList, typeError, throw... | talanis85/mudblood | src/Mudblood/Contrib/Lisp/MB.hs | gpl-3.0 | 6,828 | 0 | 17 | 1,954 | 2,599 | 1,307 | 1,292 | 168 | 2 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UnicodeSyntax #-}
{-# OPTIONS_GHC -fno-warn-unused-local-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module Main where
import Codec.BMP (BMP, packRGBA32ToBMP24, writeBMP)
import Control.Mon... | zhenyavinogradov/ml-labs | src/Lab7/Main.hs | gpl-3.0 | 13,902 | 0 | 25 | 4,371 | 4,979 | 2,529 | 2,450 | -1 | -1 |
-- Converts .lhs (literary Haskell files) to .hs (plain Haskell files)
-- Keeps only the statements which are normally compiled, plus blank lines.
-- To use:
-- ghc --make lhs2hs.hs
-- to get an executable file lhs2hs.
-- Then
-- lhs2hs filename
-- will open filename.lhs and save the converted file in filenam... | passionfruit18/ldl_exposition | util/lhs2hs.hs | gpl-3.0 | 1,655 | 0 | 14 | 543 | 355 | 179 | 176 | 27 | 6 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Organizations/Search.hs | mpl-2.0 | 5,859 | 0 | 18 | 1,408 | 866 | 505 | 361 | 123 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-games-management/gen/Network/Google/Resource/GamesManagement/Events/ResetAll.hs | mpl-2.0 | 2,713 | 0 | 12 | 575 | 233 | 146 | 87 | 41 | 1 |
{-# LANGUAGE OverloadedStrings, TypeFamilies #-}
module Model.Transcode.Types
( Transcode(..)
, TranscodePID
, TranscodeArgs
, transcodeAsset
, transcodeOrig
, transcodeId
-- TODO: don't re-export from Transcode
, makeTranscodeRow
, makeTranscode
, makeOrigTranscode
) where
import qualified Data.... | databrary/databrary | src/Model/Transcode/Types.hs | agpl-3.0 | 1,873 | 0 | 11 | 302 | 504 | 281 | 223 | 50 | 1 |
import Test.Hspec
-- We'll try just strait forward implementation.
-- Bruteforcing based on the conditions
-- There is probably math solution to this or simplification
-- a + b + c = 1000
-- a^2 + b^2 = c^2
-- a < b < c
condition_check :: Int -> (Int, Int, Int) -> Bool
condition_check sum (a, b, c)
-- a<b<c check not... | orbitgray/ProjectEuler | haskell/009.hs | lgpl-3.0 | 1,247 | 0 | 18 | 351 | 391 | 206 | 185 | 21 | 1 |
{-# LANGUAGE Haskell2010 #-}
module ReaderT where
newtype ReaderT r m a = ReaderT { runReaderT :: r -> m a }
| haskell/haddock | hoogle-test/src/type-sigs/ReaderT.hs | bsd-2-clause | 110 | 0 | 8 | 23 | 28 | 19 | 9 | 3 | 0 |
-- Copyright (c) 2015 Gabriel Gonzalez
data RNA = A | U | C | G
deriving (Read)
data AminoAcid
= Ala | Cys | Asp | Glu | Phe | Gly | His | Ile | Lys | Leu
| Met | Asn | Pro | Gln | Arg | Ser | Thr | Val | Trp | Tyr
| Stop
deriving (Show)
-- | Table of RNA triple mappings to amino acids.
decode ::... | BartMassey/haskell-basic-examples | rna.hs | bsd-2-clause | 1,431 | 0 | 14 | 413 | 731 | 381 | 350 | 56 | 1 |
{-# OPTIONS -XNoMonomorphismRestriction #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Binary.Generic.Extensions
-- Copyright : Lars Petersen
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : Lars Petersen <info@lars-petersen.net>
-- Stabilit... | lpeterse/binary-generic | src/Data/Binary/Generic/Extensions.hs | bsd-3-clause | 8,270 | 0 | 17 | 3,158 | 1,843 | 999 | 844 | 139 | 3 |
module Main (main) where
-- stdlib
import Control.Exception
import Control.Monad
import Control.Monad.Trans
import Data.List
import Network.Browser
import System.Directory
import System.Environment
import System.Exit (exitWith, ExitCode(..))
import System.FilePath
import System.IO
import System.IO.Error
import System.... | edsko/hackage-server | exes/MirrorClient.hs | bsd-3-clause | 10,501 | 0 | 23 | 2,816 | 2,447 | 1,233 | 1,214 | 207 | 4 |
{-# LANGUAGE TemplateHaskell #-}
module Client.EntityT where
import Control.Lens (makeLenses)
import Linear (V3(..))
import Types
makeLenses ''EntityT
newEntityT :: EntityT
newEntityT = EntityT
{ _eModel = Nothing
, _eAngles = V3 0 0 0
, _eOrigin = V3 0 0... | ksaveljev/hake-2 | src/Client/EntityT.hs | bsd-3-clause | 549 | 0 | 7 | 214 | 145 | 88 | 57 | 20 | 1 |
module Calc.Base
( thenP
, returnP
, happyError
, Parser
, Token(..)
, tokenToPosN
, TokenClass(..)
, AlexPosn
, AlexState(..)
, lexer
, runAlex
)
where
----------------------------------------------------------------------------
import Calc.Lexer
---------------------------------------------... | da-x/happy-alex-example | src/Calc/Base.hs | bsd-3-clause | 1,035 | 0 | 10 | 190 | 329 | 187 | 142 | 28 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
module Topic.Api (TopicApi, TopicEntity) where
import Servant
import Topic.Domain
import Data.Aeson.WithField
type TopicEntity = WithId TopicId Topic
type GetTopics =
"topics" :> Get '[JSON] [TopicEntity]
type CreateTopic =
"topics"
:> ReqBody '[JSON]... | Unisay/dancher | src/Topic/Api.hs | bsd-3-clause | 766 | 0 | 10 | 141 | 221 | 121 | 100 | 29 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module DBHelper
( runDB
, strToKey
, int64ToKey
) where
import Data.Text (pack, unpack)
import Data.Int (Int64)
import Control.Monad.Trans (liftIO, MonadIO)
import qualified Database.Persist as P
import qualified Database.Persist.Store as PS... | takei-shg/Magpie | DBHelper.hs | bsd-3-clause | 710 | 0 | 9 | 151 | 212 | 119 | 93 | 18 | 1 |
{-# LANGUAGE BangPatterns #-}
module ManualBang where
doesntEval :: Bool -> Int
doesntEval b = 1
manualSeq :: Bool -> Int
manualSeq b = b `seq` 1
banging :: Bool -> Int
banging !b = 1
data Foo = Foo Int !Int
first (Foo x _) = x
second (Foo _ y) = y | nicklawls/haskellbook | src/ManualBang.hs | bsd-3-clause | 255 | 0 | 7 | 60 | 107 | 57 | 50 | 13 | 1 |
module Network.MtGoxAPI.DepthStore.StressTest
( stressTest
) where
import Control.Monad
import Data.Time.Clock
import System.Random
import Network.MtGoxAPI.DepthStore
addRandomEntry :: DepthStoreHandle -> IO ()
addRandomEntry handle = do
t <- randomIO >>= \x -> if x
then r... | javgh/mtgoxapi | Network/MtGoxAPI/DepthStore/StressTest.hs | bsd-3-clause | 808 | 0 | 11 | 218 | 255 | 132 | 123 | 22 | 2 |
{-# OPTIONS_GHC -Wall #-}
module Main where
import Eel
main :: IO ()
main = mainM "main.ll" $ \argc _argv -> add (lit 42) argc
| stevezhee/eel | app/Main.hs | bsd-3-clause | 129 | 0 | 9 | 27 | 48 | 26 | 22 | 5 | 1 |
import Control.Concurrent (forkIO)
import qualified Control.Exception as E
import Control.Pipe
import Control.Pipe.Binary
import Network (connectTo, PortID (..))
import System.Environment (getArgs, getProgName)
import System.IO
main :: IO ()
main = do
args <- getArgs
case args of
[host, port] -> telne... | pcapriotti/pipes-extra | examples/telnet.hs | bsd-3-clause | 865 | 0 | 12 | 205 | 307 | 162 | 145 | 26 | 2 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.AutoMaster
-- Description : Change size of the stack area depending on the number of its windows.
-- Copyright : (c) 2009 Ily... | xmonad/xmonad-contrib | XMonad/Layout/AutoMaster.hs | bsd-3-clause | 4,927 | 0 | 16 | 1,302 | 1,140 | 604 | 536 | 65 | 3 |
{-# LANGUAGE BangPatterns, RankNTypes, GeneralizedNewtypeDeriving, ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
module ECC.Code.LDPC.ElimTanh where
-- Implementation of LDPC, that approximates
-- 2 *tanh−1 ( PRODUCT [ tanh ( |Z(x[n′])| / 2)] )
-- with:
-- min |Z(x[n′])|
-- where n' eltOf N(m)\n ... | ku-fpg/ecc-ldpc | src/ECC/Code/LDPC/ElimTanh.hs | bsd-3-clause | 3,476 | 0 | 11 | 1,257 | 132 | 81 | 51 | 15 | 1 |
-- | Tokenization breaks a 'String' into pieces of whitespace,
-- constants, symbols, and identifiers.
module Hpp.Tokens where
import Data.Char (isAlphaNum, isDigit, isSpace)
-- | Tokenization is 'words' except the white space is tagged rather
-- than discarded.
data Token = Important String
-- ^ Identifier... | bitemyapp/hpp | src/Hpp/Tokens.hs | bsd-3-clause | 3,852 | 0 | 13 | 916 | 1,146 | 608 | 538 | 56 | 5 |
{-# language CPP #-}
-- | = Name
--
-- XR_EXT_eye_gaze_interaction - instance extension
--
-- = Specification
--
-- See
-- <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_eye_gaze_interaction XR_EXT_eye_gaze_interaction>
-- in the main specification for complete information.
--
-- = Register... | expipiplus1/vulkan | openxr/src/OpenXR/Extensions/XR_EXT_eye_gaze_interaction.hs | bsd-3-clause | 8,099 | 0 | 14 | 1,391 | 1,405 | 814 | 591 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.