code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module CCAR.Model.Country
(
setupCountries
, cleanupCountries
, startup
)
where
import Control.Monad.IO.Class
import Control.Monad
import Control.Monad.Logger
import Control.Monad.Trans(lift)
import Control.Monad.Trans.Maybe
import Control.Monad.Trans.Resource
import Control.Applicative as Appl
import Data... | asm-products/ccar-websockets | CCAR/Model/Country.hs | agpl-3.0 | 4,015 | 38 | 20 | 789 | 1,204 | 662 | 542 | 106 | 2 |
{-# LANGUAGE ApplicativeDo #-}
module TypeTranspilerSpec where
import TypeTranspiler
import Test.Hspec
import System.Random
import Control.Monad
a =>> b = transpile a `shouldBe` Right b
keep a = a =>> a
infix 2 =>>
gg a = transpile a `shouldBe` Left "Hugh?"
main :: IO ()
main = hspec $ do
describe "simple and e... | ice1000/OI-codes | codewars/authoring/haskell/TypeTranspilerSpec.hs | agpl-3.0 | 3,484 | 0 | 27 | 1,021 | 903 | 384 | 519 | 98 | 1 |
{-# OPTIONS_GHC -F -pgmF ./scripts/local-htfpp #-}
module Foo.B (htf_thisModulesTests) where
import qualified Test.Framework as HTF
test_b_OK = HTF.assertEqual 1 1
| skogsbaer/HTF | tests/Foo/B.hs | lgpl-2.1 | 167 | 0 | 6 | 23 | 32 | 20 | 12 | 4 | 1 |
{-
Copyright 2015 Tristan Aubrey-Jones
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 writing, sof... | flocc-net/flocc | v0.1/Compiler/Types2/DepTypeAssignment.hs | apache-2.0 | 31,359 | 38 | 25 | 6,506 | 7,376 | 3,898 | 3,478 | 336 | 13 |
module FP_Core where
import FPPrac.Trees
{-
Extension of CoreIntro.hs:
- instructions as program *in* the processor,
- stack now is list of fixed length,i
- clock added
- program counter + stack pointer added,
- instruction EndProg added,
- update operaton (<~) added,
-}
-- ==========================================... | wouwouwou/2017_module_8 | src/haskell/series5/FP_Core.hs | apache-2.0 | 8,849 | 0 | 18 | 3,793 | 2,257 | 1,203 | 1,054 | 178 | 7 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE Unsafe #-}
{-# OPTIONS_HADDOCK show-extensions #-}
{-|
Copyright : (C) 2015, University of Twente
License : BSD2 ... | Ericson2314/clash-prelude | src/CLaSH/Prelude/BlockRam/File.hs | bsd-2-clause | 12,033 | 0 | 15 | 3,642 | 1,285 | 751 | 534 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Application.HXournal.Coroutine.Default
-- Copyright : (c) 2011, 2012 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <ianwookim@gmail.com>
-- Stability : exper... | wavewave/hxournal | lib/Application/HXournal/Coroutine/Default.hs | bsd-2-clause | 10,812 | 0 | 20 | 2,284 | 2,693 | 1,355 | 1,338 | 234 | 7 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QDragEnterEvent.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:22
Warning : this file is machine generated - ... | keera-studios/hsQt | Qtc/Gui/QDragEnterEvent.hs | bsd-2-clause | 3,847 | 0 | 17 | 581 | 1,060 | 566 | 494 | 66 | 1 |
{-# OPTIONS_GHC -Wno-partial-type-signatures #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE TemplateHaskell #-}
{-|
Module : Numeric.MixedType.Eq
Description : Bottom-up typed equality comparisons
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.... | michalkonecny/mixed-types-num | src/Numeric/MixedTypes/Eq.hs | bsd-3-clause | 14,141 | 49 | 21 | 2,911 | 4,289 | 2,393 | 1,896 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Lazyfoo.Lesson05 (main) where
import Control.Applicative
import Control.Monad
import Foreign.C.Types
import Linear
import qualified SDL
import Paths_sdl2 (getDataFileName)
screenWidth, screenHeight :: CInt
(screenWidth, screenHeight) = (640, 480)
loadSurface :: SDL.Surface ... | svenkeidel/sdl2 | examples/lazyfoo/Lesson05.hs | bsd-3-clause | 1,403 | 0 | 21 | 277 | 388 | 188 | 200 | 38 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Graphics.GChart.ChartItems.Labels where
import Graphics.GChart.Types
import Graphics.GChart.ChartItems.Util
import Data.List(intercalate)
import Control.Monad(liftM)
import Data.Maybe(catMaybes, fromJust)
-- Chart Title
instance ChartIte... | deepakjois/hs-gchart | Graphics/GChart/ChartItems/Labels.hs | bsd-3-clause | 5,684 | 0 | 14 | 2,702 | 1,131 | 587 | 544 | 79 | 5 |
{-# OPTIONS -Wall -fno-warn-unused-do-bind #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE RankNTypes #-}
-- | Generate a flow chart by from annotations from a code base.
--
-- The syntax is as follows:
--
-- @
-- expr <- label \/ next \/ do \/ if \/... | sjakobi/flo | src/Development/Flo.hs | bsd-3-clause | 8,160 | 0 | 17 | 2,315 | 1,899 | 1,015 | 884 | 146 | 7 |
import Data.List (sort)
import Data.Function (on)
import Common.Numbers.Primes (primesTo)
import Common.List (minimumBy')
main = print $ (fst answer) * (snd answer) where
primes = primesTo 5000
candidate = [ (p,q) | p <- primes, q <- primes, p*q <= 10000000, check p q ]
value :: (Int, Int) -> Double
va... | foreverbell/project-euler-solutions | src/70.hs | bsd-3-clause | 669 | 0 | 11 | 185 | 296 | 161 | 135 | 15 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE OverloadedStrings #-}
module Language.Epilog.MIPS.MIPS
( MIPS (..)
, Emips (..)
, BOp (..)
, Register (Ze... | adgalad/Epilog | src/Haskell/Language/Epilog/MIPS/MIPS.hs | bsd-3-clause | 12,802 | 0 | 23 | 4,561 | 4,147 | 2,082 | 2,065 | 345 | 3 |
-- Copyright (c) 2014, Dmitry Zuikov
-- 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 of conditions and... | voidlizard/emufat | src/EncodeVM.hs | bsd-3-clause | 7,096 | 0 | 14 | 1,895 | 2,538 | 1,324 | 1,214 | 127 | 27 |
import Lib
main :: IO ()
main = threadedTest "main"
| willdonnelly/dyre | Tests/threaded/Main.hs | bsd-3-clause | 53 | 0 | 6 | 11 | 22 | 11 | 11 | 3 | 1 |
module Policy where
import System.Directory ( getDirectoryContents )
import System.FilePath ( (<.>), (</>) )
-- import Prelude hiding (catch)
import qualified Control.Exception as E
import Data.Either (lefts)
import qualified System.IO
import qualified Data.Char as Char
import qualified Data.List as List
import qu... | GaloisInc/sk-dev-platform | libs/lobster/testsrc/Policy.hs | bsd-3-clause | 3,609 | 0 | 17 | 831 | 978 | 536 | 442 | 72 | 4 |
module GameOver where
import Data.IORef
import Graphics.Rendering.OpenGL hiding (($=))
import Graphics.UI.GLUT
type Vertice = (GLfloat, GLfloat)
type Cor = (GLfloat, GLfloat, GLfloat)
game :: IO ()
game = do
clear [ColorBuffer]
renderPrimitive Quads $ do
desenh... | jailson-dias/Arca | src/GameOver.hs | bsd-3-clause | 29,947 | 0 | 13 | 7,081 | 13,443 | 8,863 | 4,580 | 654 | 1 |
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fcontext-stack42 #-}
module Games.Chaos2010.Database.Wizard_spell_choices where
import Games.Chaos2010.Database.Fields
import Database.HaskellDB.DBLayout
type Wizard_spell_choices =
Record
(HCons (LVPair Wizard_name (Expr (Maybe Strin... | JakeWheat/Chaos-2010 | Games/Chaos2010/Database/Wizard_spell_choices.hs | bsd-3-clause | 499 | 0 | 15 | 67 | 104 | 58 | 46 | 11 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
module GHC.Types.RepType
(
-- * Code generator views onto Types
UnaryType, NvUnaryType, isNvUnaryType,
unwrapType,
-- * Predicates on types
isVoidTy,
-- * Type representation for the code generator
typePrimRep, typePrimRep1,
run... | sdiehl/ghc | compiler/GHC/Types/RepType.hs | bsd-3-clause | 19,963 | 0 | 14 | 4,892 | 2,496 | 1,297 | 1,199 | 222 | 6 |
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoRebindableSyntax #-}
{-# OPTIONS_GHC -Wno-missing-methods #-}
module Homogeneous.PreludeInstances
where
import Homoge... | mikeizbicki/homoiconic | src/Homoiconic/Homogeneous/Example.hs | bsd-3-clause | 7,244 | 0 | 16 | 1,795 | 2,488 | 1,288 | 1,200 | -1 | -1 |
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeOpe... | kylcarte/lnfunctors | src/Control/LnMonad/Focus.hs | bsd-3-clause | 1,605 | 1 | 9 | 312 | 605 | 335 | 270 | 43 | 1 |
module UI
( run
) where
import Brick (App (..), AttrName, BrickEvent (..),
EventM, Location (..), Next,
Padding (..), Widget, attrMap,
attrName, continue, defaultMai... | hot-leaf-juice/gotta-go-fast | src/UI.hs | bsd-3-clause | 4,369 | 0 | 12 | 1,446 | 1,410 | 727 | 683 | 107 | 13 |
module ErrMsg (
LogReader
, setLogger
, handleErrMsg
) where
import Bag
import Control.Applicative
import Data.IORef
import Data.Maybe
import DynFlags
import ErrUtils
import GHC
import qualified Gap
import HscTypes
import Outputable
import System.FilePath
----------------------------------------------------... | himura/ghc-mod | ErrMsg.hs | bsd-3-clause | 1,955 | 0 | 16 | 362 | 579 | 303 | 276 | 44 | 2 |
module Model.IO where
import Control.Monad.Trans (liftIO)
import Data.List
import Log
import Model
import Model.Repa
import Model.Types
import System.Directory
import System.FilePath
import Words
trainFiles :: (Progress m) => In... | abailly/hs-word2vec | src/Model/IO.hs | bsd-3-clause | 720 | 0 | 11 | 186 | 212 | 110 | 102 | 19 | 1 |
-- |Composes NetCore policies and predicates, and defines how these policies
-- interpret abstract packets.
module Frenetic.NetCore.Semantics
( evalProgram
, Id (..)
, Act (..)
, Pol (..)
, In (..)
, Out (..)
, Callback (..)
, Callbacks
, callbackDelayStream
, callbackInterval
, evalPol
, evalAc... | frenetic-lang/netcore-1.0 | src/Frenetic/NetCore/Semantics.hs | bsd-3-clause | 25,513 | 0 | 27 | 6,023 | 8,548 | 4,370 | 4,178 | -1 | -1 |
{-# LANGUAGE CPP, ViewPatterns, DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
------------------------------------------------------------------------------
-- |
-- Module: Database.PostgreSQL.Simple.HStore.Implementation
-- Copyright: (c) 2013 Leon P Smith
-- License: BSD3
-- Maintainer: Leon P Smith... | tomjaguarpaw/postgresql-simple | src/Database/PostgreSQL/Simple/HStore/Implementation.hs | bsd-3-clause | 7,352 | 0 | 18 | 1,909 | 2,081 | 1,084 | 997 | 159 | 3 |
-- | This module provides numerical routines for minimizing/maximizing one dimensional functions.
-- All function are translated from "Numerical Recipes in C".
-- The module is divided into simple and advanced sections.
module HLearn.Optimization.Univariate
(
-- * Simple interface
-- | These simple functio... | iamkingmaker/HLearn | src/HLearn/Optimization/Univariate.hs | bsd-3-clause | 24,260 | 0 | 26 | 9,724 | 6,307 | 3,430 | 2,877 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-------------------------------------------------------------------------------
-- |
-- Module : Fluorine.Attributes
-- Copyright : (c) 2015 Jeffrey Rosenbluth
-- License : BSD-style (see LICENSE)
-- Maintainer : jeffrey.rosenbluth@gmail.com
--
-- This module... | jeffreyrosenbluth/flourine | src/Fluorine/HTML/Events/Handler.hs | bsd-3-clause | 1,747 | 0 | 8 | 255 | 216 | 131 | 85 | 21 | 1 |
{-# LANGUAGE RankNTypes, OverloadedStrings #-}
module Protocol.ROC where
import System.Hardware.Serialport
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LB
import Protocol.ROC.Utils
import Protocol.ROC.PointTypes
import Protocol.ROC.FullyDefinedPointType
import Protocol.ROC.ROCConfig... | jqpeterson/roc-translator | src/Protocol/ROC.hs | bsd-3-clause | 2,165 | 0 | 14 | 425 | 630 | 318 | 312 | 46 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Air.Logger where
import Prelude hiding (log)
import Control.Monad (forM_, join)
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS
import Data.Time (UTCTime, getCurrentTime)
import System.Log.FastLogger
import Air.Domain
username = userCa... | andorp/air | src/Air/Logger.hs | bsd-3-clause | 1,730 | 0 | 14 | 336 | 524 | 287 | 237 | 35 | 1 |
{-# LANGUAGE Arrows #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Arrow
import Data.Maybe ... | WraithM/opaleye-trans | examples/v1/RoseTree.hs | bsd-3-clause | 4,759 | 3 | 17 | 1,327 | 1,625 | 811 | 814 | 122 | 1 |
module Main where
mingle :: String -> String -> String
mingle [] [] = []
mingle (x:xs) (y:ys) = x:y:(mingle xs ys)
main :: IO ()
main = do p <- getLine
q <- getLine
putStrLn $ mingle p q
| everyevery/programming_study | hackerrank/functional/string-mingling/string-mingling.hs | mit | 209 | 0 | 8 | 62 | 114 | 58 | 56 | 8 | 1 |
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
module Tests.Readers.Markdown (tests) where
import Text.Pandoc.Definition
import Test.Framework
import Tests.Helpers
import Tests.Arbitrary()
import Text.Pandoc.Builder
-- import Text.Pandoc.Shared ( normalize )
import Text.Pandoc
import Data.Sequence (singleton)
markdo... | Lythimus/lptv | sites/all/modules/jgm-pandoc-8be6cc2/src/Tests/Readers/Markdown.hs | gpl-2.0 | 3,414 | 0 | 22 | 1,079 | 633 | 344 | 289 | 59 | 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-redshift/gen/Network/AWS/Redshift/DescribeClusterSecurityGroups.hs | mpl-2.0 | 10,364 | 0 | 16 | 2,060 | 1,151 | 691 | 460 | 126 | 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-storagegateway/gen/Network/AWS/StorageGateway/UpdateSnapshotSchedule.hs | mpl-2.0 | 6,744 | 0 | 13 | 1,407 | 857 | 515 | 342 | 107 | 1 |
{-# LANGUAGE CPP, NondecreasingIndentation, TupleSections #-}
{-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-}
-----------------------------------------------------------------------------
--
-- GHC Driver program
--
-- (c) The University of Glasgow 2005
--
----------------------------------------... | ml9951/ghc | ghc/Main.hs | bsd-3-clause | 36,132 | 0 | 27 | 9,975 | 7,364 | 3,796 | 3,568 | 566 | 17 |
module PackageTests.BenchmarkOptions.Check where
import Test.HUnit
import System.FilePath
import PackageTests.PackageTester
suite :: Test
suite = TestCase $ do
let directory = "PackageTests" </> "BenchmarkOptions"
pdFile = directory </> "BenchmarkOptions" <.> "cabal"
spec = PackageSpec directory [... | IreneKnapp/Faction | libfaction/tests/PackageTests/BenchmarkOptions/Check.hs | bsd-3-clause | 1,033 | 0 | 12 | 289 | 177 | 88 | 89 | 20 | 1 |
module TPM (
module TPM.Admin,
module TPM.Capability,
module TPM.Const,
module TPM.Driver,
module TPM.Driver.Socket,
module TPM.Error,
module TPM.Key,
module TPM.Nonce,
module TPM.PCR,
module TPM.Digest,
module TPM.Session,
module TPM.Storage,
module TPM.Types,
mo... | armoredsoftware/protocol | tpm/mainline/src/TPM.hs | bsd-3-clause | 1,321 | 0 | 15 | 277 | 387 | 215 | 172 | 50 | 1 |
{-# LANGUAGE Haskell98, MultiParamTypeClasses, FunctionalDependencies, TypeSynonymInstances, FlexibleInstances, FlexibleContexts #-}
{-# LINE 1 "Text/Regex/Base.hs" #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
-----------------------------------------------------------------------------
-- |
--
--... | phischu/fragnix | tests/packages/scotty/Text.Regex.Base.hs | bsd-3-clause | 2,056 | 0 | 7 | 311 | 132 | 103 | 29 | 12 | 1 |
module PLpatt.Parse_PLpatt where
import PLpatt.AS_BASIC_PLpatt
import Text.ParserCombinators.Parsec
import Common.Result
import Control.Monad
import Haskell.Wrapper
import qualified Data.Text as Tx
parsemmt :: String -> IO (Result Basic_spec)
parsemmt s = do
putStr $ "----> input: " ++
... | mariefarrell/Hets | PLpatt/Parse_PLpatt.hs | gpl-2.0 | 1,108 | 0 | 15 | 488 | 295 | 145 | 150 | 31 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE MagicHash #-}
#if !defined(__PARALLEL_HASKELL__)
{-# LANGUAGE UnboxedTuples #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : System.Mem.StableName
-- Copyrig... | christiaanb/ghc | libraries/base/System/Mem/StableName.hs | bsd-3-clause | 4,360 | 0 | 8 | 846 | 292 | 181 | 111 | 29 | 2 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE StandaloneDeriving #-}
module T12583 where
import Data.Ix
data Foo a where
MkFoo :: (Eq a, Ord a, Ix a) => Foo a
deriving instance Eq (Foo a)
deriving instance Ord (Foo a)
deriving instance Ix (Foo a)
| snoyberg/ghc | testsuite/tests/deriving/should_compile/T12583.hs | bsd-3-clause | 243 | 0 | 7 | 49 | 87 | 48 | 39 | 9 | 0 |
{-# OPTIONS_GHC -w #-}
import Control.Monad(when)
import System.Exit
-- parser produced by Happy Version 1.18.6
data HappyAbsSyn t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 t33 t34 t35 t36 t37 t38 t39 t40 t41 t42 t43 t44 t45 t46 t47 t48 t49 t50 t51 t52 t53 t54 t55 t56 t57 t58 t59 t60 t... | urbanslug/ghc | testsuite/tests/perf/compiler/T5631.hs | bsd-3-clause | 31,315 | 424 | 20 | 5,516 | 9,183 | 4,780 | 4,403 | 759 | 3 |
module IntegratorForward where
import qualified Clamp
import qualified Vector3f
import qualified Input
forward_speed :: Input.T -> Float -> Float -> Float -> Float
forward_speed i sf a delta =
if (Input.is_moving_forward i)
then sf + (a * delta)
else sf
backward_speed :: Input.T -> Float -> Float -> Float ->... | io7m/jcamera | com.io7m.jcamera.documentation/src/main/resources/com/io7m/jcamera/documentation/haskell/IntegratorForward.hs | isc | 801 | 0 | 13 | 173 | 326 | 182 | 144 | 22 | 2 |
module Engine where
import Control.Monad
import Board
import Geometry
import Data.List (nub)
-- | Return the white pieces from the board
whites :: Board -> [Piece]
whites = filter (\piece -> color piece == White)
-- | Return the black pieces from the board
blacks :: Board -> [Piece]
blacks = filter (\piece -> color ... | nagyf/hs-chess | src/Engine.hs | mit | 2,550 | 0 | 11 | 564 | 1,084 | 555 | 529 | 55 | 2 |
module Handler.Run where
import Import
import Util.Handler (maybeApiUser)
import Network.Wai (lazyRequestBody)
import Model.Run.Api (runSnippet)
import Model.Snippet.Api (getSnippet)
import Settings.Environment (runApiAnonymousToken)
postRunR :: Language -> Handler Value
postRunR lang = do
langVersion <- fromMayb... | vinnymac/glot-www | Handler/Run.hs | mit | 2,536 | 0 | 16 | 608 | 782 | 384 | 398 | 51 | 2 |
module Control.Concurrent.STM.ClosableChan where
import Control.Concurrent.STM
import Control.Concurrent.STM.TBMChan
import Control.Concurrent.STM.TMChan
class ClosableChan q where
isClosedChan :: q -> STM Bool
closeChan :: q -> STM ()
instance ClosableChan (TMChan a) where
isClosedChan = isClosedTMChan
c... | MRudolph/stm-chans-class | src/Control/Concurrent/STM/ClosableChan.hs | mit | 444 | 0 | 9 | 66 | 111 | 63 | 48 | 13 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module IHaskell.Display.Widgets.Selection.RadioButtons (
-- * The RadioButtons Widget
RadioButtons,
-- * Constructor
mkRadioButtons) where
-- To keep `cab... | beni55/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/RadioButtons.hs | mit | 2,265 | 0 | 17 | 566 | 474 | 248 | 226 | 51 | 1 |
module Callbacks where
import Gol3d.Render
import Gol3d.Life
import Control.Monad ( when )
import Data.IORef
import Graphics.UI.GLUT
import System.Exit ( exitWith, ExitCode(ExitSuccess) )
import qualified Data.Map as M
import Util
import Input
import Types
import App
keyPollMap :: IORef State -> [(Key, IO ())]
key... | labcoders/gol3d-hs | src/Callbacks.hs | mit | 4,291 | 4 | 20 | 1,838 | 1,275 | 650 | 625 | 110 | 6 |
{-# LANGUAGE NamedFieldPuns #-}
{-
Copyright (C) 2012-2017 Jimmy Liang <http://gsd.uwaterloo.ca>
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 limitat... | gsdlab/claferIG | src/Language/Clafer/IG/Constraints.hs | mit | 5,792 | 0 | 14 | 1,132 | 1,579 | 835 | 744 | 84 | 6 |
{-# LANGUAGE Safe #-}
module Data.UTC.Class.Epoch
( Epoch(..)
) where
-- | The instant in time also known as __the epoch__: 1970-01-01T00:00:00Z
class Epoch t where
epoch :: t
| lpeterse/haskell-utc | Data/UTC/Class/Epoch.hs | mit | 184 | 0 | 6 | 37 | 33 | 21 | 12 | 5 | 0 |
import Control.Monad
import Data.Char
import Data.Function
import Data.List
import Data.Maybe
import Text.Printf
main = do
tests <- readLn
forM_ [1..tests] $ \caseNum -> do
str <- getLine
let ans = concatMap insertPause . groupBy pauseNeeded $ numified where
numified = map numify str
... | marknsikora/codejam | 351101/C.hs | mit | 767 | 0 | 16 | 183 | 279 | 149 | 130 | 23 | 3 |
-- This file is covered by an MIT license. See 'LICENSE' for details.
-- Author: Bertram Felgenhauer
{-# LANGUAGE OverloadedStrings #-}
module Confluence.Direct.Ground (
confluent
) where
import Confluence.Types
import Framework.Types
import Framework.Explain
import Util.Pretty
import qualified Util.Relation as R... | haskell-rewriting/confluence-tool | src/Confluence/Direct/Ground.hs | mit | 12,522 | 0 | 21 | 4,307 | 5,710 | 2,929 | 2,781 | 250 | 5 |
{-# LANGUAGE NoImplicitPrelude #-}
module Rx.Observable.Scheduler where
import Prelude.Compat
import Rx.Disposable (newBooleanDisposable, setDisposable, toDisposable)
import Rx.Scheduler (Scheduler, schedule)
import Rx.Observable.Types
scheduleOn
:: Scheduler s
-> Observable s0 a
-> Observable s a
schedule... | roman/Haskell-Reactive-Extensions | rx-core/src/Rx/Observable/Scheduler.hs | mit | 715 | 0 | 18 | 181 | 180 | 94 | 86 | 20 | 1 |
{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable
, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, CPP #-}
module Transient.MapReduce
(
Distributable(..),distribute, getText,
getUrl, getFile,textUrl, textFile,
mapKeyB, mapKeyU, reduce,eval,
PartRef)
where
#ifdef ghcjs_HOST_OS
import Transien... | geraldus/transient-universe | src/Transient/MapReduce.hs | mit | 16,955 | 0 | 6 | 5,459 | 207 | 116 | 91 | -1 | -1 |
module Language.TaPL.TypedArith.Types (typeOf, Ty) where
import Language.TaPL.TypedArith.Syntax (Term(..))
data Ty = TyBool
| TyNat
deriving (Show, Read, Eq)
typeOf :: Term -> Maybe Ty
typeOf TmZero = Just TyNat
typeOf (TmSucc t) | typeOf t == Just TyNat = Just TyNat
typeOf (TmPred t) | typeOf... | zeckalpha/TaPL | src/Language/TaPL/TypedArith/Types.hs | mit | 577 | 0 | 11 | 129 | 260 | 125 | 135 | 14 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module Development.CSSCSS.RedundancyCalcTest (tests) where
import TestHelper
import Test.HUnit
import Development.CSSCSS.Rulesets
import Development.CSSCSS.RedundancyCalc
main = $(defaultMainGenerator)
tests = $(testGroupGenerator)
case_findMatche... | zmoazeni/csscss-haskell | test/Development/CSSCSS/RedundancyCalcTest.hs | mit | 823 | 0 | 12 | 114 | 243 | 142 | 101 | 23 | 1 |
{-# LANGUAGE DataKinds #-}
-- |
-- Interpreters tests
--
-- Checks you /can/ combine interpreters nicely
module Interpreters where
import Control.Biegunka
import qualified Data.Monoid as M
import qualified Data.Semigroup as S
interpreter_0 :: Interpreter
interpreter_0 = confirm M.<> run
interpreter_1 :: I... | biegunka/biegunka | test/typecheck/should_compile/OK9.hs | mit | 364 | 0 | 5 | 62 | 62 | 41 | 21 | 9 | 1 |
{-# language FlexibleInstances #-}
{-# language MultiParamTypeClasses #-}
{-# language ScopedTypeVariables #-}
module Polynomial.Test where
import qualified Prelude
import Prelude hiding ( Num (..), Integer, null, negate, fromInteger)
import Polynomial.Class
import Polynomial.Common
import Polynomial.ToDoc
impor... | marcellussiegburg/autotool | collection/src/Polynomial/Test.hs | gpl-2.0 | 1,766 | 0 | 15 | 417 | 765 | 396 | 369 | 44 | 3 |
{- |
Module : $EmptyHeader$
Description : <optional short description entry>
Copyright : (c) <Authors or Affiliations>
License : GPLv2 or higher, see LICENSE.txt
Maintainer : <email>
Stability : unstable | experimental | provisional | stable | frozen
Portability : portable | non-portable (<reason>... | nevrenato/Hets_Fork | GMP/versioning/coloss-0.0.4/examples.pml.hs | gpl-2.0 | 1,176 | 0 | 16 | 279 | 333 | 179 | 154 | 11 | 1 |
factorial a | a <=1 = 1
| otherwise = a * factorial (a-1)
main = print $ factorial_bis 4
| algebrato/Exercise | Esercizio2.hs | gpl-2.0 | 99 | 0 | 9 | 30 | 54 | 25 | 29 | 3 | 1 |
module Experimentation.P03 (p03_test) where
import Test.HUnit
import Data.Maybe
import Data.List
elementAt_rec :: Int -> [a] -> Maybe a
elementAt_rec b all@(a:as)
| b == 0 = Just a
| b > length all = Nothing
| otherwise = elementAt_rec (b - 1) as
elementAt_nat :: Int -> [a] -> Maybe a
elementAt_nat b a
| b > le... | adarqui/99problems-hs | Experimentation/P03.hs | gpl-3.0 | 958 | 0 | 11 | 160 | 346 | 172 | 174 | 24 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Data.Text as T
import NLP.Grabber
import NLP.Article.Analyze
import Database.Persist.MySQL
import NLP.Grabber.Wordlist
import NLP.Database.Article
import NLP.Types.Monad
import NLP.Types
dbCfg :: ConnectInfo
dbCfg = ConnectInfo "loc... | azapps/nlp.hs | src/NLP.hs | gpl-3.0 | 681 | 0 | 11 | 153 | 157 | 88 | 69 | 19 | 1 |
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE RecordWildCards #-}
-- ----------------------------------------------------- --
-- --| Hearth - Haskell Interpreter for Haiku Forth |--- --
-- ----------------------------------------------------- --
import qualified "GLFW-b" Graphics.UI.GLFW as GLFW
import Graphic... | vcte/CS241_Hearth | HearthMain.hs | gpl-3.0 | 9,398 | 141 | 15 | 2,250 | 2,288 | 1,141 | 1,147 | 220 | 2 |
fmap :: (a -> b) -> (Maybe a -> Maybe b) | hmemcpy/milewski-ctfp-pdf | src/content/1.7/code/haskell/snippet04.hs | gpl-3.0 | 40 | 0 | 8 | 10 | 30 | 15 | 15 | 1 | 0 |
import Data.List (sort)
test = [[2],[3,4],[6,5,7],[4,1,8,3]]
nextRow :: [Integer] -> [Integer] -> [Integer]
nextRow a [] = a
nextRow a b = [(x + y) | x <- a, y <- b]
minimumTotal :: [[Integer]] -> Integer
minimumTotal [] = 0
minimumTotal (x:xs) = (head.sort)$ foldl nextRow x xs
| ccqpein/Arithmetic-Exercises | Triangle/Triangle.hs | apache-2.0 | 297 | 0 | 7 | 67 | 184 | 105 | 79 | 8 | 1 |
permutations' :: (Enum a, Num a) => a -> a -> a
permutations' a b = let aa = a-b+1 in
(fromRational (product [aa..a]))/ (fromRational (product [1..b]))
climbS :: (Fractional a, Enum a, Num a, Integral a) => a -> a
climbS nn = sum [(permutations' n (n + y))| n <- [1..(div nn 2)], let y = (nn - n * 2)]
| ccqpein/Arithmetic-Exercises | Climbing-Stairs/CS.hs | apache-2.0 | 305 | 0 | 13 | 66 | 203 | 105 | 98 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{- | This module defines session objects that act as entry points to spark.
There are two ways to interact with Spark: using an explicit state object,
or using the default state object (interactive session).
While the interactive session is the ... | tjhunter/karps | haskell/src/Spark/Core/Context.hs | apache-2.0 | 1,440 | 0 | 8 | 225 | 169 | 113 | 56 | 34 | 1 |
{-|
Module : VecMath
Description : 3D vectors, normals and points
Copyright : (c) Jonathan Merritt, 2015
License : Apache License 2.0
Maintainer : j.s.merritt@gmail.com
Stability : experimental
Vector mathematics and transformations.
-}
module VecMath (
-- * Classes
Cartesian3Tuple(
xcomp3
... | lancelet/approxier | src/lib/VecMath.hs | apache-2.0 | 14,540 | 0 | 14 | 4,039 | 4,847 | 2,574 | 2,273 | 353 | 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
--
-- https://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... | google/haskell-trainings | haskell_101/codelab/06_rps/src/Main.hs | apache-2.0 | 2,295 | 0 | 10 | 514 | 484 | 253 | 231 | 44 | 2 |
import Data.List
import Text.Printf
ans ([0,0]:_) = []
ans x =
let d = take 5 x
r = drop 5 x
a = maximumBy (\(a,b) (c,d)-> compare b d) $ zip ['A','B'..] $ map (\[x,y] -> x + y) d
in
a:(ans r)
main = do
c <- getContents
let i = map (map read) $ map words $ lines c :: [[Int]]
o = ans i
... | a143753/AOJ | 0195.hs | apache-2.0 | 361 | 0 | 14 | 111 | 243 | 127 | 116 | 13 | 1 |
module Chord where
import Interval (Interval (..), addInterval)
import Note
-- |A chord is defined by it's root note and all it's
-- intervals, relative to the root note.
data Chord = Chord Note [Interval]
deriving (Eq, Read, Show)
-- |Converts a chord to a list of notes that constitute the
-- chord.
toNotes :: ... | blacktaxi/inversion | src/Chord.hs | bsd-3-clause | 407 | 0 | 7 | 77 | 94 | 57 | 37 | 8 | 1 |
module Data.Text.Lazy.Encoding.AsLt
( module Data.Text.Lazy.Encoding.AsLt
) where
-- generated by https://github.com/rvion/ride/tree/master/jetpack-gen
import qualified Data.Text.Lazy.Encoding as I
-- lt_decodeLatin1 :: ByteString -> Text
lt_decodeLatin1 = I.decodeLatin1
-- lt_decodeUtf16BE :: ByteString -> Tex... | rvion/ride | jetpack/src/Data/Text/Lazy/Encoding/AsLt.hs | bsd-3-clause | 1,879 | 0 | 5 | 227 | 183 | 119 | 64 | 22 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
module Snooze.Core (
httpGo
, httpGo'
) where
import Data.ByteString.Lazy as BSL
import Network.HTTP.Client
import P
import System.IO
-- E... | ambiata/snooze | src/Snooze/Core.hs | bsd-3-clause | 942 | 0 | 10 | 211 | 147 | 84 | 63 | 21 | 1 |
-- DataKinds is needed for deriveAll0 calls on GHC 8
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module ... | sol/aeson | tests/DataFamilies/Types.hs | bsd-3-clause | 1,629 | 0 | 9 | 502 | 394 | 225 | 169 | 39 | 0 |
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1998
This module contains definitions for the IdInfo for things that
have a standard form, namely:
- data constructors
- record selectors
- method and superclass selectors
- primitive operations
-}
{-# LANGUAGE CPP #-}
module MkId (
... | ezyang/ghc | compiler/basicTypes/MkId.hs | bsd-3-clause | 64,452 | 0 | 21 | 17,694 | 7,339 | 4,019 | 3,320 | 614 | 6 |
module Mandelbrot.ColoringSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Mandelbrot.Coloring
import Data.Word
main :: IO ()
main = hspec spec
spec :: Spec
spec = parallel $ do
describe "diverseColoring" $ do
it "should produce a zero value for zero input" $
diverseColoring 0 `sh... | matt-keibler/mandelbrot | test/Mandelbrot/ColoringSpec.hs | bsd-3-clause | 2,164 | 0 | 20 | 541 | 705 | 375 | 330 | 45 | 1 |
import Math.Operad
import Data.List
a = corolla 1 [1,2]
b = corolla 2 [1,2]
la1 = shuffleCompose 1 [1,2,3] a a
la2 = shuffleCompose 1 [1,3,2] a a
la3 = shuffleCompose 2 [1,2,3] a a
lb1 = shuffleCompose 1 [1,2,3] b b
lb2 = shuffleCompose 1 [1,3,2] b b
lb3 = shuffleCompose 2 [1,2,3] b b
lc1 = shuffl... | Dronte/Operads | examples/example.hs | bsd-3-clause | 1,642 | 0 | 7 | 348 | 726 | 392 | 334 | 43 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MultiWayIf #-}
module Client.VID where
import Control.Lens ((.=), ix, (^.), zoom, use, preuse, (-=), (&), (.~), (-~), (+~))
import Control.Monad (void, liftM, when, unless)
import Data.Char (toLower)
import Data.Maybe (isJust, isNothi... | ksaveljev/hake-2 | src/Client/VID.hs | bsd-3-clause | 24,058 | 0 | 29 | 8,996 | 5,666 | 2,841 | 2,825 | -1 | -1 |
{-# LANGUAGE TemplateHaskell, TypeOperators #-}
--------------------------------------------------------------------
-- |
-- Executable : mbox-partition
-- Copyright : (c) Nicolas Pouillard 2008, 2009, 2011
-- License : BSD3
--
-- Maintainer: Nicolas Pouillard <nicolas.pouillard@gmail.com>
-- Stability : provisional
... | np/mbox-tools | mbox-partition.hs | bsd-3-clause | 3,571 | 0 | 19 | 762 | 1,092 | 593 | 499 | 64 | 4 |
module Two (two) where
import Data.List
import Data.List.Split
import Control.Monad
up :: Integer -> Integer
up n
| n > 3 = n - 3
| otherwise = n
down :: Integer -> Integer
down n
| n < 7 = n + 3
| otherwise = n
right :: Integer -> Integer
right n
| n `mod` 3 == 0 = n
| otherwise = n + 1
le... | alicemaz/advent2016 | Two.hs | bsd-3-clause | 2,050 | 0 | 14 | 644 | 1,000 | 524 | 476 | 64 | 5 |
{-# LANGUAGE Rank2Types, ScopedTypeVariables, LambdaCase #-}
module Data.Boombox.ByteString where
import qualified Data.ByteString as B
import qualified Data.ByteString.Internal as B
import Foreign.ForeignPtr
import Foreign.Ptr
import Foreign.Storable
import Control.Monad
import Control.Monad.Trans.Class
import Data.B... | fumieval/boombox | src/Data/Boombox/ByteString.hs | bsd-3-clause | 1,392 | 0 | 23 | 298 | 558 | 290 | 268 | 39 | 4 |
module Ntha.Core.Ast where
import Ntha.Type.Type
import Data.List (intercalate)
import Data.Maybe (fromMaybe)
import qualified Data.Map as M
import qualified Text.PrettyPrint as PP
type EName = String -- variable name
type EPath = String
type EField = String
type EI... | zjhmale/Ntha | src/Ntha/Core/Ast.hs | bsd-3-clause | 7,522 | 0 | 21 | 2,177 | 2,731 | 1,378 | 1,353 | 152 | 22 |
module Main where
import Log
import LogAnalysis
import Language.Haskell.Interpreter
demort :: String -> String -> IO ()
demort cmd ('(':stresult) = demort cmd (init stresult)
demort cmd stresult = putStrLn (cmd ++ " = " ++ stresult)
demor :: String -> String -> IO ()
demor cmd sresult = demort cmd (drop 6 sresult) ... | tessmero/CIS194-HW02 | app/Main.hs | bsd-3-clause | 2,255 | 0 | 11 | 587 | 530 | 247 | 283 | 46 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import System.FilePath
import System.Console.CmdArgs
import GitRunner
import G4Release
data CmdOptions = AboutIrt {
}
| G4Release { gitRepo :: String
, ignoreGitModifications :: Bool
... | kaitanie/irt | src/irt.hs | bsd-3-clause | 4,749 | 1 | 12 | 1,275 | 1,000 | 513 | 487 | 86 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Trustworthy #-}
#if __GLASGOW_HASKELL__ >= 800
{-# LANGUAGE TypeInType #-}
#endif
#includ... | ddssff/lens | src/Control/Lens/Lens.hs | bsd-3-clause | 54,288 | 0 | 15 | 11,711 | 9,056 | 5,405 | 3,651 | 386 | 2 |
module Paths_haskelldb_template (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
catchIO = Exc... | zearen-wover/haskelldb-template | dist/build/autogen/Paths_haskelldb_template.hs | bsd-3-clause | 1,172 | 0 | 10 | 164 | 329 | 188 | 141 | 25 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Aeson.ZipperSpec (spec) where
import Test.Hspec
import Data.Aeson (decode, Value(..))
import Data.Aeson.Zipper
import qualified Data.Vector as V
spec :: Spec
spec = do
describe "motion" $ do
it "up of top" $ getValue (tloc >>= up) `shouldBe` Null
it "... | llhotka/tiphys | test/Data/Aeson/ZipperSpec.hs | bsd-3-clause | 1,787 | 0 | 18 | 528 | 637 | 314 | 323 | 38 | 1 |
module Skype.LogExport (
exportChats
) where
import Skype.Entry
import Data.Set as DS
import Data.List as DL
import Data.ByteString.Char8 as DB8
import Data.ByteString as S
import Data.Time
import Control.Monad
import Control.Monad.IfElse
import Control.Exception
import System.Directory
import System.FilePath
imp... | jdevelop/skypelogr | Skype/LogExport.hs | bsd-3-clause | 3,917 | 4 | 18 | 1,602 | 942 | 493 | 449 | 76 | 2 |
-- | This module provides the /Empty/ processor.
-- Checks wether the strict components of a problem are empty.
module Tct.Trs.Processor.Empty
( emptyDeclaration
, empty
) where
import qualified Tct.Core.Data as T
import qualified Tct.Core.Processor.Empty as E
import Tct.Trs.Data
import qua... | ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Processor/Empty.hs | bsd-3-clause | 590 | 0 | 9 | 114 | 121 | 76 | 45 | -1 | -1 |
--
--
--
-----------------
-- Exercise 9.14.
-----------------
--
--
--
module E'9'14 where
import E'9'12 ( rev )
import Test.QuickCheck
prop_ReverseRev :: [Integer] -> Bool
prop_ReverseRev list
= reverse list == rev list
-- GHCi> quickCheck prop_ReverseRev
-- Note: Works for QuickCheck testing, but can't... | pascal-knodel/haskell-craft | _/links/E'9'14.hs | mit | 357 | 0 | 6 | 69 | 58 | 37 | 21 | 6 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : $Header$
Description : Abstract syntax of temporal basic specifications
Copyright : (c) Klaus Hartke, Uni Bremen 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
p... | keithodulaigh/Hets | Temporal/AS_BASIC_Temporal.hs | gpl-2.0 | 1,324 | 0 | 6 | 355 | 247 | 142 | 105 | 28 | 0 |
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, Rank2Types,
FlexibleInstances, ExistentialQuantification,
DeriveDataTypeable #-}
-- | The BlazeMarkup core, consisting of functions that offer the power to
-- generate custom markup elements. It also offers user-centric functions,
-- ... | FranklinChen/blaze-markup | src/Text/Blaze/Internal.hs | bsd-3-clause | 17,403 | 0 | 11 | 4,409 | 2,795 | 1,621 | 1,174 | 290 | 17 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Network/Wai/Handler/Warp/Buffer.hs" #-}
{-# LANGUAGE BangPatterns, OverloadedStrings #-}
module Network.Wai.Handler.Warp.Buffer (
bufferSize
, allocateBuffer
, freeBuffer
, mallocBS
, newBufferPool
, withBufferPool
, toBuilderBuffer
, copy
, bufferIO
) where... | phischu/fragnix | tests/packages/scotty/Network.Wai.Handler.Warp.Buffer.hs | bsd-3-clause | 3,307 | 0 | 11 | 566 | 825 | 447 | 378 | 74 | 2 |
{-# LANGUAGE FlexibleContexts, FlexibleInstances, OverloadedStrings, MultiWayIf #-}
module Main where
import Control.Applicative
import Control.Arrow
import Control.Concurrent (MVar, newMVar, takeMVar, putMVar, threadDelay)
import Control.Monad (guard)
import Control... | FranklinChen/IHaskell | ipython-kernel/examples/Calc.hs | mit | 8,560 | 0 | 16 | 2,106 | 2,701 | 1,401 | 1,300 | 198 | 6 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Completion
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- Collection of functions for completion and matching.
module Yi.Completion
... | TOSPIO/yi | src/library/Yi/Completion.hs | gpl-2.0 | 5,587 | 0 | 11 | 1,375 | 1,245 | 665 | 580 | 83 | 5 |
<?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="el-GR">
<title>JSON View</title>
<maps>
<homeID>jsonview</homeID>
<mapref location="map... | kingthorin/zap-extensions | addOns/jsonview/src/main/javahelp/help_el_GR/helpset_el_GR.hs | apache-2.0 | 959 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
module Options.CodeGen where
import Types
codegenOptions :: [Flag]
codegenOptions =
[ flag { flagName = "-fasm"
, flagDescription =
"Use the :ref:`native code generator <native-code-gen>`"
, flagType = DynamicFlag
, flagReverse = "-fllvm"
}
, flag { flagName = "-fllv... | siddhanathan/ghc | utils/mkUserGuidePart/Options/CodeGen.hs | bsd-3-clause | 1,052 | 0 | 7 | 346 | 172 | 112 | 60 | 26 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.Monitors.CpuFreq
-- Copyright : (c) Juraj Hercek
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Juraj Hercek <juhe_haskell@hck.sk>
-- Stability : unstable
-- Portability : unportable
--
--... | dsalisbury/xmobar | src/Plugins/Monitors/CpuFreq.hs | bsd-3-clause | 1,409 | 0 | 16 | 259 | 244 | 139 | 105 | 16 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.