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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- Constants.hs ---
--
-- Filename: Constants.hs
-- Description:
-- Author: Manuel Schneckenreither
-- Maintainer:
-- Created: Thu Sep 4 10:46:58 2014 (+0200)
-- Version:
-- Package-Requires: ()
-- Last-Updated: Mon Oct 2 11:17:48 2017 (+0200)
-- By: Manuel Schneckenreither
-- Update #: 100
-- URL:
-- D... | ComputationWithBoundedResources/ara-inference | src/Data/Rewriting/ARA/Constants.hs | mit | 779 | 0 | 5 | 144 | 80 | 62 | 18 | 8 | 1 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.HdfsProtos.ChecksumTypeProto (ChecksumTypeProto(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Ty... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/HdfsProtos/ChecksumTypeProto.hs | mit | 2,867 | 0 | 11 | 439 | 662 | 361 | 301 | 56 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module Y2021.M01.D21.Solution where
import Y2021.M01.D20.Solution -- for wineries
import Data.Aeson.WikiDatum (Name)
import Graph.Query
import Graph.JSON.Cypher
import qualified Graph.JSON.Cypher.Read.Rows as RR
{--
Okay, yesterday, we got so... | geophf/1HaskellADay | exercises/HAD/Y2021/M01/D21/Solution.hs | mit | 3,234 | 0 | 11 | 547 | 370 | 214 | 156 | 32 | 1 |
-- | A haskell library for representing web pages.
--
-- This library is a collection of web page abstractions, together with a reimagining of <http://hackage.haskell.org/package/suavemente suavemente>.
--
-- I wanted to expose the server delivery mechanism, switch the streaming nature of the gap between a web page and... | tonyday567/lucid-page | src/Web/Rep.hs | mit | 1,645 | 0 | 5 | 369 | 285 | 202 | 83 | 51 | 0 |
--------------------------------------------------------------------
-- |
-- Copyright : (c) 2015 Smelkov Ilya
-- License : MIT
-- Maintainer: Smelkov Ilya <triplepointfive@gmail.com>
-- Stability : experimental
-- Portability: non-portable
--
-- Implementation of the post processing step to generate face
-- norm... | triplepointfive/soten | src/Codec/Soten/PostProcess/GenFaceNormals.hs | mit | 2,114 | 0 | 14 | 498 | 514 | 287 | 227 | 35 | 4 |
-- |Imports encapsulation, only.
module MMM.Core.All(
module MMM.Core.CompComb
, module MMM.Core.FuncComb
, module MMM.Core.Probability
, module MMM.Core.Distributive
) where
import MMM.Core.CompComb
import MMM.Core.FuncComb
import MMM.Core.Probability
import MMM.Core.Distributive
| VictorCMiraldo/mmm | MMM/Core/All.hs | mit | 297 | 0 | 5 | 42 | 62 | 43 | 19 | 9 | 0 |
module Language.Binal.Optimizer where
import qualified Data.Maybe as Maybe
import Language.Binal.Types
import qualified Language.Binal.Util as Util
isNotCall :: String -> TypedAST -> Bool
isNotCall _ (TyLit _ _ _) = True
isNotCall name (TyList (TyLit (SymLit "^") _ _:_:body:[]) _ _) = isNotCall nam... | pasberth/binal1 | Language/Binal/Optimizer.hs | mit | 5,150 | 0 | 21 | 1,049 | 2,683 | 1,342 | 1,341 | 78 | 4 |
{-----------------------------------------------------------------------------------------
Module name: URLEncoding.Serializable
Made by: Tomas Möre 2015
Simply serves as a class for diffrent serializable objects
------------------------------------------------------------------------------------------}
{-# LANGUA... | black0range/Smutt | src/Smutt/Util/URLEncoding/Serializable.hs | mit | 1,158 | 0 | 10 | 175 | 237 | 130 | 107 | 20 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html
module Stratosphere.ResourceProperties.IAMGroupPolicy where
import Stratosphere.ResourceImpo... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/IAMGroupPolicy.hs | mit | 1,749 | 0 | 13 | 216 | 252 | 145 | 107 | 29 | 1 |
module Regex(parseRegex,t) where
import Data.Char
import Control.Monad.Identity
import Control.Monad.Error
import Control.Monad.State
{-
regex - '/' --> body
body - nterm not * / \ --> First char
body - \ nterm --> First char
first char -- nterm not / \ --> otherchars
first char -- \ nterm --> otherchars
other chars... | nbrunt/JSHOP | src/old/ver2/Regex.hs | mit | 2,320 | 2 | 13 | 465 | 930 | 473 | 457 | 34 | 1 |
import Control.Arrow
import Data.IORef
import Data.List
import Data.Maybe
import Data.Time.Format
import Graphics.UI.Gtk
import System.Exit
import System.Information.CPU
import System.Information.Memory
import System.Information.Network
import System.Process
import System.Taffybar
import System.Taffybar.Battery
import ... | Undeterminant/config-home-gui | home/.config/taffybar/taffybar.hs | cc0-1.0 | 8,404 | 0 | 21 | 3,155 | 2,274 | 1,188 | 1,086 | -1 | -1 |
-- | builds basic OBDDs
module OBDD.Make
( constant, unit, variable )
where
import OBDD.Data
import Data.Map ( Map )
import qualified Data.Map as M
constant :: Ord v => Bool -> OBDD v
constant b = make $ do
register $ Leaf b
-- | Variable with given parity
unit :: Ord v => v -> Bool -> OBDD v
unit v p = mak... | jwaldmann/haskell-obdd | src/OBDD/Make.hs | gpl-2.0 | 480 | 0 | 10 | 133 | 199 | 101 | 98 | 15 | 1 |
module Sets.Algebra.Complement where
import Notes
import Logic.PropositionalLogic.Macro
import Sets.Algebra.Difference.Terms
import Sets.Algebra.Intersection.Terms
import Sets.Algebra.Union.Terms
import Sets.Basics.Terms
import Sets.Algebra.Compl... | NorfairKing/the-notes | src/Sets/Algebra/Complement.hs | gpl-2.0 | 5,905 | 0 | 23 | 2,033 | 2,603 | 1,386 | 1,217 | 120 | 1 |
{- | Utility functions for Data.EventList.Relative.TimeBody. -}
module Data.Rhythm.EventList where
import qualified Data.EventList.Relative.TimeBody as RTB
import qualified Numeric.NonNegative.Class as NN
import Data.Traversable (traverse)
import Control.Applicative (Applicative)
import Control.Monad (guard)
import Pr... | mtolly/rhythm | src/Data/Rhythm/EventList.hs | gpl-3.0 | 1,325 | 0 | 13 | 265 | 489 | 263 | 226 | 22 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Scryptic.Language.AbsScrypt where
-- Haskell module generated by the BNF converter
import Data.Data (Data,Typeable)
import GHC.Generics (Generic)
newtype Ident = Ident String deriving (Eq,Ord,Show,Data,Typeable,Generic)
data Scrypt =
OneBlo... | JohnLato/scryptic | src/Scryptic/Language/AbsScrypt.hs | gpl-3.0 | 1,521 | 0 | 7 | 265 | 590 | 325 | 265 | 59 | 0 |
{-# LANGUAGE TemplateHaskell, BangPatterns, FlexibleInstances, RecordWildCards, RankNTypes, OverloadedStrings, NamedFieldPuns #-}
module Game where
import qualified Data.Map.Strict as M
import qualified Data.Sequence as S
import Data.Sequence.Lens
import Data.Sequence (ViewL(..), ViewR(..), (|>), (<|), Seq)
import qua... | mikeplus64/plissken | src/Game.hs | gpl-3.0 | 14,643 | 0 | 19 | 4,355 | 5,319 | 2,683 | 2,636 | -1 | -1 |
import "hint" HLint.Builtin.All
import "hint" HLint.Default
import "hint" HLint.Dollar
import Data.Map
import Control.Arrow
import Control.Monad
ignore "Use section"
warn = f . g $ x ==> f $ g x where
-- https://github.com/ndmitchell/hlint/blob/master/src/HSE/Util.hs
-- _ = not (isInfixApp x || isApp x || i... | xkollar/handy-haskell | hlint/HLint.hs | gpl-3.0 | 2,953 | 0 | 10 | 601 | 1,289 | 684 | 605 | -1 | -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.BigQuery.Ty... | brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | 504,664 | 0 | 57 | 118,454 | 87,762 | 50,563 | 37,199 | 9,787 | 1 |
{-
This file is part of Adaptive.
Adaptive is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Adaptive is dis... | HackerFoo/Adaptive | Data/Adaptive.hs | lgpl-3.0 | 10,227 | 1 | 13 | 2,619 | 3,036 | 1,563 | 1,473 | 184 | 3 |
----------------------------------------------------------------------
-- |
-- Module : Graphics.UI.Awesomium.Javascript
-- Copyright : (c) 2012 Maksymilian Owsianny
-- License : LGPL-3 (see the file LICENSE)
--
-- Maintainer : Maksymilian.Owsianny+Awesomium@gmail.com
-- Stability : Experimental
-- ... | MaxOw/awesomium | src/Graphics/UI/Awesomium/Javascript.hs | lgpl-3.0 | 4,147 | 0 | 22 | 951 | 1,103 | 588 | 515 | -1 | -1 |
module PrettyJSON
(renderJValue
)where
import Numeric (showHex)
import Data.Char (ord)
import Data.Bits (shiftR, (.&.))
import SimpleJSON (JValue(..))
import Prettify (Doc, (<>), char, double, fsep, hcat, punctuate, text, compact, pretty)
renderJValue :: JValue -> Doc
renderJValue (JBool True) = text "true"
r... | aniketd/learn.haskell | RWH/4_and_before/SimpleJSON/PrettyJSON.hs | unlicense | 1,806 | 0 | 12 | 477 | 744 | 383 | 361 | 44 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Model where
import Database.Persist.TH
share [mkPersist sqlSettings, mkMigrate "migrateAll"... | rnons/xmppbot | Model.hs | unlicense | 494 | 0 | 7 | 122 | 40 | 26 | 14 | 9 | 0 |
module Main where
import Text.Show.Pretty (ppShow)
import Parser
import Codegen
import Emit
import Control.Monad.Trans
import System.IO
import System.Environment
import System.Console.Haskeline
import qualified LLVM.General.AST as AST
initModule :: AST.Module
initModule = emptyModule "my cool jit"
process :: AST... | eigengo/hwsexp | Main.hs | apache-2.0 | 1,117 | 0 | 17 | 276 | 386 | 190 | 196 | 39 | 3 |
module Control.Distributed.Process.Monitoring (
statsCollector
) where
import Control.Distributed.Process (Process, ProcessId, getSelfPid)
statsCollector :: Process ProcessId
statsCollector = getSelfPid
| lucasdicioccio/distributed-process-monitoring | src/Control/Distributed/Process/Monitoring.hs | apache-2.0 | 214 | 0 | 5 | 29 | 43 | 27 | 16 | 5 | 1 |
type Birds = Int
type Pole = (Birds, Birds)
landLeft :: Birds -> Pole -> Pole
landLeft n (left, right) = (left + n, right)
landRight :: Birds -> Pole -> Pole
landRight n (left, right) = (left, right + n)
landLeft' :: Birds -> Pole -> Maybe Pole
landLeft' n (left, right)
| abs ((left + n) - right) < 4 = Just (... | EricYT/Haskell | src/chapter-13-2.hs | apache-2.0 | 606 | 0 | 13 | 175 | 279 | 148 | 131 | 16 | 1 |
-- | Module that defines the behaviour of constants in the CAS
module Expr.Const
(
fromInteger
)
where
import Prelude hiding (fromInteger) -- Hide fromInteger since we are defining a function with this very name in this module
import Expr (Expr(Atom, Symbol))
-- We define a utility method fo... | abid-mujtaba/haskell-cas | src/Expr/Const.hs | apache-2.0 | 1,254 | 0 | 7 | 251 | 68 | 42 | 26 | 7 | 1 |
-- | Low-level messaging between this client and the MongoDB server, see Mongo
-- Wire Protocol (<http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol>).
--
-- This module is not intended for direct use. Use the high-level interface at
-- "Database.MongoDB.Query" and "Database.MongoDB.Connection" instead.
{-# LANGU... | selectel/mongoDB-haskell | Database/MongoDB/Internal/Protocol.hs | apache-2.0 | 13,517 | 0 | 15 | 2,944 | 2,603 | 1,430 | 1,173 | 233 | 4 |
{-# LANGUAGE BangPatterns #-}
import qualified Data.ByteString.Char8 as C
import qualified Data.IntMap as Map
import Data.Array.Unboxed
facts = listArray (1, 20) [
[ (1, 1) ]
, [ (2, 1) ]
, [ (3, 1) ]
, [ (2, 2) ]
, [ (5, 1) ]
, [ (2, 1), (3, 1) ]
, [ (7, 1) ]
, [ (2, 3) ]
, [ (3, 2) ]
, [ (2, 1)... | wangbj/haskell | guessthe.hs | bsd-2-clause | 2,223 | 0 | 17 | 851 | 1,290 | 754 | 536 | 78 | 6 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
-- |Here we use the stuff defined in the AST and Parsec modules
-- to parse things.
module Language.Sh.Parser ( parse, hereDocsComplete ) where
import Language.Sh.Parser.Internal
import Language.Sh.Parser.Parsec
import Language.Sh.Sy... | shicks/shsh | Language/Sh/Parser.hs | bsd-3-clause | 26,534 | 0 | 21 | 11,808 | 6,207 | 3,094 | 3,113 | 442 | 6 |
module Language.Haskell.GhcMod.Browse (
browseModule
, browse
, browseAll)
where
import Control.Applicative ((<$>))
import Control.Monad (void)
import Data.Char (isAlpha)
import Data.List (sort)
import Data.Maybe (catMaybes)
import FastString (mkFastString)
import GHC (Ghc, GhcException(CmdLineError), Module... | yuga/ghc-mod | Language/Haskell/GhcMod/Browse.hs | bsd-3-clause | 5,710 | 0 | 15 | 1,269 | 1,643 | 841 | 802 | 112 | 3 |
{-# LANGUAGE DeriveGeneric #-}
module Language.Wart.Scheme.Syntax (Scheme (..)) where
import GHC.Generics (Generic)
data Scheme a = G deriving Generic
| sonyandy/wart | src/Language/Wart/Scheme/Syntax.hs | bsd-3-clause | 153 | 0 | 5 | 21 | 39 | 26 | 13 | 4 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-
Example adapted from SYB
========================
-}
module Main (main) where
import Control.Lens
import Control.Monad (void)
import Data.Generics.Product
import GHC.... | kcsongor/generic-lens | generic-lens/test/syb/Tree.hs | bsd-3-clause | 2,445 | 0 | 13 | 658 | 598 | 333 | 265 | 37 | 1 |
{-# OPTIONS_GHC -Wall #-}
-- |This is the expansion module. It provides an interface for a monad
-- in which expansions can happen, and then defines the expansions.
module Language.Sh.Expansion ( ExpansionFunctions(..),
noGlobExpansion,
expand, expandWord... | shicks/shsh | Language/Sh/Expansion.hs | bsd-3-clause | 12,860 | 0 | 17 | 4,283 | 3,402 | 1,726 | 1,676 | 174 | 13 |
module Main
where
import Minimax
import TicTacToe
import Data.Array.Diff
getNum :: IO Int
getNum = getLine >>= (\numStr -> return (read numStr))
humanMoveGS gs@(TTTGameState b p) = do
moveInt <- getNum
newB <- return (setSquare b moveInt p)
newGS <- return (TTTGameState newB (switc... | tylerprete/haskell-minimax-games | app/runtictactoe.hs | bsd-3-clause | 1,529 | 0 | 14 | 458 | 629 | 313 | 316 | 36 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Data.ByteString as B
import Control.Concurrent (forkIO)
import Control.Concurrent.MVar
import Control.Monad
import Control.Monad.Trans.Resource
import Control.Monad.IO.Class (liftIO)
import Network.Connection
import Data.Conduit
import qualified ... | sdroege/conduit-connection | tests/Tests.hs | bsd-3-clause | 2,416 | 0 | 20 | 706 | 702 | 357 | 345 | 68 | 2 |
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.Functions.F24
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : por... | haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F24.hs | bsd-3-clause | 66,595 | 0 | 16 | 8,933 | 10,548 | 5,451 | 5,097 | 1,092 | 1 |
module Promote.GenDefunSymbols where
import Data.Singletons (Apply, type (~>))
import Data.Singletons.TH (genDefunSymbols)
import GHC.TypeLits hiding (type (*))
import Data.Kind (Type)
type family LiftMaybe (f :: a ~> b) (x :: Maybe a) :: Maybe b where
LiftMaybe f Nothing = Nothing
LiftMaybe f (Just a) = Just... | goldfirere/singletons | singletons-base/tests/compile-and-dump/Promote/GenDefunSymbols.hs | bsd-3-clause | 436 | 1 | 9 | 83 | 181 | 106 | 75 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.VertexArrayObject
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portab... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/VertexArrayObject.hs | bsd-3-clause | 825 | 0 | 4 | 110 | 51 | 41 | 10 | 7 | 0 |
{- |
Module : SAWScript.Provers.Rewrite
Description : Useful rewrites.
Maintainer : GaloisInc
Stability : provisional
-}
{-# LANGUAGE OverloadedStrings #-}
module SAWScript.Prover.Rewrite where
import Verifier.SAW.Rewriter
( Simpset, emptySimpset, addRules, RewriteRule
, scEqsRewriteRules, ... | GaloisInc/saw-script | src/SAWScript/Prover/Rewrite.hs | bsd-3-clause | 2,077 | 0 | 12 | 668 | 427 | 245 | 182 | 61 | 2 |
-- module Agpl_lib where
-- import Agpl_syntax
-- import Data.Matrix
-- game :: GameState
-- game = undefined
-- playerToPiece :: Player -> Piece
-- playerToPiece = undefined
isFull b = mfold (\((i, j), piece, acc) -> if piece == Nil then False else (True && acc)) True b
xor :: Bool -> Bool -> Bool
xor True True = F... | matthew-eads/agpl | Agpl_lib.hs | isc | 3,349 | 0 | 23 | 1,173 | 1,539 | 850 | 689 | -1 | -1 |
{-# LANGUAGE TypeOperators #-}
{-|
Module : DeepLearning.Util
Description : Deep Learning
Copyright : (c) Andrew Tulloch, 2014
License : GPL-3
Maintainer : andrew+cabal@tullo.ch
Stability : experimental
Portability : POSIX
-}
module DeepLearning.Util where
import Data.Array.Repa
import ... | silky/deeplearning-hs | DeepLearning/Util.hs | mit | 883 | 0 | 8 | 223 | 159 | 90 | 69 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Name.Name(
Module(..),
Name,
Class,
NameType(..),
ToName(..),
ffiExportName,
fromModule,
fromTypishHsName,
fromValishHsName,
getIdent,
getModule,
isConstructorLike,
isTypeNamespace,
isValNamespace,
mainModule,
prel... | dec9ue/jhc_copygc | src/Name/Name.hs | gpl-2.0 | 6,100 | 0 | 14 | 1,435 | 2,519 | 1,334 | 1,185 | -1 | -1 |
module Protocol.ROC.Internal
(
) where
| jqpeterson/roc-translator | src/Protocol/ROC/Internal.hs | bsd-3-clause | 47 | 0 | 3 | 13 | 10 | 7 | 3 | 2 | 0 |
{-# LANGUAGE CPP, GADTs, UnboxedTuples #-}
-----------------------------------------------------------------------------
--
-- Monad for Stg to C-- code generation
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module StgCmmMonad (
... | spacekitteh/smcghc | compiler/codeGen/StgCmmMonad.hs | bsd-3-clause | 28,875 | 0 | 14 | 7,619 | 5,374 | 2,944 | 2,430 | 426 | 1 |
-- test-suite/HLint.hs
module Main (main) where
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
arguments :: [String]
arguments =
[ "src" ]
main :: IO ()
main = do
hints <- hlint arguments
if null hints then exitSuccess else exitFailure
| solatis/dissent | test/HLint.hs | mit | 288 | 0 | 8 | 54 | 89 | 51 | 38 | 10 | 2 |
-- | A first example in equalional reasoning.
-- | From the definition of append we should be able to
-- | semi-automatically prove the two axioms.
-- | Note for soundness we need
-- | totallity: all the cases should be covered
-- | termination: we cannot have diverging things into proofs
{-@ LIQUID "--totality" ... | ssaavedra/liquidhaskell | tests/equationalproofs/pos/AppendVerbose.hs | bsd-3-clause | 3,022 | 0 | 17 | 878 | 834 | 431 | 403 | 48 | 1 |
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RecordWildCards #-}
-- | The Config type.
module Stack.Ty... | wskplho/stack | src/Stack/Types/Config.hs | bsd-3-clause | 36,365 | 0 | 17 | 8,991 | 7,027 | 3,759 | 3,268 | 746 | 3 |
module TurtleState (
TurtleState(..),
initialTurtleState,
pencolor',
pencolor_,
setPencolor,
SVG(..),
Position(..),
Color(..),
colorToWord32
) where
import Data.Word(Word32)
import Data.Bits
import Text.XML.YJSVG
pencolor' :: TurtleState -> Color
pencolor' t =
RGB (round $ red t * 0xff) (round $ green t * 0... | YoshikuniJujo/wxturtle | tools/TurtleState.hs | bsd-3-clause | 1,803 | 96 | 13 | 380 | 825 | 473 | 352 | 70 | 1 |
{-#Language BangPatterns, TupleSections, FlexibleContexts #-}
module Csound.Control.Evt(
Evt(..), Bam, Tick,
-- * Core functions
boolToEvt, evtToBool, sigToEvt, evtToSig, stepper,
filterE, filterSE, accumSE, accumE, filterAccumE, filterAccumSE,
Snap, snapshot, snaps, snaps2, sync, syncBpm,
... | isomorphism/csound-expression | src/Csound/Control/Evt.hs | bsd-3-clause | 12,319 | 0 | 15 | 2,812 | 3,642 | 1,959 | 1,683 | 162 | 2 |
import StackTest
import System.Directory
import System.FilePath
import System.Info (os)
main :: IO ()
main = do
-- install in relative path
removeDirIgnore "bin"
createDirectory "bin"
stack [defaultResolverArg, "--local-bin-path", "./bin", "install" , "happy"]
doesExist ("./bin/happy" ++ exeExt)
-- Defaul... | juhp/stack | test/integration/tests/443-specify-path/Main.hs | bsd-3-clause | 1,013 | 0 | 11 | 165 | 197 | 105 | 92 | 17 | 1 |
undef = undef
eq :: Eq a => a -> a -> Bool
_ `eq` _ = undef
f xs y = xs `eq` [y]
f' :: (Monad m, Eq (m a)) => a -> m a -> Bool
f' x y = return x == y
| themattchan/tandoori | input/class-red.hs | bsd-3-clause | 166 | 0 | 8 | 63 | 112 | 58 | 54 | 6 | 1 |
{-# LANGUAGE RecordWildCards, ViewPatterns #-}
module Distribution.Server.Features.PreferredVersions.Backup
( restorePreferredVersions
, backupPreferredVersions
) where
import Distribution.Server.Framework.BackupRestore
import Distribution.Server.Framework.BackupDump
import Distribution.Server.Features.Preferred... | mpickering/hackage-server | Distribution/Server/Features/PreferredVersions/Backup.hs | bsd-3-clause | 4,853 | 0 | 12 | 1,031 | 1,117 | 591 | 526 | 86 | 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="pl-PL">
<title>JSON View</title>
<maps>
<homeID>jsonview</homeID>
<mapref location="map... | kingthorin/zap-extensions | addOns/jsonview/src/main/javahelp/help_pl_PL/helpset_pl_PL.hs | apache-2.0 | 959 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
module RightSectionIn1 where
{- map2 xs = map (1 +) xs -}
map2 xs = (case ((+ 1), xs) of
(f, []) -> []
(f, (x : xs)) -> (f x) : (map2 xs))
| SAdams601/HaRe | old/testing/generativeFold/RightSectionIn1_TokOut.hs | bsd-3-clause | 172 | 0 | 11 | 67 | 81 | 47 | 34 | 4 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Yesod.Form.Types
( -- * Helpers
Enctype (..)
, FormResult (..)
, FormMessage (..)
, Env
, FileEnv
, Ints (..)
... | ygale/yesod | yesod-form/Yesod/Form/Types.hs | mit | 5,513 | 0 | 17 | 1,561 | 1,710 | 950 | 760 | 141 | 0 |
module GitShow where
import qualified Github.Repos.Commits as Github
import Data.List
main = do
possibleCommit <- Github.commit "thoughtbot" "paperclip" "bc5c51d1ece1ee45f94b056a0f5a1674d7e8cba9"
case possibleCommit of
(Left error) -> putStrLn $ "Error: " ++ (show error)
(Right commit) -> putStrLn $ fo... | mavenraven/github | samples/Repos/Commits/GitShow.hs | bsd-3-clause | 986 | 0 | 16 | 185 | 281 | 143 | 138 | 22 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Network.Wai.Handler.Warp (defaultSettings, setPort)
import Network.Wai.Handler.WarpTLS
import Network.HTTP.Types (status200)
import Blaze.ByteString.Builder (copyByteString)
import Data.Monoid
import qualified Data.Conduit as C
import qualified Data.Conduit.L... | AndrewRademacher/wai | warp-tls/pong.hs | mit | 2,327 | 0 | 11 | 477 | 480 | 270 | 210 | 63 | 9 |
{-# LANGUAGE RecordWildCards, MonadComprehensions, TransformListComp, NamedFieldPuns #-}
module T3901 where
import GHC.Exts (groupWith)
data Rec = Rec {a :: Int} deriving (Show)
recs1 = [a | Rec {a=a} <- [Rec 1], then group by a using groupWith]
recs2 = [a | Rec {a} <- [Rec 1], then group by a using groupWith]
re... | forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/rename/should_compile/mc11.hs | bsd-3-clause | 470 | 0 | 10 | 92 | 199 | 112 | 87 | 9 | 1 |
{-# LANGUAGE UndecidableInstances #-}
module T7279 where
data T a = MkT
instance (Eq a, Show b) => Eq (T a)
| wxwxwwxxx/ghc | testsuite/tests/typecheck/should_fail/T7279.hs | bsd-3-clause | 110 | 0 | 7 | 23 | 41 | 23 | 18 | 4 | 0 |
{-# LANGUAGE Rank2Types, KindSignatures #-}
module T7368 where
newtype Bad w = Bad (forall a. (w a -> a))
-- Bad :: forall w. (forall a. w a -> a) -> Bad w
fun :: forall (f :: * -> *). f (Bad f) -> Bool
fun (Bad x) = True
{- f (Bad f) ~ Bad w
-->
f ~ Bad
Bad f ~ w
-}
| urbanslug/ghc | testsuite/tests/typecheck/should_fail/T7368a.hs | bsd-3-clause | 281 | 0 | 10 | 80 | 81 | 47 | 34 | 5 | 1 |
module TestSuites.ANNSpec(spec) where
--3rd party
import System.Directory (doesFileExist)
import Test.Hspec (hspec)
import Test.Hspec.Contrib.HUnit (fromHUnitTest)
import Test.HUnit
--own
import HelperFuncs (removeIfExists)
import ... | Taketrung/HsPredictor | tests/TestSuites/ANNSpec.hs | mit | 1,183 | 0 | 11 | 255 | 321 | 171 | 150 | 29 | 3 |
{-# LANGUAGE LambdaCase #-}
module Text.Docvim.Visitor.Command (extractCommand) where
import Control.Applicative
import Text.Docvim.AST
import Text.Docvim.Visitor
-- | Extracts a list of nodes (if any exist) identified by the `@command`
-- annotation of the source code.
extractCommand :: Alternative f => [Node] -> (... | wincent/docvim | lib/Text/Docvim/Visitor/Command.hs | mit | 477 | 0 | 10 | 100 | 103 | 60 | 43 | 10 | 2 |
{-# LANGUAGE NoMonomorphismRestriction
#-}
module Plugins.Gallery.Gallery.Manual48 where
import Diagrams.Prelude
no = (circle 1 <> hrule 2 # rotateBy (1/8))
# lw 0.2 # lc red
example = no <> image "static/phone.png" 1.5 1.5
| andrey013/pluginstest | Plugins/Gallery/Gallery/Manual48.hs | mit | 239 | 0 | 11 | 48 | 76 | 40 | 36 | 6 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Models.User where
import Data.Aeson
import Data.Text
import Data.Text.Encoding (encodeUtf8)
import Data.UUID
import GHC.Generics
import Text.Email.Validate
-- * user info
data UserLevel = Base | Admin
deriving... | gigavinyl/ordermage | src/Models/User.hs | mit | 1,400 | 0 | 12 | 292 | 388 | 209 | 179 | 45 | 1 |
--------------------------------------------------------------------------------
-- (c) Tsitsimpis Ilias, 2011-2012
--
-- This module defines classes and functions for pretty-printing
--
--------------------------------------------------------------------------------
module Outputable (
printOutput,
printErrs,... | iliastsi/gac | src/main/Outputable.hs | mit | 2,449 | 0 | 12 | 418 | 534 | 292 | 242 | 50 | 2 |
{-|
Strict Deque API lifted to a State monad, \"mtl\"-style.
-}
module Deque.Strict.State
where
import Deque.Prelude hiding (tail, init, last, head, null, dropWhile, takeWhile, reverse)
import Deque.Strict (Deque)
import qualified Deque.Strict as Deque
import qualified Deque.Prelude as Prelude
{-|
\(\mathcal{O}(n)\)... | nikita-volkov/deque | library/Deque/Strict/State.hs | mit | 4,088 | 0 | 12 | 691 | 1,134 | 584 | 550 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Main
-- Copyright : 2014 © Futurice OY, Oleg Grenrus
-- License : MIT (see the file LICENSE)
--
-- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi>
-- Stability : experimental
-- Portability : non-portable ... | futurice/pulmurice-client | src/Main.hs | mit | 5,723 | 0 | 19 | 1,262 | 1,618 | 784 | 834 | 114 | 9 |
module Utils where
import qualified SDL.Video.Renderer as SDL
import qualified SDL.Vect as SDL
import Foreign.C.Types
import Data.List
import System.Random
data Direction
= DirectionRight
| DirectionLeft
| DirectionUp
| DirectionDown
deriving (Show, Eq, Enum)
directionVec :: Direction -> (Int, Int)
direc... | Lignum/Tetoris | src/Utils.hs | mit | 1,303 | 0 | 11 | 222 | 424 | 239 | 185 | 36 | 1 |
module Control.Arrow.Signal(liftSignal) where
import Prelude hiding ((.), id)
import Control.Category
import Control.Arrow
liftSignal :: (ArrowChoice a) => a b (Maybe c) -> a (Maybe b) (Maybe c)
liftSignal a = arr cFromMaybe >>> right a >>> arr cToMaybe
where cFromMaybe Nothing = Left ()
cFromMaybe (Just ... | prophile/trivial-wire | Control/Arrow/Signal.hs | mit | 465 | 0 | 11 | 114 | 192 | 99 | 93 | 11 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import App
import AppConfig as Config (AppConfig(..), readConfig)
import Messaging.Job as Job
import CommonCreatures (WithErr)
import Control.Monad.Except (runExceptT, throwError)
import Control.Monad.Reader
import qualified Data.Aeson as Aeson
import Features.Feat... | gust/feature-creature | legacy/exe-search-service/Main.hs | mit | 3,199 | 0 | 21 | 526 | 963 | 497 | 466 | 73 | 2 |
module Main where
import Prelude hiding (Left, Right)
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
-- 1. Nope
data Nope a =
NopeDataJpg
deriving (Eq, Show)
instance Functor Nope where
fmap _ _ = NopeDataJpg
instance Applicative Nope where
pure _ = NopeDataJpg
_ <*... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter18/ChapterExercises187/src/Main.hs | mit | 2,953 | 0 | 10 | 691 | 1,300 | 661 | 639 | 92 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module ScalarMultProperties (
testScalarMult
) where
import Util
import Crypto.Saltine.Class
import Crypto.Saltine.Core.ScalarMult
import qualified Data.ByteString as S
import Data.Maybe (f... | tel/saltine | tests/ScalarMultProperties.hs | mit | 2,560 | 0 | 15 | 536 | 881 | 528 | 353 | 57 | 1 |
-- xmonad: Personal module: Hook Log
-- Author: Simon L. J. Robin | https://sljrobin.org
--------------------------------------------------------------------------------
module Hook_Log where
--------------------------------------------------------------------------------
-- * `System.IO` -> Standar... | sljrobin/dotfiles | xmonad/.xmonad/lib/Hook_Log.hs | gpl-2.0 | 2,783 | 1 | 13 | 755 | 296 | 177 | 119 | 27 | 9 |
<%
/*
*
* hello.hs
* Famous "Hello World"!
*
* Written by Felipe Coury <fcoury@flexsys-ci.com>
* www - http://www.harbour-project.org
*
*/
FUNCTION Main()
// Add content-type parameter if using active page on a Web Server
IF !empty( GetEnv( "SERVER_NAME" ) )
OutStd( "HTTP/1.0 200 OK" + chr(10) )
O... | xharbour/core | samples/hscript/hello.hs | gpl-2.0 | 716 | 41 | 37 | 149 | 340 | 176 | 164 | -1 | -1 |
module Pudding.Storage.Header
( Header
, byteHeader
, parseHeader
) where
import Data.ByteString (ByteString)
class Header a where
byteHeader :: a -> ByteString
parseHeader :: ByteString -> a
| jfulseca/Pudding | src/Pudding/Storage/Header.hs | gpl-3.0 | 198 | 0 | 7 | 33 | 55 | 32 | 23 | 8 | 0 |
import Prelude hiding (elem, (++), (!!))
quickSort [] = []
quickSort (x:xs) = quickSort less ++ [x] ++ quickSort more
where less = filter (<=x) xs
more = filter (>x) xs
factorial x = if x > 1 then x * factorial(x - 1) else 1
l = [1, 2, 3]
myMap f l = [f x | x <- l] -- list comprehension
myFilter p l = [x... | antonpetkoff/learning | haskell/fmi-fp/intro.hs | gpl-3.0 | 1,631 | 0 | 11 | 498 | 716 | 402 | 314 | 30 | 2 |
-- Main.hs - Lexical data collection tool
-- Copyright (C) 2015 Quytelda Kahja <quytelda@tamalin.org>
--
-- This file is part of LEXicality.
--
-- LEXicality 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, e... | quytelda/lexicality-haskell | src/Main.hs | gpl-3.0 | 4,410 | 0 | 14 | 1,207 | 969 | 530 | 439 | 95 | 1 |
module Physics.Body
( Body(..)
, bodyF
, bodyFPure
, bodyFConstrained
) where
-- import FRP.Netwire
import Control.Category
import Control.Monad.Writer.Strict
import Control.Wire
import Data.Maybe (mapMaybe, isJust, fromMaybe)
import Linear.Metric
import Linear.V3
import Linear.Vector
import... | mstksg/netwire-experiments | src/Physics/Body.hs | gpl-3.0 | 4,814 | 1 | 23 | 1,399 | 1,238 | 685 | 553 | -1 | -1 |
module ConfigSpec where
import Config
import Test.Hspec
spec :: Spec
spec = do
describe "configSpec.getValue" $ do
it "returns the corresponding value to a key" $
getValue [("key","value")] "key" `shouldBe` "value"
it "returns empty if the value isn't found" $
getValue [] "... | jmittert/shush | test/ConfigSpec.hs | gpl-3.0 | 815 | 0 | 14 | 236 | 214 | 114 | 100 | 21 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveDataTypeable #-}
--------------------------------------------------------------------------------
-- |
-- Module : Tct.Method.Predicates
-- Copyright : (c) Martin Avanzini <martin.avanzini@uibk.ac.at>,
-- Georg Moser <georg.moser@uibk.ac.at>,
... | mzini/TcT | source/Tct/Method/Predicates.hs | gpl-3.0 | 9,846 | 0 | 17 | 2,259 | 2,067 | 1,123 | 944 | 177 | 2 |
module Ast where
data Module =
Module
{ m_name :: Id
, m_bindings :: [Binding]
}
data Binding =
Binding
{ b_lhs :: Expr
, b_rhs :: Expr
}
type Id = String
type Block = [Stmt]
data Expr =
Func [Id] Block
| Call Expr [Expr]
| Use Id
| Index Expr Expr
| Literal LitVal
| Array [Exp... | ktvoelker/hjc | Ast.hs | gpl-3.0 | 630 | 0 | 9 | 192 | 211 | 128 | 83 | 35 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Ampersand.Output.Population2Xlsx
(fSpec2PopulationXlsx)
where
import Ampersand.Basics
import Ampersand.ADL1(AAtomValue(..),HasSignature(..),aavstr)
import Ampersand.FSpec
import Codec.Xlsx
import qualified Data.ByteString.Lazy as L
imp... | AmpersandTarski/ampersand | src/Ampersand/Output/Population2Xlsx.hs | gpl-3.0 | 4,248 | 1 | 26 | 1,846 | 974 | 521 | 453 | 74 | 12 |
module Main where
import Game
payoff :: Board -> Double
payoff b = (fromInt (monotonicity b)) - (jerk b)
options :: Integer -> Board -> [Board]
options i b = unfoldr (\(n, s) -> if n > i then Nothing else Just (s, (n+1, concat $ map ((zipWith ($) [left, right, up, down]).repeat) s))) (0, [b])
| diracdeltafunk/2048-hsAI | Main.hs | gpl-3.0 | 294 | 0 | 18 | 56 | 167 | 95 | 72 | 6 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-vault/gen/Network/Google/Resource/Vault/Matters/Close.hs | mpl-2.0 | 4,811 | 0 | 17 | 1,161 | 780 | 454 | 326 | 113 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Attachments/BatchDelete.hs | mpl-2.0 | 8,589 | 0 | 20 | 1,886 | 1,040 | 612 | 428 | 148 | 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-s3/gen/Network/AWS/S3/PutBucketLifecycle.hs | mpl-2.0 | 3,897 | 0 | 11 | 771 | 532 | 315 | 217 | 72 | 1 |
module ViperVM.VirtualPlatform.Objects.Matrix (
Matrix, matrixAllocate, matrixRelease, matrixTransfer,
createMatrix, matrixBuffer, matrixRegion, matrixCellType,
matrixWidth, matrixHeight, matrixDimensions, matrixPadding, matrixOffset,
matrixSubMatrix, matrixSubMatrixTrim, matrixSplit,
pokeHostFloatMatrix... | hsyl20/HViperVM | lib/ViperVM/VirtualPlatform/Objects/Matrix.hs | lgpl-3.0 | 5,287 | 0 | 17 | 1,117 | 1,698 | 904 | 794 | 102 | 3 |
{-
- Copyright 2012 Fabio Riga
-
- 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 i... | EffeErre/cbladmin | src/Helpers.hs | apache-2.0 | 1,468 | 0 | 11 | 310 | 215 | 116 | 99 | 17 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-| The data structures for the server part -}
module Spark.Server.Transform(
transform,
loadGraph
) where
import qualified Data.HashMap.Strict as HM
import qualified Data.Map.Strict as M
import qualified... | tjhunter/karps | haskell/src-server/Spark/Server/Transform.hs | apache-2.0 | 6,224 | 0 | 17 | 1,065 | 1,720 | 956 | 764 | 151 | 2 |
module Anagram.A279688 (a279688, a279688_list) where
import Helpers.AnagramHelper (possibleAnagramBases, nIsBaseBAnagramOf2n)
a279688 :: Int -> Integer
a279688 n = a279688_list !! (n - 1)
a279688_list :: [Integer]
a279688_list = 0 : filter isAnyAnagram [1..]
-- There exists some base such that n & 2n are anagrams.
i... | peterokagey/haskellOEIS | src/Anagram/A279688.hs | apache-2.0 | 421 | 0 | 8 | 61 | 114 | 63 | 51 | 8 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
module Main where
import ClassyPrelude
import Openshift.OapivApi
import qualified Openshift.V1.ProjectList as ProjectList
import qualified Openshift.V1.Project as Project
import Kubernetes.V1.ObjectMeta (name)
import Kubernetes.A... | minhdoboi/deprecated-openshift-haskell-api | example/Main.hs | apache-2.0 | 1,566 | 0 | 16 | 243 | 425 | 225 | 200 | 36 | 2 |
module Wham.AnalyzerTypes where
import Wham.SignExc
import Wham.SignBoolExc
import Wham.InterpreterTypes
import qualified Data.Map as Map
data AbstractMode = StateMode StateMode
| Both
deriving (Show)
type AbstractStack = Stack SignExc SignBoolExc
type AbstractStackElement = Stack... | helino/wham | src/Wham/AnalyzerTypes.hs | bsd-3-clause | 481 | 0 | 7 | 93 | 104 | 61 | 43 | 13 | 0 |
module Main where
import qualified Text.Parsec as Parsec
import qualified Text.Parsec.String as Parsec
p_hello :: Parsec.Parser String
p_hello = Parsec.string "Hello"
p_world :: Parsec.Parser String
p_world = Parsec.string "World"
p_hello_world :: Parsec.Parser String
p_hello_world = do
str1 <- p_hello
_... | christianlavoie/origami-computational-model | src/Hello.hs | bsd-3-clause | 845 | 0 | 13 | 210 | 260 | 128 | 132 | 27 | 2 |
module Main where
import Constraints
import Control.Concurrent
import Control.Concurrent.Async
import Text.Printf
import Data.IORef
main :: IO ()
main = do
threads <- getNumCapabilities
best'chan <- newChan
best'ref <- newIORef (undefined, -1)
let target = 0.95
getBest old@(best'ne,best'sc, _) = do
... | Tener/deeplearning-thesis | src/constraints-single-random-neuron.hs | bsd-3-clause | 2,040 | 0 | 20 | 741 | 570 | 280 | 290 | 47 | 3 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Pattern-matching bindings (HsBinds and MonoBinds)
Handles @HsBinds@; those at the top level require different handling,
in that the @Rec@/@NonRec@/etc structure is thrown away (whereas at
lower levels it is preserved with... | bitemyapp/ghc | compiler/deSugar/DsBinds.hs | bsd-3-clause | 41,997 | 0 | 22 | 12,898 | 6,780 | 3,520 | 3,260 | 428 | 21 |
{-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--totality" @-}
{-@ LIQUID "--exact-data-cons" @-}
{-@ LIQUID "--higherorderqs" @-}
module Peano where
import Prelude hiding (plus)
import Proves
-- Why do we need these?
zeroR :: Peano -> Proof
zeroL :: Peano -> Proof
plusAssoc :: Peano -> Peano -> Pean... | nikivazou/thesis | text/refinementreflection/Peano.hs | bsd-3-clause | 1,908 | 0 | 15 | 609 | 779 | 387 | 392 | 62 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Events where
import Prelude hiding (id)
import DataSource (defineTable)
$(defineTable
[]
"hatohol" "events" [])
| cosmo0920/ya-hatohol-house-keeper | src/Events.hs | bsd-3-clause | 236 | 0 | 8 | 37 | 44 | 26 | 18 | 9 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
The @match@ function
-}
{-# LANGUAGE CPP #-}
module Match ( match, matchEquations, matchWrapper, matchSimply, matchSinglePat ) where
#include "HsVersions.h"
import {-#SOURCE#-} DsExpr (dsLExpr, dsSyntaxExpr)
import Dy... | mettekou/ghc | compiler/deSugar/Match.hs | bsd-3-clause | 41,288 | 12 | 21 | 10,927 | 7,216 | 3,785 | 3,431 | 402 | 29 |
module ZTail.Tail (
tailText
) where
import Data.Array (Array, array, (//), (!))
import Text.Regex
import qualified Data.Char
import qualified System.Exit
import qualified System.Cmd
import qualified Data.Time.Clock
import qualified Data.Time.LocalTime
import qualified Data.Time.Format
import qualified System.Lo... | adarqui/ZTail-Lib | src/ZTail/Tail.hs | bsd-3-clause | 2,576 | 0 | 16 | 519 | 1,128 | 612 | 516 | -1 | -1 |
{-# LANGUAGE UnboxedTuples, MagicHash, DeriveDataTypeable #-}
{-# LANGUAGE ScopedTypeVariables, TypeOperators, DefaultSignatures, GADTs, TypeFamilies, FlexibleContexts, FlexibleInstances, UndecidableInstances #-}
-- |
-- Module : Data.Primitive.Types
-- Copyright : (c) Roman Leshchinskiy 2009-2010
-- License ... | reinerp/primitive | Data/Primitive/Types.hs | bsd-3-clause | 24,002 | 6 | 16 | 5,736 | 5,182 | 2,819 | 2,363 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.